summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml444
-rw-r--r--doc/classes/AABB.xml11
-rw-r--r--doc/classes/AStar.xml8
-rw-r--r--doc/classes/AStar2D.xml34
-rw-r--r--doc/classes/AcceptDialog.xml13
-rw-r--r--doc/classes/AnimatedSprite2D.xml (renamed from doc/classes/AnimatedSprite.xml)12
-rw-r--r--doc/classes/AnimatedSprite3D.xml6
-rw-r--r--doc/classes/AnimatedTexture.xml24
-rw-r--r--doc/classes/Animation.xml45
-rw-r--r--doc/classes/AnimationNode.xml30
-rw-r--r--doc/classes/AnimationNodeAdd2.xml3
-rw-r--r--doc/classes/AnimationNodeAdd3.xml3
-rw-r--r--doc/classes/AnimationNodeAnimation.xml5
-rw-r--r--doc/classes/AnimationNodeBlend2.xml3
-rw-r--r--doc/classes/AnimationNodeBlend3.xml3
-rw-r--r--doc/classes/AnimationNodeBlendSpace1D.xml11
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml13
-rw-r--r--doc/classes/AnimationNodeBlendTree.xml43
-rw-r--r--doc/classes/AnimationNodeOneShot.xml8
-rw-r--r--doc/classes/AnimationNodeOutput.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml57
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml14
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml10
-rw-r--r--doc/classes/AnimationNodeTimeScale.xml5
-rw-r--r--doc/classes/AnimationNodeTimeSeek.xml5
-rw-r--r--doc/classes/AnimationNodeTransition.xml135
-rw-r--r--doc/classes/AnimationPlayer.xml66
-rw-r--r--doc/classes/AnimationRootNode.xml2
-rw-r--r--doc/classes/AnimationTrackEditPlugin.xml2
-rw-r--r--doc/classes/AnimationTree.xml11
-rw-r--r--doc/classes/AnimationTreePlayer.xml660
-rw-r--r--doc/classes/Area2D.xml10
-rw-r--r--doc/classes/Area3D.xml (renamed from doc/classes/Area.xml)46
-rw-r--r--doc/classes/Array.xml118
-rw-r--r--doc/classes/ArrayMesh.xml68
-rw-r--r--doc/classes/AtlasTexture.xml9
-rw-r--r--doc/classes/AudioBusLayout.xml2
-rw-r--r--doc/classes/AudioEffect.xml2
-rw-r--r--doc/classes/AudioEffectAmplify.xml2
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml2
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectChorus.xml2
-rw-r--r--doc/classes/AudioEffectCompressor.xml4
-rw-r--r--doc/classes/AudioEffectDelay.xml2
-rw-r--r--doc/classes/AudioEffectDistortion.xml2
-rw-r--r--doc/classes/AudioEffectEQ.xml2
-rw-r--r--doc/classes/AudioEffectEQ10.xml2
-rw-r--r--doc/classes/AudioEffectEQ21.xml2
-rw-r--r--doc/classes/AudioEffectEQ6.xml2
-rw-r--r--doc/classes/AudioEffectFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectInstance.xml2
-rw-r--r--doc/classes/AudioEffectLimiter.xml2
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml2
-rw-r--r--doc/classes/AudioEffectPanner.xml2
-rw-r--r--doc/classes/AudioEffectPhaser.xml2
-rw-r--r--doc/classes/AudioEffectPitchShift.xml2
-rw-r--r--doc/classes/AudioEffectRecord.xml8
-rw-r--r--doc/classes/AudioEffectReverb.xml2
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzer.xml2
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzerInstance.xml2
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml2
-rw-r--r--doc/classes/AudioServer.xml74
-rw-r--r--doc/classes/AudioStream.xml2
-rw-r--r--doc/classes/AudioStreamGenerator.xml2
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml4
-rw-r--r--doc/classes/AudioStreamMicrophone.xml2
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/AudioStreamPlaybackResampled.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml10
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml8
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml8
-rw-r--r--doc/classes/AudioStreamRandomPitch.xml2
-rw-r--r--doc/classes/AudioStreamSample.xml18
-rw-r--r--doc/classes/BackBufferCopy.xml3
-rw-r--r--doc/classes/BakedLightmap.xml97
-rw-r--r--doc/classes/BakedLightmapData.xml34
-rw-r--r--doc/classes/BaseButton.xml12
-rw-r--r--doc/classes/BaseMaterial3D.xml710
-rw-r--r--doc/classes/Basis.xml14
-rw-r--r--doc/classes/BitMap.xml2
-rw-r--r--doc/classes/BitmapFont.xml9
-rw-r--r--doc/classes/Bone2D.xml2
-rw-r--r--doc/classes/BoneAttachment3D.xml (renamed from doc/classes/BoneAttachment.xml)4
-rw-r--r--doc/classes/BoxContainer.xml9
-rw-r--r--doc/classes/BoxShape3D.xml (renamed from doc/classes/BoxShape.xml)4
-rw-r--r--doc/classes/Button.xml17
-rw-r--r--doc/classes/ButtonGroup.xml2
-rw-r--r--doc/classes/CPUParticles2D.xml33
-rw-r--r--doc/classes/CPUParticles3D.xml (renamed from doc/classes/CPUParticles.xml)46
-rw-r--r--doc/classes/Callable.xml95
-rw-r--r--doc/classes/Camera2D.xml7
-rw-r--r--doc/classes/Camera3D.xml (renamed from doc/classes/Camera.xml)41
-rw-r--r--doc/classes/CameraEffects.xml45
-rw-r--r--doc/classes/CameraFeed.xml54
-rw-r--r--doc/classes/CameraServer.xml19
-rw-r--r--doc/classes/CameraTexture.xml8
-rw-r--r--doc/classes/CanvasItem.xml277
-rw-r--r--doc/classes/CanvasItemMaterial.xml10
-rw-r--r--doc/classes/CanvasLayer.xml4
-rw-r--r--doc/classes/CanvasModulate.xml2
-rw-r--r--doc/classes/CapsuleMesh.xml2
-rw-r--r--doc/classes/CapsuleShape2D.xml2
-rw-r--r--doc/classes/CapsuleShape3D.xml (renamed from doc/classes/CapsuleShape.xml)2
-rw-r--r--doc/classes/CenterContainer.xml2
-rw-r--r--doc/classes/CharFXTransform.xml34
-rw-r--r--doc/classes/CheckBox.xml33
-rw-r--r--doc/classes/CheckButton.xml33
-rw-r--r--doc/classes/CircleShape2D.xml2
-rw-r--r--doc/classes/ClassDB.xml62
-rw-r--r--doc/classes/ClippedCamera3D.xml (renamed from doc/classes/ClippedCamera.xml)12
-rw-r--r--doc/classes/CollisionObject2D.xml4
-rw-r--r--doc/classes/CollisionObject3D.xml (renamed from doc/classes/CollisionObject.xml)20
-rw-r--r--doc/classes/CollisionPolygon2D.xml13
-rw-r--r--doc/classes/CollisionPolygon3D.xml (renamed from doc/classes/CollisionPolygon.xml)6
-rw-r--r--doc/classes/CollisionShape2D.xml3
-rw-r--r--doc/classes/CollisionShape3D.xml (renamed from doc/classes/CollisionShape.xml)8
-rw-r--r--doc/classes/Color.xml222
-rw-r--r--doc/classes/ColorPicker.xml26
-rw-r--r--doc/classes/ColorPickerButton.xml18
-rw-r--r--doc/classes/ColorRect.xml2
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml4
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml (renamed from doc/classes/ConcavePolygonShape.xml)9
-rw-r--r--doc/classes/ConeTwistJoint3D.xml (renamed from doc/classes/ConeTwistJoint.xml)16
-rw-r--r--doc/classes/ConfigFile.xml50
-rw-r--r--doc/classes/ConfirmationDialog.xml11
-rw-r--r--doc/classes/Container.xml5
-rw-r--r--doc/classes/Control.xml256
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml6
-rw-r--r--doc/classes/ConvexPolygonShape3D.xml (renamed from doc/classes/ConvexPolygonShape.xml)6
-rw-r--r--doc/classes/Crypto.xml7
-rw-r--r--doc/classes/CryptoKey.xml3
-rw-r--r--doc/classes/CubeMap.xml99
-rw-r--r--doc/classes/CubeMesh.xml2
-rw-r--r--doc/classes/Cubemap.xml (renamed from doc/classes/SpatialGizmo.xml)2
-rw-r--r--doc/classes/CubemapArray.xml (renamed from doc/classes/TextureArray.xml)2
-rw-r--r--doc/classes/Curve.xml2
-rw-r--r--doc/classes/Curve2D.xml8
-rw-r--r--doc/classes/Curve3D.xml22
-rw-r--r--doc/classes/CurveTexture.xml2
-rw-r--r--doc/classes/CylinderMesh.xml2
-rw-r--r--doc/classes/CylinderShape3D.xml (renamed from doc/classes/CylinderShape.xml)2
-rw-r--r--doc/classes/DTLSServer.xml90
-rw-r--r--doc/classes/DampedSpringJoint2D.xml2
-rw-r--r--doc/classes/Decal.xml111
-rw-r--r--doc/classes/Dictionary.xml76
-rw-r--r--doc/classes/DirectionalLight3D.xml (renamed from doc/classes/DirectionalLight.xml)19
-rw-r--r--doc/classes/Directory.xml19
-rw-r--r--doc/classes/DisplayServer.xml1053
-rw-r--r--doc/classes/DynamicFont.xml19
-rw-r--r--doc/classes/DynamicFontData.xml6
-rw-r--r--doc/classes/EditorExportPlugin.xml21
-rw-r--r--doc/classes/EditorFeatureProfile.xml39
-rw-r--r--doc/classes/EditorFileDialog.xml22
-rw-r--r--doc/classes/EditorFileSystem.xml8
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml4
-rw-r--r--doc/classes/EditorImportPlugin.xml2
-rw-r--r--doc/classes/EditorInspector.xml11
-rw-r--r--doc/classes/EditorInspectorPlugin.xml6
-rw-r--r--doc/classes/EditorInterface.xml11
-rw-r--r--doc/classes/EditorNode3DGizmo.xml (renamed from doc/classes/EditorSpatialGizmo.xml)30
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml (renamed from doc/classes/EditorSpatialGizmoPlugin.xml)48
-rw-r--r--doc/classes/EditorPlugin.xml28
-rw-r--r--doc/classes/EditorProperty.xml32
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml2
-rw-r--r--doc/classes/EditorResourcePreview.xml7
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml6
-rw-r--r--doc/classes/EditorSceneImporter.xml2
-rw-r--r--doc/classes/EditorSceneImporterAssimp.xml6
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorScript.xml4
-rw-r--r--doc/classes/EditorSelection.xml5
-rw-r--r--doc/classes/EditorSettings.xml18
-rw-r--r--doc/classes/EditorSpinSlider.xml2
-rw-r--r--doc/classes/EditorVCSInterface.xml26
-rw-r--r--doc/classes/EncodedObjectAsID.xml2
-rw-r--r--doc/classes/Engine.xml27
-rw-r--r--doc/classes/Environment.xml255
-rw-r--r--doc/classes/Expression.xml4
-rw-r--r--doc/classes/File.xml20
-rw-r--r--doc/classes/FileDialog.xml40
-rw-r--r--doc/classes/FileSystemDock.xml101
-rw-r--r--doc/classes/Font.xml4
-rw-r--r--doc/classes/FuncRef.xml4
-rw-r--r--doc/classes/GIProbe.xml28
-rw-r--r--doc/classes/GIProbeData.xml76
-rw-r--r--doc/classes/GPUParticles2D.xml (renamed from doc/classes/Particles2D.xml)15
-rw-r--r--doc/classes/GPUParticles3D.xml (renamed from doc/classes/Particles.xml)12
-rw-r--r--doc/classes/Generic6DOFJoint3D.xml (renamed from doc/classes/Generic6DOFJoint.xml)38
-rw-r--r--doc/classes/Geometry.xml95
-rw-r--r--doc/classes/GeometryInstance3D.xml (renamed from doc/classes/GeometryInstance.xml)56
-rw-r--r--doc/classes/Gradient.xml10
-rw-r--r--doc/classes/GradientTexture.xml2
-rw-r--r--doc/classes/GraphEdit.xml79
-rw-r--r--doc/classes/GraphNode.xml61
-rw-r--r--doc/classes/GridContainer.xml5
-rw-r--r--doc/classes/GrooveJoint2D.xml2
-rw-r--r--doc/classes/HBoxContainer.xml3
-rw-r--r--doc/classes/HScrollBar.xml21
-rw-r--r--doc/classes/HSeparator.xml4
-rw-r--r--doc/classes/HSlider.xml22
-rw-r--r--doc/classes/HSplitContainer.xml7
-rw-r--r--doc/classes/HTTPClient.xml36
-rw-r--r--doc/classes/HTTPRequest.xml37
-rw-r--r--doc/classes/HashingContext.xml7
-rw-r--r--doc/classes/HeightMapShape3D.xml (renamed from doc/classes/HeightMapShape.xml)6
-rw-r--r--doc/classes/HingeJoint3D.xml (renamed from doc/classes/HingeJoint.xml)16
-rw-r--r--doc/classes/IP.xml8
-rw-r--r--doc/classes/IP_Unix.xml15
-rw-r--r--doc/classes/Image.xml130
-rw-r--r--doc/classes/ImageTexture.xml66
-rw-r--r--doc/classes/ImageTextureLayered.xml31
-rw-r--r--doc/classes/ImmediateGeometry3D.xml (renamed from doc/classes/ImmediateGeometry.xml)13
-rw-r--r--doc/classes/Input.xml39
-rw-r--r--doc/classes/InputDefault.xml15
-rw-r--r--doc/classes/InputEvent.xml13
-rw-r--r--doc/classes/InputEventAction.xml4
-rw-r--r--doc/classes/InputEventFromWindow.xml (renamed from doc/classes/PlaneShape.xml)4
-rw-r--r--doc/classes/InputEventGesture.xml4
-rw-r--r--doc/classes/InputEventJoypadButton.xml4
-rw-r--r--doc/classes/InputEventJoypadMotion.xml4
-rw-r--r--doc/classes/InputEventKey.xml28
-rw-r--r--doc/classes/InputEventMIDI.xml2
-rw-r--r--doc/classes/InputEventMagnifyGesture.xml2
-rw-r--r--doc/classes/InputEventMouse.xml2
-rw-r--r--doc/classes/InputEventMouseButton.xml2
-rw-r--r--doc/classes/InputEventMouseMotion.xml5
-rw-r--r--doc/classes/InputEventPanGesture.xml2
-rw-r--r--doc/classes/InputEventScreenDrag.xml2
-rw-r--r--doc/classes/InputEventScreenTouch.xml2
-rw-r--r--doc/classes/InputEventWithModifiers.xml14
-rw-r--r--doc/classes/InputMap.xml23
-rw-r--r--doc/classes/InstancePlaceholder.xml17
-rw-r--r--doc/classes/InterpolatedCamera.xml36
-rw-r--r--doc/classes/ItemList.xml67
-rw-r--r--doc/classes/JNISingleton.xml (renamed from doc/classes/ResourceFormatSaverCrypto.xml)2
-rw-r--r--doc/classes/JSON.xml2
-rw-r--r--doc/classes/JSONParseResult.xml6
-rw-r--r--doc/classes/JSONRPC.xml2
-rw-r--r--doc/classes/JavaClass.xml (renamed from doc/classes/ResourceFormatLoaderCrypto.xml)2
-rw-r--r--doc/classes/JavaClassWrapper.xml21
-rw-r--r--doc/classes/JavaScript.xml2
-rw-r--r--doc/classes/Joint2D.xml2
-rw-r--r--doc/classes/Joint3D.xml (renamed from doc/classes/Joint.xml)2
-rw-r--r--doc/classes/KinematicBody2D.xml20
-rw-r--r--doc/classes/KinematicBody3D.xml (renamed from doc/classes/KinematicBody.xml)56
-rw-r--r--doc/classes/KinematicCollision2D.xml6
-rw-r--r--doc/classes/KinematicCollision3D.xml (renamed from doc/classes/KinematicCollision.xml)12
-rw-r--r--doc/classes/Label.xml15
-rw-r--r--doc/classes/LargeTexture.xml21
-rw-r--r--doc/classes/Light.xml118
-rw-r--r--doc/classes/Light2D.xml28
-rw-r--r--doc/classes/Light3D.xml159
-rw-r--r--doc/classes/LightOccluder2D.xml4
-rw-r--r--doc/classes/LightmapProbe.xml13
-rw-r--r--doc/classes/Lightmapper.xml13
-rw-r--r--doc/classes/LightmapperRD.xml13
-rw-r--r--doc/classes/Line2D.xml17
-rw-r--r--doc/classes/LineEdit.xml71
-rw-r--r--doc/classes/LineShape2D.xml6
-rw-r--r--doc/classes/LinkButton.xml10
-rw-r--r--doc/classes/Listener.xml37
-rw-r--r--doc/classes/Listener3D.xml45
-rw-r--r--doc/classes/MainLoop.xml108
-rw-r--r--doc/classes/MarginContainer.xml2
-rw-r--r--doc/classes/Marshalls.xml10
-rw-r--r--doc/classes/Material.xml8
-rw-r--r--doc/classes/MenuButton.xml23
-rw-r--r--doc/classes/Mesh.xml64
-rw-r--r--doc/classes/MeshDataTool.xml18
-rw-r--r--doc/classes/MeshInstance.xml73
-rw-r--r--doc/classes/MeshInstance2D.xml14
-rw-r--r--doc/classes/MeshInstance3D.xml83
-rw-r--r--doc/classes/MeshLibrary.xml33
-rw-r--r--doc/classes/MeshTexture.xml5
-rw-r--r--doc/classes/MultiMesh.xml59
-rw-r--r--doc/classes/MultiMeshInstance2D.xml12
-rw-r--r--doc/classes/MultiMeshInstance3D.xml (renamed from doc/classes/MultiMeshInstance.xml)11
-rw-r--r--doc/classes/MultiplayerAPI.xml18
-rw-r--r--doc/classes/Mutex.xml2
-rw-r--r--doc/classes/Navigation.xml106
-rw-r--r--doc/classes/Navigation2D.xml63
-rw-r--r--doc/classes/Navigation3D.xml83
-rw-r--r--doc/classes/NavigationAgent2D.xml159
-rw-r--r--doc/classes/NavigationAgent3D.xml165
-rw-r--r--doc/classes/NavigationMesh.xml12
-rw-r--r--doc/classes/NavigationMeshGenerator.xml (renamed from doc/classes/EditorNavigationMeshGenerator.xml)2
-rw-r--r--doc/classes/NavigationMeshInstance.xml19
-rw-r--r--doc/classes/NavigationObstacle2D.xml31
-rw-r--r--doc/classes/NavigationObstacle3D.xml31
-rw-r--r--doc/classes/NavigationPolygon.xml38
-rw-r--r--doc/classes/NavigationRegion2D.xml (renamed from doc/classes/NavigationPolygonInstance.xml)2
-rw-r--r--doc/classes/NavigationRegion3D.xml42
-rw-r--r--doc/classes/NavigationServer2D.xml298
-rw-r--r--doc/classes/NavigationServer3D.xml375
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml2
-rw-r--r--doc/classes/Nil.xml169
-rw-r--r--doc/classes/NinePatchRect.xml8
-rw-r--r--doc/classes/Node.xml113
-rw-r--r--doc/classes/Node2D.xml14
-rw-r--r--doc/classes/Node3D.xml (renamed from doc/classes/Spatial.xml)44
-rw-r--r--doc/classes/Node3DGizmo.xml13
-rw-r--r--doc/classes/NodePath.xml36
-rw-r--r--doc/classes/ORMMaterial3D.xml13
-rw-r--r--doc/classes/OS.xml549
-rw-r--r--doc/classes/Object.xml94
-rw-r--r--doc/classes/OccluderPolygon2D.xml4
-rw-r--r--doc/classes/OmniLight3D.xml (renamed from doc/classes/OmniLight.xml)13
-rw-r--r--doc/classes/OptionButton.xml52
-rw-r--r--doc/classes/PCKPacker.xml17
-rw-r--r--doc/classes/PHashTranslation.xml2
-rw-r--r--doc/classes/PackedByteArray.xml (renamed from doc/classes/PoolByteArray.xml)47
-rw-r--r--doc/classes/PackedColorArray.xml (renamed from doc/classes/PoolColorArray.xml)30
-rw-r--r--doc/classes/PackedDataContainer.xml4
-rw-r--r--doc/classes/PackedDataContainerRef.xml3
-rw-r--r--doc/classes/PackedFloat32Array.xml (renamed from doc/classes/PoolRealArray.xml)31
-rw-r--r--doc/classes/PackedFloat64Array.xml114
-rw-r--r--doc/classes/PackedInt32Array.xml114
-rw-r--r--doc/classes/PackedInt64Array.xml (renamed from doc/classes/PoolIntArray.xml)36
-rw-r--r--doc/classes/PackedScene.xml16
-rw-r--r--doc/classes/PackedStringArray.xml (renamed from doc/classes/PoolStringArray.xml)39
-rw-r--r--doc/classes/PackedVector2Array.xml (renamed from doc/classes/PoolVector2Array.xml)30
-rw-r--r--doc/classes/PackedVector3Array.xml (renamed from doc/classes/PoolVector3Array.xml)30
-rw-r--r--doc/classes/PacketPeer.xml17
-rw-r--r--doc/classes/PacketPeerDTLS.xml66
-rw-r--r--doc/classes/PacketPeerStream.xml2
-rw-r--r--doc/classes/PacketPeerUDP.xml33
-rw-r--r--doc/classes/Panel.xml13
-rw-r--r--doc/classes/PanelContainer.xml6
-rw-r--r--doc/classes/PanoramaSky.xml20
-rw-r--r--doc/classes/PanoramaSkyMaterial.xml22
-rw-r--r--doc/classes/ParallaxBackground.xml2
-rw-r--r--doc/classes/ParallaxLayer.xml4
-rw-r--r--doc/classes/ParticlesMaterial.xml59
-rw-r--r--doc/classes/Path2D.xml3
-rw-r--r--doc/classes/Path3D.xml (renamed from doc/classes/Path.xml)8
-rw-r--r--doc/classes/PathFollow2D.xml2
-rw-r--r--doc/classes/PathFollow3D.xml (renamed from doc/classes/PathFollow.xml)20
-rw-r--r--doc/classes/Performance.xml60
-rw-r--r--doc/classes/PhysicalBone.xml67
-rw-r--r--doc/classes/PhysicalBone3D.xml138
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml52
-rw-r--r--doc/classes/Physics2DDirectBodyStateSW.xml15
-rw-r--r--doc/classes/Physics2DServerSW.xml15
-rw-r--r--doc/classes/PhysicsBody2D.xml4
-rw-r--r--doc/classes/PhysicsBody3D.xml (renamed from doc/classes/PhysicsBody.xml)6
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml (renamed from doc/classes/Physics2DDirectBodyState.xml)10
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml (renamed from doc/classes/PhysicsDirectBodyState.xml)10
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml (renamed from doc/classes/Physics2DDirectSpaceState.xml)34
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml (renamed from doc/classes/PhysicsDirectSpaceState.xml)26
-rw-r--r--doc/classes/PhysicsMaterial.xml4
-rw-r--r--doc/classes/PhysicsServer2D.xml (renamed from doc/classes/Physics2DServer.xml)70
-rw-r--r--doc/classes/PhysicsServer3D.xml (renamed from doc/classes/PhysicsServer.xml)196
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml (renamed from doc/classes/Physics2DShapeQueryParameters.xml)14
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml (renamed from doc/classes/PhysicsShapeQueryParameters.xml)12
-rw-r--r--doc/classes/PhysicsShapeQueryResult2D.xml (renamed from doc/classes/Physics2DShapeQueryResult.xml)9
-rw-r--r--doc/classes/PhysicsShapeQueryResult3D.xml (renamed from doc/classes/PhysicsShapeQueryResult.xml)10
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml (renamed from doc/classes/Physics2DTestMotionResult.xml)2
-rw-r--r--doc/classes/PinJoint2D.xml6
-rw-r--r--doc/classes/PinJoint3D.xml (renamed from doc/classes/PinJoint.xml)12
-rw-r--r--doc/classes/Plane.xml17
-rw-r--r--doc/classes/PlaneMesh.xml2
-rw-r--r--doc/classes/PointMesh.xml4
-rw-r--r--doc/classes/Polygon2D.xml36
-rw-r--r--doc/classes/PolygonPathFinder.xml10
-rw-r--r--doc/classes/Popup.xml74
-rw-r--r--doc/classes/PopupDialog.xml20
-rw-r--r--doc/classes/PopupMenu.xml94
-rw-r--r--doc/classes/PopupPanel.xml5
-rw-r--r--doc/classes/Position2D.xml2
-rw-r--r--doc/classes/Position3D.xml4
-rw-r--r--doc/classes/PrimitiveMesh.xml5
-rw-r--r--doc/classes/PrismMesh.xml2
-rw-r--r--doc/classes/ProceduralSky.xml79
-rw-r--r--doc/classes/ProceduralSkyMaterial.xml49
-rw-r--r--doc/classes/ProgressBar.xml7
-rw-r--r--doc/classes/ProjectSettings.xml509
-rw-r--r--doc/classes/ProximityGroup3D.xml (renamed from doc/classes/ProximityGroup.xml)4
-rw-r--r--doc/classes/ProxyTexture.xml5
-rw-r--r--doc/classes/QuadMesh.xml2
-rw-r--r--doc/classes/Quat.xml8
-rw-r--r--doc/classes/RDAttachmentFormat.xml21
-rw-r--r--doc/classes/RDPipelineColorBlendState.xml23
-rw-r--r--doc/classes/RDPipelineColorBlendStateAttachment.xml43
-rw-r--r--doc/classes/RDPipelineDepthStencilState.xml57
-rw-r--r--doc/classes/RDPipelineMultisampleState.xml27
-rw-r--r--doc/classes/RDPipelineRasterizationState.xml37
-rw-r--r--doc/classes/RDSamplerState.xml45
-rw-r--r--doc/classes/RDShaderBytecode.xml71
-rw-r--r--doc/classes/RDShaderFile.xml41
-rw-r--r--doc/classes/RDShaderSource.xml45
-rw-r--r--doc/classes/RDTextureFormat.xml49
-rw-r--r--doc/classes/RDTextureView.xml25
-rw-r--r--doc/classes/RDUniform.xml39
-rw-r--r--doc/classes/RDVertexAttribute.xml25
-rw-r--r--doc/classes/RID.xml4
-rw-r--r--doc/classes/RandomNumberGenerator.xml2
-rw-r--r--doc/classes/Range.xml2
-rw-r--r--doc/classes/RayCast2D.xml2
-rw-r--r--doc/classes/RayCast3D.xml (renamed from doc/classes/RayCast.xml)14
-rw-r--r--doc/classes/RayShape2D.xml2
-rw-r--r--doc/classes/RayShape3D.xml (renamed from doc/classes/RayShape.xml)4
-rw-r--r--doc/classes/Rect2.xml24
-rw-r--r--doc/classes/Rect2i.xml52
-rw-r--r--doc/classes/RectangleShape2D.xml2
-rw-r--r--doc/classes/Reference.xml2
-rw-r--r--doc/classes/ReferenceRect.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml18
-rw-r--r--doc/classes/RemoteTransform2D.xml2
-rw-r--r--doc/classes/RemoteTransform3D.xml (renamed from doc/classes/RemoteTransform.xml)10
-rw-r--r--doc/classes/RenderingDevice.xml1599
-rw-r--r--doc/classes/RenderingServer.xml (renamed from doc/classes/VisualServer.xml)2218
-rw-r--r--doc/classes/Resource.xml4
-rw-r--r--doc/classes/ResourceFormatLoader.xml8
-rw-r--r--doc/classes/ResourceFormatSaver.xml4
-rw-r--r--doc/classes/ResourceImporter.xml2
-rw-r--r--doc/classes/ResourceInteractiveLoader.xml55
-rw-r--r--doc/classes/ResourceLoader.xml60
-rw-r--r--doc/classes/ResourcePreloader.xml16
-rw-r--r--doc/classes/ResourceSaver.xml4
-rw-r--r--doc/classes/RichTextEffect.xml13
-rw-r--r--doc/classes/RichTextLabel.xml56
-rw-r--r--doc/classes/RigidBody2D.xml18
-rw-r--r--doc/classes/RigidBody3D.xml (renamed from doc/classes/RigidBody.xml)43
-rw-r--r--doc/classes/RootMotionView.xml2
-rw-r--r--doc/classes/SceneState.xml14
-rw-r--r--doc/classes/SceneTree.xml108
-rw-r--r--doc/classes/SceneTreeTimer.xml2
-rw-r--r--doc/classes/Script.xml15
-rw-r--r--doc/classes/ScriptCreateDialog.xml11
-rw-r--r--doc/classes/ScriptEditor.xml4
-rw-r--r--doc/classes/ScrollBar.xml3
-rw-r--r--doc/classes/ScrollContainer.xml12
-rw-r--r--doc/classes/SegmentShape2D.xml2
-rw-r--r--doc/classes/Semaphore.xml15
-rw-r--r--doc/classes/Separator.xml2
-rw-r--r--doc/classes/Shader.xml30
-rw-r--r--doc/classes/ShaderGlobalsOverride.xml13
-rw-r--r--doc/classes/ShaderMaterial.xml12
-rw-r--r--doc/classes/Shape2D.xml3
-rw-r--r--doc/classes/Shape3D.xml (renamed from doc/classes/Shape.xml)5
-rw-r--r--doc/classes/ShortCut.xml2
-rw-r--r--doc/classes/Signal.xml97
-rw-r--r--doc/classes/Skeleton2D.xml9
-rw-r--r--doc/classes/Skeleton3D.xml (renamed from doc/classes/Skeleton.xml)16
-rw-r--r--doc/classes/SkeletonIK3D.xml (renamed from doc/classes/SkeletonIK.xml)8
-rw-r--r--doc/classes/Skin.xml20
-rw-r--r--doc/classes/SkinReference.xml2
-rw-r--r--doc/classes/Sky.xml22
-rw-r--r--doc/classes/Slider.xml2
-rw-r--r--doc/classes/SliderJoint3D.xml (renamed from doc/classes/SliderJoint.xml)6
-rw-r--r--doc/classes/SoftBody3D.xml (renamed from doc/classes/SoftBody.xml)12
-rw-r--r--doc/classes/SpatialMaterial.xml524
-rw-r--r--doc/classes/SphereMesh.xml4
-rw-r--r--doc/classes/SphereShape3D.xml (renamed from doc/classes/SphereShape.xml)4
-rw-r--r--doc/classes/SpinBox.xml15
-rw-r--r--doc/classes/SplitContainer.xml15
-rw-r--r--doc/classes/SpotLight3D.xml (renamed from doc/classes/SpotLight.xml)4
-rw-r--r--doc/classes/SpringArm3D.xml (renamed from doc/classes/SpringArm.xml)30
-rw-r--r--doc/classes/Sprite2D.xml (renamed from doc/classes/Sprite.xml)22
-rw-r--r--doc/classes/Sprite3D.xml7
-rw-r--r--doc/classes/SpriteBase3D.xml9
-rw-r--r--doc/classes/SpriteFrames.xml45
-rw-r--r--doc/classes/StandardMaterial3D.xml13
-rw-r--r--doc/classes/StaticBody2D.xml10
-rw-r--r--doc/classes/StaticBody3D.xml (renamed from doc/classes/StaticBody.xml)15
-rw-r--r--doc/classes/StreamCubemap.xml13
-rw-r--r--doc/classes/StreamCubemapArray.xml13
-rw-r--r--doc/classes/StreamPeer.xml6
-rw-r--r--doc/classes/StreamPeerBuffer.xml4
-rw-r--r--doc/classes/StreamPeerSSL.xml5
-rw-r--r--doc/classes/StreamPeerTCP.xml2
-rw-r--r--doc/classes/StreamTexture2D.xml (renamed from doc/classes/StreamTexture.xml)4
-rw-r--r--doc/classes/StreamTexture2DArray.xml13
-rw-r--r--doc/classes/StreamTextureLayered.xml25
-rw-r--r--doc/classes/String.xml154
-rw-r--r--doc/classes/StringName.xml24
-rw-r--r--doc/classes/StyleBox.xml10
-rw-r--r--doc/classes/StyleBoxEmpty.xml2
-rw-r--r--doc/classes/StyleBoxFlat.xml23
-rw-r--r--doc/classes/StyleBoxLine.xml9
-rw-r--r--doc/classes/StyleBoxTexture.xml22
-rw-r--r--doc/classes/SubViewport.xml57
-rw-r--r--doc/classes/SubViewportContainer.xml25
-rw-r--r--doc/classes/SurfaceTool.xml24
-rw-r--r--doc/classes/TCP_Server.xml2
-rw-r--r--doc/classes/TabContainer.xml49
-rw-r--r--doc/classes/Tabs.xml56
-rw-r--r--doc/classes/TextEdit.xml55
-rw-r--r--doc/classes/TextFile.xml2
-rw-r--r--doc/classes/Texture.xml122
-rw-r--r--doc/classes/Texture2D.xml133
-rw-r--r--doc/classes/Texture2DArray.xml13
-rw-r--r--doc/classes/Texture3D.xml16
-rw-r--r--doc/classes/TextureButton.xml14
-rw-r--r--doc/classes/TextureLayered.xml74
-rw-r--r--doc/classes/TextureProgress.xml16
-rw-r--r--doc/classes/TextureRect.xml6
-rw-r--r--doc/classes/Theme.xml170
-rw-r--r--doc/classes/Thread.xml9
-rw-r--r--doc/classes/TileMap.xml18
-rw-r--r--doc/classes/TileSet.xml13
-rw-r--r--doc/classes/Timer.xml5
-rw-r--r--doc/classes/ToolButton.xml13
-rw-r--r--doc/classes/TouchScreenButton.xml6
-rw-r--r--doc/classes/Transform.xml16
-rw-r--r--doc/classes/Transform2D.xml14
-rw-r--r--doc/classes/Translation.xml14
-rw-r--r--doc/classes/TranslationServer.xml6
-rw-r--r--doc/classes/Tree.xml108
-rw-r--r--doc/classes/TreeItem.xml51
-rw-r--r--doc/classes/TriangleMesh.xml2
-rw-r--r--doc/classes/Tween.xml90
-rw-r--r--doc/classes/UDPServer.xml98
-rw-r--r--doc/classes/UndoRedo.xml16
-rw-r--r--doc/classes/VBoxContainer.xml3
-rw-r--r--doc/classes/VScrollBar.xml22
-rw-r--r--doc/classes/VSeparator.xml4
-rw-r--r--doc/classes/VSlider.xml22
-rw-r--r--doc/classes/VSplitContainer.xml7
-rw-r--r--doc/classes/Variant.xml4
-rw-r--r--doc/classes/Vector2.xml19
-rw-r--r--doc/classes/Vector2i.xml61
-rw-r--r--doc/classes/Vector3.xml21
-rw-r--r--doc/classes/Vector3i.xml72
-rw-r--r--doc/classes/VehicleBody3D.xml (renamed from doc/classes/VehicleBody.xml)12
-rw-r--r--doc/classes/VehicleWheel3D.xml (renamed from doc/classes/VehicleWheel.xml)16
-rw-r--r--doc/classes/VelocityTracker3D.xml (renamed from doc/classes/SpatialVelocityTracker.xml)2
-rw-r--r--doc/classes/VideoPlayer.xml21
-rw-r--r--doc/classes/VideoStream.xml3
-rw-r--r--doc/classes/Viewport.xml272
-rw-r--r--doc/classes/ViewportContainer.xml22
-rw-r--r--doc/classes/ViewportTexture.xml5
-rw-r--r--doc/classes/VisibilityEnabler2D.xml15
-rw-r--r--doc/classes/VisibilityEnabler3D.xml (renamed from doc/classes/VisibilityEnabler.xml)18
-rw-r--r--doc/classes/VisibilityNotifier2D.xml5
-rw-r--r--doc/classes/VisibilityNotifier3D.xml (renamed from doc/classes/VisibilityNotifier.xml)21
-rw-r--r--doc/classes/VisualInstance3D.xml (renamed from doc/classes/VisualInstance.xml)21
-rw-r--r--doc/classes/VisualShader.xml23
-rw-r--r--doc/classes/VisualShaderNode.xml39
-rw-r--r--doc/classes/VisualShaderNodeBooleanConstant.xml7
-rw-r--r--doc/classes/VisualShaderNodeBooleanUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeColorConstant.xml7
-rw-r--r--doc/classes/VisualShaderNodeColorFunc.xml21
-rw-r--r--doc/classes/VisualShaderNodeColorOp.xml66
-rw-r--r--doc/classes/VisualShaderNodeColorUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeCompare.xml33
-rw-r--r--doc/classes/VisualShaderNodeCubeMap.xml32
-rw-r--r--doc/classes/VisualShaderNodeCubeMapUniform.xml13
-rw-r--r--doc/classes/VisualShaderNodeCubemap.xml41
-rw-r--r--doc/classes/VisualShaderNodeCubemapUniform.xml15
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml23
-rw-r--r--doc/classes/VisualShaderNodeDeterminant.xml7
-rw-r--r--doc/classes/VisualShaderNodeDotProduct.xml7
-rw-r--r--doc/classes/VisualShaderNodeExpression.xml13
-rw-r--r--doc/classes/VisualShaderNodeFaceForward.xml7
-rw-r--r--doc/classes/VisualShaderNodeFloatConstant.xml (renamed from doc/classes/VisualShaderNodeScalarConstant.xml)6
-rw-r--r--doc/classes/VisualShaderNodeFloatFunc.xml116
-rw-r--r--doc/classes/VisualShaderNodeFloatOp.xml50
-rw-r--r--doc/classes/VisualShaderNodeFloatUniform.xml38
-rw-r--r--doc/classes/VisualShaderNodeFresnel.xml7
-rw-r--r--doc/classes/VisualShaderNodeGlobalExpression.xml7
-rw-r--r--doc/classes/VisualShaderNodeGroupBase.xml61
-rw-r--r--doc/classes/VisualShaderNodeIf.xml7
-rw-r--r--doc/classes/VisualShaderNodeInput.xml9
-rw-r--r--doc/classes/VisualShaderNodeIntConstant.xml20
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml32
-rw-r--r--doc/classes/VisualShaderNodeIntOp.xml41
-rw-r--r--doc/classes/VisualShaderNodeIntUniform.xml38
-rw-r--r--doc/classes/VisualShaderNodeIs.xml8
-rw-r--r--doc/classes/VisualShaderNodeOuterProduct.xml7
-rw-r--r--doc/classes/VisualShaderNodeOutput.xml4
-rw-r--r--doc/classes/VisualShaderNodeScalarClamp.xml7
-rw-r--r--doc/classes/VisualShaderNodeScalarDerivativeFunc.xml9
-rw-r--r--doc/classes/VisualShaderNodeScalarFunc.xml82
-rw-r--r--doc/classes/VisualShaderNodeScalarInterp.xml7
-rw-r--r--doc/classes/VisualShaderNodeScalarOp.xml38
-rw-r--r--doc/classes/VisualShaderNodeScalarSmoothStep.xml8
-rw-r--r--doc/classes/VisualShaderNodeScalarSwitch.xml7
-rw-r--r--doc/classes/VisualShaderNodeScalarUniform.xml13
-rw-r--r--doc/classes/VisualShaderNodeSwitch.xml7
-rw-r--r--doc/classes/VisualShaderNodeTexture.xml21
-rw-r--r--doc/classes/VisualShaderNodeTextureUniform.xml12
-rw-r--r--doc/classes/VisualShaderNodeTextureUniformTriplanar.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformCompose.xml7
-rw-r--r--doc/classes/VisualShaderNodeTransformConstant.xml6
-rw-r--r--doc/classes/VisualShaderNodeTransformDecompose.xml7
-rw-r--r--doc/classes/VisualShaderNodeTransformFunc.xml8
-rw-r--r--doc/classes/VisualShaderNodeTransformMult.xml10
-rw-r--r--doc/classes/VisualShaderNodeTransformUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformVecMult.xml10
-rw-r--r--doc/classes/VisualShaderNodeUniform.xml14
-rw-r--r--doc/classes/VisualShaderNodeVec3Constant.xml6
-rw-r--r--doc/classes/VisualShaderNodeVec3Uniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorClamp.xml7
-rw-r--r--doc/classes/VisualShaderNodeVectorCompose.xml7
-rw-r--r--doc/classes/VisualShaderNodeVectorDecompose.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorDerivativeFunc.xml8
-rw-r--r--doc/classes/VisualShaderNodeVectorDistance.xml8
-rw-r--r--doc/classes/VisualShaderNodeVectorFunc.xml40
-rw-r--r--doc/classes/VisualShaderNodeVectorInterp.xml7
-rw-r--r--doc/classes/VisualShaderNodeVectorLen.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorOp.xml18
-rw-r--r--doc/classes/VisualShaderNodeVectorRefract.xml7
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarMix.xml7
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml8
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarStep.xml8
-rw-r--r--doc/classes/VisualShaderNodeVectorSmoothStep.xml8
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/Window.xml419
-rw-r--r--doc/classes/WindowDialog.xml50
-rw-r--r--doc/classes/World2D.xml10
-rw-r--r--doc/classes/World3D.xml (renamed from doc/classes/World.xml)18
-rw-r--r--doc/classes/WorldEnvironment.xml6
-rw-r--r--doc/classes/WorldMarginShape3D.xml20
-rw-r--r--doc/classes/X509Certificate.xml3
-rw-r--r--doc/classes/XMLParser.xml20
-rw-r--r--doc/classes/XRAnchor3D.xml (renamed from doc/classes/ARVRAnchor.xml)6
-rw-r--r--doc/classes/XRCamera3D.xml (renamed from doc/classes/ARVRCamera.xml)5
-rw-r--r--doc/classes/XRController3D.xml (renamed from doc/classes/ARVRController.xml)26
-rw-r--r--doc/classes/XRInterface.xml (renamed from doc/classes/ARVRInterface.xml)55
-rw-r--r--doc/classes/XROrigin3D.xml (renamed from doc/classes/ARVROrigin.xml)9
-rw-r--r--doc/classes/XRPositionalTracker.xml (renamed from doc/classes/ARVRPositionalTracker.xml)22
-rw-r--r--doc/classes/XRServer.xml (renamed from doc/classes/ARVRServer.xml)43
-rw-r--r--doc/classes/YSort.xml2
-rw-r--r--doc/classes/bool.xml35
-rw-r--r--doc/classes/float.xml6
-rw-r--r--doc/classes/int.xml16
631 files changed, 15519 insertions, 9172 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index b25de3cf99..03eb733e54 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GlobalScope" category="Core" version="3.2">
+<class name="@GlobalScope" version="4.0">
<brief_description>
Global scope constants and variables.
</brief_description>
<description>
- Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc.
+ Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
Singletons are also documented here, since they can be accessed from anywhere.
</description>
<tutorials>
@@ -12,9 +12,6 @@
<methods>
</methods>
<members>
- <member name="ARVRServer" type="ARVRServer" setter="" getter="">
- The [ARVRServer] singleton.
- </member>
<member name="AudioServer" type="AudioServer" setter="" getter="">
The [AudioServer] singleton.
</member>
@@ -24,6 +21,9 @@
<member name="ClassDB" type="ClassDB" setter="" getter="">
The [ClassDB] singleton.
</member>
+ <member name="DisplayServer" type="DisplayServer" setter="" getter="">
+ The [DisplayServer] singleton.
+ </member>
<member name="Engine" type="Engine" setter="" getter="">
The [Engine] singleton.
</member>
@@ -42,14 +42,25 @@
<member name="JSON" type="JSON" setter="" getter="">
The [JSON] singleton.
</member>
+ <member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter="">
+ The [JavaClassWrapper] singleton.
+ [b]Note:[/b] Only implemented on Android.
+ </member>
<member name="JavaScript" type="JavaScript" setter="" getter="">
The [JavaScript] singleton.
+ [b]Note:[/b] Only implemented on HTML5.
</member>
- <member name="Marshalls" type="Reference" setter="" getter="">
+ <member name="Marshalls" type="Marshalls" setter="" getter="">
The [Marshalls] singleton.
</member>
- <member name="NavigationMeshGenerator" type="EditorNavigationMeshGenerator" setter="" getter="">
- The [EditorNavigationMeshGenerator] singleton.
+ <member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
+ The [NavigationMeshGenerator] singleton.
+ </member>
+ <member name="NavigationServer2D" type="NavigationServer2D" setter="" getter="">
+ The [NavigationServer2D] singleton.
+ </member>
+ <member name="NavigationServer3D" type="NavigationServer3D" setter="" getter="">
+ The [NavigationServer2D] singleton.
</member>
<member name="OS" type="OS" setter="" getter="">
The [OS] singleton.
@@ -57,15 +68,18 @@
<member name="Performance" type="Performance" setter="" getter="">
The [Performance] singleton.
</member>
- <member name="Physics2DServer" type="Physics2DServer" setter="" getter="">
- The [Physics2DServer] singleton.
+ <member name="PhysicsServer2D" type="PhysicsServer2D" setter="" getter="">
+ The [PhysicsServer2D] singleton.
</member>
- <member name="PhysicsServer" type="PhysicsServer" setter="" getter="">
- The [PhysicsServer] singleton.
+ <member name="PhysicsServer3D" type="PhysicsServer3D" setter="" getter="">
+ The [PhysicsServer3D] singleton.
</member>
<member name="ProjectSettings" type="ProjectSettings" setter="" getter="">
The [ProjectSettings] singleton.
</member>
+ <member name="RenderingServer" type="RenderingServer" setter="" getter="">
+ The [RenderingServer] singleton.
+ </member>
<member name="ResourceLoader" type="ResourceLoader" setter="" getter="">
The [ResourceLoader] singleton.
</member>
@@ -78,8 +92,8 @@
<member name="VisualScriptEditor" type="VisualScriptEditor" setter="" getter="">
The [VisualScriptEditor] singleton.
</member>
- <member name="VisualServer" type="VisualServer" setter="" getter="">
- The [VisualServer] singleton.
+ <member name="XRServer" type="XRServer" setter="" getter="">
+ The [XRServer] singleton.
</member>
</members>
<constants>
@@ -132,7 +146,7 @@
Vertical bottom alignment, usually for text-derived classes.
</constant>
<constant name="SPKEY" value="16777216">
- Scancodes with this bit applied are non-printable.
+ Keycodes with this bit applied are non-printable.
</constant>
<constant name="KEY_ESCAPE" value="16777217" enum="KeyList">
Escape key.
@@ -141,7 +155,7 @@
Tab key.
</constant>
<constant name="KEY_BACKTAB" value="16777219" enum="KeyList">
- Shift+Tab key.
+ Shift + Tab key.
</constant>
<constant name="KEY_BACKSPACE" value="16777220" enum="KeyList">
Backspace key.
@@ -879,7 +893,7 @@
Ctrl key mask.
</constant>
<constant name="KEY_MASK_CMD" value="268435456" enum="KeyModifierMask">
- Cmd key mask.
+ Command key mask. On macOS, this is equivalent to [constant KEY_MASK_META]. On other platforms, this is equivalent to [constant KEY_MASK_CTRL]. This mask should be preferred to [constant KEY_MASK_META] or [constant KEY_MASK_CTRL] for system shortcuts as it handles all platforms correctly.
</constant>
<constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask">
Keypad key mask.
@@ -929,212 +943,185 @@
<constant name="BUTTON_MASK_XBUTTON2" value="256" enum="ButtonList">
Extra mouse button 2 mask.
</constant>
- <constant name="JOY_BUTTON_0" value="0" enum="JoystickList">
- Gamepad button 0.
- </constant>
- <constant name="JOY_BUTTON_1" value="1" enum="JoystickList">
- Gamepad button 1.
- </constant>
- <constant name="JOY_BUTTON_2" value="2" enum="JoystickList">
- Gamepad button 2.
- </constant>
- <constant name="JOY_BUTTON_3" value="3" enum="JoystickList">
- Gamepad button 3.
- </constant>
- <constant name="JOY_BUTTON_4" value="4" enum="JoystickList">
- Gamepad button 4.
- </constant>
- <constant name="JOY_BUTTON_5" value="5" enum="JoystickList">
- Gamepad button 5.
- </constant>
- <constant name="JOY_BUTTON_6" value="6" enum="JoystickList">
- Gamepad button 6.
+ <constant name="JOY_INVALID_BUTTON" value="-1" enum="JoyButtonList">
+ An invalid game controller button.
</constant>
- <constant name="JOY_BUTTON_7" value="7" enum="JoystickList">
- Gamepad button 7.
+ <constant name="JOY_BUTTON_A" value="0" enum="JoyButtonList">
+ Game controller SDL button A.
</constant>
- <constant name="JOY_BUTTON_8" value="8" enum="JoystickList">
- Gamepad button 8.
+ <constant name="JOY_BUTTON_B" value="1" enum="JoyButtonList">
+ Game controller SDL button B.
</constant>
- <constant name="JOY_BUTTON_9" value="9" enum="JoystickList">
- Gamepad button 9.
+ <constant name="JOY_BUTTON_X" value="2" enum="JoyButtonList">
+ Game controller SDL button X.
</constant>
- <constant name="JOY_BUTTON_10" value="10" enum="JoystickList">
- Gamepad button 10.
+ <constant name="JOY_BUTTON_Y" value="3" enum="JoyButtonList">
+ Game controller SDL button Y.
</constant>
- <constant name="JOY_BUTTON_11" value="11" enum="JoystickList">
- Gamepad button 11.
+ <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButtonList">
+ Game controller SDL back button.
</constant>
- <constant name="JOY_BUTTON_12" value="12" enum="JoystickList">
- Gamepad button 12.
+ <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButtonList">
+ Game controller SDL guide button.
</constant>
- <constant name="JOY_BUTTON_13" value="13" enum="JoystickList">
- Gamepad button 13.
+ <constant name="JOY_BUTTON_START" value="6" enum="JoyButtonList">
+ Game controller SDL start button.
</constant>
- <constant name="JOY_BUTTON_14" value="14" enum="JoystickList">
- Gamepad button 14.
+ <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButtonList">
+ Game controller SDL left stick button.
</constant>
- <constant name="JOY_BUTTON_15" value="15" enum="JoystickList">
- Gamepad button 15.
+ <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButtonList">
+ Game controller SDL right stick button.
</constant>
- <constant name="JOY_BUTTON_MAX" value="16" enum="JoystickList">
- Represents the maximum number of joystick buttons supported.
+ <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButtonList">
+ Game controller SDL left shoulder button.
</constant>
- <constant name="JOY_SONY_CIRCLE" value="1" enum="JoystickList">
- DualShock circle button.
+ <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButtonList">
+ Game controller SDL right shoulder button.
</constant>
- <constant name="JOY_SONY_X" value="0" enum="JoystickList">
- DualShock X button.
+ <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButtonList">
+ Game controller SDL D-pad up button.
</constant>
- <constant name="JOY_SONY_SQUARE" value="2" enum="JoystickList">
- DualShock square button.
+ <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButtonList">
+ Game controller SDL D-pad down button.
</constant>
- <constant name="JOY_SONY_TRIANGLE" value="3" enum="JoystickList">
- DualShock triangle button.
+ <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButtonList">
+ Game controller SDL D-pad left button.
</constant>
- <constant name="JOY_XBOX_B" value="1" enum="JoystickList">
- Xbox controller B button.
+ <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButtonList">
+ Game controller SDL D-pad right button.
</constant>
- <constant name="JOY_XBOX_A" value="0" enum="JoystickList">
- Xbox controller A button.
+ <constant name="JOY_SDL_BUTTONS" value="15" enum="JoyButtonList">
+ The number of SDL game controller buttons.
</constant>
- <constant name="JOY_XBOX_X" value="2" enum="JoystickList">
- Xbox controller X button.
+ <constant name="JOY_SONY_X" value="0" enum="JoyButtonList">
+ Sony DualShock controller X button maps to SDL button A.
</constant>
- <constant name="JOY_XBOX_Y" value="3" enum="JoystickList">
- Xbox controller Y button.
+ <constant name="JOY_SONY_CROSS" value="0" enum="JoyButtonList">
+ Sony DualShock controller cross button maps to SDL button A.
</constant>
- <constant name="JOY_DS_A" value="1" enum="JoystickList">
- Nintendo controller A button.
+ <constant name="JOY_SONY_CIRCLE" value="1" enum="JoyButtonList">
+ Sony DualShock controller circle button maps to SDL button B.
</constant>
- <constant name="JOY_DS_B" value="0" enum="JoystickList">
- Nintendo controller B button.
+ <constant name="JOY_SONY_SQUARE" value="2" enum="JoyButtonList">
+ Sony DualShock controller square button maps to SDL button X.
</constant>
- <constant name="JOY_DS_X" value="3" enum="JoystickList">
- Nintendo controller X button.
+ <constant name="JOY_SONY_TRIANGLE" value="3" enum="JoyButtonList">
+ Sony DualShock controller triangle button maps to SDL button Y.
</constant>
- <constant name="JOY_DS_Y" value="2" enum="JoystickList">
- Nintendo controller Y button.
+ <constant name="JOY_SONY_SELECT" value="4" enum="JoyButtonList">
+ Sony DualShock controller select button maps to SDL back button.
</constant>
- <constant name="JOY_VR_GRIP" value="2" enum="JoystickList">
- Grip (side) buttons on a VR controller.
+ <constant name="JOY_SONY_START" value="6" enum="JoyButtonList">
+ Sony DualShock controller start button maps to SDL start button.
</constant>
- <constant name="JOY_VR_PAD" value="14" enum="JoystickList">
- Push down on the touchpad or main joystick on a VR controller.
+ <constant name="JOY_SONY_PS" value="5" enum="JoyButtonList">
+ Sony DualShock controller PS button maps to SDL guide button.
</constant>
- <constant name="JOY_VR_TRIGGER" value="15" enum="JoystickList">
- Trigger on a VR controller.
+ <constant name="JOY_SONY_L1" value="9" enum="JoyButtonList">
+ Sony DualShock controller L1 button maps to SDL left shoulder button.
</constant>
- <constant name="JOY_OCULUS_AX" value="7" enum="JoystickList">
- A button on the right Oculus Touch controller, X button on the left controller (also when used in OpenVR).
+ <constant name="JOY_SONY_R1" value="10" enum="JoyButtonList">
+ Sony DualShock controller R1 button maps to SDL right shoulder button.
</constant>
- <constant name="JOY_OCULUS_BY" value="1" enum="JoystickList">
- B button on the right Oculus Touch controller, Y button on the left controller (also when used in OpenVR).
+ <constant name="JOY_SONY_L3" value="7" enum="JoyButtonList">
+ Sony DualShock controller L3 button maps to SDL left stick button.
</constant>
- <constant name="JOY_OCULUS_MENU" value="3" enum="JoystickList">
- Menu button on either Oculus Touch controller.
+ <constant name="JOY_SONY_R3" value="8" enum="JoyButtonList">
+ Sony DualShock controller R3 button maps to SDL right stick button.
</constant>
- <constant name="JOY_OPENVR_MENU" value="1" enum="JoystickList">
- Menu button in OpenVR (Except when Oculus Touch controllers are used).
+ <constant name="JOY_XBOX_A" value="0" enum="JoyButtonList">
+ Xbox game controller A button maps to SDL button A.
</constant>
- <constant name="JOY_SELECT" value="10" enum="JoystickList">
- Gamepad button Select.
+ <constant name="JOY_XBOX_B" value="1" enum="JoyButtonList">
+ Xbox game controller B button maps to SDL button B.
</constant>
- <constant name="JOY_START" value="11" enum="JoystickList">
- Gamepad button Start.
+ <constant name="JOY_XBOX_X" value="2" enum="JoyButtonList">
+ Xbox game controller X button maps to SDL button X.
</constant>
- <constant name="JOY_DPAD_UP" value="12" enum="JoystickList">
- Gamepad DPad up.
+ <constant name="JOY_XBOX_Y" value="3" enum="JoyButtonList">
+ Xbox game controller Y button maps to SDL button Y.
</constant>
- <constant name="JOY_DPAD_DOWN" value="13" enum="JoystickList">
- Gamepad DPad down.
+ <constant name="JOY_XBOX_BACK" value="4" enum="JoyButtonList">
+ Xbox game controller back button maps to SDL back button.
</constant>
- <constant name="JOY_DPAD_LEFT" value="14" enum="JoystickList">
- Gamepad DPad left.
+ <constant name="JOY_XBOX_START" value="6" enum="JoyButtonList">
+ Xbox game controller start button maps to SDL start button.
</constant>
- <constant name="JOY_DPAD_RIGHT" value="15" enum="JoystickList">
- Gamepad DPad right.
+ <constant name="JOY_XBOX_HOME" value="5" enum="JoyButtonList">
+ Xbox game controller home button maps to SDL guide button.
</constant>
- <constant name="JOY_L" value="4" enum="JoystickList">
- Gamepad left Shoulder button.
+ <constant name="JOY_XBOX_LS" value="7" enum="JoyButtonList">
+ Xbox game controller left stick button maps to SDL left stick button.
</constant>
- <constant name="JOY_L2" value="6" enum="JoystickList">
- Gamepad left trigger.
+ <constant name="JOY_XBOX_RS" value="8" enum="JoyButtonList">
+ Xbox game controller right stick button maps to SDL right stick button.
</constant>
- <constant name="JOY_L3" value="8" enum="JoystickList">
- Gamepad left stick click.
+ <constant name="JOY_XBOX_LB" value="9" enum="JoyButtonList">
+ Xbox game controller left bumper button maps to SDL left shoulder button.
</constant>
- <constant name="JOY_R" value="5" enum="JoystickList">
- Gamepad right Shoulder button.
+ <constant name="JOY_XBOX_RB" value="10" enum="JoyButtonList">
+ Xbox game controller right bumper button maps to SDL right shoulder button.
</constant>
- <constant name="JOY_R2" value="7" enum="JoystickList">
- Gamepad right trigger.
+ <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButtonList">
+ The maximum number of game controller buttons.
</constant>
- <constant name="JOY_R3" value="9" enum="JoystickList">
- Gamepad right stick click.
+ <constant name="JOY_INVALID_AXIS" value="-1" enum="JoyAxisList">
+ An invalid game controller axis.
</constant>
- <constant name="JOY_AXIS_0" value="0" enum="JoystickList">
- Gamepad left stick horizontal axis.
+ <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxisList">
+ Game controller left joystick x-axis.
</constant>
- <constant name="JOY_AXIS_1" value="1" enum="JoystickList">
- Gamepad left stick vertical axis.
+ <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxisList">
+ Game controller left joystick y-axis.
</constant>
- <constant name="JOY_AXIS_2" value="2" enum="JoystickList">
- Gamepad right stick horizontal axis.
+ <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxisList">
+ Game controller right joystick x-axis.
</constant>
- <constant name="JOY_AXIS_3" value="3" enum="JoystickList">
- Gamepad right stick vertical axis.
+ <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxisList">
+ Game controller right joystick y-axis.
</constant>
- <constant name="JOY_AXIS_4" value="4" enum="JoystickList">
- Generic gamepad axis 4.
+ <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxisList">
+ Game controller left trigger axis.
</constant>
- <constant name="JOY_AXIS_5" value="5" enum="JoystickList">
- Generic gamepad axis 5.
+ <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxisList">
+ Game controller right trigger axis.
</constant>
- <constant name="JOY_AXIS_6" value="6" enum="JoystickList">
- Gamepad left trigger analog axis.
+ <constant name="JOY_SDL_AXES" value="6" enum="JoyAxisList">
+ The number of SDL game controller axes.
</constant>
- <constant name="JOY_AXIS_7" value="7" enum="JoystickList">
- Gamepad right trigger analog axis.
+ <constant name="JOY_AXIS_0_X" value="0" enum="JoyAxisList">
+ Game controller joystick 0 x-axis.
</constant>
- <constant name="JOY_AXIS_8" value="8" enum="JoystickList">
- Generic gamepad axis 8.
+ <constant name="JOY_AXIS_0_Y" value="1" enum="JoyAxisList">
+ Game controller joystick 0 y-axis.
</constant>
- <constant name="JOY_AXIS_9" value="9" enum="JoystickList">
- Generic gamepad axis 9.
+ <constant name="JOY_AXIS_1_X" value="2" enum="JoyAxisList">
+ Game controller joystick 1 x-axis.
</constant>
- <constant name="JOY_AXIS_MAX" value="10" enum="JoystickList">
- Represents the maximum number of joystick axes supported.
+ <constant name="JOY_AXIS_1_Y" value="3" enum="JoyAxisList">
+ Game controller joystick 1 y-axis.
</constant>
- <constant name="JOY_ANALOG_LX" value="0" enum="JoystickList">
- Gamepad left stick horizontal axis.
+ <constant name="JOY_AXIS_2_X" value="4" enum="JoyAxisList">
+ Game controller joystick 2 x-axis.
</constant>
- <constant name="JOY_ANALOG_LY" value="1" enum="JoystickList">
- Gamepad left stick vertical axis.
+ <constant name="JOY_AXIS_2_Y" value="5" enum="JoyAxisList">
+ Game controller joystick 2 y-axis.
</constant>
- <constant name="JOY_ANALOG_RX" value="2" enum="JoystickList">
- Gamepad right stick horizontal axis.
+ <constant name="JOY_AXIS_3_X" value="6" enum="JoyAxisList">
+ Game controller joystick 3 x-axis.
</constant>
- <constant name="JOY_ANALOG_RY" value="3" enum="JoystickList">
- Gamepad right stick vertical axis.
+ <constant name="JOY_AXIS_3_Y" value="7" enum="JoyAxisList">
+ Game controller joystick 3 y-axis.
</constant>
- <constant name="JOY_ANALOG_L2" value="6" enum="JoystickList">
- Gamepad left analog trigger.
+ <constant name="JOY_AXIS_4_X" value="8" enum="JoyAxisList">
+ Game controller joystick 4 x-axis.
</constant>
- <constant name="JOY_ANALOG_R2" value="7" enum="JoystickList">
- Gamepad right analog trigger.
+ <constant name="JOY_AXIS_4_Y" value="9" enum="JoyAxisList">
+ Game controller joystick 4 y-axis.
</constant>
- <constant name="JOY_VR_ANALOG_TRIGGER" value="2" enum="JoystickList">
- VR Controller analog trigger.
- </constant>
- <constant name="JOY_VR_ANALOG_GRIP" value="4" enum="JoystickList">
- VR Controller analog grip (side buttons).
- </constant>
- <constant name="JOY_OPENVR_TOUCHPADX" value="0" enum="JoystickList">
- OpenVR touchpad X axis (Joystick axis on Oculus Touch and Windows MR controllers).
- </constant>
- <constant name="JOY_OPENVR_TOUCHPADY" value="1" enum="JoystickList">
- OpenVR touchpad Y axis (Joystick axis on Oculus Touch and Windows MR controllers).
+ <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxisList">
+ The maximum number of game controller axes.
</constant>
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MidiMessageList">
MIDI note OFF message.
@@ -1162,11 +1149,11 @@
Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
[codeblock]
var err = method_that_returns_error()
- if (err != OK):
- print("Failure!)
+ if err != OK:
+ print("Failure!")
# Or, equivalent:
- if (err):
- print("Still failing!)
+ if err:
+ print("Still failing!")
[/codeblock]
</constant>
<constant name="FAILED" value="1" enum="Error">
@@ -1331,52 +1318,52 @@
<constant name="PROPERTY_HINT_LENGTH" value="5" enum="PropertyHint">
Deprecated hint, unused.
</constant>
- <constant name="PROPERTY_HINT_KEY_ACCEL" value="7" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_KEY_ACCEL" value="6" enum="PropertyHint">
Deprecated hint, unused.
</constant>
- <constant name="PROPERTY_HINT_FLAGS" value="8" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_FLAGS" value="7" 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="9" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="8" 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="10" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="9" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D physics 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_FILE" value="13" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_FILE" value="12" 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="14" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_DIR" value="13" 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="15" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_FILE" value="14" 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="16" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_DIR" value="15" 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="17" enum="PropertyHint">
- Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
+ <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="16" enum="PropertyHint">
+ Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
- <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="17" 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_PLACEHOLDER_TEXT" value="19" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="18" 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>
- <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="20" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="19" enum="PropertyHint">
Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
</constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="21" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="20" enum="PropertyHint">
Hints that an image is compressed using lossy compression.
</constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="22" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21" enum="PropertyHint">
Hints that an image is compressed using lossless compression.
</constant>
<constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags">
@@ -1406,6 +1393,9 @@
<constant name="PROPERTY_USAGE_CATEGORY" value="256" enum="PropertyUsageFlags">
Used to categorize properties together in the editor.
</constant>
+ <constant name="PROPERTY_USAGE_SUBGROUP" value="512" enum="PropertyUsageFlags">
+ Used to group properties together in the editor in a subgroup (under a group).
+ </constant>
<constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048" enum="PropertyUsageFlags">
The property does not save its state in [PackedScene].
</constant>
@@ -1449,7 +1439,7 @@
Default method flags.
</constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
- Variable is of type [Nil] (only applied for [code]null[/code]).
+ Variable is [code]null[/code].
</constant>
<constant name="TYPE_BOOL" value="1" enum="Variant.Type">
Variable is of type [bool].
@@ -1466,70 +1456,94 @@
<constant name="TYPE_VECTOR2" value="5" enum="Variant.Type">
Variable is of type [Vector2].
</constant>
- <constant name="TYPE_RECT2" value="6" enum="Variant.Type">
+ <constant name="TYPE_VECTOR2I" value="6" enum="Variant.Type">
+ Variable is of type [Vector2i].
+ </constant>
+ <constant name="TYPE_RECT2" value="7" enum="Variant.Type">
Variable is of type [Rect2].
</constant>
- <constant name="TYPE_VECTOR3" value="7" enum="Variant.Type">
+ <constant name="TYPE_RECT2I" value="8" enum="Variant.Type">
+ Variable is of type [Rect2i].
+ </constant>
+ <constant name="TYPE_VECTOR3" value="9" enum="Variant.Type">
Variable is of type [Vector3].
</constant>
- <constant name="TYPE_TRANSFORM2D" value="8" enum="Variant.Type">
+ <constant name="TYPE_VECTOR3I" value="10" enum="Variant.Type">
+ Variable is of type [Vector3i].
+ </constant>
+ <constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type">
Variable is of type [Transform2D].
</constant>
- <constant name="TYPE_PLANE" value="9" enum="Variant.Type">
+ <constant name="TYPE_PLANE" value="12" enum="Variant.Type">
Variable is of type [Plane].
</constant>
- <constant name="TYPE_QUAT" value="10" enum="Variant.Type">
+ <constant name="TYPE_QUAT" value="13" enum="Variant.Type">
Variable is of type [Quat].
</constant>
- <constant name="TYPE_AABB" value="11" enum="Variant.Type">
+ <constant name="TYPE_AABB" value="14" enum="Variant.Type">
Variable is of type [AABB].
</constant>
- <constant name="TYPE_BASIS" value="12" enum="Variant.Type">
+ <constant name="TYPE_BASIS" value="15" enum="Variant.Type">
Variable is of type [Basis].
</constant>
- <constant name="TYPE_TRANSFORM" value="13" enum="Variant.Type">
+ <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type">
Variable is of type [Transform].
</constant>
- <constant name="TYPE_COLOR" value="14" enum="Variant.Type">
+ <constant name="TYPE_COLOR" value="17" enum="Variant.Type">
Variable is of type [Color].
</constant>
- <constant name="TYPE_NODE_PATH" value="15" enum="Variant.Type">
+ <constant name="TYPE_STRING_NAME" value="18" enum="Variant.Type">
+ Variable is of type [StringName].
+ </constant>
+ <constant name="TYPE_NODE_PATH" value="19" enum="Variant.Type">
Variable is of type [NodePath].
</constant>
- <constant name="TYPE_RID" value="16" enum="Variant.Type">
+ <constant name="TYPE_RID" value="20" enum="Variant.Type">
Variable is of type [RID].
</constant>
- <constant name="TYPE_OBJECT" value="17" enum="Variant.Type">
+ <constant name="TYPE_OBJECT" value="21" enum="Variant.Type">
Variable is of type [Object].
</constant>
- <constant name="TYPE_DICTIONARY" value="18" enum="Variant.Type">
+ <constant name="TYPE_CALLABLE" value="22" enum="Variant.Type">
+ Variable is of type [Callable].
+ </constant>
+ <constant name="TYPE_SIGNAL" value="23" enum="Variant.Type">
+ Variable is of type [Signal].
+ </constant>
+ <constant name="TYPE_DICTIONARY" value="24" enum="Variant.Type">
Variable is of type [Dictionary].
</constant>
- <constant name="TYPE_ARRAY" value="19" enum="Variant.Type">
+ <constant name="TYPE_ARRAY" value="25" enum="Variant.Type">
Variable is of type [Array].
</constant>
- <constant name="TYPE_RAW_ARRAY" value="20" enum="Variant.Type">
- Variable is of type [PoolByteArray].
+ <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type">
+ Variable is of type [PackedByteArray].
+ </constant>
+ <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type">
+ Variable is of type [PackedInt32Array].
+ </constant>
+ <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type">
+ Variable is of type [PackedInt64Array].
</constant>
- <constant name="TYPE_INT_ARRAY" value="21" enum="Variant.Type">
- Variable is of type [PoolIntArray].
+ <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type">
+ Variable is of type [PackedFloat32Array].
</constant>
- <constant name="TYPE_REAL_ARRAY" value="22" enum="Variant.Type">
- Variable is of type [PoolRealArray].
+ <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type">
+ Variable is of type [PackedFloat64Array].
</constant>
- <constant name="TYPE_STRING_ARRAY" value="23" enum="Variant.Type">
- Variable is of type [PoolStringArray].
+ <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type">
+ Variable is of type [PackedStringArray].
</constant>
- <constant name="TYPE_VECTOR2_ARRAY" value="24" enum="Variant.Type">
- Variable is of type [PoolVector2Array].
+ <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type">
+ Variable is of type [PackedVector2Array].
</constant>
- <constant name="TYPE_VECTOR3_ARRAY" value="25" enum="Variant.Type">
- Variable is of type [PoolVector3Array].
+ <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type">
+ Variable is of type [PackedVector3Array].
</constant>
- <constant name="TYPE_COLOR_ARRAY" value="26" enum="Variant.Type">
- Variable is of type [PoolColorArray].
+ <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type">
+ Variable is of type [PackedColorArray].
</constant>
- <constant name="TYPE_MAX" value="27" enum="Variant.Type">
+ <constant name="TYPE_MAX" value="35" enum="Variant.Type">
Represents the size of the [enum Variant.Type] enum.
</constant>
<constant name="OP_EQUAL" value="0" enum="Variant.Operator">
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 61e1ea9b8d..3f2f27d121 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AABB" category="Built-In Types" version="3.2">
+<class name="AABB" version="4.0">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>
@@ -43,7 +43,7 @@
<return type="float">
</return>
<description>
- Gets the area of the [AABB].
+ Returns the volume of the [AABB].
</description>
</method>
<method name="get_endpoint">
@@ -66,7 +66,7 @@
<return type="int">
</return>
<description>
- Returns the index of the longest axis of the [AABB] (according to [Vector3]::AXIS* enum).
+ Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants).
</description>
</method>
<method name="get_longest_axis_size">
@@ -182,6 +182,7 @@
<argument index="0" name="aabb" type="AABB">
</argument>
<description>
+ Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="merge">
@@ -190,13 +191,13 @@
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Returns a larger AABB that contains this AABB and [code]with[/code].
+ Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
</description>
</method>
</methods>
<members>
<member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
- Ending corner.
+ Ending corner. This is calculated as [code]position + size[/code]. Changing this property changes [member size] accordingly.
</member>
<member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
Beginning corner.
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 6304bd34f6..e930abba87 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar" inherits="Reference" category="Core" version="3.2">
+<class name="AStar" inherits="Reference" version="4.0">
<brief_description>
An implementation of A* to find shortest paths among connected points in space.
</brief_description>
@@ -152,7 +152,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
@@ -185,7 +185,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -213,7 +213,7 @@
</description>
</method>
<method name="get_point_path">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 3002e3c351..16fa05041e 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar2D" inherits="Reference" category="Core" version="3.2">
+<class name="AStar2D" inherits="Reference" version="4.0">
<brief_description>
- AStar class representation that uses 2d-vectors as edges.
+ AStar class representation that uses 2D vectors as edges.
</brief_description>
<description>
This is a wrapper for the [AStar] class which uses 2D vectors instead of 3D vectors.
@@ -9,6 +9,30 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_compute_cost" qualifiers="virtual">
+ <return type="float">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Called when computing the cost between two connected points.
+ Note that this function is hidden in the default [code]AStar2D[/code] class.
+ </description>
+ </method>
+ <method name="_estimate_cost" qualifiers="virtual">
+ <return type="float">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <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.
+ </description>
+ </method>
<method name="add_point">
<return type="void">
</return>
@@ -111,7 +135,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
@@ -144,7 +168,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -172,7 +196,7 @@
</description>
</method>
<method name="get_point_path">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index 8acaaa4819..99b566e74f 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.2">
+<class name="AcceptDialog" inherits="Window" version="4.0">
<brief_description>
Base dialog for user notification.
</brief_description>
@@ -67,16 +67,23 @@
<member name="dialog_text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The text displayed by the dialog.
</member>
- <member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Alert!&quot;" />
+ <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Alert!&quot;" />
+ <member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
+ <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
</members>
<signals>
+ <signal name="cancelled">
+ <description>
+ </description>
+ </signal>
<signal name="confirmed">
<description>
Emitted when the dialog is accepted, i.e. the OK button is pressed.
</description>
</signal>
<signal name="custom_action">
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Emitted when a custom button is pressed. See [method add_button].
diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite2D.xml
index 10ee4222c8..8d0534ccd2 100644
--- a/doc/classes/AnimatedSprite.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.2">
+<class name="AnimatedSprite2D" inherits="Node2D" version="4.0">
<brief_description>
Sprite node that can use multiple textures for animation.
</brief_description>
@@ -19,7 +19,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="anim" type="String" default="&quot;&quot;">
+ <argument index="0" name="anim" type="StringName" default="@&quot;&quot;">
</argument>
<argument index="1" name="backwards" type="bool" default="false">
</argument>
@@ -36,7 +36,7 @@
</method>
</methods>
<members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" default="&quot;default&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true">
@@ -60,6 +60,12 @@
<member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
If [code]true[/code], the [member animation] is currently playing.
</member>
+ <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0">
+ Strength of the specular light effect of this [AnimatedSprite2D].
+ </member>
+ <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
+ The color of the specular light effect.
+ </member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
The animation speed is multiplied by this value.
</member>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index eac5822d53..ad9706a52a 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.2">
+<class name="AnimatedSprite3D" inherits="SpriteBase3D" version="4.0">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
@@ -19,7 +19,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="anim" type="String" default="&quot;&quot;">
+ <argument index="0" name="anim" type="StringName" default="@&quot;&quot;">
</argument>
<description>
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
@@ -34,7 +34,7 @@
</method>
</methods>
<members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" default="&quot;default&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index 5c43ce4d74..285e0d5f39 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedTexture" inherits="Texture" category="Core" version="3.2">
+<class name="AnimatedTexture" inherits="Texture2D" version="4.0">
<brief_description>
Proxy texture for simple frame-based animations.
</brief_description>
<description>
- [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture] resource can be used, e.g. in a [TileSet].
+ [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite2D], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet].
The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
[AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. Also, it doesn't support [AtlasTexture]. Each frame needs to be separate image.
</description>
@@ -21,12 +21,12 @@
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="frame" type="int">
</argument>
<description>
- Returns the given frame's [Texture].
+ Returns the given frame's [Texture2D].
</description>
</method>
<method name="set_frame_delay">
@@ -52,16 +52,18 @@
</return>
<argument index="0" name="frame" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
- Assigns a [Texture] 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.
+ 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.
</description>
</method>
</methods>
<members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
+ <member name="current_frame" type="int" setter="set_current_frame" getter="get_current_frame">
+ Sets the currently visible frame of the texture.
+ </member>
<member name="fps" type="float" setter="set_fps" getter="get_fps" default="4.0">
Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]).
For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.
@@ -69,10 +71,16 @@
<member name="frames" type="int" setter="set_frames" getter="get_frames" default="1">
Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES].
</member>
+ <member name="oneshot" type="bool" setter="set_oneshot" getter="get_oneshot" default="false">
+ If [code]true[/code], the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [member pause] to [code]true[/code].
+ </member>
+ <member name="pause" type="bool" setter="set_pause" getter="get_pause" default="false">
+ If [code]true[/code], the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to [code]false[/code].
+ </member>
</members>
<constants>
<constant name="MAX_FRAMES" value="256">
- The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite].
+ The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite2D].
</constant>
</constants>
</class>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 97da8c9980..09811d5617 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Animation" inherits="Resource" category="Core" version="3.2">
+<class name="Animation" inherits="Resource" version="4.0">
<brief_description>
Contains data used to animate everything in the engine.
</brief_description>
@@ -14,7 +14,7 @@
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
[/codeblock]
- Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
+ Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
@@ -32,13 +32,14 @@
</description>
</method>
<method name="animation_track_get_key_animation" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<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.
</description>
</method>
<method name="animation_track_insert_key">
@@ -48,9 +49,10 @@
</argument>
<argument index="1" name="time" type="float">
</argument>
- <argument index="2" name="animation" type="String">
+ <argument index="2" name="animation" type="StringName">
</argument>
<description>
+ 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.
</description>
</method>
<method name="animation_track_set_key_animation">
@@ -60,9 +62,10 @@
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
- <argument index="2" name="animation" type="String">
+ <argument index="2" name="animation" type="StringName">
</argument>
<description>
+ 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.
</description>
</method>
<method name="audio_track_get_key_end_offset" qualifiers="const">
@@ -73,6 +76,8 @@
<argument index="1" name="key_idx" type="int">
</argument>
<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.
+ 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">
@@ -83,6 +88,8 @@
<argument index="1" name="key_idx" type="int">
</argument>
<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.
+ 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">
@@ -93,6 +100,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<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.
</description>
</method>
<method name="audio_track_insert_key">
@@ -109,6 +117,8 @@
<argument index="4" name="end_offset" type="float" default="0">
</argument>
<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.
</description>
</method>
<method name="audio_track_set_key_end_offset">
@@ -121,6 +131,7 @@
<argument index="2" name="offset" type="float">
</argument>
<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.
</description>
</method>
<method name="audio_track_set_key_start_offset">
@@ -133,6 +144,7 @@
<argument index="2" name="offset" type="float">
</argument>
<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.
</description>
</method>
<method name="audio_track_set_key_stream">
@@ -145,6 +157,7 @@
<argument index="2" name="stream" type="Resource">
</argument>
<description>
+ Sets the stream 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.
</description>
</method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
@@ -155,6 +168,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<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.
</description>
</method>
<method name="bezier_track_get_key_out_handle" qualifiers="const">
@@ -165,6 +179,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<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.
</description>
</method>
<method name="bezier_track_get_key_value" qualifiers="const">
@@ -175,6 +190,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<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.
</description>
</method>
<method name="bezier_track_insert_key">
@@ -191,6 +207,8 @@
<argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
+ Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track.
+ [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.
</description>
</method>
<method name="bezier_track_interpolate" qualifiers="const">
@@ -201,6 +219,7 @@
<argument index="1" name="time" type="float">
</argument>
<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_in_handle">
@@ -213,6 +232,7 @@
<argument index="2" name="in_handle" type="Vector2">
</argument>
<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.
</description>
</method>
<method name="bezier_track_set_key_out_handle">
@@ -225,6 +245,7 @@
<argument index="2" name="out_handle" type="Vector2">
</argument>
<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.
</description>
</method>
<method name="bezier_track_set_key_value">
@@ -237,6 +258,7 @@
<argument index="2" name="value" type="float">
</argument>
<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.
</description>
</method>
<method name="clear">
@@ -274,7 +296,7 @@
</description>
</method>
<method name="method_track_get_key_indices" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
@@ -287,7 +309,7 @@
</description>
</method>
<method name="method_track_get_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
@@ -627,7 +649,7 @@
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
@@ -656,7 +678,7 @@
<argument index="1" name="mode" type="int" enum="Animation.UpdateMode">
</argument>
<description>
- Sets the update mode ([code]UPDATE_*[/code]) of a value track.
+ Sets the update mode (see [enum UpdateMode]) of a value track.
</description>
</method>
</methods>
@@ -675,6 +697,7 @@
<signals>
<signal name="tracks_changed">
<description>
+ Emitted when there's a change in the list of tracks, e.g. tracks are added, moved or have changed paths.
</description>
</signal>
</signals>
@@ -689,10 +712,13 @@
Method tracks call functions with given arguments per key.
</constant>
<constant name="TYPE_BEZIER" value="3" enum="TrackType">
+ Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
</constant>
<constant name="TYPE_AUDIO" value="4" enum="TrackType">
+ Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
</constant>
<constant name="TYPE_ANIMATION" value="5" enum="TrackType">
+ Animation tracks play animations in other [AnimationPlayer] nodes.
</constant>
<constant name="INTERPOLATION_NEAREST" value="0" enum="InterpolationType">
No interpolation (nearest value).
@@ -713,6 +739,7 @@
Update at the keyframes.
</constant>
<constant name="UPDATE_CAPTURE" value="3" enum="UpdateMode">
+ Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
</constant>
</constants>
</class>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index b4288bbfaa..3d6ebd5934 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNode" inherits="Resource" category="Core" version="3.2">
+<class name="AnimationNode" inherits="Resource" version="4.0">
<brief_description>
Base resource for [AnimationTree] nodes.
</brief_description>
@@ -8,6 +8,7 @@
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_input">
@@ -16,13 +17,13 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree]
+ 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">
</return>
- <argument index="0" name="animation" type="String">
+ <argument index="0" name="animation" type="StringName">
</argument>
<argument index="1" name="time" type="float">
</argument>
@@ -33,7 +34,7 @@
<argument index="4" name="blend" type="float">
</argument>
<description>
- Blend an animation by "blend" amount (name must be valid in the linked [AnimationPlayer]). A time and delta mas be passed, as well as whether seek happened.
+ 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.
</description>
</method>
<method name="blend_input">
@@ -52,13 +53,13 @@
<argument index="5" name="optimize" type="bool" default="true">
</argument>
<description>
- Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. Time is a delta, unless "seek" is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed.
+ 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).
</description>
</method>
<method name="blend_node">
<return type="float">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
@@ -118,7 +119,7 @@
<method name="get_parameter" qualifiers="const">
<return type="Variant">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
@@ -127,7 +128,7 @@
<method name="get_parameter_default_value" qualifiers="virtual">
<return type="Variant">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
@@ -141,7 +142,7 @@
</description>
</method>
<method name="has_filter" qualifiers="virtual">
- <return type="String">
+ <return type="bool">
</return>
<description>
Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
@@ -164,10 +165,9 @@
<argument index="1" name="seek" type="bool">
</argument>
<description>
- Called when a custom node is processed. The argument "time" is relative, unless "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 returns the time left for the current animation to finish (if unsure, just pass the value from the main blend being called).
+ User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
+ Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
+ This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
</description>
</method>
<method name="remove_input">
@@ -193,7 +193,7 @@
<method name="set_parameter">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -204,7 +204,7 @@
</methods>
<members>
<member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled">
- Returns whether filtering is enabled.
+ If [code]true[/code], filtering is enabled.
</member>
</members>
<signals>
diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml
index bb7857717d..48983a624e 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" category="Core" version="3.2">
+<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.0">
<brief_description>
Blends two animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -7,6 +7,7 @@
A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml
index d338c2cf9e..1bfebc91fc 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" category="Core" version="3.2">
+<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.0">
<brief_description>
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -11,6 +11,7 @@
- A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml
index a964877068..ab44148c15 100644
--- a/doc/classes/AnimationNodeAnimation.xml
+++ b/doc/classes/AnimationNodeAnimation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeAnimation" inherits="AnimationRootNode" category="Core" version="3.2">
+<class name="AnimationNodeAnimation" inherits="AnimationRootNode" version="4.0">
<brief_description>
Input animation to use in an [AnimationNodeBlendTree].
</brief_description>
@@ -7,11 +7,12 @@
A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
<members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" default="&quot;&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;&quot;">
Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player].
</member>
</members>
diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml
index cac97b9ee7..2b56167225 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" category="Core" version="3.2">
+<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.0">
<brief_description>
Blends two animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -7,6 +7,7 @@
A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml
index 3b5c1f0b99..5a306a225d 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" category="Core" version="3.2">
+<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.0">
<brief_description>
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -11,6 +11,7 @@
- A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml
index 82d5716ee3..6e82f0afb7 100644
--- a/doc/classes/AnimationNodeBlendSpace1D.xml
+++ b/doc/classes/AnimationNodeBlendSpace1D.xml
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" category="Core" version="3.2">
+<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" version="4.0">
<brief_description>
Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis.
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree].
This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point].
- Outputs the linear blend of the two [code]AnimationNode[/code] closest to the node's current [code]value[/code].
+ Outputs the linear blend of the two [AnimationNode]s closest to the node's current value.
You can set the extents of the axis using the [member min_space] and [member max_space].
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_blend_point">
@@ -22,7 +23,7 @@
<argument index="2" name="at_index" type="int" default="-1">
</argument>
<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 [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.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
@@ -38,7 +39,7 @@
<argument index="0" name="point" type="int">
</argument>
<description>
- Returns the [code]AnimationNode[/code] referenced by the point at index [code]point[/code].
+ Returns the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
@@ -67,7 +68,7 @@
<argument index="1" name="node" type="AnimationRootNode">
</argument>
<description>
- Changes the AnimationNode referenced by the point at index [code]point[/code].
+ Changes the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index d8ea7fea5b..f8680ba8ec 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" category="Core" version="3.2">
+<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" version="4.0">
<brief_description>
- Blends linearly between three [AnimationNode] of any type placed in a 2d space.
+ Blends linearly between three [AnimationNode] of any type placed in a 2D space.
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree].
@@ -9,6 +9,7 @@
You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_blend_point">
@@ -21,7 +22,7 @@
<argument index="2" name="at_index" type="int" default="-1">
</argument>
<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 [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.
</description>
</method>
<method name="add_triangle">
@@ -36,7 +37,7 @@
<argument index="3" name="at_index" type="int" default="-1">
</argument>
<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 [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.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
@@ -52,7 +53,7 @@
<argument index="0" name="point" type="int">
</argument>
<description>
- Returns the [code]AnimationRootNode[/code] referenced by the point at index [code]point[/code].
+ Returns the [AnimationRootNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
@@ -108,7 +109,7 @@
<argument index="1" name="node" type="AnimationRootNode">
</argument>
<description>
- Changes the AnimationNode referenced by the point at index [code]point[/code].
+ Changes the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml
index 76a0d65920..4a34d75ff9 100644
--- a/doc/classes/AnimationNodeBlendTree.xml
+++ b/doc/classes/AnimationNodeBlendTree.xml
@@ -1,115 +1,134 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" category="Core" version="3.2">
+<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.0">
<brief_description>
+ [AnimationTree] node resource that contains many blend type nodes.
</brief_description>
<description>
+ This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
+ Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later.
</description>
</method>
<method name="connect_node">
<return type="void">
</return>
- <argument index="0" name="input_node" type="String">
+ <argument index="0" name="input_node" type="StringName">
</argument>
<argument index="1" name="input_index" type="int">
</argument>
- <argument index="2" name="output_node" type="String">
+ <argument index="2" name="output_node" type="StringName">
</argument>
<description>
+ Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code].
</description>
</method>
<method name="disconnect_node">
<return type="void">
</return>
- <argument index="0" name="input_node" type="String">
+ <argument index="0" name="input_node" type="StringName">
</argument>
<argument index="1" name="input_index" type="int">
</argument>
<description>
+ Disconnects the node connected to the specified input.
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
+ Returns the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
+ Returns the position of the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
+ Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists.
</description>
</method>
<method name="remove_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
+ Removes a sub-node.
</description>
</method>
<method name="rename_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
+ Changes the name of a sub-node.
</description>
</method>
<method name="set_node_position">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
<description>
+ Modifies the position of a sub-node.
</description>
</method>
</methods>
<members>
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
+ The global offset of all sub-nodes.
</member>
</members>
<constants>
<constant name="CONNECTION_OK" value="0">
+ The connection was successful.
</constant>
<constant name="CONNECTION_ERROR_NO_INPUT" value="1">
+ The input node is [code]null[/code].
</constant>
<constant name="CONNECTION_ERROR_NO_INPUT_INDEX" value="2">
+ The specified input port is out of range.
</constant>
<constant name="CONNECTION_ERROR_NO_OUTPUT" value="3">
+ The output node is [code]null[/code].
</constant>
<constant name="CONNECTION_ERROR_SAME_NODE" value="4">
+ Input and output nodes are the same.
</constant>
<constant name="CONNECTION_ERROR_CONNECTION_EXISTS" value="5">
+ The specified connection already exists.
</constant>
</constants>
</class>
diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml
index 099548f60a..4ba0b82df6 100644
--- a/doc/classes/AnimationNodeOneShot.xml
+++ b/doc/classes/AnimationNodeOneShot.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeOneShot" inherits="AnimationNode" category="Core" version="3.2">
+<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0">
<brief_description>
+ Plays an animation once in [AnimationNodeBlendTree].
</brief_description>
<description>
+ A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="get_mix_mode" qualifiers="const">
@@ -24,10 +27,13 @@
</methods>
<members>
<member name="autorestart" type="bool" setter="set_autorestart" getter="has_autorestart" default="false">
+ If [code]true[/code], the sub-animation will restart automatically after finishing.
</member>
<member name="autorestart_delay" type="float" setter="set_autorestart_delay" getter="get_autorestart_delay" default="1.0">
+ The delay after which the automatic restart is triggered, in seconds.
</member>
<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>
diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml
index bfe28319c6..38b05eb650 100644
--- a/doc/classes/AnimationNodeOutput.xml
+++ b/doc/classes/AnimationNodeOutput.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeOutput" inherits="AnimationNode" category="Core" version="3.2">
+<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.0">
<brief_description>
+ Generic output node to be added to [AnimationNodeBlendTree].
</brief_description>
<description>
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 9a21492b8a..3b351a3345 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" category="Core" version="3.2">
+<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" version="4.0">
<brief_description>
State machine for control of animations.
</brief_description>
<description>
- Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the [AnimationTree] node to control it programmatically.
+ Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically.
[b]Example:[/b]
[codeblock]
var state_machine = $AnimationTree.get("parameters/playback")
@@ -12,12 +12,13 @@
[/codeblock]
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
@@ -30,9 +31,9 @@
<method name="add_transition">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
- <argument index="1" name="to" type="String">
+ <argument index="1" name="to" type="StringName">
</argument>
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition">
</argument>
@@ -57,14 +58,14 @@
<method name="get_node" qualifiers="const">
<return type="AnimationNode">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the animation node with the given name.
</description>
</method>
<method name="get_node_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="node" type="AnimationNode">
</argument>
@@ -75,7 +76,7 @@
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the given node's coordinates. Used for display in the editor.
@@ -105,7 +106,7 @@
</description>
</method>
<method name="get_transition_from" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -114,7 +115,7 @@
</description>
</method>
<method name="get_transition_to" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -125,7 +126,7 @@
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the graph contains the given node.
@@ -134,9 +135,9 @@
<method name="has_transition" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
- <argument index="1" name="to" type="String">
+ <argument index="1" name="to" type="StringName">
</argument>
<description>
Returns [code]true[/code] if there is a transition between the given nodes.
@@ -145,7 +146,7 @@
<method name="remove_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Deletes the given node from the graph.
@@ -154,12 +155,12 @@
<method name="remove_transition">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
- <argument index="1" name="to" type="String">
+ <argument index="1" name="to" type="StringName">
</argument>
<description>
- Deletes the given transition.
+ Deletes the transition between the two specified nodes.
</description>
</method>
<method name="remove_transition_by_index">
@@ -168,24 +169,34 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Deletes the given transition.
+ Deletes the given transition by index.
</description>
</method>
<method name="rename_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
Renames the given node.
</description>
</method>
+ <method name="replace_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="node" type="AnimationNode">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_end_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Sets the given node as the graph end point.
@@ -203,7 +214,7 @@
<method name="set_node_position">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
@@ -214,7 +225,7 @@
<method name="set_start_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Sets the given node as the graph start point.
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 09cd369bc4..f4b89a5086 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeStateMachinePlayback" inherits="Resource" category="Core" version="3.2">
+<class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.0">
<brief_description>
- Playback control for AnimationNodeStateMachine.
+ Playback control for [AnimationNodeStateMachine].
</brief_description>
<description>
Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code].
@@ -12,19 +12,21 @@
[/codeblock]
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="get_current_node" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the currently playing animation state.
</description>
</method>
<method name="get_travel_path" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
+ Returns the current travel path as computed internally by the A* algorithm.
</description>
</method>
<method name="is_playing" qualifiers="const">
@@ -37,7 +39,7 @@
<method name="start">
<return type="void">
</return>
- <argument index="0" name="node" type="String">
+ <argument index="0" name="node" type="StringName">
</argument>
<description>
Starts playing the given animation.
@@ -53,7 +55,7 @@
<method name="travel">
<return type="void">
</return>
- <argument index="0" name="to_node" type="String">
+ <argument index="0" name="to_node" type="StringName">
</argument>
<description>
Transitions from the current state to another one, following the shortest path.
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 08ff9997cf..f0b7cc4099 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeStateMachineTransition" inherits="Resource" category="Core" version="3.2">
+<class name="AnimationNodeStateMachineTransition" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
<members>
- <member name="advance_condition" type="String" setter="set_advance_condition" getter="get_advance_condition" default="&quot;&quot;">
- Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to "idle":
+ <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@&quot;&quot;">
+ Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
[codeblock]
- $animation_tree["parameters/conditions/idle"] = is_on_floor and linear_velocity.x == 0
+ $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)
[/codeblock]
</member>
<member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false">
@@ -34,6 +35,7 @@
<signals>
<signal name="advance_condition_changed">
<description>
+ Emitted when [member advance_condition] is changed.
</description>
</signal>
</signals>
diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml
index 9ce773c4e2..5c2e6cb692 100644
--- a/doc/classes/AnimationNodeTimeScale.xml
+++ b/doc/classes/AnimationNodeTimeScale.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTimeScale" inherits="AnimationNode" category="Core" version="3.2">
+<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.0">
<brief_description>
+ A time-scaling animation node to be used with [AnimationTree].
</brief_description>
<description>
+ Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml
index d593f5489c..0fef106da5 100644
--- a/doc/classes/AnimationNodeTimeSeek.xml
+++ b/doc/classes/AnimationNodeTimeSeek.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTimeSeek" inherits="AnimationNode" category="Core" version="3.2">
+<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0">
<brief_description>
+ A time-seeking animation node to be used with [AnimationTree].
</brief_description>
<description>
+ This node can be used to cause a seek command to happen to any sub-children of the graph. After setting the time, this value returns to -1.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index 82839b6bab..11250c5b17 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTransition" inherits="AnimationNode" category="Core" version="3.2">
+<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0">
<brief_description>
+ A generic animation transition node for [AnimationTree].
</brief_description>
<description>
+ Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="get_input_caption" qualifiers="const">
@@ -45,137 +48,11 @@
</method>
</methods>
<members>
- <member name="input_0/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_0/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_1/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_1/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_10/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_10/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_11/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_11/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_12/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_12/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_13/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_13/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_14/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_14/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_15/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_15/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_16/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_16/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_17/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_17/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_18/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_18/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_19/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_19/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_2/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_2/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_20/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_20/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_21/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_21/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_22/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_22/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_23/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_23/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_24/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_24/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_25/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_25/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_26/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_26/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_27/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_27/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_28/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_28/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_29/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_29/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_3/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_3/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_30/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_30/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_31/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_31/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_4/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_4/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_5/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_5/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_6/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_6/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_7/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_7/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_8/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_8/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </member>
- <member name="input_9/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance">
- </member>
- <member name="input_9/name" type="String" setter="set_input_caption" getter="get_input_caption">
- </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">
+ Cross-fading time (in seconds) between each animation connected to the inputs.
</member>
</members>
<constants>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 60d04649a8..1420b1bf64 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationPlayer" inherits="Node" category="Core" version="3.2">
+<class name="AnimationPlayer" inherits="Node" version="4.0">
<brief_description>
Container and 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.
Updating the target properties of animations occurs at process time.
</description>
<tutorials>
@@ -15,7 +16,7 @@
<method name="add_animation">
<return type="int" enum="Error">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="animation" type="Animation">
</argument>
@@ -33,9 +34,9 @@
</description>
</method>
<method name="animation_get_next" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
<description>
Returns the name of the next animation in the queue.
@@ -44,9 +45,9 @@
<method name="animation_set_next">
<return type="void">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
- <argument index="1" name="anim_to" type="String">
+ <argument index="1" name="anim_to" type="StringName">
</argument>
<description>
Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes.
@@ -67,7 +68,7 @@
</description>
</method>
<method name="find_animation" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="animation" type="Animation">
</argument>
@@ -78,14 +79,14 @@
<method name="get_animation" qualifiers="const">
<return type="Animation">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the list of stored animation names.
@@ -94,9 +95,9 @@
<method name="get_blend_time" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
- <argument index="1" name="anim_to" type="String">
+ <argument index="1" name="anim_to" type="StringName">
</argument>
<description>
Gets the blend time (in seconds) between two animations, referenced by their names.
@@ -106,11 +107,11 @@
<return type="float">
</return>
<description>
- Gets the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method.
+ Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.
</description>
</method>
<method name="get_queue">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns a list of the animation names that are currently queued to play.
@@ -119,7 +120,7 @@
<method name="has_animation" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
@@ -135,7 +136,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="name" type="String" default="&quot;&quot;">
+ <argument index="0" name="name" type="StringName" default="&quot;&quot;">
</argument>
<argument index="1" name="custom_blend" type="float" default="-1">
</argument>
@@ -144,28 +145,27 @@
<argument index="3" name="from_end" type="bool" default="false">
</argument>
<description>
- Plays the animation with key [code]name[/code]. Custom speed and blend times can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards.
- If the animation has been paused by [method stop], it will be resumed. Calling [method play] without arguments will also resume the animation.
- [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].
+ 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.
+ [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">
</return>
- <argument index="0" name="name" type="String" default="&quot;&quot;">
+ <argument index="0" name="name" type="StringName" default="&quot;&quot;">
</argument>
<argument index="1" name="custom_blend" type="float" default="-1">
</argument>
<description>
Plays the animation with key [code]name[/code] in reverse.
- If the animation has been paused by [code]stop(true)[/code], it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards.
- [b]Note:[/b] This is the same as [code]play[/code] in regards to process/update behavior.
+ 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">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Queues an animation for playback once the current one is done.
@@ -175,7 +175,7 @@
<method name="remove_animation">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Removes the animation with key [code]name[/code].
@@ -184,9 +184,9 @@
<method name="rename_animation">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="newname" type="String">
+ <argument index="1" name="newname" type="StringName">
</argument>
<description>
Renames an existing animation with key [code]name[/code] to [code]newname[/code].
@@ -206,9 +206,9 @@
<method name="set_blend_time">
<return type="void">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
- <argument index="1" name="anim_to" type="String">
+ <argument index="1" name="anim_to" type="StringName">
</argument>
<argument index="2" name="sec" type="float">
</argument>
@@ -222,8 +222,8 @@
<argument index="0" name="reset" type="bool" default="true">
</argument>
<description>
- Stops 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], then calling [method play] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [method play_backwards].
+ 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.
</description>
</method>
</methods>
@@ -264,23 +264,23 @@
</members>
<signals>
<signal name="animation_changed">
- <argument index="0" name="old_name" type="String">
+ <argument index="0" name="old_name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
If the currently being played animation changes, this signal will notify of such change.
</description>
</signal>
<signal name="animation_finished">
- <argument index="0" name="anim_name" type="String">
+ <argument index="0" name="anim_name" type="StringName">
</argument>
<description>
Notifies when an animation finished playing.
</description>
</signal>
<signal name="animation_started">
- <argument index="0" name="anim_name" type="String">
+ <argument index="0" name="anim_name" type="StringName">
</argument>
<description>
Notifies when an animation starts playing.
diff --git a/doc/classes/AnimationRootNode.xml b/doc/classes/AnimationRootNode.xml
index 735f3215e9..46759b7f4d 100644
--- a/doc/classes/AnimationRootNode.xml
+++ b/doc/classes/AnimationRootNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationRootNode" inherits="AnimationNode" category="Core" version="3.2">
+<class name="AnimationRootNode" inherits="AnimationNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AnimationTrackEditPlugin.xml b/doc/classes/AnimationTrackEditPlugin.xml
index 2dcabb051f..8490d48718 100644
--- a/doc/classes/AnimationTrackEditPlugin.xml
+++ b/doc/classes/AnimationTrackEditPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTrackEditPlugin" inherits="Reference" category="Core" version="3.2">
+<class name="AnimationTrackEditPlugin" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index d1c24e466d..9642dd1c70 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTree" inherits="Node" category="Core" version="3.2">
+<class name="AnimationTree" inherits="Node" version="4.0">
<brief_description>
+ A node to be used for advanced animation transitions in an [AnimationPlayer].
</brief_description>
<description>
</description>
@@ -15,6 +16,7 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
+ Manually advance the animations by the specified time (in seconds).
</description>
</method>
<method name="get_root_motion_transform" qualifiers="const">
@@ -36,22 +38,29 @@
</methods>
<members>
<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="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>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
+ The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
</member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
+ The root animation node of this [AnimationTree]. See [AnimationNode].
</member>
</members>
<constants>
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
+ The animations will progress during the physics frame (i.e. [method Node._physics_process]).
</constant>
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
+ The animations will progress during the idle frame (i.e. [method Node._process]).
</constant>
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
+ The animations will only progress manually (see [method advance]).
</constant>
</constants>
</class>
diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml
deleted file mode 100644
index 3b6003b478..0000000000
--- a/doc/classes/AnimationTreePlayer.xml
+++ /dev/null
@@ -1,660 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.2">
- <brief_description>
- Animation Player that uses a node graph for blending Animations.
- </brief_description>
- <description>
- A node graph tool for blending multiple animations bound to an [AnimationPlayer]. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose.
- It takes [Animation]s from an [AnimationPlayer] node and mixes them depending on the graph.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="add_node">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType">
- </argument>
- <argument index="1" name="id" type="String">
- </argument>
- <description>
- Adds a [code]type[/code] node to the graph with name [code]id[/code].
- </description>
- </method>
- <method name="advance">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- Shifts position in the animation timeline. Delta is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
- </description>
- </method>
- <method name="animation_node_get_animation" qualifiers="const">
- <return type="Animation">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the [AnimationPlayer]'s [Animation] bound to the [AnimationTreePlayer]'s animation node with name [code]id[/code].
- </description>
- </method>
- <method name="animation_node_get_master_animation" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the name of the [member master_player]'s [Animation] bound to this animation node.
- </description>
- </method>
- <method name="animation_node_get_position" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_node_set_animation">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="animation" type="Animation">
- </argument>
- <description>
- Binds a new [Animation] from the [member master_player] to the [AnimationTreePlayer]'s animation node with name [code]id[/code].
- </description>
- </method>
- <method name="animation_node_set_filter_path">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- If [code]enable[/code] is [code]true[/code], the animation node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
- </description>
- </method>
- <method name="animation_node_set_master_animation">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="source" type="String">
- </argument>
- <description>
- Binds the [Animation] named [code]source[/code] from [member master_player] to the animation node [code]id[/code]. Recalculates caches.
- </description>
- </method>
- <method name="are_nodes_connected" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="dst_id" type="String">
- </argument>
- <argument index="2" name="dst_input_idx" type="int">
- </argument>
- <description>
- Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot.
- </description>
- </method>
- <method name="blend2_node_get_amount" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the blend amount of a Blend2 node given its name.
- </description>
- </method>
- <method name="blend2_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="blend" type="float">
- </argument>
- <description>
- Sets the blend amount of a Blend2 node given its name and value.
- A Blend2 Node blends two animations with the amount between 0 and 1.
- At 0, Output is input a.
- Towards 1, the influence of a gets lessened, the influence of b gets raised.
- At 1, Output is input b.
- </description>
- </method>
- <method name="blend2_node_set_filter_path">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- If [code]enable[/code] is [code]true[/code], the blend2 node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
- </description>
- </method>
- <method name="blend3_node_get_amount" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the blend amount of a Blend3 node given its name.
- </description>
- </method>
- <method name="blend3_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="blend" type="float">
- </argument>
- <description>
- Sets the blend amount of a Blend3 node given its name and value.
- A Blend3 Node blends three animations with the amount between -1 and 1.
- At -1, Output is input b-.
- From -1 to 0, the influence of b- gets lessened, the influence of a gets raised and the influence of b+ is 0.
- At 0, Output is input a.
- From 0 to 1, the influence of a gets lessened, the influence of b+ gets raised and the influence of b+ is 0.
- At 1, Output is input b+.
- </description>
- </method>
- <method name="blend4_node_get_amount" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the blend amount of a Blend4 node given its name.
- </description>
- </method>
- <method name="blend4_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="blend" type="Vector2">
- </argument>
- <description>
- Sets the blend amount of a Blend4 node given its name and value.
- A Blend4 Node blends two pairs of animations.
- The two pairs are blended like blend2 and then added together.
- </description>
- </method>
- <method name="connect_nodes">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="dst_id" type="String">
- </argument>
- <argument index="2" name="dst_input_idx" type="int">
- </argument>
- <description>
- Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot.
- </description>
- </method>
- <method name="disconnect_nodes">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="dst_input_idx" type="int">
- </argument>
- <description>
- Disconnects nodes connected to [code]id[/code] at the specified input slot.
- </description>
- </method>
- <method name="get_node_list">
- <return type="PoolStringArray">
- </return>
- <description>
- Returns a [PoolStringArray] containing the name of all nodes.
- </description>
- </method>
- <method name="mix_node_get_amount" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns mix amount of a Mix node given its name.
- </description>
- </method>
- <method name="mix_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="ratio" type="float">
- </argument>
- <description>
- Sets mix amount of a Mix node given its name and value.
- A Mix node adds input b to input a by the amount given by ratio.
- </description>
- </method>
- <method name="node_exists" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="node" type="String">
- </argument>
- <description>
- Check if a node exists (by name).
- </description>
- </method>
- <method name="node_get_input_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the input count for a given node. Different types of nodes have different amount of inputs.
- </description>
- </method>
- <method name="node_get_input_source" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="idx" type="int">
- </argument>
- <description>
- Returns the input source for a given node input.
- </description>
- </method>
- <method name="node_get_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns position of a node in the graph given its name.
- </description>
- </method>
- <method name="node_get_type" qualifiers="const">
- <return type="int" enum="AnimationTreePlayer.NodeType">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Gets the node type, will return from [code]NODE_*[/code] enum.
- </description>
- </method>
- <method name="node_rename">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="node" type="String">
- </argument>
- <argument index="1" name="new_name" type="String">
- </argument>
- <description>
- Rename a node in the graph.
- </description>
- </method>
- <method name="node_set_position">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="screen_position" type="Vector2">
- </argument>
- <description>
- Sets position of a node in the graph given its name and position.
- </description>
- </method>
- <method name="oneshot_node_get_autorestart_delay" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns autostart delay of a OneShot node given its name.
- </description>
- </method>
- <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns autostart random delay of a OneShot node given its name.
- </description>
- </method>
- <method name="oneshot_node_get_fadein_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns fade in time of a OneShot node given its name.
- </description>
- </method>
- <method name="oneshot_node_get_fadeout_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns fade out time of a OneShot node given its name.
- </description>
- </method>
- <method name="oneshot_node_has_autorestart" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns whether a OneShot node will auto restart given its name.
- </description>
- </method>
- <method name="oneshot_node_is_active" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns whether a OneShot node is active given its name.
- </description>
- </method>
- <method name="oneshot_node_set_autorestart">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- Sets autorestart property of a OneShot node given its name and value.
- </description>
- </method>
- <method name="oneshot_node_set_autorestart_delay">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="delay_sec" type="float">
- </argument>
- <description>
- Sets autorestart delay of a OneShot node given its name and value in seconds.
- </description>
- </method>
- <method name="oneshot_node_set_autorestart_random_delay">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="rand_sec" type="float">
- </argument>
- <description>
- Sets autorestart random delay of a OneShot node given its name and value in seconds.
- </description>
- </method>
- <method name="oneshot_node_set_fadein_time">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <description>
- Sets fade in time of a OneShot node given its name and value in seconds.
- </description>
- </method>
- <method name="oneshot_node_set_fadeout_time">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <description>
- Sets fade out time of a OneShot node given its name and value in seconds.
- </description>
- </method>
- <method name="oneshot_node_set_filter_path">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- If [code]enable[/code] is [code]true[/code], the oneshot node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
- </description>
- </method>
- <method name="oneshot_node_start">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Starts a OneShot node given its name.
- </description>
- </method>
- <method name="oneshot_node_stop">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Stops the OneShot node with name [code]id[/code].
- </description>
- </method>
- <method name="recompute_caches">
- <return type="void">
- </return>
- <description>
- Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.
- </description>
- </method>
- <method name="remove_node">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Removes the animation node with name [code]id[/code].
- </description>
- </method>
- <method name="reset">
- <return type="void">
- </return>
- <description>
- Resets this [AnimationTreePlayer].
- </description>
- </method>
- <method name="timescale_node_get_scale" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns time scale value of the TimeScale node with name [code]id[/code].
- </description>
- </method>
- <method name="timescale_node_set_scale">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="scale" type="float">
- </argument>
- <description>
- Sets the time scale of the TimeScale node with name [code]id[/code] to [code]scale[/code].
- The timescale node is used to speed [Animation]s up if the scale is above 1 or slow them down if it is below 1.
- If applied after a blend or mix, affects all input animations to that blend or mix.
- </description>
- </method>
- <method name="timeseek_node_seek">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="seconds" type="float">
- </argument>
- <description>
- Sets the time seek value of the TimeSeek node with name [code]id[/code] to [code]seconds[/code].
- This functions as a seek in the [Animation] or the blend or mix of [Animation]s input in it.
- </description>
- </method>
- <method name="transition_node_delete_input">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- Deletes the input at [code]input_idx[/code] for the transition node with name [code]id[/code].
- </description>
- </method>
- <method name="transition_node_get_current" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the index of the currently evaluated input for the transition node with name [code]id[/code].
- </description>
- </method>
- <method name="transition_node_get_input_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the number of inputs for the transition node with name [code]id[/code]. You can add inputs by rightclicking on the transition node.
- </description>
- </method>
- <method name="transition_node_get_xfade_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Returns the cross fade time for the transition node with name [code]id[/code].
- </description>
- </method>
- <method name="transition_node_has_input_auto_advance" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the input at [code]input_idx[/code] on transition node with name [code]id[/code] is set to automatically advance to the next input upon completion.
- </description>
- </method>
- <method name="transition_node_set_current">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- The transition node with name [code]id[/code] sets its current input at [code]input_idx[/code].
- </description>
- </method>
- <method name="transition_node_set_input_auto_advance">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- The transition node with name [code]id[/code] advances to its next input automatically when the input at [code]input_idx[/code] completes.
- </description>
- </method>
- <method name="transition_node_set_input_count">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="count" type="int">
- </argument>
- <description>
- Resizes the number of inputs available for the transition node with name [code]id[/code].
- </description>
- </method>
- <method name="transition_node_set_xfade_time">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <description>
- The transition node with name [code]id[/code] sets its cross fade time to [code]time_sec[/code].
- </description>
- </method>
- </methods>
- <members>
- <member name="active" type="bool" setter="set_active" getter="is_active" default="false">
- If [code]true[/code], the [AnimationTreePlayer] is able to play animations.
- </member>
- <member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path" default="NodePath(&quot;..&quot;)">
- The node from which to relatively access other nodes.
- It accesses the Bones, so it should point to the same Node the AnimationPlayer would point its Root Node at.
- </member>
- <member name="master_player" type="NodePath" setter="set_master_player" getter="get_master_player" default="NodePath(&quot;&quot;)">
- The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes.
- Once set, Animation nodes can be added to the AnimationTreePlayer.
- </member>
- <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode" default="1">
- The thread in which to update animations.
- </member>
- </members>
- <constants>
- <constant name="NODE_OUTPUT" value="0" enum="NodeType">
- Output node.
- </constant>
- <constant name="NODE_ANIMATION" value="1" enum="NodeType">
- Animation node.
- </constant>
- <constant name="NODE_ONESHOT" value="2" enum="NodeType">
- OneShot node.
- </constant>
- <constant name="NODE_MIX" value="3" enum="NodeType">
- Mix node.
- </constant>
- <constant name="NODE_BLEND2" value="4" enum="NodeType">
- Blend2 node.
- </constant>
- <constant name="NODE_BLEND3" value="5" enum="NodeType">
- Blend3 node.
- </constant>
- <constant name="NODE_BLEND4" value="6" enum="NodeType">
- Blend4 node.
- </constant>
- <constant name="NODE_TIMESCALE" value="7" enum="NodeType">
- TimeScale node.
- </constant>
- <constant name="NODE_TIMESEEK" value="8" enum="NodeType">
- TimeSeek node.
- </constant>
- <constant name="NODE_TRANSITION" value="9" enum="NodeType">
- Transition node.
- </constant>
- <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
- Process animation during the physics process. This is especially useful when animating physics bodies.
- </constant>
- <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
- Process animation during the idle process.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 9a5870c73d..4190cbe6b9 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.2">
+<class name="Area2D" inherits="CollisionObject2D" version="4.0">
<brief_description>
2D area for detection and 2D physics influence.
</brief_description>
@@ -29,14 +29,14 @@
</description>
</method>
<method name="get_overlapping_areas" qualifiers="const">
- <return type="Array">
+ <return type="Area2D[]">
</return>
<description>
Returns a list of intersecting [Area2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
- <return type="Array">
+ <return type="Node2D[]">
</return>
<description>
Returns a list of intersecting [PhysicsBody2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
@@ -90,7 +90,7 @@
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="1.0">
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&quot;Master&quot;">
+ <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@&quot;Master&quot;">
The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
@@ -155,7 +155,7 @@
<argument index="3" name="self_shape" type="int">
</argument>
<description>
- Emitted when another area enters, reporting which shapes overlapped.
+ Emitted when another area enters, reporting which shapes overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code].
</description>
</signal>
<signal name="area_shape_exited">
diff --git a/doc/classes/Area.xml b/doc/classes/Area3D.xml
index 6bd1382488..a94cecd879 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Area" inherits="CollisionObject" category="Core" version="3.2">
+<class name="Area3D" inherits="CollisionObject3D" version="4.0">
<brief_description>
General-purpose area node for detection and 3D physics influence.
</brief_description>
<description>
- 3D area that detects [CollisionObject] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
+ 3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
</description>
<tutorials>
</tutorials>
@@ -28,17 +28,17 @@
</description>
</method>
<method name="get_overlapping_areas" qualifiers="const">
- <return type="Array">
+ <return type="Area3D[]">
</return>
<description>
- Returns a list of intersecting [Area]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
+ Returns a list of intersecting [Area3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
- <return type="Array">
+ <return type="Node3D[]">
</return>
<description>
- Returns a list of intersecting [PhysicsBody]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
+ Returns a list of intersecting [PhysicsBody3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="overlaps_area" qualifiers="const">
@@ -47,7 +47,7 @@
<argument index="0" name="area" type="Node">
</argument>
<description>
- If [code]true[/code], the given area overlaps the Area.
+ If [code]true[/code], the given area overlaps the Area3D.
[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.
</description>
</method>
@@ -57,9 +57,9 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- If [code]true[/code], the given physics body overlaps the Area.
+ If [code]true[/code], the given physics body overlaps the Area3D.
[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 [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ 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).
</description>
</method>
<method name="set_collision_layer_bit">
@@ -70,7 +70,7 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the layer mask. This simplifies editing this [Area]'s layers.
+ Set/clear individual bits on the layer mask. This simplifies editing this [Area3D]'s layers.
</description>
</method>
<method name="set_collision_mask_bit">
@@ -81,7 +81,7 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the collision mask. This simplifies editing which [Area] layers this [Area] scans.
+ Set/clear individual bits on the collision mask. This simplifies editing which [Area3D] layers this [Area3D] scans.
</description>
</method>
</methods>
@@ -89,7 +89,7 @@
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1">
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" default="&quot;Master&quot;">
+ <member name="audio_bus_name" type="StringName" setter="set_audio_bus" getter="get_audio_bus" default="@&quot;Master&quot;">
The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
@@ -131,26 +131,26 @@
<member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false">
If [code]true[/code], the area applies reverb to its associated audio.
</member>
- <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus" default="&quot;Master&quot;">
+ <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@&quot;Master&quot;">
The reverb bus name to use for this area's associated audio.
</member>
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0">
The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride" default="0">
+ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area3D.SpaceOverride" default="0">
Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
</member>
</members>
<signals>
<signal name="area_entered">
- <argument index="0" name="area" type="Area">
+ <argument index="0" name="area" type="Area3D">
</argument>
<description>
Emitted when another area enters.
</description>
</signal>
<signal name="area_exited">
- <argument index="0" name="area" type="Area">
+ <argument index="0" name="area" type="Area3D">
</argument>
<description>
Emitted when another area exits.
@@ -159,20 +159,20 @@
<signal name="area_shape_entered">
<argument index="0" name="area_id" type="int">
</argument>
- <argument index="1" name="area" type="Area">
+ <argument index="1" name="area" type="Area3D">
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
<argument index="3" name="self_shape" type="int">
</argument>
<description>
- Emitted when another area enters, reporting which areas overlapped.
+ Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code].
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_id" type="int">
</argument>
- <argument index="1" name="area" type="Area">
+ <argument index="1" name="area" type="Area3D">
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
@@ -187,7 +187,7 @@
</argument>
<description>
Emitted when a physics body enters.
- The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ 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).
</description>
</signal>
<signal name="body_exited">
@@ -195,7 +195,7 @@
</argument>
<description>
Emitted when a physics body exits.
- The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ 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).
</description>
</signal>
<signal name="body_shape_entered">
@@ -209,7 +209,7 @@
</argument>
<description>
Emitted when a physics body enters, reporting which shapes overlapped.
- The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ 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).
</description>
</signal>
<signal name="body_shape_exited">
@@ -223,7 +223,7 @@
</argument>
<description>
Emitted when a physics body exits, reporting which shapes were overlapping.
- The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ 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).
</description>
</signal>
</signals>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index e09c1f4b08..7593f7dff4 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Array" category="Built-In Types" version="3.2">
+<class name="Array" version="4.0">
<brief_description>
Generic array datatype.
</brief_description>
@@ -8,13 +8,19 @@
[b]Example:[/b]
[codeblock]
var array = ["One", 2, 3, "Four"]
- print(array[0]) # One
- print(array[2]) # 3
- print(array[-1]) # Four
+ print(array[0]) # One.
+ print(array[2]) # 3.
+ print(array[-1]) # Four.
array[2] = "Three"
- print(array[-2]) # Three
+ print(array[-2]) # Three.
[/codeblock]
- Arrays are always passed by reference.
+ Arrays can be concatenated using the [code]+[/code] operator:
+ [codeblock]
+ var array1 = ["One", 2]
+ var array2 = [3, "Four"]
+ print(array1 + array2) # ["One", 2, 3, "Four"]
+ [/codeblock]
+ [b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate].
</description>
<tutorials>
</tutorials>
@@ -22,67 +28,87 @@
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolColorArray">
+ <argument index="0" name="from" type="PackedColorArray">
+ </argument>
+ <description>
+ Constructs an array from a [PackedColorArray].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PackedVector3Array">
+ </argument>
+ <description>
+ Constructs an array from a [PackedVector3Array].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PackedVector2Array">
</argument>
<description>
- Constructs an array from a [PoolColorArray].
+ Constructs an array from a [PackedVector2Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolVector3Array">
+ <argument index="0" name="from" type="PackedStringArray">
</argument>
<description>
- Constructs an array from a [PoolVector3Array].
+ Constructs an array from a [PackedStringArray].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolVector2Array">
+ <argument index="0" name="from" type="PackedFloat64Array">
</argument>
<description>
- Constructs an array from a [PoolVector2Array].
+ Constructs an array from a [PackedFloat64Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolStringArray">
+ <argument index="0" name="from" type="PackedFloat32Array">
</argument>
<description>
- Constructs an array from a [PoolStringArray].
+ Constructs an array from a [PackedFloat32Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolRealArray">
+ <argument index="0" name="from" type="PackedInt64Array">
</argument>
<description>
- Constructs an array from a [PoolRealArray].
+ Constructs an array from a [PackedInt64Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolIntArray">
+ <argument index="0" name="from" type="PackedInt32Array">
</argument>
<description>
- Constructs an array from a [PoolIntArray].
+ Constructs an array from a [PackedInt32Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolByteArray">
+ <argument index="0" name="from" type="PackedByteArray">
</argument>
<description>
- Constructs an array from a [PoolByteArray].
+ Constructs an array from a [PackedByteArray].
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -93,7 +119,7 @@
<return type="Variant">
</return>
<description>
- Returns the last element of the array if the array is not empty.
+ Returns the last element of the array, or [code]null[/code] if the array is empty.
</description>
</method>
<method name="bsearch">
@@ -101,7 +127,7 @@
</return>
<argument index="0" name="value" type="Variant">
</argument>
- <argument index="1" name="before" type="bool" default="True">
+ <argument index="1" name="before" type="bool" default="true">
</argument>
<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.
@@ -117,7 +143,7 @@
</argument>
<argument index="2" name="func" type="String">
</argument>
- <argument index="3" name="before" type="bool" default="True">
+ <argument index="3" name="before" type="bool" default="true">
</argument>
<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.
@@ -125,6 +151,8 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
</description>
@@ -141,7 +169,7 @@
<method name="duplicate">
<return type="Array">
</return>
- <argument index="0" name="deep" type="bool" default="False">
+ <argument index="0" name="deep" type="bool" default="false">
</argument>
<description>
Returns a copy of the array.
@@ -156,6 +184,8 @@
</description>
</method>
<method name="erase">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -186,7 +216,7 @@
<return type="Variant">
</return>
<description>
- Returns the first element of the array if the array is not empty.
+ Returns the first element of the array, or [code]null[/code] if the array is empty.
</description>
</method>
<method name="has">
@@ -212,6 +242,8 @@
</description>
</method>
<method name="insert">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="int">
</argument>
<argument index="1" name="value" type="Variant">
@@ -221,6 +253,8 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
@@ -243,17 +277,19 @@
<return type="Variant">
</return>
<description>
- Removes the last element of the array.
+ Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty.
</description>
</method>
<method name="pop_front">
<return type="Variant">
</return>
<description>
- Removes the first element of the array.
+ Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -261,6 +297,8 @@
</description>
</method>
<method name="push_front">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -268,6 +306,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="int">
</argument>
<description>
@@ -275,6 +315,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="int">
</argument>
<description>
@@ -293,6 +335,8 @@
</description>
</method>
<method name="shuffle">
+ <return type="void">
+ </return>
<description>
Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GDScript.randi]. Call [method @GDScript.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling.
</description>
@@ -313,35 +357,45 @@
</argument>
<argument index="2" name="step" type="int" default="1">
</argument>
- <argument index="3" name="deep" type="bool" default="False">
+ <argument index="3" name="deep" type="bool" default="false">
</argument>
<description>
Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
</description>
</method>
<method name="sort">
+ <return type="void">
+ </return>
<description>
Sorts the array.
- [b]Note:[/b] strings are sorted in alphabetical, not natural order.
+ [b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example:
+ [codeblock]
+ var strings = ["string1", "string2", "string10", "string11"]
+ strings.sort()
+ print(strings) # Prints [string1, string10, string11, string2]
+ [/codeblock]
</description>
</method>
<method name="sort_custom">
+ <return type="void">
+ </return>
<argument index="0" name="obj" type="Object">
</argument>
<argument index="1" name="func" type="String">
</argument>
<description>
- Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
+ Sorts the array using a custom method. The arguments are an object that holds the method and the name of such 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].
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblock]
class MyCustomSorter:
- static func sort(a, b):
+ static func sort_ascending(a, b):
if a[0] &lt; b[0]:
return true
return false
var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
- my_items.sort_custom(MyCustomSorter, "sort")
+ my_items.sort_custom(MyCustomSorter, "sort_ascending")
+ print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
[/codeblock]
</description>
</method>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 9f32691e57..b45716544a 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.2">
+<class name="ArrayMesh" inherits="Mesh" version="4.0">
<brief_description>
[Mesh] type that provides utility for constructing a surface from arrays.
</brief_description>
<description>
- The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle
+ The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays.
+ The most basic example is the creation of a single triangle:
[codeblock]
- var vertices = PoolVector3Array()
+ var vertices = PackedVector3Array()
vertices.push_back(Vector3(0, 1, 0))
vertices.push_back(Vector3(1, 0, 0))
vertices.push_back(Vector3(0, 0, 1))
@@ -17,18 +18,21 @@
arrays[ArrayMesh.ARRAY_VERTEX] = vertices
# Create the Mesh.
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)
- var m = MeshInstance.new()
+ var m = MeshInstance3D.new()
m.mesh = arr_mesh
[/codeblock]
- The [code]MeshInstance[/code] is ready to be added to the SceneTree to be shown.
+ The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown.
+ See also [ImmediateGeometry3D], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
+ [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html</link>
</tutorials>
<methods>
<method name="add_blend_shape">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.
@@ -43,14 +47,17 @@
</argument>
<argument index="2" name="blend_shapes" type="Array" default="[ ]">
</argument>
- <argument index="3" name="compress_flags" type="int" default="97280">
+ <argument index="3" name="lods" type="Dictionary" default="{
+
+}">
+ </argument>
+ <argument index="4" name="compress_flags" type="int" default="31744">
</argument>
<description>
Creates a new surface.
- Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See [Mesh] for details. (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.
+ 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 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 ARRAY_INDEX] if it is used.
Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
- Godot uses clockwise winding order for front faces of triangle primitive modes.
</description>
</method>
<method name="clear_blend_shapes">
@@ -60,6 +67,13 @@
Removes all blend shapes from this [ArrayMesh].
</description>
</method>
+ <method name="clear_surfaces">
+ <return type="void">
+ </return>
+ <description>
+ Removes all surfaces from this [ArrayMesh].
+ </description>
+ </method>
<method name="get_blend_shape_count" qualifiers="const">
<return type="int">
</return>
@@ -68,7 +82,7 @@
</description>
</method>
<method name="get_blend_shape_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="index" type="int">
</argument>
@@ -148,15 +162,6 @@
Returns the primitive type of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
- <method name="surface_remove">
- <return type="void">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Removes a surface at position [code]surf_idx[/code], shifting greater surfaces one [code]surf_idx[/code] slot down.
- </description>
- </method>
<method name="surface_set_name">
<return type="void">
</return>
@@ -175,7 +180,7 @@
</argument>
<argument index="1" name="offset" type="int">
</argument>
- <argument index="2" name="data" type="PoolByteArray">
+ <argument index="2" name="data" type="PackedByteArray">
</argument>
<description>
Updates a specified region of mesh arrays on the GPU.
@@ -185,6 +190,7 @@
</methods>
<members>
<member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1">
+ Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
</member>
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
@@ -198,31 +204,31 @@
Amount of weights/bone indices per vertex (always 4).
</constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
- [PoolVector3Array], [PoolVector2Array], or [Array] of vertex positions.
+ [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions.
</constant>
<constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
- [PoolVector3Array] of vertex normals.
+ [PackedVector3Array] of vertex normals.
</constant>
<constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
- [PoolRealArray] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
+ [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
</constant>
<constant name="ARRAY_COLOR" value="3" enum="ArrayType">
- [PoolColorArray] of vertex colors.
+ [PackedColorArray] of vertex colors.
</constant>
<constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
- [PoolVector2Array] for UV coordinates.
+ [PackedVector2Array] for UV coordinates.
</constant>
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
- [PoolVector2Array] for second UV coordinates.
+ [PackedVector2Array] for second UV coordinates.
</constant>
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
- [PoolRealArray] or [PoolIntArray] of bone indices. Each element in groups of 4 floats.
+ [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
- [PoolRealArray] of bone weights. Each element in groups of 4 floats.
+ [PackedFloat32Array] of bone weights. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
- [PoolIntArray] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
+ [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
</constant>
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
@@ -232,10 +238,10 @@
Array format will include vertices (mandatory).
</constant>
<constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat">
- Array format will include normals
+ Array format will include normals.
</constant>
<constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat">
- Array format will include tangents
+ Array format will include tangents.
</constant>
<constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat">
Array format will include a color array.
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index db6ac1bc6d..5bc077ef49 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -1,23 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AtlasTexture" inherits="Texture" category="Core" version="3.2">
+<class name="AtlasTexture" inherits="Texture2D" version="4.0">
<brief_description>
Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
</brief_description>
<description>
- [Texture] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture], a margin that defines the border width, and a region that defines the actual area of the AtlasTexture.
+ [Texture2D] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture2D], a margin that defines the border width, and a region that defines the actual area of the AtlasTexture.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas">
- The texture that contains the atlas. Can be any [Texture] subtype.
+ <member name="atlas" type="Texture2D" setter="set_atlas" getter="get_atlas">
+ The texture that contains the atlas. Can be any [Texture2D] subtype.
</member>
<member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false">
If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2( 0, 0, 0, 0 )">
The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin.
</member>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
index fb36440a67..09746913bd 100644
--- a/doc/classes/AudioBusLayout.xml
+++ b/doc/classes/AudioBusLayout.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.2">
+<class name="AudioBusLayout" inherits="Resource" version="4.0">
<brief_description>
Stores information about the audio buses.
</brief_description>
diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml
index 3e7863a44c..60bf15ce57 100644
--- a/doc/classes/AudioEffect.xml
+++ b/doc/classes/AudioEffect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffect" inherits="Resource" category="Core" version="3.2">
+<class name="AudioEffect" inherits="Resource" version="4.0">
<brief_description>
Audio effect for audio.
</brief_description>
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
index 3003238eb9..1334a81661 100644
--- a/doc/classes/AudioEffectAmplify.xml
+++ b/doc/classes/AudioEffectAmplify.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectAmplify" inherits="AudioEffect" version="4.0">
<brief_description>
Adds an amplifying audio effect to an audio bus.
Increases or decreases the volume of the selected audio bus.
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index f85c8cdd32..e8b398c8f4 100644
--- a/doc/classes/AudioEffectBandLimitFilter.xml
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.2">
+<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
Adds a band limit filter to the audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
index 359eb9d669..ad3dbc5256 100644
--- a/doc/classes/AudioEffectBandPassFilter.xml
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2">
+<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
Adds a band pass filter to the audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
index 4da125ba63..30913a1529 100644
--- a/doc/classes/AudioEffectChorus.xml
+++ b/doc/classes/AudioEffectChorus.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectChorus" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a chorus audio effect.
</brief_description>
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 6834804ea7..3117978d8a 100644
--- a/doc/classes/AudioEffectCompressor.xml
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectCompressor" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a compressor audio effect to an audio bus.
Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume.
@@ -32,7 +32,7 @@
<member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" default="250.0">
Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000.
</member>
- <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain" default="&quot;&quot;">
+ <member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="@&quot;&quot;">
Reduce the sound level using another audio bus for threshold detection.
</member>
<member name="threshold" type="float" setter="set_threshold" getter="get_threshold" default="0.0">
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index aea6ead983..e55e0cb2ad 100644
--- a/doc/classes/AudioEffectDelay.xml
+++ b/doc/classes/AudioEffectDelay.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectDelay" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a delay audio effect to an audio bus. Plays input signal back after a period of time.
Two tap delay and feedback options.
diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml
index 0ee7d73f88..3cfeaadb23 100644
--- a/doc/classes/AudioEffectDistortion.xml
+++ b/doc/classes/AudioEffectDistortion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectDistortion" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a distortion audio effect to an Audio bus.
Modify the sound to make it dirty.
diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
index d30b6fc71d..c27c2f221c 100644
--- a/doc/classes/AudioEffectEQ.xml
+++ b/doc/classes/AudioEffectEQ.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectEQ" inherits="AudioEffect" version="4.0">
<brief_description>
Base class for audio equalizers. Gives you control over frequencies.
Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs.
diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml
index e94c4c71df..c9fb03e23c 100644
--- a/doc/classes/AudioEffectEQ10.xml
+++ b/doc/classes/AudioEffectEQ10.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.2">
+<class name="AudioEffectEQ10" inherits="AudioEffectEQ" version="4.0">
<brief_description>
Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml
index dd26e06ee8..7ff8a1756e 100644
--- a/doc/classes/AudioEffectEQ21.xml
+++ b/doc/classes/AudioEffectEQ21.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.2">
+<class name="AudioEffectEQ21" inherits="AudioEffectEQ" version="4.0">
<brief_description>
Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml
index eb3dc738ef..b47da5ed2a 100644
--- a/doc/classes/AudioEffectEQ6.xml
+++ b/doc/classes/AudioEffectEQ6.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.2">
+<class name="AudioEffectEQ6" inherits="AudioEffectEQ" version="4.0">
<brief_description>
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.
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 5daad6748f..f548fb49cc 100644
--- a/doc/classes/AudioEffectFilter.xml
+++ b/doc/classes/AudioEffectFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectFilter" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a filter to the audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index 589195da02..82a3c74941 100644
--- a/doc/classes/AudioEffectHighPassFilter.xml
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2">
+<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
Adds a high-pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index cccd18afcc..cf620e4417 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.2">
+<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml
index eb8bcfdf2a..dc76880a36 100644
--- a/doc/classes/AudioEffectInstance.xml
+++ b/doc/classes/AudioEffectInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectInstance" inherits="Reference" category="Core" version="3.2">
+<class name="AudioEffectInstance" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index ee6252809a..2fbea06aed 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectLimiter" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a soft-clip limiter audio effect to an Audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
index c0319a6713..e7a66d03bd 100644
--- a/doc/classes/AudioEffectLowPassFilter.xml
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2">
+<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
Adds a low-pass filter to the Audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index 1e60e637fc..7cf09b0f05 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.2">
+<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index 4b5cfd7e51..2393674a2e 100644
--- a/doc/classes/AudioEffectNotchFilter.xml
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.2">
+<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
Adds a notch filter to the Audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml
index e3a2dfcf21..19c4cd1457 100644
--- a/doc/classes/AudioEffectPanner.xml
+++ b/doc/classes/AudioEffectPanner.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectPanner" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a panner audio effect to an Audio bus. Pans sound left or right.
</brief_description>
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
index 445f78dd73..b1d229e150 100644
--- a/doc/classes/AudioEffectPhaser.xml
+++ b/doc/classes/AudioEffectPhaser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectPhaser" inherits="AudioEffect" version="4.0">
<brief_description>
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.
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index 1f891dfb32..afe364de63 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectPitchShift" inherits="AudioEffect" version="4.0">
<brief_description>
Adds a pitch-shifting audio effect to an Audio bus.
Raises or lowers the pitch of original sound.
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index 4f97797b37..4dac81322f 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -1,22 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectRecord" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectRecord" inherits="AudioEffect" version="4.0">
<brief_description>
+ Audio effect used for recording sound from a microphone.
</brief_description>
<description>
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link>
</tutorials>
<methods>
<method name="get_recording" qualifiers="const">
<return type="AudioStreamSample">
</return>
<description>
+ Returns the recorded sample.
</description>
</method>
<method name="is_recording_active" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether the recording is active or not.
</description>
</method>
<method name="set_recording_active">
@@ -25,11 +29,13 @@
<argument index="0" name="record" type="bool">
</argument>
<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>
</members>
<constants>
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index a0664e727f..26eb2be753 100644
--- a/doc/classes/AudioEffectReverb.xml
+++ b/doc/classes/AudioEffectReverb.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectReverb" inherits="AudioEffect" version="4.0">
<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.
diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml
index a56e4f2692..4c08b18f1d 100644
--- a/doc/classes/AudioEffectSpectrumAnalyzer.xml
+++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml
index ca068d572d..53428cdfb8 100644
--- a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml
+++ b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectSpectrumAnalyzerInstance" inherits="AudioEffectInstance" category="Core" version="3.2">
+<class name="AudioEffectSpectrumAnalyzerInstance" inherits="AudioEffectInstance" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
index 6cb692b5d7..663e3e982c 100644
--- a/doc/classes/AudioEffectStereoEnhance.xml
+++ b/doc/classes/AudioEffectStereoEnhance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core" version="3.2">
+<class name="AudioEffectStereoEnhance" inherits="AudioEffect" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 2d3ceebed5..49c6f5bb34 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioServer" inherits="Object" category="Core" version="3.2">
+<class name="AudioServer" inherits="Object" version="4.0">
<brief_description>
Server interface for low-level audio access.
</brief_description>
<description>
- AudioServer is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
+ [AudioServer] is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
@@ -32,25 +32,27 @@
Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code].
</description>
</method>
- <method name="capture_get_device_list">
- <return type="Array">
+ <method name="capture_get_device">
+ <return type="String">
</return>
<description>
- Returns the names of all audio input devices detected on the system.
+ Name of the current device for audio input (see [method capture_get_device_list]).
</description>
</method>
- <method name="capture_start">
- <return type="int" enum="Error">
+ <method name="capture_get_device_list">
+ <return type="Array">
</return>
<description>
- Attempts to start recording from the audio driver's capture device. On success, the return value is [constant OK].
+ Returns the names of all audio input devices detected on the system.
</description>
</method>
- <method name="capture_stop">
- <return type="int" enum="Error">
+ <method name="capture_set_device">
+ <return type="void">
</return>
+ <argument index="0" name="name" type="String">
+ </argument>
<description>
- Attempts to stop recording from the audio driver's capture device. On success, the return value is [constant OK].
+ Sets which audio input device is used for audio capture.
</description>
</method>
<method name="generate_bus_layout" qualifiers="const">
@@ -99,12 +101,13 @@
<argument index="2" name="channel" type="int" default="0">
</argument>
<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">
</return>
- <argument index="0" name="bus_name" type="String">
+ <argument index="0" name="bus_name" type="StringName">
</argument>
<description>
Returns the index of the bus with the name [code]bus_name[/code].
@@ -142,7 +145,7 @@
</description>
</method>
<method name="get_bus_send" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
@@ -159,32 +162,11 @@
Returns the volume of the bus at index [code]bus_idx[/code] in dB.
</description>
</method>
- <method name="get_capture_buffer">
- <return type="PoolIntArray">
- </return>
- <description>
- Returns an [PoolIntArray] containing audio frames from the capture device.
- </description>
- </method>
- <method name="get_capture_position">
- <return type="int">
- </return>
- <description>
- Returns the write position of the capture device buffer.
- </description>
- </method>
- <method name="get_capture_size">
- <return type="int">
- </return>
- <description>
- Returns the size of the capture device buffer.
- </description>
- </method>
<method name="get_device_list">
<return type="Array">
</return>
<description>
- Returns the names of all audio output devices detected on the system.
+ Returns the names of all audio devices detected on the system.
</description>
</method>
<method name="get_mix_rate" qualifiers="const">
@@ -212,12 +194,14 @@
<return type="float">
</return>
<description>
+ Returns the relative time since the last mix occurred.
</description>
</method>
<method name="get_time_to_next_mix" qualifiers="const">
<return type="float">
</return>
<description>
+ Returns the relative time until the next mix occurs.
</description>
</method>
<method name="is_bus_bypassing_effects" qualifiers="const">
@@ -262,7 +246,8 @@
<return type="void">
</return>
<description>
- Locks the audio driver's main loop. Remember to unlock it afterwards.
+ Locks the audio driver's main loop.
+ [b]Note:[/b] Remember to unlock it afterwards.
</description>
</method>
<method name="move_bus">
@@ -356,7 +341,7 @@
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
- <argument index="1" name="send" type="String">
+ <argument index="1" name="send" type="StringName">
</argument>
<description>
Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code].
@@ -409,9 +394,6 @@
<member name="bus_count" type="int" setter="set_bus_count" getter="get_bus_count" default="1">
Number of available audio buses.
</member>
- <member name="capture_device" type="String" setter="capture_set_device" getter="capture_get_device" default="&quot;&quot;">
- Name of the current device for audio input (see [method capture_get_device_list]).
- </member>
<member name="device" type="String" setter="set_device" getter="get_device" default="&quot;Default&quot;">
Name of the current device for audio output (see [method get_device_list]).
</member>
@@ -420,14 +402,6 @@
</member>
</members>
<signals>
- <signal name="audio_mix_callback">
- <description>
- </description>
- </signal>
- <signal name="audio_update_callback">
- <description>
- </description>
- </signal>
<signal name="bus_layout_changed">
<description>
Emitted when the [AudioBusLayout] changes.
@@ -442,10 +416,10 @@
A 3.1 channel surround setup was detected.
</constant>
<constant name="SPEAKER_SURROUND_51" value="2" enum="SpeakerMode">
- A 5.1 channel surround setup was detected.
+ A 5.1 channel surround setup was detected.
</constant>
<constant name="SPEAKER_SURROUND_71" value="3" enum="SpeakerMode">
- A 7.1 channel surround setup was detected.
+ A 7.1 channel surround setup was detected.
</constant>
</constants>
</class>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index 15662b7eff..d5c8e42515 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStream" inherits="Resource" category="Core" version="3.2">
+<class name="AudioStream" inherits="Resource" version="4.0">
<brief_description>
Base class for audio streams.
</brief_description>
diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml
index 9a1e4432f1..e93da411cd 100644
--- a/doc/classes/AudioStreamGenerator.xml
+++ b/doc/classes/AudioStreamGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamGenerator" inherits="AudioStream" category="Core" version="3.2">
+<class name="AudioStreamGenerator" inherits="AudioStream" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index 448284e670..e3e17b8a93 100644
--- a/doc/classes/AudioStreamGeneratorPlayback.xml
+++ b/doc/classes/AudioStreamGeneratorPlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" category="Core" version="3.2">
+<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -37,7 +37,7 @@
<method name="push_buffer">
<return type="bool">
</return>
- <argument index="0" name="frames" type="PoolVector2Array">
+ <argument index="0" name="frames" type="PackedVector2Array">
</argument>
<description>
</description>
diff --git a/doc/classes/AudioStreamMicrophone.xml b/doc/classes/AudioStreamMicrophone.xml
index afa60655ea..e73e50e3a9 100644
--- a/doc/classes/AudioStreamMicrophone.xml
+++ b/doc/classes/AudioStreamMicrophone.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamMicrophone" inherits="AudioStream" category="Core" version="3.2">
+<class name="AudioStreamMicrophone" inherits="AudioStream" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index 92e654a50f..f928d54526 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.2">
+<class name="AudioStreamPlayback" inherits="Reference" version="4.0">
<brief_description>
Meta class for playing back audio.
</brief_description>
diff --git a/doc/classes/AudioStreamPlaybackResampled.xml b/doc/classes/AudioStreamPlaybackResampled.xml
index 07e7e70bf1..faa563fdd8 100644
--- a/doc/classes/AudioStreamPlaybackResampled.xml
+++ b/doc/classes/AudioStreamPlaybackResampled.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" category="Core" version="3.2">
+<class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 4bc29335ff..dbc3d3e21b 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.2">
+<class name="AudioStreamPlayer" inherits="Node" version="4.0">
<brief_description>
Plays back audio non-positionally.
</brief_description>
@@ -21,6 +21,7 @@
<return type="AudioStreamPlayback">
</return>
<description>
+ Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer].
</description>
</method>
<method name="play">
@@ -53,14 +54,14 @@
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
</member>
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0">
- If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants.
+ If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
- Changes the pitch and the tempo of the audio.
+ The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false">
If [code]true[/code], audio is playing.
@@ -69,6 +70,7 @@
The [AudioStream] object to be played.
</member>
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
+ If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
</member>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
Volume of sound, in dB.
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 4734aff770..844e2316ba 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.2">
+<class name="AudioStreamPlayer2D" inherits="Node2D" version="4.0">
<brief_description>
Plays audio in 2D.
</brief_description>
@@ -21,6 +21,7 @@
<return type="AudioStreamPlayback">
</return>
<description>
+ Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D].
</description>
</method>
<method name="play">
@@ -59,14 +60,14 @@
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0">
Maximum distance from which audio is still hearable.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
- Changes the pitch and the tempo of the audio.
+ The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false">
If [code]true[/code], audio is playing.
@@ -75,6 +76,7 @@
The [AudioStream] object to be played.
</member>
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
+ If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
</member>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
Base volume without dampening.
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index a73f96d082..bd90e3bd1a 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.2">
+<class name="AudioStreamPlayer3D" inherits="Node3D" version="4.0">
<brief_description>
Plays 3D sound in 3D space.
</brief_description>
@@ -21,6 +21,7 @@
<return type="AudioStreamPlayback">
</return>
<description>
+ Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D].
</description>
</method>
<method name="play">
@@ -65,7 +66,7 @@
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0">
@@ -90,7 +91,7 @@
Decides if audio should pause when source is outside of [member max_distance] range.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
- Changes the pitch and the tempo of the audio.
+ The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false">
If [code]true[/code], audio is playing.
@@ -99,6 +100,7 @@
The [AudioStream] object to be played.
</member>
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
+ If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
</member>
<member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0">
Base sound level unaffected by dampening, in dB.
diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml
index a2ee314d92..7e93b3267c 100644
--- a/doc/classes/AudioStreamRandomPitch.xml
+++ b/doc/classes/AudioStreamRandomPitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.2">
+<class name="AudioStreamRandomPitch" inherits="AudioStream" version="4.0">
<brief_description>
Plays audio with random pitch shifting.
</brief_description>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index a496902ded..c12e1bd05c 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.2">
+<class name="AudioStreamSample" inherits="AudioStream" version="4.0">
<brief_description>
Stores audio data loaded from WAV files.
</brief_description>
@@ -22,21 +22,21 @@
</method>
</methods>
<members>
- <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )">
+ <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )">
Contains the audio data in bytes.
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0">
- Audio format. See [code]FORMAT_*[/code] constants for values.
+ 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">
- Loop start in bytes.
+ The loop start 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_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0">
- Loop end in bytes.
+ 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">
- Loop mode. See [code]LOOP_*[/code] constants for values.
+ The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100">
The sample rate for mixing this audio.
@@ -59,13 +59,13 @@
Audio does not loop.
</constant>
<constant name="LOOP_FORWARD" value="1" enum="LoopMode">
- Audio loops the data between [member loop_begin] and [member loop_end] playing forward only.
+ Audio loops the data between [member loop_begin] and [member loop_end], playing forward only.
</constant>
<constant name="LOOP_PING_PONG" value="2" enum="LoopMode">
- Audio loops the data between [member loop_begin] and [member loop_end] playing back and forth.
+ Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth.
</constant>
<constant name="LOOP_BACKWARD" value="3" enum="LoopMode">
- Audio loops the data between [member loop_begin] and [member loop_end] playing backward only.
+ Audio loops the data between [member loop_begin] and [member loop_end], playing backward only.
</constant>
</constants>
</class>
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 945af0c701..7cc6a5613b 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.2">
+<class name="BackBufferCopy" inherits="Node2D" version="4.0">
<brief_description>
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function.
</brief_description>
<description>
Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
+ [b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the BackBufferCopy node instead of adding them as children.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml
index 4a1381295f..6fd08fc4e4 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/BakedLightmap.xml
@@ -1,94 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.2">
+<class name="BakedLightmap" inherits="VisualInstance3D" version="4.0">
<brief_description>
- Prerendered indirect light map for a scene.
</brief_description>
<description>
- Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the [GIProbe] approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time.
</description>
<tutorials>
- <link>https://docs.godotengine.org/en/latest/tutorials/3d/baked_lightmaps.html</link>
</tutorials>
<methods>
- <method name="bake">
- <return type="int" enum="BakedLightmap.BakeError">
- </return>
- <argument index="0" name="from_node" type="Node" default="null">
- </argument>
- <argument index="1" name="create_visual_debug" type="bool" default="false">
- </argument>
- <description>
- Bakes the lightmaps within the currently edited scene.
- </description>
- </method>
- <method name="debug_bake">
- <return type="void">
- </return>
- <description>
- Executes a dry run bake of lightmaps within the currently edited scene.
- </description>
- </method>
</methods>
<members>
- <member name="bake_cell_size" type="float" setter="set_bake_cell_size" getter="get_bake_cell_size" default="0.25">
- Grid subdivision size for lightmapper calculation. The default value will work for most cases. Increase for better lighting on small details or if your scene is very large.
+ <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005">
</member>
- <member name="bake_default_texels_per_unit" type="float" setter="set_bake_default_texels_per_unit" getter="get_bake_default_texels_per_unit" default="20.0">
- If a [member Mesh.lightmap_size_hint] isn't specified, the lightmap baker will dynamically set the lightmap size using this value. This value is measured in texels per world unit. The maximum lightmap texture size is 4096x4096.
+ <member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="1">
</member>
- <member name="bake_energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
- Multiplies the light sources' intensity by this value. For instance, if the value is set to 2, lights will be twice as bright. If the value is set to 0.5, lights will be half as bright.
+ <member name="directional" type="bool" setter="set_directional" getter="is_directional" default="false">
</member>
- <member name="bake_extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )">
- The size of the affected area.
+ <member name="environment_custom_color" type="Color" setter="set_environment_custom_color" getter="get_environment_custom_color">
</member>
- <member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr" default="false">
- If [code]true[/code], the lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller file size.
+ <member name="environment_custom_energy" type="float" setter="set_environment_custom_energy" getter="get_environment_custom_energy">
</member>
- <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode" default="0">
- Lightmapping mode. See [enum BakeMode].
+ <member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky">
</member>
- <member name="bake_propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0">
- Defines how far the light will travel before it is no longer effective. The higher the number, the farther the light will travel. For instance, if the value is set to 2, the light will go twice as far. If the value is set to 0.5, the light will only go half as far.
+ <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="BakedLightmap.EnvironmentMode" default="0">
</member>
- <member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1">
- Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality].
+ <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="BakedLightmap.GenerateProbes" default="0">
</member>
- <member name="capture_cell_size" type="float" setter="set_capture_cell_size" getter="get_capture_cell_size" default="0.5">
- Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size].
- </member>
- <member name="image_path" type="String" setter="set_image_path" getter="get_image_path" default="&quot;.&quot;">
- The location where lightmaps will be saved.
+ <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
</member>
<member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
- The calculated light data.
+ </member>
+ <member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384">
+ </member>
+ <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1">
+ </member>
+ <member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true">
</member>
</members>
<constants>
<constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
- The lowest bake quality mode. Fastest to calculate.
</constant>
<constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
- The default bake quality mode.
</constant>
<constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality">
- The highest bake quality mode. Takes longer to calculate.
</constant>
- <constant name="BAKE_MODE_CONE_TRACE" value="0" enum="BakeMode">
- Less precise but faster bake mode.
+ <constant name="BAKE_QUALITY_ULTRA" value="3" enum="BakeQuality">
+ </constant>
+ <constant name="GENERATE_PROBES_DISABLED" value="0" enum="GenerateProbes">
+ </constant>
+ <constant name="GENERATE_PROBES_SUBDIV_4" value="1" enum="GenerateProbes">
+ </constant>
+ <constant name="GENERATE_PROBES_SUBDIV_8" value="2" enum="GenerateProbes">
</constant>
- <constant name="BAKE_MODE_RAY_TRACE" value="1" enum="BakeMode">
- More precise bake mode but can take considerably longer to bake.
+ <constant name="GENERATE_PROBES_SUBDIV_16" value="3" enum="GenerateProbes">
+ </constant>
+ <constant name="GENERATE_PROBES_SUBDIV_32" value="4" enum="GenerateProbes">
</constant>
<constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
</constant>
- <constant name="BAKE_ERROR_NO_SAVE_PATH" value="1" enum="BakeError">
+ <constant name="BAKE_ERROR_NO_LIGHTMAPPER" value="1" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_NO_SAVE_PATH" value="2" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_NO_MESHES" value="3" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_MESHES_INVALID" value="4" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="5" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_USER_ABORTED" value="6" enum="BakeError">
+ </constant>
+ <constant name="ENVIRONMENT_MODE_DISABLED" value="0" enum="EnvironmentMode">
</constant>
- <constant name="BAKE_ERROR_NO_MESHES" value="2" enum="BakeError">
+ <constant name="ENVIRONMENT_MODE_SCENE" value="1" enum="EnvironmentMode">
</constant>
- <constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="3" enum="BakeError">
+ <constant name="ENVIRONMENT_MODE_CUSTOM_SKY" value="2" enum="EnvironmentMode">
</constant>
- <constant name="BAKE_ERROR_USER_ABORTED" value="4" enum="BakeError">
+ <constant name="ENVIRONMENT_MODE_CUSTOM_COLOR" value="3" enum="EnvironmentMode">
</constant>
</constants>
</class>
diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml
index 68bbfb8f60..026477782a 100644
--- a/doc/classes/BakedLightmapData.xml
+++ b/doc/classes/BakedLightmapData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.2">
+<class name="BakedLightmapData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -12,9 +12,11 @@
</return>
<argument index="0" name="path" type="NodePath">
</argument>
- <argument index="1" name="lightmap" type="Texture">
+ <argument index="1" name="lightmap" type="Rect2">
</argument>
- <argument index="2" name="instance" type="int">
+ <argument index="2" name="offset" type="int">
+ </argument>
+ <argument index="3" name="arg3" type="int">
</argument>
<description>
</description>
@@ -31,33 +33,31 @@
<description>
</description>
</method>
- <method name="get_user_lightmap" qualifiers="const">
- <return type="Texture">
+ <method name="get_user_path" qualifiers="const">
+ <return type="NodePath">
</return>
<argument index="0" name="user_idx" type="int">
</argument>
<description>
</description>
</method>
- <method name="get_user_path" qualifiers="const">
- <return type="NodePath">
+ <method name="is_using_spherical_harmonics" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="user_idx" type="int">
+ <description>
+ </description>
+ </method>
+ <method name="set_uses_spherical_harmonics">
+ <return type="void">
+ </return>
+ <argument index="0" name="uses_spherical_harmonics" type="bool">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 0, 0, 0 )">
- </member>
- <member name="cell_space_transform" type="Transform" setter="set_cell_space_transform" getter="get_cell_space_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- </member>
- <member name="cell_subdiv" type="int" setter="set_cell_subdiv" getter="get_cell_subdiv" default="1">
- </member>
- <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
- </member>
- <member name="octree" type="PoolByteArray" setter="set_octree" getter="get_octree" default="PoolByteArray( )">
+ <member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture">
</member>
</members>
<constants>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index b4f4b21afd..5e908b0e53 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BaseButton" inherits="Control" category="Core" version="3.2">
+<class name="BaseButton" inherits="Control" version="4.0">
<brief_description>
Base class for different kinds of buttons.
</brief_description>
@@ -22,14 +22,14 @@
<argument index="0" name="button_pressed" type="bool">
</argument>
<description>
- Called when the button is toggled (only if toggle_mode is active).
+ Called when the button is toggled (only if [member toggle_mode] is active).
</description>
</method>
<method name="get_draw_mode" qualifiers="const">
<return type="int" enum="BaseButton.DrawMode">
</return>
<description>
- Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [code]DRAW_*[/code] enum.
+ Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum.
</description>
</method>
<method name="is_hovered" qualifiers="const">
@@ -42,7 +42,7 @@
</methods>
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1">
- Determines when the button is considered clicked, one of the [code]ACTION_MODE_*[/code] constants.
+ Determines when the button is considered clicked, one of the [enum ActionMode] constants.
</member>
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1">
Binary mask to choose which mouse buttons this button will respond to.
@@ -60,9 +60,10 @@
</member>
<member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false">
If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
+ [b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
- If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).
+ If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active).
</member>
<member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut">
[ShortCut] associated to the button.
@@ -112,6 +113,7 @@
The state of buttons are disabled.
</constant>
<constant name="DRAW_HOVER_PRESSED" value="4" enum="DrawMode">
+ The state of buttons are both hovered and pressed.
</constant>
<constant name="ACTION_MODE_BUTTON_PRESS" value="0" enum="ActionMode">
Require just a press to consider the button clicked.
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
new file mode 100644
index 0000000000..1da4e23437
--- /dev/null
+++ b/doc/classes/BaseMaterial3D.xml
@@ -0,0 +1,710 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BaseMaterial3D" inherits="Material" version="4.0">
+ <brief_description>
+ Default 3D rendering material.
+ </brief_description>
+ <description>
+ This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/3d/spatial_material.html</link>
+ </tutorials>
+ <methods>
+ <method name="get_feature" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature">
+ </argument>
+ <description>
+ Returns [code]true[/code], if the specified [enum Feature] is enabled.
+ </description>
+ </method>
+ <method name="get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam">
+ </argument>
+ <description>
+ Returns the [Texture] associated with the specified [enum TextureParam].
+ </description>
+ </method>
+ <method name="set_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam">
+ </argument>
+ <argument index="1" name="texture" type="Texture2D">
+ </argument>
+ <description>
+ Sets the texture for the slot specified by [code]param[/code]. 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_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture to multiply by [member albedo_color]. Used for basic texturing of objects.
+ </member>
+ <member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold">
+ Threshold at which the alpha scissor will discard values.
+ </member>
+ <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy">
+ The strength of the anisotropy effect.
+ </member>
+ <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken.
+ </member>
+ <member name="anisotropy_flowmap" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture that offsets the tangent map for anisotropy calculations.
+ </member>
+ <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture].
+ </member>
+ <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect">
+ Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic.
+ </member>
+ <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag">
+ If [code]true[/code], use [code]UV2[/code] coordinates to look up from the [member ao_texture].
+ </member>
+ <member name="ao_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture that defines the amount of ambient occlusion for a given point on the object.
+ </member>
+ <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel">
+ Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
+ </member>
+ <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight">
+ The color used by the backlight effect. Represents the light passing through an object.
+ </member>
+ <member name="backlight_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], the backlight effect is enabled.
+ </member>
+ <member name="backlight_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture used to control the backlight effect per-pixel. Added to [member backlight].
+ </member>
+ <member name="billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED].
+ </member>
+ <member name="billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
+ Controls how the object faces the camera. See [enum BillboardMode].
+ </member>
+ <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="BaseMaterial3D.BlendMode" default="0">
+ The material's blend mode.
+ [b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode].
+ </member>
+ <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat">
+ Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect.
+ </member>
+ <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.
+ </member>
+ <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss">
+ Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat.
+ </member>
+ <member name="clearcoat_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel.
+ </member>
+ <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="BaseMaterial3D.CullMode" default="0">
+ Which side of the object is not drawn when backfaces are rendered. See [enum CullMode].
+ </member>
+ <member name="depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="BaseMaterial3D.DepthDrawMode" default="0">
+ 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.
+ </member>
+ <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode">
+ 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.
+ </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.
+ </member>
+ <member name="detail_normal" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture that specifies the per-pixel normal of the detail overlay.
+ [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">
+ Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.
+ </member>
+ <member name="diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="BaseMaterial3D.DiffuseMode" default="0">
+ The algorithm used for diffuse light scattering. See [enum DiffuseMode].
+ </member>
+ <member name="disable_ambient_light" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the object receives no ambient light.
+ </member>
+ <member name="disable_receive_shadows" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the object receives no shadow that would otherwise be cast onto it.
+ </member>
+ <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance">
+ Distance at which the object fades fully and is no longer visible.
+ </member>
+ <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance">
+ Distance at which the object starts to fade. If the object is less than this distance away it will appear normal.
+ </member>
+ <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0">
+ Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.
+ </member>
+ <member name="emission" type="Color" setter="set_emission" getter="get_emission">
+ The emitted light's color. See [member emission_enabled].
+ </member>
+ <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] is used and this object is used in baked lighting.
+ </member>
+ <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy">
+ The emitted light's strength. See [member emission_enabled].
+ </member>
+ <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag">
+ Use [code]UV2[/code] to read from the [member emission_texture].
+ </member>
+ <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="BaseMaterial3D.EmissionOperator">
+ Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options.
+ </member>
+ <member name="emission_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture that specifies how much surface emits light at a given point.
+ </member>
+ <member name="fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the object is rendered at the same size regardless of distance.
+ </member>
+ <member name="grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" default="false">
+ If [code]true[/code], enables the vertex grow setting. See [member grow_amount].
+ </member>
+ <member name="grow_amount" type="float" setter="set_grow" getter="get_grow" default="0.0">
+ 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">
+ </member>
+ <member name="heightmap_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ </member>
+ <member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal">
+ </member>
+ <member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent">
+ </member>
+ <member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="heightmap_max_layers" type="int" setter="set_heightmap_deep_parallax_max_layers" getter="get_heightmap_deep_parallax_max_layers">
+ </member>
+ <member name="heightmap_min_layers" type="int" setter="set_heightmap_deep_parallax_min_layers" getter="get_heightmap_deep_parallax_min_layers">
+ </member>
+ <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale">
+ </member>
+ <member name="heightmap_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ </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.
+ [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">
+ Texture used to specify metallic for an object. This is multiplied by [member metallic].
+ </member>
+ <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0">
+ Specifies the channel of the [member metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
+ </member>
+ <member name="no_depth_test" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], depth testing is disabled and the object will be drawn in render order.
+ </member>
+ <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], normal mapping is enabled.
+ </member>
+ <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale">
+ 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 normal read from [code]normal_texture[/code] 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="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
+ The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode].
+ </member>
+ <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
+ If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode].
+ </member>
+ <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
+ The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode].
+ </member>
+ <member name="point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0">
+ The point size in pixels. See [member use_point_size].
+ </member>
+ <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance">
+ Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.
+ </member>
+ <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false">
+ If [code]true[/code], the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.
+ </member>
+ <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object.
+ </member>
+ <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction">
+ The strength of the refraction effect.
+ </member>
+ <member name="refraction_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale].
+ </member>
+ <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="BaseMaterial3D.TextureChannel">
+ Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
+ </member>
+ <member name="rim" type="float" setter="set_rim" getter="get_rim">
+ Sets the strength of the rim lighting effect.
+ </member>
+ <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.
+ </member>
+ <member name="rim_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim].
+ </member>
+ <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint">
+ The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best.
+ </member>
+ <member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0">
+ Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic].
+ </member>
+ <member name="roughness_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture used to control the roughness per-pixel. Multiplied by [member roughness].
+ </member>
+ <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0">
+ Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
+ </member>
+ <member name="shading_mode" type="int" setter="set_shading_mode" getter="get_shading_mode" enum="BaseMaterial3D.ShadingMode" default="1">
+ Sets whether the shading takes place per-pixel or per-vertex. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel.
+ </member>
+ <member name="shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR.
+ </member>
+ <member name="specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="BaseMaterial3D.SpecularMode" default="0">
+ The method for rendering the specular blob. See [enum SpecularMode].
+ </member>
+ <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
+ </member>
+ <member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag">
+ If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin.
+ </member>
+ <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength">
+ The strength of the subsurface scattering effect.
+ </member>
+ <member name="subsurf_scatter_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength].
+ </member>
+ <member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost">
+ </member>
+ <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color">
+ </member>
+ <member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve">
+ </member>
+ <member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth">
+ </member>
+ <member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="subsurf_scatter_transmittance_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ </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.
+ </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.
+ </member>
+ <member name="transparency" type="int" setter="set_transparency" getter="get_transparency" enum="BaseMaterial3D.Transparency" default="0">
+ If [code]true[/code], transparency is enabled on the body. See also [member blend_mode].
+ </member>
+ <member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], render point size can be changed.
+ [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.
+ </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.
+ </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.
+ </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.
+ </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.
+ </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.
+ </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.
+ </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.
+ </member>
+ </members>
+ <constants>
+ <constant name="TEXTURE_ALBEDO" value="0" enum="TextureParam">
+ Texture specifying per-pixel color.
+ </constant>
+ <constant name="TEXTURE_METALLIC" value="1" enum="TextureParam">
+ Texture specifying per-pixel metallic value.
+ </constant>
+ <constant name="TEXTURE_ROUGHNESS" value="2" enum="TextureParam">
+ Texture specifying per-pixel roughness value.
+ </constant>
+ <constant name="TEXTURE_EMISSION" value="3" enum="TextureParam">
+ Texture specifying per-pixel emission color.
+ </constant>
+ <constant name="TEXTURE_NORMAL" value="4" enum="TextureParam">
+ Texture specifying per-pixel normal vector.
+ </constant>
+ <constant name="TEXTURE_RIM" value="5" enum="TextureParam">
+ Texture specifying per-pixel rim value.
+ </constant>
+ <constant name="TEXTURE_CLEARCOAT" value="6" enum="TextureParam">
+ Texture specifying per-pixel clearcoat value.
+ </constant>
+ <constant name="TEXTURE_FLOWMAP" value="7" enum="TextureParam">
+ Texture specifying per-pixel flowmap direction for use with [member anisotropy].
+ </constant>
+ <constant name="TEXTURE_AMBIENT_OCCLUSION" value="8" enum="TextureParam">
+ Texture specifying per-pixel ambient occlusion value.
+ </constant>
+ <constant name="TEXTURE_HEIGHTMAP" value="9" enum="TextureParam">
+ Texture specifying per-pixel height.
+ </constant>
+ <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10" enum="TextureParam">
+ Texture specifying per-pixel subsurface scattering.
+ </constant>
+ <constant name="TEXTURE_SUBSURFACE_TRANSMITTANCE" value="11" enum="TextureParam">
+ Texture specifying per-pixel transmittance for subsurface scattering.
+ </constant>
+ <constant name="TEXTURE_BACKLIGHT" value="12" enum="TextureParam">
+ Texture specifying per-pixel backlight color.
+ </constant>
+ <constant name="TEXTURE_REFRACTION" value="13" enum="TextureParam">
+ Texture specifying per-pixel refraction strength.
+ </constant>
+ <constant name="TEXTURE_DETAIL_MASK" value="14" enum="TextureParam">
+ Texture specifying per-pixel detail mask blending value.
+ </constant>
+ <constant name="TEXTURE_DETAIL_ALBEDO" value="15" enum="TextureParam">
+ Texture specifying per-pixel detail color.
+ </constant>
+ <constant name="TEXTURE_DETAIL_NORMAL" value="16" enum="TextureParam">
+ Texture specifying per-pixel detail normal.
+ </constant>
+ <constant name="TEXTURE_ORM" value="17" enum="TextureParam">
+ Texture holding ambient occlusion, roughness, and metallic.
+ </constant>
+ <constant name="TEXTURE_MAX" value="18" enum="TextureParam">
+ Represents the size of the [enum TextureParam] enum.
+ </constant>
+ <constant name="TEXTURE_FILTER_NEAREST" value="0" enum="TextureFilter">
+ The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
+ </constant>
+ <constant name="TEXTURE_FILTER_LINEAR" value="1" enum="TextureFilter">
+ The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps.
+ </constant>
+ <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="2" enum="TextureFilter">
+ The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps.
+ </constant>
+ <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="3" enum="TextureFilter">
+ 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.
+ </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.
+ </constant>
+ <constant name="TEXTURE_FILTER_MAX" value="6" enum="TextureFilter">
+ Represents the size of the [enum TextureFilter] enum.
+ </constant>
+ <constant name="DETAIL_UV_1" value="0" enum="DetailUV">
+ Use [code]UV[/code] with the detail texture.
+ </constant>
+ <constant name="DETAIL_UV_2" value="1" enum="DetailUV">
+ Use [code]UV2[/code] with the detail texture.
+ </constant>
+ <constant name="TRANSPARENCY_DISABLED" value="0" enum="Transparency">
+ The material will not use transparency.
+ </constant>
+ <constant name="TRANSPARENCY_ALPHA" value="1" enum="Transparency">
+ The material will use the texture's alpha values for transparency.
+ </constant>
+ <constant name="TRANSPARENCY_ALPHA_SCISSOR" value="2" enum="Transparency">
+ The material will cut off all values below a threshold, the rest will remain opaque.
+ </constant>
+ <constant name="TRANSPARENCY_ALPHA_DEPTH_PRE_PASS" value="3" enum="Transparency">
+ The material will use the texture's alpha value for transparency, but will still be rendered in the pre-pass.
+ </constant>
+ <constant name="TRANSPARENCY_MAX" value="4" enum="Transparency">
+ Represents the size of the [enum Transparency] enum.
+ </constant>
+ <constant name="SHADING_MODE_UNSHADED" value="0" enum="ShadingMode">
+ The object will not receive shadows.
+ </constant>
+ <constant name="SHADING_MODE_PER_PIXEL" value="1" enum="ShadingMode">
+ The object will be shaded per pixel. Useful for realistic shading effect.
+ </constant>
+ <constant name="SHADING_MODE_PER_VERTEX" value="2" enum="ShadingMode">
+ The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality.
+ </constant>
+ <constant name="SHADING_MODE_MAX" value="3" enum="ShadingMode">
+ Represents the size of the [enum ShadingMode] enum.
+ </constant>
+ <constant name="FEATURE_EMISSION" value="0" enum="Feature">
+ Constant for setting [member emission_enabled].
+ </constant>
+ <constant name="FEATURE_NORMAL_MAPPING" value="1" enum="Feature">
+ Constant for setting [member normal_enabled].
+ </constant>
+ <constant name="FEATURE_RIM" value="2" enum="Feature">
+ Constant for setting [member rim_enabled].
+ </constant>
+ <constant name="FEATURE_CLEARCOAT" value="3" enum="Feature">
+ Constant for setting [member clearcoat_enabled].
+ </constant>
+ <constant name="FEATURE_ANISOTROPY" value="4" enum="Feature">
+ Constant for setting [member anisotropy_enabled].
+ </constant>
+ <constant name="FEATURE_AMBIENT_OCCLUSION" value="5" enum="Feature">
+ Constant for setting [member ao_enabled].
+ </constant>
+ <constant name="FEATURE_HEIGHT_MAPPING" value="6" enum="Feature">
+ Constant for setting [member heightmap_enabled].
+ </constant>
+ <constant name="FEATURE_SUBSURFACE_SCATTERING" value="7" enum="Feature">
+ Constant for setting [member subsurf_scatter_enabled].
+ </constant>
+ <constant name="FEATURE_SUBSURFACE_TRANSMITTANCE" value="8" enum="Feature">
+ Constant for setting [member subsurf_scatter_transmittance_enabled].
+ </constant>
+ <constant name="FEATURE_BACKLIGHT" value="9" enum="Feature">
+ Constant for setting [member backlight_enabled].
+ </constant>
+ <constant name="FEATURE_REFRACTION" value="10" enum="Feature">
+ Constant for setting [member refraction_enabled].
+ </constant>
+ <constant name="FEATURE_DETAIL" value="11" enum="Feature">
+ Constant for setting [member detail_enabled].
+ </constant>
+ <constant name="FEATURE_MAX" value="12" enum="Feature">
+ Represents the size of the [enum Feature] enum.
+ </constant>
+ <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
+ Default blend mode. The color of the object is blended over the background based on the object's alpha value.
+ </constant>
+ <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
+ The color of the object is added to the background.
+ </constant>
+ <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
+ The color of the object is subtracted from the background.
+ </constant>
+ <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
+ The color of the object is multiplied by the background.
+ </constant>
+ <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0" enum="DepthDrawMode">
+ Default depth draw mode. Depth is drawn only for opaque objects.
+ </constant>
+ <constant name="DEPTH_DRAW_ALWAYS" value="1" enum="DepthDrawMode">
+ Depth draw is calculated for both opaque and transparent objects.
+ </constant>
+ <constant name="DEPTH_DRAW_DISABLED" value="2" enum="DepthDrawMode">
+ No depth draw.
+ </constant>
+ <constant name="CULL_BACK" value="0" enum="CullMode">
+ Default cull mode. The back of the object is culled when not visible.
+ </constant>
+ <constant name="CULL_FRONT" value="1" enum="CullMode">
+ The front of the object is culled when not visible.
+ </constant>
+ <constant name="CULL_DISABLED" value="2" enum="CullMode">
+ No culling is performed.
+ </constant>
+ <constant name="FLAG_DISABLE_DEPTH_TEST" value="0" enum="Flags">
+ Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
+ </constant>
+ <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="1" enum="Flags">
+ Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh.
+ </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.
+ </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].
+ </constant>
+ <constant name="FLAG_FIXED_SIZE" value="4" enum="Flags">
+ Object is scaled by depth so that it always appears the same size on screen.
+ </constant>
+ <constant name="FLAG_BILLBOARD_KEEP_SCALE" value="5" enum="Flags">
+ Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED].
+ </constant>
+ <constant name="FLAG_UV1_USE_TRIPLANAR" value="6" enum="Flags">
+ Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code].
+ </constant>
+ <constant name="FLAG_UV2_USE_TRIPLANAR" value="7" enum="Flags">
+ Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code].
+ </constant>
+ <constant name="FLAG_UV1_USE_WORLD_TRIPLANAR" value="8" enum="Flags">
+ Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code].
+ </constant>
+ <constant name="FLAG_UV2_USE_WORLD_TRIPLANAR" value="9" enum="Flags">
+ Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code].
+ </constant>
+ <constant name="FLAG_AO_ON_UV2" value="10" enum="Flags">
+ Use [code]UV2[/code] coordinates to look up from the [member ao_texture].
+ </constant>
+ <constant name="FLAG_EMISSION_ON_UV2" value="11" enum="Flags">
+ 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.
+ </constant>
+ <constant name="FLAG_DONT_RECEIVE_SHADOWS" value="13" enum="Flags">
+ Disables receiving shadows from other objects.
+ </constant>
+ <constant name="FLAG_DISABLE_AMBIENT_LIGHT" value="14" enum="Flags">
+ Disables receiving ambient light.
+ </constant>
+ <constant name="FLAG_USE_SHADOW_TO_OPACITY" value="15" enum="Flags">
+ Enables the shadow to opacity feature.
+ </constant>
+ <constant name="FLAG_USE_TEXTURE_REPEAT" value="16" enum="Flags">
+ Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
+ </constant>
+ <constant name="FLAG_INVERT_HEIGHTMAP" value="17" enum="Flags">
+ Invert values read from a depth texture to convert them to height values (heightmap).
+ </constant>
+ <constant name="FLAG_SUBSURFACE_MODE_SKIN" value="18" enum="Flags">
+ Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.
+ </constant>
+ <constant name="FLAG_MAX" value="19" enum="Flags">
+ Represents the size of the [enum Flags] enum.
+ </constant>
+ <constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode">
+ Default diffuse scattering algorithm.
+ </constant>
+ <constant name="DIFFUSE_LAMBERT" value="1" enum="DiffuseMode">
+ Diffuse scattering ignores roughness.
+ </constant>
+ <constant name="DIFFUSE_LAMBERT_WRAP" value="2" enum="DiffuseMode">
+ Extends Lambert to cover more than 90 degrees when roughness increases.
+ </constant>
+ <constant name="DIFFUSE_OREN_NAYAR" value="3" enum="DiffuseMode">
+ Attempts to use roughness to emulate microsurfacing.
+ </constant>
+ <constant name="DIFFUSE_TOON" value="4" enum="DiffuseMode">
+ Uses a hard cut for lighting, with smoothing affected by roughness.
+ </constant>
+ <constant name="SPECULAR_SCHLICK_GGX" value="0" enum="SpecularMode">
+ Default specular blob.
+ </constant>
+ <constant name="SPECULAR_BLINN" value="1" enum="SpecularMode">
+ Older specular algorithm, included for compatibility.
+ </constant>
+ <constant name="SPECULAR_PHONG" value="2" enum="SpecularMode">
+ Older specular algorithm, included for compatibility.
+ </constant>
+ <constant name="SPECULAR_TOON" value="3" enum="SpecularMode">
+ Toon blob which changes size based on roughness.
+ </constant>
+ <constant name="SPECULAR_DISABLED" value="4" enum="SpecularMode">
+ No specular blob.
+ </constant>
+ <constant name="BILLBOARD_DISABLED" value="0" enum="BillboardMode">
+ Billboard mode is disabled.
+ </constant>
+ <constant name="BILLBOARD_ENABLED" value="1" enum="BillboardMode">
+ The object's Z axis will always face the camera.
+ </constant>
+ <constant name="BILLBOARD_FIXED_Y" value="2" enum="BillboardMode">
+ The object's X axis will always face the camera.
+ </constant>
+ <constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode">
+ Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties.
+ The [member ParticlesMaterial.anim_speed] or [member CPUParticles3D.anim_speed] should also be set to a positive value for the animation to play.
+ </constant>
+ <constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel">
+ Used to read from the red channel of a texture.
+ </constant>
+ <constant name="TEXTURE_CHANNEL_GREEN" value="1" enum="TextureChannel">
+ Used to read from the green channel of a texture.
+ </constant>
+ <constant name="TEXTURE_CHANNEL_BLUE" value="2" enum="TextureChannel">
+ Used to read from the blue channel of a texture.
+ </constant>
+ <constant name="TEXTURE_CHANNEL_ALPHA" value="3" enum="TextureChannel">
+ Used to read from the alpha channel of a texture.
+ </constant>
+ <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4" enum="TextureChannel">
+ Currently unused.
+ </constant>
+ <constant name="EMISSION_OP_ADD" value="0" enum="EmissionOperator">
+ Adds the emission color to the color from the emission texture.
+ </constant>
+ <constant name="EMISSION_OP_MULTIPLY" value="1" enum="EmissionOperator">
+ Multiplies the emission color by the color from the emission texture.
+ </constant>
+ <constant name="DISTANCE_FADE_DISABLED" value="0" enum="DistanceFadeMode">
+ Do not use distance fade.
+ </constant>
+ <constant name="DISTANCE_FADE_PIXEL_ALPHA" value="1" enum="DistanceFadeMode">
+ Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel.
+ </constant>
+ <constant name="DISTANCE_FADE_PIXEL_DITHER" value="2" enum="DistanceFadeMode">
+ Smoothly fades the object out based on each pixel's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA].
+ </constant>
+ <constant name="DISTANCE_FADE_OBJECT_DITHER" value="3" enum="DistanceFadeMode">
+ Smoothly fades the object out based on the object's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA].
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index df9438e695..3952ea2d27 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Basis" category="Built-In Types" version="3.2">
+<class name="Basis" version="4.0">
<brief_description>
3×3 matrix datatype.
</brief_description>
@@ -64,20 +64,21 @@
<return type="Vector3">
</return>
<description>
- Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
+ Returns the basis's rotation in the form of Euler angles (in the YXZ convention: first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). See [method get_rotation_quat] if you need a quaternion instead.
</description>
</method>
<method name="get_orthogonal_index">
<return type="int">
</return>
<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 grid map editor. For further details, refer to Godot source code.
+ 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 grid map editor. For further details, refer to the Godot source code.
</description>
</method>
<method name="get_rotation_quat">
<return type="Quat">
</return>
<description>
+ Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles.
</description>
</method>
<method name="get_scale">
@@ -99,9 +100,10 @@
</return>
<argument index="0" name="b" type="Basis">
</argument>
- <argument index="1" name="epsilon" type="float" default="0.00001">
+ <argument index="1" name="epsilon" type="float" default="1e-05">
</argument>
<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.
</description>
</method>
<method name="orthonormalized">
@@ -209,12 +211,16 @@
</members>
<constants>
<constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
+ The identity basis. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer.
</constant>
<constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )">
+ The basis that will flip something along the X axis when used in a transformation.
</constant>
<constant name="FLIP_Y" value="Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )">
+ The basis that will flip something along the Y axis when used in a transformation.
</constant>
<constant name="FLIP_Z" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )">
+ The basis that will flip something along the Z axis when used in a transformation.
</constant>
</constants>
</class>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 7f03c22b70..f0ac7d1160 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BitMap" inherits="Resource" category="Core" version="3.2">
+<class name="BitMap" inherits="Resource" version="4.0">
<brief_description>
Boolean matrix.
</brief_description>
diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml
index 16a28978d5..421b405808 100644
--- a/doc/classes/BitmapFont.xml
+++ b/doc/classes/BitmapFont.xml
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BitmapFont" inherits="Font" category="Core" version="3.2">
+<class name="BitmapFont" inherits="Font" version="4.0">
<brief_description>
- Renders text using [code]*.fnt[/code] fonts.
+ Renders text using fonts under the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format.
+ Handles files with the [code].fnt[/code] extension.
</brief_description>
<description>
Renders text using [code]*.fnt[/code] fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see [DynamicFont].
@@ -42,7 +43,7 @@
<method name="add_texture">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<description>
Adds a texture to the [BitmapFont].
@@ -87,7 +88,7 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml
index 21e08f13f9..910d488dfd 100644
--- a/doc/classes/Bone2D.xml
+++ b/doc/classes/Bone2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Bone2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Bone2D" inherits="Node2D" version="4.0">
<brief_description>
Joint used with [Skeleton2D] to control and animate other nodes.
</brief_description>
diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment3D.xml
index a6145b6a78..ab1e5b17d9 100644
--- a/doc/classes/BoneAttachment.xml
+++ b/doc/classes/BoneAttachment3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoneAttachment" inherits="Spatial" category="Core" version="3.2">
+<class name="BoneAttachment3D" inherits="Node3D" version="4.0">
<brief_description>
A node that will attach to a bone.
</brief_description>
<description>
- This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone.
+ This node must be the child of a [Skeleton3D] node. You can then select a bone for this node to attach to. The BoneAttachment3D node will copy the transform of the selected bone.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index ae0a20b8f6..0d8233e6ff 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxContainer" inherits="Container" category="Core" version="3.2">
+<class name="BoxContainer" inherits="Container" version="4.0">
<brief_description>
Base class for box containers.
</brief_description>
<description>
- Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
+ Arranges child [Control] nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.
</description>
<tutorials>
</tutorials>
@@ -15,15 +15,14 @@
<argument index="0" name="begin" type="bool">
</argument>
<description>
- Adds a control to the box as a spacer. If [code]true[/code], [code]begin[/code] will insert the spacer control in front of other children.
+ Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children.
</description>
</method>
</methods>
<members>
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0">
- The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]).
+ The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER], or [constant ALIGN_END]).
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
</members>
<constants>
<constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape3D.xml
index 9e3977b342..fd08da148d 100644
--- a/doc/classes/BoxShape.xml
+++ b/doc/classes/BoxShape3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxShape" inherits="Shape" category="Core" version="3.2">
+<class name="BoxShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Box shape resource.
</brief_description>
<description>
- 3D box shape that can be a child of a [PhysicsBody] or [Area].
+ 3D box shape that can be a child of a [PhysicsBody3D] or [Area3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 305be8b58d..675441d842 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Button" inherits="BaseButton" category="Core" version="3.2">
+<class name="Button" inherits="BaseButton" version="4.0">
<brief_description>
Standard themed Button.
</brief_description>
@@ -12,7 +12,7 @@
</methods>
<members>
<member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1">
- Text alignment policy for the button's text, use one of the [code]ALIGN_*[/code] constants.
+ Text alignment policy for the button's text, use one of the [enum TextAlign] constants.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false">
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
@@ -23,7 +23,7 @@
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
Flat buttons don't display decoration.
</member>
- <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon">
+ <member name="icon" type="Texture2D" setter="set_button_icon" getter="get_button_icon">
Button's icon, if text is present the icon will be placed before the text.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
@@ -43,26 +43,37 @@
</constants>
<theme_items>
<theme_item name="disabled" type="StyleBox">
+ [StyleBox] used when the [Button] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [Button]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the [Button].
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ Text [Color] used when the [Button] is disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ [StyleBox] used when the [Button] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="2">
+ The horizontal space between [Button]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default [StyleBox] for the [Button].
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ [StyleBox] used when the [Button] is being pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index 2c1f3163e0..b7f3234b36 100644
--- a/doc/classes/ButtonGroup.xml
+++ b/doc/classes/ButtonGroup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ButtonGroup" inherits="Resource" category="Core" version="3.2">
+<class name="ButtonGroup" inherits="Resource" version="4.0">
<brief_description>
Group of Buttons.
</brief_description>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index c8dbffb4cb..df3ef71a2a 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CPUParticles2D" inherits="Node2D" category="Core" version="3.2">
+<class name="CPUParticles2D" inherits="Node2D" version="4.0">
<brief_description>
CPU-based 2D particle emitter.
</brief_description>
<description>
CPU-based 2D particle node used to create a variety of particle systems and effects.
- See also [Particles2D], which provides the same functionality with hardware acceleration, but may not run on older devices.
+ See also [GPUParticles2D], which provides the same functionality with hardware acceleration, but may not run on older devices.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link>
@@ -17,7 +17,7 @@
<argument index="0" name="particles" type="Node">
</argument>
<description>
- Sets this node's properties to match a given [Particles2D] node with an assigned [ParticlesMaterial].
+ Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial].
</description>
</method>
<method name="get_param" qualifiers="const">
@@ -26,6 +26,7 @@
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter">
</argument>
<description>
+ Returns the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
@@ -34,6 +35,7 @@
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter">
</argument>
<description>
+ Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_randomness" qualifiers="const">
@@ -42,6 +44,7 @@
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter">
</argument>
<description>
+ Returns the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
@@ -50,6 +53,7 @@
<argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags">
</argument>
<description>
+ Returns the enabled state of the given flag (see [enum Flags] for options).
</description>
</method>
<method name="restart">
@@ -67,6 +71,7 @@
<argument index="1" name="value" type="float">
</argument>
<description>
+ Sets the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_curve">
@@ -77,6 +82,7 @@
<argument index="1" name="curve" type="Curve">
</argument>
<description>
+ Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_randomness">
@@ -87,6 +93,7 @@
<argument index="1" name="randomness" type="float">
</argument>
<description>
+ Sets the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_particle_flag">
@@ -97,6 +104,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
+ Enables or disables the given flag (see [enum Flags] for options).
</description>
</method>
</methods>
@@ -161,11 +169,14 @@
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0">
Particle draw order. Uses [enum DrawOrder] values.
</member>
- <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors">
+ <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors">
+ Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals">
+ <member name="emission_normals" type="PackedVector2Array" setter="set_emission_normals" getter="get_emission_normals">
+ Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points">
+ <member name="emission_points" type="PackedVector2Array" setter="set_emission_points" getter="get_emission_points">
+ Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents">
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE].
@@ -188,8 +199,6 @@
<member name="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.
</member>
- <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
- </member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
</member>
@@ -229,8 +238,9 @@
<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>
- <member name="normalmap" type="Texture" setter="set_normalmap" getter="get_normalmap">
+ <member name="normalmap" type="Texture2D" setter="set_normalmap" getter="get_normalmap">
Normal map to be used for the [member texture] property.
+ [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="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.
@@ -283,7 +293,7 @@
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Tangential acceleration randomness ratio.
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
</member>
</members>
@@ -360,5 +370,8 @@
<constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
</constant>
+ <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape">
+ Represents the size of the [enum EmissionShape] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles3D.xml
index e68b0feb2d..07da066bd9 100644
--- a/doc/classes/CPUParticles.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CPUParticles" inherits="GeometryInstance" category="Core" version="3.2">
+<class name="CPUParticles3D" inherits="GeometryInstance3D" version="4.0">
<brief_description>
CPU-based 3D particle emitter.
</brief_description>
<description>
CPU-based 3D particle node used to create a variety of particle systems and effects.
- See also [Particles], which provides the same functionality with hardware acceleration, but may not run on older devices.
+ See also [GPUParticles3D], which provides the same functionality with hardware acceleration, but may not run on older devices.
</description>
<tutorials>
</tutorials>
@@ -16,39 +16,43 @@
<argument index="0" name="particles" type="Node">
</argument>
<description>
- Sets this node's properties to match a given [Particles] node with an assigned [ParticlesMaterial].
+ Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial].
</description>
</method>
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="CPUParticles.Parameter">
+ <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter">
</argument>
<description>
+ Returns the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
<return type="Curve">
</return>
- <argument index="0" name="param" type="int" enum="CPUParticles.Parameter">
+ <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter">
</argument>
<description>
+ Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_randomness" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="CPUParticles.Parameter">
+ <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter">
</argument>
<description>
+ Returns the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="CPUParticles.Flags">
+ <argument index="0" name="flag" type="int" enum="CPUParticles3D.Flags">
</argument>
<description>
+ Returns the enabled state of the given flag (see [enum Flags] for options).
</description>
</method>
<method name="restart">
@@ -61,41 +65,45 @@
<method name="set_param">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="CPUParticles.Parameter">
+ <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter">
</argument>
<argument index="1" name="value" type="float">
</argument>
<description>
+ Sets the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_curve">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="CPUParticles.Parameter">
+ <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter">
</argument>
<argument index="1" name="curve" type="Curve">
</argument>
<description>
+ Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_randomness">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="CPUParticles.Parameter">
+ <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter">
</argument>
<argument index="1" name="randomness" type="float">
</argument>
<description>
+ Sets the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_particle_flag">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="CPUParticles.Flags">
+ <argument index="0" name="flag" type="int" enum="CPUParticles3D.Flags">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<description>
+ Enables or disables the given flag (see [enum Flags] for options).
</description>
</method>
</methods>
@@ -157,19 +165,22 @@
<member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3( 1, 0, 0 )">
Unit vector specifying the particles' emission direction.
</member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles.DrawOrder" default="0">
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles3D.DrawOrder" default="0">
Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX].
</member>
- <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )">
+ <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PackedColorArray( )">
+ Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals">
+ <member name="emission_normals" type="PackedVector3Array" setter="set_emission_normals" getter="get_emission_normals">
+ Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )">
+ <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array( )">
+ Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0">
+ <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles3D.EmissionShape" default="0">
Particles will be emitted inside this region. See [enum EmissionShape] for possible values.
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
@@ -367,5 +378,8 @@
<constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
</constant>
+ <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape">
+ Represents the size of the [enum EmissionShape] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
new file mode 100644
index 0000000000..3cc74beb58
--- /dev/null
+++ b/doc/classes/Callable.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Callable" version="4.0">
+ <brief_description>
+ An object representing a method in a certain object that can be called.
+ </brief_description>
+ <description>
+ [Callable] is a first class object which can be held in variables and passed to functions. It represents a given method in an [Object], and is typically used for signal callbacks.
+ [b]Example:[/b]
+ [codeblock]
+ var callable = Callable(self, "print_args")
+ func print_args(arg1, arg2, arg3 = ""):
+ prints(arg1, arg2, arg3)
+ func test():
+ callable.call("hello", "world") # Prints "hello world".
+ callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(Node.gd)::print_args".
+ callable.call("invalid") # Invalid call, should have at least 2 arguments.
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="Callable">
+ <return type="Callable">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="method_name" type="StringName">
+ </argument>
+ <description>
+ Creates a new [Callable] for the method called [code]method_name[/code] in the specified [code]object[/code].
+ </description>
+ </method>
+ <method name="call" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <description>
+ Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature.
+ </description>
+ </method>
+ <method name="call_deferred" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature.
+ </description>
+ </method>
+ <method name="get_method">
+ <return type="StringName">
+ </return>
+ <description>
+ Returns the name of the method represented by this [Callable].
+ </description>
+ </method>
+ <method name="get_object">
+ <return type="Object">
+ </return>
+ <description>
+ Returns the object on which this [Callable] is called.
+ </description>
+ </method>
+ <method name="get_object_id">
+ <return type="int">
+ </return>
+ <description>
+ Returns the ID of this [Callable]'s object (see [method Object.get_instance_id]).
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_custom">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_null">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_standard">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index 6f1627e296..ad49216b34 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Camera2D" inherits="Node2D" version="4.0">
<brief_description>
Camera node for 2D scenes.
</brief_description>
<description>
Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes.
- This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport].
+ This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, inherit from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]).
+ Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position.
</description>
<tutorials>
</tutorials>
@@ -103,7 +104,7 @@
</methods>
<members>
<member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1">
- The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants.
+ The Camera2D's anchor point. See [enum AnchorMode] constants.
</member>
<member name="current" type="bool" setter="_set_current" getter="is_current" default="false">
If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one.
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera3D.xml
index 3b4313b204..598b4bd685 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera" inherits="Spatial" category="Core" version="3.2">
+<class name="Camera3D" inherits="Node3D" version="4.0">
<brief_description>
Camera node, displays from a point of view.
</brief_description>
<description>
- Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
+ [Camera3D] is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
</description>
<tutorials>
</tutorials>
@@ -22,14 +22,14 @@
<return type="RID">
</return>
<description>
- Returns the camera's RID from the [VisualServer].
+ Returns the camera's RID from the [RenderingServer].
</description>
</method>
<method name="get_camera_transform" qualifiers="const">
<return type="Transform">
</return>
<description>
- Gets the camera transform. Subclassed cameras such as [InterpolatedCamera] may provide different transforms than the [Node] transform.
+ Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform.
</description>
</method>
<method name="get_cull_mask_bit" qualifiers="const">
@@ -38,12 +38,14 @@
<argument index="0" name="layer" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise.
</description>
</method>
<method name="get_frustum" qualifiers="const">
<return type="Array">
</return>
<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>
</method>
<method name="is_position_behind" qualifiers="const">
@@ -109,6 +111,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
+ Enables or disables the given [code]layer[/code] in the [member cull_mask].
</description>
</method>
<method name="set_frustum">
@@ -123,6 +126,7 @@
<argument index="3" name="z_far" type="float">
</argument>
<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.
</description>
</method>
<method name="set_orthogonal">
@@ -135,7 +139,7 @@
<argument index="2" name="z_far" type="float">
</argument>
<description>
- Sets the camera projection to orthogonal mode, by specifying a width and the [code]near[/code] and [code]far[/code] clip planes in worldspace 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 [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.)
</description>
</method>
<method name="set_perspective">
@@ -148,7 +152,7 @@
<argument index="2" name="z_far" type="float">
</argument>
<description>
- Sets the camera projection to perspective mode, by specifying a [code]fov[/code] angle in degrees (FOV means Field of View), and the [code]near[/code] and [code]far[/code] clip planes in world-space units.
+ 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.
</description>
</method>
<method name="unproject_position" qualifiers="const">
@@ -168,8 +172,11 @@
<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.
</member>
- <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0">
- If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values.
+ <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera3D.DopplerTracking" default="0">
+ If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values.
+ </member>
+ <member name="effects" type="CameraEffects" setter="set_effects" getter="get_effects">
+ The [CameraEffects] to use for this camera.
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] to use for this camera.
@@ -177,21 +184,27 @@
<member name="far" type="float" setter="set_zfar" getter="get_zfar" default="100.0">
The distance to the far culling boundary for this camera relative to its local Z axis.
</member>
- <member name="fov" type="float" setter="set_fov" getter="get_fov" default="70.0">
+ <member name="fov" type="float" setter="set_fov" getter="get_fov" default="75.0">
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
+ For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to an horizontal FOV of:
+ - ~91.31 degrees in a 4:3 viewport
+ - ~101.67 degrees in a 16:10 viewport
+ - ~107.51 degrees in a 16:9 viewport
+ - ~121.63 degrees in a 21:9 viewport
</member>
<member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )">
+ The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
The horizontal (X) offset of the camera viewport.
</member>
- <member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect" default="1">
+ <member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera3D.KeepAspect" default="1">
The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT].
</member>
<member name="near" type="float" setter="set_znear" getter="get_znear" 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="Camera.Projection" default="0">
+ <member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera3D.Projection" 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">
@@ -218,13 +231,13 @@
Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking">
- Disables Doppler effect simulation (default).
+ Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default).
</constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking">
- Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
+ Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant>
<constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking">
- Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
+ Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant>
</constants>
</class>
diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml
new file mode 100644
index 0000000000..ea9ab85b80
--- /dev/null
+++ b/doc/classes/CameraEffects.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CameraEffects" inherits="Resource" version="4.0">
+ <brief_description>
+ Contains camera-specific effects such as depth of field and exposure override.
+ </brief_description>
+ <description>
+ Contains camera-specific effects such as depth of field and exposure override.
+ See also [Environment] for general 3D environment settings.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1">
+ The amount of blur for both near and far depth-of-field effects. The amount of blur increases the radius of the blur effect, making the affected area blurrier. However, If the amount is too high, you might start to see lines appearing, especially when using a low quality blur.
+ </member>
+ <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0">
+ The distance from the camera where the far blur effect affects the rendering.
+ </member>
+ <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false">
+ If [code]true[/code], enables the depth-of-field far blur effect. This has a significant performance cost. Consider disabling it in scenes where there are no far away objects.
+ </member>
+ <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0">
+ The length of the transition between the no-blur area and far blur.
+ </member>
+ <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0">
+ Distance from the camera where the near blur effect affects the rendering.
+ </member>
+ <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false">
+ If [code]true[/code], enables the depth-of-field near blur effect. This has a significant performance cost. Consider disabling it in scenes where there are no nearby objects.
+ </member>
+ <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0">
+ The length of the transition between the near blur and no-blur area.
+ </member>
+ <member name="override_exposure" type="float" setter="set_override_exposure" getter="get_override_exposure" default="1.0">
+ The exposure override value to use. Higher values will result in a brighter scene. Only effective if [member override_exposure_enable] is [code]true[/code].
+ </member>
+ <member name="override_exposure_enable" type="bool" setter="set_override_exposure_enabled" getter="is_override_exposure_enabled" default="false">
+ If [code]true[/code], overrides the manual or automatic exposure defined in the [Environment] with the value in [member override_exposure].
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml
index f490faf369..4fc124592f 100644
--- a/doc/classes/CameraFeed.xml
+++ b/doc/classes/CameraFeed.xml
@@ -1,66 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraFeed" inherits="Reference" category="Core" version="3.2">
+<class name="CameraFeed" inherits="Reference" version="4.0">
<brief_description>
A camera feed gives you access to a single physical camera attached to your device.
</brief_description>
<description>
- A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used.
+ A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also [CameraServer].
[b]Note:[/b] Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="get_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the unique ID for this feed.
- </description>
- </method>
- <method name="get_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the camera's name.
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="int" enum="CameraFeed.FeedPosition">
- </return>
- <description>
- Returns the position of camera on the device.
- </description>
- </method>
</methods>
- <members>
- <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false">
- If [code]true[/code], the feed is active.
- </member>
- <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, -1, 0, 1 )">
- The transform applied to the camera's image.
- </member>
- </members>
<constants>
- <constant name="FEED_NOIMAGE" value="0" enum="FeedDataType">
- No image set for the feed.
- </constant>
- <constant name="FEED_RGB" value="1" enum="FeedDataType">
- Feed supplies RGB images.
- </constant>
- <constant name="FEED_YCBCR" value="2" enum="FeedDataType">
- Feed supplies YCbCr images that need to be converted to RGB.
- </constant>
- <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType">
- Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
- </constant>
- <constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition">
- Unspecified position.
- </constant>
- <constant name="FEED_FRONT" value="1" enum="FeedPosition">
- Camera is mounted at the front of the device.
- </constant>
- <constant name="FEED_BACK" value="2" enum="FeedPosition">
- Camera is mounted at the back of the device.
- </constant>
</constants>
</class>
diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml
index 850794c1da..e00dc031dc 100644
--- a/doc/classes/CameraServer.xml
+++ b/doc/classes/CameraServer.xml
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraServer" inherits="Object" category="Core" version="3.2">
+<class name="CameraServer" inherits="Object" version="4.0">
<brief_description>
- The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.
+ Server keeping track of different cameras accessible in Godot.
</brief_description>
<description>
+ The [CameraServer] keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.
+ It is notably used to provide AR modules with a video feed from the camera.
+ [b]Note:[/b] This class is currently only implemented on macOS and iOS. On other platforms, no [CameraFeed]s will be available.
</description>
<tutorials>
</tutorials>
@@ -14,7 +17,7 @@
<argument index="0" name="feed" type="CameraFeed">
</argument>
<description>
- Adds a camera feed to the camera server.
+ Adds the camera [code]feed[/code] to the camera server.
</description>
</method>
<method name="feeds">
@@ -30,7 +33,7 @@
<argument index="0" name="index" type="int">
</argument>
<description>
- Returns the [CameraFeed] with this id.
+ Returns the [CameraFeed] corresponding to the camera with the given [code]index[/code].
</description>
</method>
<method name="get_feed_count">
@@ -46,7 +49,7 @@
<argument index="0" name="feed" type="CameraFeed">
</argument>
<description>
- Removes a [CameraFeed].
+ Removes the specified camera [code]feed[/code].
</description>
</method>
</methods>
@@ -55,14 +58,14 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Emitted when a [CameraFeed] is added (webcam is plugged in).
+ 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">
</argument>
<description>
- Emitted when a [CameraFeed] is removed (webcam is removed).
+ Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged).
</description>
</signal>
</signals>
@@ -71,7 +74,7 @@
The RGBA camera image.
</constant>
<constant name="FEED_YCBCR_IMAGE" value="0" enum="FeedImage">
- The YCbCr camera image.
+ The [url=https://en.wikipedia.org/wiki/YCbCr]YCbCr[/url] camera image.
</constant>
<constant name="FEED_Y_IMAGE" value="0" enum="FeedImage">
The Y component camera image.
diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml
index e2bff76998..c0730129a9 100644
--- a/doc/classes/CameraTexture.xml
+++ b/doc/classes/CameraTexture.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraTexture" inherits="Texture" category="Core" version="3.2">
+<class name="CameraTexture" inherits="Texture2D" version="4.0">
<brief_description>
- This texture gives access to the camera texture provided by a [CameraFeed].
- [b]Note:[/b] Many cameras supply YCbCr images which need to be converted in a shader.
+ Texture provided by a [CameraFeed].
</brief_description>
<description>
+ This texture gives access to the camera texture provided by a [CameraFeed].
+ [b]Note:[/b] Many cameras supply YCbCr images which need to be converted in a shader.
</description>
<tutorials>
</tutorials>
@@ -17,7 +18,6 @@
<member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active" default="false">
Convenience property that gives access to the active property of the [CameraFeed].
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage" default="0">
Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component.
</member>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 8372d15324..b3a3722836 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasItem" inherits="Node" category="Core" version="3.2">
+<class name="CanvasItem" inherits="Node" version="4.0">
<brief_description>
Base class of anything 2D.
</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.
- 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.
+ 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.
+ Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis.
+ A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode.
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
+ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
@@ -19,7 +20,7 @@
<return type="void">
</return>
<description>
- Called (if exists) to draw the canvas item.
+ Overridable function called by the engine (if defined) to draw the canvas item.
</description>
</method>
<method name="draw_arc">
@@ -39,9 +40,8 @@
</argument>
<argument index="6" name="width" type="float" default="1.0">
</argument>
- <argument index="7" name="antialiased" type="bool" default="false">
- </argument>
<description>
+ Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve.
</description>
</method>
<method name="draw_char">
@@ -77,17 +77,23 @@
<method name="draw_colored_polygon">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
+ </argument>
+ <argument index="3" name="texture" type="Texture2D" default="null">
+ </argument>
+ <argument index="4" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="5" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="3" name="texture" type="Texture" default="null">
+ <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="4" name="normal_map" type="Texture" default="null">
+ <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
- <argument index="5" name="antialiased" type="bool" default="false">
+ <argument index="8" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
Draws a colored polygon of any amount of points, convex or concave.
@@ -104,10 +110,8 @@
</argument>
<argument index="3" name="width" type="float" default="1.0">
</argument>
- <argument index="4" name="antialiased" type="bool" default="false">
- </argument>
<description>
- Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased.
+ Draws a line from a 2D point to another, with a given color and width.
</description>
</method>
<method name="draw_mesh">
@@ -115,45 +119,50 @@
</return>
<argument index="0" name="mesh" type="Mesh">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
- <argument index="2" name="normal_map" type="Texture" default="null">
+ <argument index="2" name="normal_map" type="Texture2D" default="null">
</argument>
- <argument index="3" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <argument index="3" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="5" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ </argument>
+ <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
+ </argument>
+ <argument index="8" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
+ Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_multiline">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
- <argument index="3" name="antialiased" type="bool" default="false">
- </argument>
<description>
- Draws multiple, parallel lines with a uniform [code]color[/code]. [code]width[/code] and [code]antialiased[/code] are currently not implemented and have no effect.
+ Draws multiple, parallel lines with a uniform [code]color[/code].
</description>
</method>
<method name="draw_multiline_colors">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="1" name="colors" type="PackedColorArray">
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
- <argument index="3" name="antialiased" type="bool" default="false">
- </argument>
<description>
- Draws multiple, parallel lines with a uniform [code]width[/code], segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
+ Draws multiple, parallel 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].
</description>
</method>
<method name="draw_multimesh">
@@ -161,27 +170,42 @@
</return>
<argument index="0" name="multimesh" type="MultiMesh">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
+ </argument>
+ <argument index="2" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="3" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="2" name="normal_map" type="Texture" default="null">
+ <argument index="5" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
+ </argument>
+ <argument index="6" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
+ Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_polygon">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
+ </argument>
+ <argument index="1" name="colors" type="PackedColorArray">
+ </argument>
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
+ </argument>
+ <argument index="3" name="texture" type="Texture2D" default="null">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="4" name="normal_map" type="Texture2D" default="null">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="5" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="3" name="texture" type="Texture" default="null">
+ <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="4" name="normal_map" type="Texture" default="null">
+ <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
- <argument index="5" name="antialiased" type="bool" default="false">
+ <argument index="8" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
Draws a polygon of any amount of points, convex or concave.
@@ -190,50 +214,54 @@
<method name="draw_polyline">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
- <argument index="3" name="antialiased" type="bool" default="false">
- </argument>
<description>
- Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code] and optional antialiasing.
+ Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code].
</description>
</method>
<method name="draw_polyline_colors">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="1" name="colors" type="PackedColorArray">
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
- <argument index="3" name="antialiased" type="bool" default="false">
- </argument>
<description>
- Draws interconnected line segments with a uniform [code]width[/code], segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
+ Draws interconnected line segments 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].
</description>
</method>
<method name="draw_primitive">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="1" name="colors" type="PackedColorArray">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array">
+ <argument index="2" name="uvs" type="PackedVector2Array">
</argument>
- <argument index="3" name="texture" type="Texture" default="null">
+ <argument index="3" name="texture" type="Texture2D" default="null">
</argument>
<argument index="4" name="width" type="float" default="1.0">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
+ <argument index="5" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="6" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
+ </argument>
+ <argument index="9" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
- Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
+ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad.
</description>
</method>
<method name="draw_rect">
@@ -247,11 +275,9 @@
</argument>
<argument index="3" name="width" type="float" default="1.0">
</argument>
- <argument index="4" name="antialiased" type="bool" default="false">
- </argument>
<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. If [code]antialiased[/code] is [code]true[/code], the lines will be antialiased.
- [b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only effective if [code]filled[/code] is [code]false[/code].
+ 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].
</description>
</method>
<method name="draw_set_transform">
@@ -307,13 +333,21 @@
<method name="draw_texture">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
<argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="3" name="normal_map" type="Texture" default="null">
+ <argument index="3" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="4" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="5" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="6" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
+ </argument>
+ <argument index="7" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
Draws a texture at a given position.
@@ -322,7 +356,7 @@
<method name="draw_texture_rect">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="rect" type="Rect2">
</argument>
@@ -332,7 +366,15 @@
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
+ <argument index="5" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="6" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
+ </argument>
+ <argument index="9" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
Draws a 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.
@@ -341,7 +383,7 @@
<method name="draw_texture_rect_region">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="rect" type="Rect2">
</argument>
@@ -351,9 +393,17 @@
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
+ <argument index="5" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="6" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="6" name="clip_uv" type="bool" default="true">
+ <argument index="8" name="clip_uv" type="bool" default="true">
+ </argument>
+ <argument index="9" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
+ </argument>
+ <argument index="10" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<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.
@@ -377,77 +427,77 @@
<return type="RID">
</return>
<description>
- Returns the canvas item RID used by [VisualServer] for this item.
+ Returns the canvas item RID used by [RenderingServer] for this item.
</description>
</method>
<method name="get_canvas_transform" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets the transform matrix of this item's canvas.
+ Returns the transform matrix of this item's canvas.
</description>
</method>
<method name="get_global_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Gets the global position of the mouse.
+ Returns the global position of the mouse.
</description>
</method>
<method name="get_global_transform" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets the global transform matrix of this item.
+ Returns the global transform matrix of this item.
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets the global transform matrix of this item in relation to the canvas.
+ Returns the global transform matrix of this item in relation to the canvas.
</description>
</method>
<method name="get_local_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Gets the mouse position relative to this item's position.
+ Returns the mouse position relative to this item's position.
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets the transform matrix of this item.
+ Returns the transform matrix of this item.
</description>
</method>
<method name="get_viewport_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Gets the viewport's boundaries as a [Rect2].
+ Returns the viewport's boundaries as a [Rect2].
</description>
</method>
<method name="get_viewport_transform" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets this item's transform in relation to the viewport.
+ Returns this item's transform in relation to the viewport.
</description>
</method>
<method name="get_world_2d" qualifiers="const">
<return type="World2D">
</return>
<description>
- Gets the [World2D] where this item is in.
+ Returns the [World2D] where this item is in.
</description>
</method>
<method name="hide">
<return type="void">
</return>
<description>
- Hide the CanvasItem if it's currently visible.
+ Hide the [CanvasItem] if it's currently visible.
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
@@ -527,14 +577,14 @@
<return type="void">
</return>
<description>
- Show the CanvasItem if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
+ Show the [CanvasItem] if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</description>
</method>
<method name="update">
<return type="void">
</return>
<description>
- Queue the CanvasItem for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw.
+ Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw.
</description>
</method>
</methods>
@@ -557,6 +607,12 @@
<member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top">
If [code]true[/code], the object draws on top of its parent.
</member>
+ <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0">
+ The texture filtering mode to use on this [CanvasItem].
+ </member>
+ <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
+ The texture repeating mode to use on this [CanvasItem].
+ </member>
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false">
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
</member>
@@ -567,7 +623,7 @@
<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. This can only be connected realtime, as deferred will not allow drawing.
</description>
</signal>
<signal name="hide">
@@ -587,38 +643,61 @@
</signal>
</signals>
<constants>
- <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
+ <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
+ The [CanvasItem]'s transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform].
+ </constant>
+ <constant name="NOTIFICATION_DRAW" value="30">
+ The [CanvasItem] is requested to draw.
</constant>
- <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
- Additive blending mode.
+ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
+ The [CanvasItem]'s visibility has changed.
</constant>
- <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
- Subtractive blending mode.
+ <constant name="NOTIFICATION_ENTER_CANVAS" value="32">
+ The [CanvasItem] has entered the canvas.
</constant>
- <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
- Multiplicative blending mode.
+ <constant name="NOTIFICATION_EXIT_CANVAS" value="33">
+ The [CanvasItem] has exited the canvas.
</constant>
- <constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode">
- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
+ <constant name="TEXTURE_FILTER_PARENT_NODE" value="0" enum="TextureFilter">
+ The [CanvasItem] will inherit the filter from its parent.
</constant>
- <constant name="BLEND_MODE_DISABLED" value="5" enum="BlendMode">
- Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied.
+ <constant name="TEXTURE_FILTER_NEAREST" value="1" enum="TextureFilter">
+ The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art.
</constant>
- <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
- The CanvasItem's transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform].
+ <constant name="TEXTURE_FILTER_LINEAR" value="2" enum="TextureFilter">
+ The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style.
</constant>
- <constant name="NOTIFICATION_DRAW" value="30">
- The CanvasItem is requested to draw.
+ <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter">
+ The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps.
</constant>
- <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
- The CanvasItem's visibility has changed.
+ <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="TextureFilter">
+ 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="NOTIFICATION_ENTER_CANVAS" value="32">
- The CanvasItem has entered the canvas.
+ <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.
+ [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="NOTIFICATION_EXIT_CANVAS" value="33">
- The CanvasItem has exited the canvas.
+ <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.
+ [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">
+ Represents the size of the [enum TextureFilter] enum.
+ </constant>
+ <constant name="TEXTURE_REPEAT_PARENT_NODE" value="0" enum="TextureRepeat">
+ The [CanvasItem] will inherit the filter from its parent.
+ </constant>
+ <constant name="TEXTURE_REPEAT_DISABLED" value="1" enum="TextureRepeat">
+ Texture will not repeat.
+ </constant>
+ <constant name="TEXTURE_REPEAT_ENABLED" value="2" enum="TextureRepeat">
+ Texture will repeat normally.
+ </constant>
+ <constant name="TEXTURE_REPEAT_MIRROR" value="3" enum="TextureRepeat">
+ Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored.
+ </constant>
+ <constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat">
+ Represents the size of the [enum TextureRepeat] enum.
</constant>
</constants>
</class>
diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml
index 5963e00d9e..c2d44c1d17 100644
--- a/doc/classes/CanvasItemMaterial.xml
+++ b/doc/classes/CanvasItemMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.2">
+<class name="CanvasItemMaterial" inherits="Material" version="4.0">
<brief_description>
A material for [CanvasItem]s.
</brief_description>
@@ -18,12 +18,20 @@
The manner in which material reacts to lighting.
</member>
<member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
+ The number of columns in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D].
+ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
+ If [code]true[/code], the particles animation will loop.
+ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
+ The number of rows in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D].
+ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false">
+ If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play.
+ This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes.
</member>
</members>
<constants>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 2e56009f50..8202a29d44 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasLayer" inherits="Node" category="Core" version="3.2">
+<class name="CanvasLayer" inherits="Node" version="4.0">
<brief_description>
Canvas drawing layer.
</brief_description>
@@ -24,8 +24,10 @@
The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead.
</member>
<member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false">
+ Sets the layer to follow the viewport in order to simulate a pseudo 3D effect.
</member>
<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.
</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/CanvasModulate.xml b/doc/classes/CanvasModulate.xml
index 95214b8c6a..19f8912cd8 100644
--- a/doc/classes/CanvasModulate.xml
+++ b/doc/classes/CanvasModulate.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.2">
+<class name="CanvasModulate" inherits="Node2D" version="4.0">
<brief_description>
Tint the entire canvas.
</brief_description>
diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml
index 3cdb9b3e22..fab11d44cc 100644
--- a/doc/classes/CapsuleMesh.xml
+++ b/doc/classes/CapsuleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="CapsuleMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Class representing a capsule-shaped [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
index a13abadf36..290d260f0f 100644
--- a/doc/classes/CapsuleShape2D.xml
+++ b/doc/classes/CapsuleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="CapsuleShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Capsule shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape3D.xml
index 0b55ca3472..f56d94dc63 100644
--- a/doc/classes/CapsuleShape.xml
+++ b/doc/classes/CapsuleShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleShape" inherits="Shape" category="Core" version="3.2">
+<class name="CapsuleShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Capsule shape for collisions.
</brief_description>
diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml
index d792b1b180..435f4eb06b 100644
--- a/doc/classes/CenterContainer.xml
+++ b/doc/classes/CenterContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CenterContainer" inherits="Container" category="Core" version="3.2">
+<class name="CenterContainer" inherits="Container" version="4.0">
<brief_description>
Keeps children controls centered.
</brief_description>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index e03229abe1..c16e448498 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -1,39 +1,51 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CharFXTransform" inherits="Reference" category="Core" version="3.2">
+<class name="CharFXTransform" inherits="Reference" version="4.0">
<brief_description>
+ Controls how an individual character will be displayed in a [RichTextEffect].
</brief_description>
<description>
+ By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect].
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>
+ <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
- <method name="get_value_or">
- <return type="Variant">
- </return>
- <argument index="0" name="key" type="String">
- </argument>
- <argument index="1" name="default_value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="absolute_index" type="int" setter="set_absolute_index" getter="get_absolute_index" default="0">
+ The index of the current character (starting from 0). Setting this property won't affect drawing.
</member>
<member name="character" type="int" setter="set_character" getter="get_character" default="0">
+ The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:
+ [codeblock]
+ # `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
+ # See the RichTextEffect documentation for details.
+ char_fx.character = ord("*")
+ [/codeblock]
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
+ The color the character will be drawn with.
</member>
<member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0">
+ The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].
+ [b]Note:[/b] Time still passes while the [RichTextLabel] is hidden.
</member>
<member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}">
+ Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form [code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.
+ For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]:
+ [codeblock]
+ {"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)}
+ [/codeblock]
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ The position offset the character will be drawn with (in pixels).
</member>
<member name="relative_index" type="int" setter="set_relative_index" getter="get_relative_index" default="0">
+ The index of the current character (starting from 0). Setting this property won't affect drawing.
</member>
<member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true">
+ If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead.
</member>
</members>
<constants>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 97ef4dbe95..9c42091eb8 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckBox" inherits="Button" category="Core" version="3.2">
+<class name="CheckBox" inherits="Button" version="4.0">
<brief_description>
- Binary choice user interface widget.
+ Binary choice user interface widget. See also [CheckButton].
</brief_description>
<description>
- A checkbox allows the user to make a binary choice (choosing only one of two possible options).
+ A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed.
</description>
<tutorials>
</tutorials>
@@ -18,41 +18,58 @@
</constants>
<theme_items>
<theme_item name="check_vadjust" type="int" default="0">
- The vertical offset used when rendering the check icons.
+ The vertical offset used when rendering the check icons (in pixels).
</theme_item>
- <theme_item name="checked" type="Texture">
+ <theme_item name="checked" type="Texture2D">
+ The check icon to display when the [CheckBox] is checked.
</theme_item>
<theme_item name="disabled" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is focused.
</theme_item>
<theme_item name="font" type="Font">
+ The [Font] to use for the [CheckBox] text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ The [CheckBox] text's font color.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ The [CheckBox] text's font color when it's disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ The [CheckBox] text's font color when it's hovered.
</theme_item>
<theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckBox] text's font color when it's hovered and pressed.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckBox] text's font color when it's pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered.
</theme_item>
<theme_item name="hover_pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ The separation between the check icon and the text (in pixels).
</theme_item>
<theme_item name="normal" type="StyleBox">
+ The [StyleBox] to display as a background.
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is pressed.
</theme_item>
- <theme_item name="radio_checked" type="Texture">
+ <theme_item name="radio_checked" type="Texture2D">
+ If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
</theme_item>
- <theme_item name="radio_unchecked" type="Texture">
+ <theme_item name="radio_unchecked" type="Texture2D">
+ If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
</theme_item>
- <theme_item name="unchecked" type="Texture">
+ <theme_item name="unchecked" type="Texture2D">
+ The check icon to display when the [CheckBox] is unchecked.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 5b867b6a3a..514ff9a691 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckButton" inherits="Button" category="Core" version="3.2">
+<class name="CheckButton" inherits="Button" version="4.0">
<brief_description>
- Checkable button.
+ Checkable button. See also [CheckBox].
</brief_description>
<description>
- CheckButton is a toggle button displayed as a check field.
+ CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button.
</description>
<tutorials>
</tutorials>
@@ -18,41 +18,58 @@
</constants>
<theme_items>
<theme_item name="check_vadjust" type="int" default="0">
- The vertical offset used when rendering the icons.
+ The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>
<theme_item name="disabled" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is focused.
</theme_item>
<theme_item name="font" type="Font">
+ The [Font] to use for the [CheckButton] text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ The [CheckButton] text's font color.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ The [CheckButton] text's font color when it's disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ The [CheckButton] text's font color when it's hovered.
</theme_item>
<theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckButton] text's font color when it's hovered and pressed.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckButton] text's font color when it's pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered.
</theme_item>
<theme_item name="hover_pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ The separation between the toggle icon and the text (in pixels).
</theme_item>
<theme_item name="normal" type="StyleBox">
+ The [StyleBox] to display as a background.
</theme_item>
- <theme_item name="off" type="Texture">
+ <theme_item name="off" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked.
</theme_item>
- <theme_item name="off_disabled" type="Texture">
+ <theme_item name="off_disabled" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked and disabled.
</theme_item>
- <theme_item name="on" type="Texture">
+ <theme_item name="on" type="Texture2D">
+ The icon to display when the [CheckButton] is checked.
</theme_item>
- <theme_item name="on_disabled" type="Texture">
+ <theme_item name="on_disabled" type="Texture2D">
+ The icon to display when the [CheckButton] is checked and disabled.
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml
index 4cff7b5cd4..db889b0f1b 100644
--- a/doc/classes/CircleShape2D.xml
+++ b/doc/classes/CircleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="CircleShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Circular shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index fd08643dd5..2a6a2ddd91 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ClassDB" inherits="Object" category="Core" version="3.2">
+<class name="ClassDB" inherits="Object" version="4.0">
<brief_description>
Class information repository.
</brief_description>
@@ -12,7 +12,7 @@
<method name="can_instance" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case.
@@ -21,16 +21,16 @@
<method name="class_exists" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns whether the specified [code]class[/code] is available or not.
</description>
</method>
<method name="class_get_category" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required.
@@ -39,18 +39,18 @@
<method name="class_get_integer_constant" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<description>
Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found.
</description>
</method>
<method name="class_get_integer_constant_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -61,7 +61,7 @@
<method name="class_get_method_list" qualifiers="const">
<return type="Array">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -74,7 +74,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<description>
Returns the value of [code]property[/code] of [code]class[/code] or its ancestry.
@@ -83,7 +83,7 @@
<method name="class_get_property_list" qualifiers="const">
<return type="Array">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -94,9 +94,9 @@
<method name="class_get_signal" qualifiers="const">
<return type="Dictionary">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="signal" type="String">
+ <argument index="1" name="signal" type="StringName">
</argument>
<description>
Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
@@ -105,7 +105,7 @@
<method name="class_get_signal_list" qualifiers="const">
<return type="Array">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -116,9 +116,9 @@
<method name="class_has_integer_constant" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<description>
Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not.
@@ -127,9 +127,9 @@
<method name="class_has_method" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="no_inheritance" type="bool" default="false">
</argument>
@@ -140,9 +140,9 @@
<method name="class_has_signal" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="signal" type="String">
+ <argument index="1" name="signal" type="StringName">
</argument>
<description>
Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not.
@@ -153,7 +153,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -162,25 +162,25 @@
</description>
</method>
<method name="get_class_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the names of all the classes available.
</description>
</method>
<method name="get_inheriters_from_class" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns the names of all the classes that directly or indirectly inherit from [code]class[/code].
</description>
</method>
<method name="get_parent_class" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns the parent class of [code]class[/code].
@@ -189,7 +189,7 @@
<method name="instance" qualifiers="const">
<return type="Variant">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Creates an instance of [code]class[/code].
@@ -198,7 +198,7 @@
<method name="is_class_enabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns whether this [code]class[/code] is enabled or not.
@@ -207,9 +207,9 @@
<method name="is_parent_class" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="inherits" type="String">
+ <argument index="1" name="inherits" type="StringName">
</argument>
<description>
Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not.
diff --git a/doc/classes/ClippedCamera.xml b/doc/classes/ClippedCamera3D.xml
index 9eda79bbae..58ecec828d 100644
--- a/doc/classes/ClippedCamera.xml
+++ b/doc/classes/ClippedCamera3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ClippedCamera" inherits="Camera" category="Core" version="3.2">
+<class name="ClippedCamera3D" inherits="Camera3D" version="4.0">
<brief_description>
- A [Camera] that includes collision.
+ A [Camera3D] that includes collision.
</brief_description>
<description>
- This node extends [Camera] to add collisions with [Area] and/or [PhysicsBody] nodes. The camera cannot move through colliding objects.
+ This node extends [Camera3D] to add collisions with [Area3D] and/or [PhysicsBody3D] nodes. The camera cannot move through colliding objects.
</description>
<tutorials>
</tutorials>
@@ -84,10 +84,10 @@
</methods>
<members>
<member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false">
- If [code]true[/code], the camera stops on contact with [Area]s.
+ If [code]true[/code], the camera stops on contact with [Area3D]s.
</member>
<member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true">
- If [code]true[/code], the camera stops on contact with [PhysicsBody]s.
+ If [code]true[/code], the camera stops on contact with [PhysicsBody3D]s.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected.
@@ -95,7 +95,7 @@
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
The camera's collision margin. The camera can't get closer than this distance to a colliding object.
</member>
- <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode" default="0">
+ <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera3D.ProcessMode" default="0">
The camera's process callback. See [enum ProcessMode].
</member>
</members>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index b9ec9480cf..e8f7a59e4c 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.2">
+<class name="CollisionObject2D" inherits="Node2D" version="4.0">
<brief_description>
Base node for 2D collision objects.
</brief_description>
@@ -44,6 +44,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
+ Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code].
</description>
</method>
<method name="get_shape_owners">
@@ -199,6 +200,7 @@
<argument index="1" name="margin" type="float">
</argument>
<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.
</description>
</method>
<method name="shape_owner_set_transform">
diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject3D.xml
index c30aeafcf3..f8e897653d 100644
--- a/doc/classes/CollisionObject.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionObject" inherits="Spatial" category="Core" version="3.2">
+<class name="CollisionObject3D" inherits="Node3D" version="4.0">
<brief_description>
Base node for collision objects.
</brief_description>
<description>
- CollisionObject is the base class for physics objects. It can hold any number of collision [Shape]s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods.
+ CollisionObject3D is the base class for physics objects. It can hold any number of collision [Shape3D]s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject3D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods.
</description>
<tutorials>
</tutorials>
@@ -23,7 +23,7 @@
<argument index="4" name="shape_idx" type="int">
</argument>
<description>
- Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape3D] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events.
</description>
</method>
<method name="create_shape_owner">
@@ -81,10 +81,10 @@
</return>
<argument index="0" name="owner_id" type="int">
</argument>
- <argument index="1" name="shape" type="Shape">
+ <argument index="1" name="shape" type="Shape3D">
</argument>
<description>
- Adds a [Shape] to the shape owner.
+ Adds a [Shape3D] to the shape owner.
</description>
</method>
<method name="shape_owner_clear_shapes">
@@ -106,14 +106,14 @@
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
- <return type="Shape">
+ <return type="Shape3D">
</return>
<argument index="0" name="owner_id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<description>
- Returns the [Shape] with the given id from the given shape owner.
+ Returns the [Shape3D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
@@ -133,7 +133,7 @@
<argument index="1" name="shape_id" type="int">
</argument>
<description>
- Returns the child index of the [Shape] with the given id from the given shape owner.
+ 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">
@@ -181,10 +181,10 @@
</methods>
<members>
<member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag" default="false">
- If [code]true[/code], the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes.
+ If [code]true[/code], the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes.
</member>
<member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
- If [code]true[/code], the [CollisionObject]'s shapes will respond to [RayCast]s.
+ If [code]true[/code], the [CollisionObject3D]'s shapes will respond to [RayCast3D]s.
</member>
</members>
<signals>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index fe46d45f71..242cdb8c80 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.2">
+<class name="CollisionPolygon2D" inherits="Node2D" version="4.0">
<brief_description>
Defines a 2D collision polygon.
</brief_description>
<description>
- Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygon can be drawn in the editor or specified by a list of vertices.
+ Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices.
</description>
<tutorials>
</tutorials>
@@ -12,18 +12,19 @@
</methods>
<members>
<member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0">
- Collision build mode. Use one of the [code]BUILD_*[/code] constants.
+ Collision build mode. Use one of the [enum BuildMode] constants.
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], no collisions will be detected.
</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.
+ If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects.
</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.
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
- The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference.
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
+ The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon3D.xml
index 994f589190..dd3c57d1d0 100644
--- a/doc/classes/CollisionPolygon.xml
+++ b/doc/classes/CollisionPolygon3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.2">
+<class name="CollisionPolygon3D" inherits="Node3D" version="4.0">
<brief_description>
Editor-only class for defining a collision polygon in 3D space.
</brief_description>
<description>
- Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a [Shape] for gameplay. Properties modified during gameplay will have no effect.
+ Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a [Shape3D] for gameplay. Properties modified during gameplay will have no effect.
</description>
<tutorials>
</tutorials>
@@ -17,7 +17,7 @@
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], no collision will be produced.
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
Array of vertices which define the polygon.
[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
</member>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 5fd8826a98..e32ce9c9f9 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionShape2D" inherits="Node2D" category="Core" version="3.2">
+<class name="CollisionShape2D" inherits="Node2D" version="4.0">
<brief_description>
Node that represents collision shape data in 2D space.
</brief_description>
@@ -19,6 +19,7 @@
Sets whether this collision shape should only detect collision on one side (top or bottom).
</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.
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
The actual shape owned by this collision shape.
diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape3D.xml
index c34c0be839..76515a65a7 100644
--- a/doc/classes/CollisionShape.xml
+++ b/doc/classes/CollisionShape3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionShape" inherits="Spatial" category="Core" version="3.2">
+<class name="CollisionShape3D" inherits="Node3D" version="4.0">
<brief_description>
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 [Area] to give it a detection shape, or add it to a [PhysicsBody] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject.shape_owner_get_shape] to get the actual shape.
+ 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.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
@@ -14,7 +14,7 @@
<return type="void">
</return>
<description>
- Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry.
+ Sets the collision shape's shape to the addition of all its convexed [MeshInstance3D] siblings geometry.
</description>
</method>
<method name="resource_changed">
@@ -31,7 +31,7 @@
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
A disabled collision shape has no effect in the world.
</member>
- <member name="shape" type="Shape" setter="set_shape" getter="get_shape">
+ <member name="shape" type="Shape3D" setter="set_shape" getter="get_shape">
The actual shape owned by this collision shape.
</member>
</members>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index deba30712e..b35d4fb36a 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Color" category="Built-In Types" version="3.2">
+<class name="Color" version="4.0">
<brief_description>
Color in RGBA format with some support for ARGB format.
</brief_description>
<description>
A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values greater than 1.
- You can also create a color from standardized color names by using [method @GDScript.ColorN].
+ You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
+ If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
</description>
<tutorials>
</tutorials>
@@ -18,11 +19,11 @@
<description>
Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN].
[codeblock]
- # Each of the following creates the same color RGBA(178, 217, 10, 255)
- var c1 = Color("#ffb2d90a") # ARGB format with "#"
- var c2 = Color("ffb2d90a") # ARGB format
- var c3 = Color("#b2d90a") # RGB format with "#"
- var c4 = Color("b2d90a") # RGB format
+ # Each of the following creates the same color RGBA(178, 217, 10, 255).
+ var c1 = Color("#ffb2d90a") # ARGB format with "#".
+ var c2 = Color("ffb2d90a") # ARGB format.
+ var c3 = Color("#b2d90a") # RGB format with "#".
+ var c4 = Color("b2d90a") # RGB format.
[/codeblock]
</description>
</method>
@@ -41,6 +42,20 @@
<method name="Color">
<return type="Color">
</return>
+ <argument index="0" name="c" type="Color">
+ </argument>
+ <argument index="1" name="a" type="float">
+ </argument>
+ <description>
+ Constructs a color from an existing color, but with a custom alpha value.
+ [codeblock]
+ var red = Color(Color.red, 0.5) # 50% transparent red.
+ [/codeblock]
+ </description>
+ </method>
+ <method name="Color">
+ <return type="Color">
+ </return>
<argument index="0" name="r" type="float">
</argument>
<argument index="1" name="g" type="float">
@@ -119,7 +134,7 @@
</argument>
<argument index="2" name="v" type="float">
</argument>
- <argument index="3" name="a" type="float" default="1">
+ <argument index="3" name="a" type="float" default="1.0">
</argument>
<description>
Constructs a color from an HSV profile. [code]h[/code], [code]s[/code], and [code]v[/code] are values between 0 and 1.
@@ -128,18 +143,6 @@
[/codeblock]
</description>
</method>
- <method name="gray">
- <return type="float">
- </return>
- <description>
- Returns the color's grayscale representation.
- The gray value is calculated as [code](r + g + b) / 3[/code].
- [codeblock]
- var c = Color(0.2, 0.45, 0.82)
- var gray = c.gray() # A value of 0.466667
- [/codeblock]
- </description>
- </method>
<method name="inverted">
<return type="Color">
</return>
@@ -157,34 +160,35 @@
<argument index="0" name="color" type="Color">
</argument>
<description>
+ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
- <method name="lightened">
+ <method name="lerp">
<return type="Color">
</return>
- <argument index="0" name="amount" type="float">
+ <argument index="0" name="b" type="Color">
+ </argument>
+ <argument index="1" name="t" type="float">
</argument>
<description>
- Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1).
+ Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1.
[codeblock]
- var green = Color(0.0, 1.0, 0.0)
- var lightgreen = green.lightened(0.2) # 20% lighter than regular green
+ var c1 = Color(1.0, 0.0, 0.0)
+ var c2 = Color(0.0, 1.0, 0.0)
+ var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255)
[/codeblock]
</description>
</method>
- <method name="linear_interpolate">
+ <method name="lightened">
<return type="Color">
</return>
- <argument index="0" name="b" type="Color">
- </argument>
- <argument index="1" name="t" type="float">
+ <argument index="0" name="amount" type="float">
</argument>
<description>
- Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1.
+ Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1).
[codeblock]
- var c1 = Color(1.0, 0.0, 0.0)
- var c2 = Color(0.0, 1.0, 0.0)
- var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, 255)
+ var green = Color(0.0, 1.0, 0.0)
+ var lightgreen = green.lightened(0.2) # 20% lighter than regular green
[/codeblock]
</description>
</method>
@@ -235,7 +239,7 @@
<method name="to_html">
<return type="String">
</return>
- <argument index="0" name="with_alpha" type="bool" default="True">
+ <argument index="0" name="with_alpha" type="bool" default="true">
</argument>
<description>
Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]).
@@ -306,297 +310,443 @@
</member>
</members>
<constants>
- <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )">
- </constant>
<constant name="aliceblue" value="Color( 0.94, 0.97, 1, 1 )">
+ Alice blue color.
</constant>
<constant name="antiquewhite" value="Color( 0.98, 0.92, 0.84, 1 )">
+ Antique white color.
</constant>
<constant name="aqua" value="Color( 0, 1, 1, 1 )">
+ Aqua color.
</constant>
<constant name="aquamarine" value="Color( 0.5, 1, 0.83, 1 )">
+ Aquamarine color.
</constant>
<constant name="azure" value="Color( 0.94, 1, 1, 1 )">
+ Azure color.
</constant>
<constant name="beige" value="Color( 0.96, 0.96, 0.86, 1 )">
+ Beige color.
</constant>
<constant name="bisque" value="Color( 1, 0.89, 0.77, 1 )">
+ Bisque color.
</constant>
<constant name="black" value="Color( 0, 0, 0, 1 )">
+ Black color.
</constant>
<constant name="blanchedalmond" value="Color( 1, 0.92, 0.8, 1 )">
+ Blanche almond color.
</constant>
<constant name="blue" value="Color( 0, 0, 1, 1 )">
+ Blue color.
</constant>
<constant name="blueviolet" value="Color( 0.54, 0.17, 0.89, 1 )">
+ Blue violet color.
</constant>
<constant name="brown" value="Color( 0.65, 0.16, 0.16, 1 )">
+ Brown color.
</constant>
<constant name="burlywood" value="Color( 0.87, 0.72, 0.53, 1 )">
+ Burly wood color.
</constant>
<constant name="cadetblue" value="Color( 0.37, 0.62, 0.63, 1 )">
+ Cadet blue color.
</constant>
<constant name="chartreuse" value="Color( 0.5, 1, 0, 1 )">
+ Chartreuse color.
</constant>
<constant name="chocolate" value="Color( 0.82, 0.41, 0.12, 1 )">
+ Chocolate color.
</constant>
<constant name="coral" value="Color( 1, 0.5, 0.31, 1 )">
+ Coral color.
</constant>
<constant name="cornflower" value="Color( 0.39, 0.58, 0.93, 1 )">
+ Cornflower color.
</constant>
<constant name="cornsilk" value="Color( 1, 0.97, 0.86, 1 )">
+ Corn silk color.
</constant>
<constant name="crimson" value="Color( 0.86, 0.08, 0.24, 1 )">
+ Crimson color.
</constant>
<constant name="cyan" value="Color( 0, 1, 1, 1 )">
+ Cyan color.
</constant>
<constant name="darkblue" value="Color( 0, 0, 0.55, 1 )">
+ Dark blue color.
</constant>
<constant name="darkcyan" value="Color( 0, 0.55, 0.55, 1 )">
+ Dark cyan color.
</constant>
<constant name="darkgoldenrod" value="Color( 0.72, 0.53, 0.04, 1 )">
+ Dark goldenrod color.
</constant>
<constant name="darkgray" value="Color( 0.66, 0.66, 0.66, 1 )">
+ Dark gray color.
</constant>
<constant name="darkgreen" value="Color( 0, 0.39, 0, 1 )">
+ Dark green color.
</constant>
<constant name="darkkhaki" value="Color( 0.74, 0.72, 0.42, 1 )">
+ Dark khaki color.
</constant>
<constant name="darkmagenta" value="Color( 0.55, 0, 0.55, 1 )">
+ Dark magenta color.
</constant>
<constant name="darkolivegreen" value="Color( 0.33, 0.42, 0.18, 1 )">
+ Dark olive green color.
</constant>
<constant name="darkorange" value="Color( 1, 0.55, 0, 1 )">
+ Dark orange color.
</constant>
<constant name="darkorchid" value="Color( 0.6, 0.2, 0.8, 1 )">
+ Dark orchid color.
</constant>
<constant name="darkred" value="Color( 0.55, 0, 0, 1 )">
+ Dark red color.
</constant>
<constant name="darksalmon" value="Color( 0.91, 0.59, 0.48, 1 )">
+ Dark salmon color.
</constant>
<constant name="darkseagreen" value="Color( 0.56, 0.74, 0.56, 1 )">
+ Dark sea green color.
</constant>
<constant name="darkslateblue" value="Color( 0.28, 0.24, 0.55, 1 )">
+ Dark slate blue color.
</constant>
<constant name="darkslategray" value="Color( 0.18, 0.31, 0.31, 1 )">
+ Dark slate gray color.
</constant>
<constant name="darkturquoise" value="Color( 0, 0.81, 0.82, 1 )">
+ Dark turquoise color.
</constant>
<constant name="darkviolet" value="Color( 0.58, 0, 0.83, 1 )">
+ Dark violet color.
</constant>
<constant name="deeppink" value="Color( 1, 0.08, 0.58, 1 )">
+ Deep pink color.
</constant>
<constant name="deepskyblue" value="Color( 0, 0.75, 1, 1 )">
+ Deep sky blue color.
</constant>
<constant name="dimgray" value="Color( 0.41, 0.41, 0.41, 1 )">
+ Dim gray color.
</constant>
<constant name="dodgerblue" value="Color( 0.12, 0.56, 1, 1 )">
+ Dodger blue color.
</constant>
<constant name="firebrick" value="Color( 0.7, 0.13, 0.13, 1 )">
+ Firebrick color.
</constant>
<constant name="floralwhite" value="Color( 1, 0.98, 0.94, 1 )">
+ Floral white color.
</constant>
<constant name="forestgreen" value="Color( 0.13, 0.55, 0.13, 1 )">
+ Forest green color.
</constant>
<constant name="fuchsia" value="Color( 1, 0, 1, 1 )">
+ Fuchsia color.
</constant>
<constant name="gainsboro" value="Color( 0.86, 0.86, 0.86, 1 )">
+ Gainsboro color.
</constant>
<constant name="ghostwhite" value="Color( 0.97, 0.97, 1, 1 )">
+ Ghost white color.
</constant>
<constant name="gold" value="Color( 1, 0.84, 0, 1 )">
+ Gold color.
</constant>
<constant name="goldenrod" value="Color( 0.85, 0.65, 0.13, 1 )">
+ Goldenrod color.
+ </constant>
+ <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )">
+ Gray color.
</constant>
<constant name="green" value="Color( 0, 1, 0, 1 )">
+ Green color.
</constant>
<constant name="greenyellow" value="Color( 0.68, 1, 0.18, 1 )">
+ Green yellow color.
</constant>
<constant name="honeydew" value="Color( 0.94, 1, 0.94, 1 )">
+ Honeydew color.
</constant>
<constant name="hotpink" value="Color( 1, 0.41, 0.71, 1 )">
+ Hot pink color.
</constant>
<constant name="indianred" value="Color( 0.8, 0.36, 0.36, 1 )">
+ Indian red color.
</constant>
<constant name="indigo" value="Color( 0.29, 0, 0.51, 1 )">
+ Indigo color.
</constant>
<constant name="ivory" value="Color( 1, 1, 0.94, 1 )">
+ Ivory color.
</constant>
<constant name="khaki" value="Color( 0.94, 0.9, 0.55, 1 )">
+ Khaki color.
</constant>
<constant name="lavender" value="Color( 0.9, 0.9, 0.98, 1 )">
+ Lavender color.
</constant>
<constant name="lavenderblush" value="Color( 1, 0.94, 0.96, 1 )">
+ Lavender blush color.
</constant>
<constant name="lawngreen" value="Color( 0.49, 0.99, 0, 1 )">
+ Lawn green color.
</constant>
<constant name="lemonchiffon" value="Color( 1, 0.98, 0.8, 1 )">
+ Lemon chiffon color.
</constant>
<constant name="lightblue" value="Color( 0.68, 0.85, 0.9, 1 )">
+ Light blue color.
</constant>
<constant name="lightcoral" value="Color( 0.94, 0.5, 0.5, 1 )">
+ Light coral color.
</constant>
<constant name="lightcyan" value="Color( 0.88, 1, 1, 1 )">
+ Light cyan color.
</constant>
<constant name="lightgoldenrod" value="Color( 0.98, 0.98, 0.82, 1 )">
+ Light goldenrod color.
</constant>
<constant name="lightgray" value="Color( 0.83, 0.83, 0.83, 1 )">
+ Light gray color.
</constant>
<constant name="lightgreen" value="Color( 0.56, 0.93, 0.56, 1 )">
+ Light green color.
</constant>
<constant name="lightpink" value="Color( 1, 0.71, 0.76, 1 )">
+ Light pink color.
</constant>
<constant name="lightsalmon" value="Color( 1, 0.63, 0.48, 1 )">
+ Light salmon color.
</constant>
<constant name="lightseagreen" value="Color( 0.13, 0.7, 0.67, 1 )">
+ Light sea green color.
</constant>
<constant name="lightskyblue" value="Color( 0.53, 0.81, 0.98, 1 )">
+ Light sky blue color.
</constant>
<constant name="lightslategray" value="Color( 0.47, 0.53, 0.6, 1 )">
+ Light slate gray color.
</constant>
<constant name="lightsteelblue" value="Color( 0.69, 0.77, 0.87, 1 )">
+ Light steel blue color.
</constant>
<constant name="lightyellow" value="Color( 1, 1, 0.88, 1 )">
+ Light yellow color.
</constant>
<constant name="lime" value="Color( 0, 1, 0, 1 )">
+ Lime color.
</constant>
<constant name="limegreen" value="Color( 0.2, 0.8, 0.2, 1 )">
+ Lime green color.
</constant>
<constant name="linen" value="Color( 0.98, 0.94, 0.9, 1 )">
+ Linen color.
</constant>
<constant name="magenta" value="Color( 1, 0, 1, 1 )">
+ Magenta color.
</constant>
<constant name="maroon" value="Color( 0.69, 0.19, 0.38, 1 )">
+ Maroon color.
</constant>
<constant name="mediumaquamarine" value="Color( 0.4, 0.8, 0.67, 1 )">
+ Medium aquamarine color.
</constant>
<constant name="mediumblue" value="Color( 0, 0, 0.8, 1 )">
+ Medium blue color.
</constant>
<constant name="mediumorchid" value="Color( 0.73, 0.33, 0.83, 1 )">
+ Medium orchid color.
</constant>
<constant name="mediumpurple" value="Color( 0.58, 0.44, 0.86, 1 )">
+ Medium purple color.
</constant>
<constant name="mediumseagreen" value="Color( 0.24, 0.7, 0.44, 1 )">
+ Medium sea green color.
</constant>
<constant name="mediumslateblue" value="Color( 0.48, 0.41, 0.93, 1 )">
+ Medium slate blue color.
</constant>
<constant name="mediumspringgreen" value="Color( 0, 0.98, 0.6, 1 )">
+ Medium spring green color.
</constant>
<constant name="mediumturquoise" value="Color( 0.28, 0.82, 0.8, 1 )">
+ Medium turquoise color.
</constant>
<constant name="mediumvioletred" value="Color( 0.78, 0.08, 0.52, 1 )">
+ Medium violet red color.
</constant>
<constant name="midnightblue" value="Color( 0.1, 0.1, 0.44, 1 )">
+ Midnight blue color.
</constant>
<constant name="mintcream" value="Color( 0.96, 1, 0.98, 1 )">
+ Mint cream color.
</constant>
<constant name="mistyrose" value="Color( 1, 0.89, 0.88, 1 )">
+ Misty rose color.
</constant>
<constant name="moccasin" value="Color( 1, 0.89, 0.71, 1 )">
+ Moccasin color.
</constant>
<constant name="navajowhite" value="Color( 1, 0.87, 0.68, 1 )">
+ Navajo white color.
</constant>
<constant name="navyblue" value="Color( 0, 0, 0.5, 1 )">
+ Navy blue color.
</constant>
<constant name="oldlace" value="Color( 0.99, 0.96, 0.9, 1 )">
+ Old lace color.
</constant>
<constant name="olive" value="Color( 0.5, 0.5, 0, 1 )">
+ Olive color.
</constant>
<constant name="olivedrab" value="Color( 0.42, 0.56, 0.14, 1 )">
+ Olive drab color.
</constant>
<constant name="orange" value="Color( 1, 0.65, 0, 1 )">
+ Orange color.
</constant>
<constant name="orangered" value="Color( 1, 0.27, 0, 1 )">
+ Orange red color.
</constant>
<constant name="orchid" value="Color( 0.85, 0.44, 0.84, 1 )">
+ Orchid color.
</constant>
<constant name="palegoldenrod" value="Color( 0.93, 0.91, 0.67, 1 )">
+ Pale goldenrod color.
</constant>
<constant name="palegreen" value="Color( 0.6, 0.98, 0.6, 1 )">
+ Pale green color.
</constant>
<constant name="paleturquoise" value="Color( 0.69, 0.93, 0.93, 1 )">
+ Pale turquoise color.
</constant>
<constant name="palevioletred" value="Color( 0.86, 0.44, 0.58, 1 )">
+ Pale violet red color.
</constant>
<constant name="papayawhip" value="Color( 1, 0.94, 0.84, 1 )">
+ Papaya whip color.
</constant>
<constant name="peachpuff" value="Color( 1, 0.85, 0.73, 1 )">
+ Peach puff color.
</constant>
<constant name="peru" value="Color( 0.8, 0.52, 0.25, 1 )">
+ Peru color.
</constant>
<constant name="pink" value="Color( 1, 0.75, 0.8, 1 )">
+ Pink color.
</constant>
<constant name="plum" value="Color( 0.87, 0.63, 0.87, 1 )">
+ Plum color.
</constant>
<constant name="powderblue" value="Color( 0.69, 0.88, 0.9, 1 )">
+ Powder blue color.
</constant>
<constant name="purple" value="Color( 0.63, 0.13, 0.94, 1 )">
+ Purple color.
</constant>
<constant name="rebeccapurple" value="Color( 0.4, 0.2, 0.6, 1 )">
+ Rebecca purple color.
</constant>
<constant name="red" value="Color( 1, 0, 0, 1 )">
+ Red color.
</constant>
<constant name="rosybrown" value="Color( 0.74, 0.56, 0.56, 1 )">
+ Rosy brown color.
</constant>
<constant name="royalblue" value="Color( 0.25, 0.41, 0.88, 1 )">
+ Royal blue color.
</constant>
<constant name="saddlebrown" value="Color( 0.55, 0.27, 0.07, 1 )">
+ Saddle brown color.
</constant>
<constant name="salmon" value="Color( 0.98, 0.5, 0.45, 1 )">
+ Salmon color.
</constant>
<constant name="sandybrown" value="Color( 0.96, 0.64, 0.38, 1 )">
+ Sandy brown color.
</constant>
<constant name="seagreen" value="Color( 0.18, 0.55, 0.34, 1 )">
+ Sea green color.
</constant>
<constant name="seashell" value="Color( 1, 0.96, 0.93, 1 )">
+ Seashell color.
</constant>
<constant name="sienna" value="Color( 0.63, 0.32, 0.18, 1 )">
+ Sienna color.
</constant>
<constant name="silver" value="Color( 0.75, 0.75, 0.75, 1 )">
+ Silver color.
</constant>
<constant name="skyblue" value="Color( 0.53, 0.81, 0.92, 1 )">
+ Sky blue color.
</constant>
<constant name="slateblue" value="Color( 0.42, 0.35, 0.8, 1 )">
+ Slate blue color.
</constant>
<constant name="slategray" value="Color( 0.44, 0.5, 0.56, 1 )">
+ Slate gray color.
</constant>
<constant name="snow" value="Color( 1, 0.98, 0.98, 1 )">
+ Snow color.
</constant>
<constant name="springgreen" value="Color( 0, 1, 0.5, 1 )">
+ Spring green color.
</constant>
<constant name="steelblue" value="Color( 0.27, 0.51, 0.71, 1 )">
+ Steel blue color.
</constant>
<constant name="tan" value="Color( 0.82, 0.71, 0.55, 1 )">
+ Tan color.
</constant>
<constant name="teal" value="Color( 0, 0.5, 0.5, 1 )">
+ Teal color.
</constant>
<constant name="thistle" value="Color( 0.85, 0.75, 0.85, 1 )">
+ Thistle color.
</constant>
<constant name="tomato" value="Color( 1, 0.39, 0.28, 1 )">
+ Tomato color.
</constant>
<constant name="transparent" value="Color( 1, 1, 1, 0 )">
+ Transparent color (white with no alpha).
</constant>
<constant name="turquoise" value="Color( 0.25, 0.88, 0.82, 1 )">
+ Turquoise color.
</constant>
<constant name="violet" value="Color( 0.93, 0.51, 0.93, 1 )">
+ Violet color.
</constant>
<constant name="webgray" value="Color( 0.5, 0.5, 0.5, 1 )">
+ Web gray color.
</constant>
<constant name="webgreen" value="Color( 0, 0.5, 0, 1 )">
+ Web green color.
</constant>
<constant name="webmaroon" value="Color( 0.5, 0, 0, 1 )">
+ Web maroon color.
</constant>
<constant name="webpurple" value="Color( 0.5, 0, 0.5, 1 )">
+ Web purple color.
</constant>
<constant name="wheat" value="Color( 0.96, 0.87, 0.7, 1 )">
+ Wheat color.
</constant>
<constant name="white" value="Color( 1, 1, 1, 1 )">
+ White color.
</constant>
<constant name="whitesmoke" value="Color( 0.96, 0.96, 0.96, 1 )">
+ White smoke color.
</constant>
<constant name="yellow" value="Color( 1, 1, 0, 1 )">
+ Yellow color.
</constant>
<constant name="yellowgreen" value="Color( 0.6, 0.8, 0.2, 1 )">
+ Yellow green color.
</constant>
</constants>
</class>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 07ce76fdb2..d8b4a8f76c 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.2">
+<class name="ColorPicker" inherits="BoxContainer" version="4.0">
<brief_description>
Color picker control.
</brief_description>
<description>
- [Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace.
+ Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace.
</description>
<tutorials>
</tutorials>
@@ -29,7 +29,7 @@
</description>
</method>
<method name="get_presets" qualifiers="const">
- <return type="PoolColorArray">
+ <return type="PackedColorArray">
</return>
<description>
Returns the list of colors in the presets of the color picker.
@@ -87,27 +87,35 @@
<constants>
</constants>
<theme_items>
- <theme_item name="add_preset" type="Texture">
+ <theme_item name="add_preset" type="Texture2D">
+ The icon for the "Add Preset" button.
</theme_item>
- <theme_item name="color_hue" type="Texture">
+ <theme_item name="color_hue" type="Texture2D">
+ Custom texture for the hue selection slider on the right.
</theme_item>
- <theme_item name="color_sample" type="Texture">
+ <theme_item name="color_sample" type="Texture2D">
</theme_item>
<theme_item name="h_width" type="int" default="30">
+ The width of the hue selection slider.
</theme_item>
<theme_item name="label_width" type="int" default="10">
</theme_item>
<theme_item name="margin" type="int" default="4">
+ The margin around the [ColorPicker].
</theme_item>
- <theme_item name="overbright_indicator" type="Texture">
+ <theme_item name="overbright_indicator" type="Texture2D">
+ The indicator used to signalize that the color value is outside the 0-1 range.
</theme_item>
- <theme_item name="preset_bg" type="Texture">
+ <theme_item name="preset_bg" type="Texture2D">
</theme_item>
- <theme_item name="screen_picker" type="Texture">
+ <theme_item name="screen_picker" type="Texture2D">
+ The icon for the screen color picker button.
</theme_item>
<theme_item name="sv_height" type="int" default="256">
+ The height of the saturation-value selection box.
</theme_item>
<theme_item name="sv_width" type="int" default="256">
+ The width of the saturation-value selection box.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index e8c78fb6bf..67f64c8a66 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPickerButton" inherits="Button" category="Core" version="3.2">
+<class name="ColorPickerButton" inherits="Button" version="4.0">
<brief_description>
Button that pops out a [ColorPicker].
</brief_description>
@@ -43,39 +43,53 @@
</signal>
<signal name="picker_created">
<description>
+ Emitted when the [ColorPicker] is created (the button is pressed for the first time).
</description>
</signal>
<signal name="popup_closed">
<description>
+ Emitted when the [ColorPicker] is closed.
</description>
</signal>
</signals>
<constants>
</constants>
<theme_items>
- <theme_item name="bg" type="Texture">
+ <theme_item name="bg" type="Texture2D">
+ The background of the color preview rect on the button.
</theme_item>
<theme_item name="disabled" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [ColorPickerButton]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Default text [Color] of the [ColorPickerButton].
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
+ Text [Color] used when the [ColorPickerButton] is disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [ColorPickerButton] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
+ Text [Color] used when the [ColorPickerButton] is being pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="2">
+ The horizontal space between [ColorPickerButton]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default [StyleBox] for the [ColorPickerButton].
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is being pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
index 2ff0a7eee3..92f42b6dd3 100644
--- a/doc/classes/ColorRect.xml
+++ b/doc/classes/ColorRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorRect" inherits="Control" category="Core" version="3.2">
+<class name="ColorRect" inherits="Control" version="4.0">
<brief_description>
Colored rectangle.
</brief_description>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index a6fe2486ea..9999d086da 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="ConcavePolygonShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Concave polygon 2D shape resource for physics.
</brief_description>
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments" default="PoolVector2Array( )">
+ <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array( )">
The array of points that make up the [ConcavePolygonShape2D]'s line segments.
</member>
</members>
diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape3D.xml
index a09b5005b9..20402d350a 100644
--- a/doc/classes/ConcavePolygonShape.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConcavePolygonShape" inherits="Shape" category="Core" version="3.2">
+<class name="ConcavePolygonShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Concave polygon shape.
</brief_description>
<description>
- Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
+ Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles.
+ Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [KinematicBody3D] or [RigidBody3D] with a mode other than Static.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_faces" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
Returns the faces (an array of triangles).
@@ -19,7 +20,7 @@
<method name="set_faces">
<return type="void">
</return>
- <argument index="0" name="faces" type="PoolVector3Array">
+ <argument index="0" name="faces" type="PackedVector3Array">
</argument>
<description>
Sets the faces (an array of triangles).
diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint3D.xml
index 4c95a4bef9..e86e95bec3 100644
--- a/doc/classes/ConeTwistJoint.xml
+++ b/doc/classes/ConeTwistJoint3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConeTwistJoint" inherits="Joint" category="Core" version="3.2">
+<class name="ConeTwistJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
A twist joint between two 3D bodies.
</brief_description>
<description>
- The joint can rotate the bodies across an axis defined by the local x-axes of the [Joint].
- The twist axis is initiated as the X axis of the [Joint].
- Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies.
+ The joint can rotate the bodies across an axis defined by the local x-axes of the [Joint3D].
+ The twist axis is initiated as the X axis of the [Joint3D].
+ Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint3D in the local space of the two Bodies.
</description>
<tutorials>
</tutorials>
@@ -14,7 +14,7 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
+ <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param">
</argument>
<description>
</description>
@@ -22,7 +22,7 @@
<method name="set_param">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
+ <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -44,7 +44,7 @@
<member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span" default="45.0">
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 [ConeTwistJoint].
+ 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">
@@ -56,7 +56,7 @@
<constant name="PARAM_SWING_SPAN" value="0" enum="Param">
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 [ConeTwistJoint].
+ Could be defined as looseness in the [ConeTwistJoint3D].
If below 0.05, this behavior is locked.
</constant>
<constant name="PARAM_TWIST_SPAN" value="1" enum="Param">
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 56f54e4434..522d484131 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfigFile" inherits="Reference" category="Core" version="3.2">
+<class name="ConfigFile" inherits="Reference" version="4.0">
<brief_description>
Helper class to handle INI-style files.
</brief_description>
@@ -8,7 +8,7 @@
[codeblock]
[section]
some_key=42
- string_example="Hello World!"
+ string_example="Hello World3D!"
a_vector=Vector3( 1, 0, 2 )
[/codeblock]
The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem.
@@ -26,6 +26,7 @@
config.save("user://settings.cfg")
[/codeblock]
Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load.
+ ConfigFiles can also contain manually written comment lines starting with a semicolon ([code];[/code]). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action.
</description>
<tutorials>
</tutorials>
@@ -36,7 +37,7 @@
<argument index="0" name="section" type="String">
</argument>
<description>
- Deletes the specified section along with all the key-value pairs inside.
+ 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">
@@ -47,19 +48,20 @@
<argument index="1" name="key" type="String">
</argument>
<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="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="section" type="String">
</argument>
<description>
- Returns an array of all defined key identifiers in the specified section.
+ 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>
</method>
<method name="get_sections" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns an array of all defined section identifiers.
@@ -75,7 +77,7 @@
<argument index="2" name="default" type="Variant" default="null">
</argument>
<description>
- Returns the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [code]default[/code] argument, or [code]null[/code] if it is omitted.
+ 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.
</description>
</method>
<method name="has_section" qualifiers="const">
@@ -104,7 +106,8 @@
<argument index="0" name="path" type="String">
</argument>
<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 [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK].
+ 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).
</description>
</method>
<method name="load_encrypted">
@@ -112,9 +115,11 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="key" type="PoolByteArray">
+ <argument index="1" name="key" type="PackedByteArray">
</argument>
<description>
+ Loads the encrypted config file specified as a parameter, using the provided [code]key[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="load_encrypted_pass">
@@ -122,9 +127,21 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="pass" type="String">
+ <argument index="1" name="password" type="String">
</argument>
<description>
+ Loads the encrypted config file specified as a parameter, using the provided [code]password[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ </description>
+ </method>
+ <method name="parse">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="data" type="String">
+ </argument>
+ <description>
+ Parses the 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).
</description>
</method>
<method name="save">
@@ -133,7 +150,8 @@
<argument index="0" name="path" type="String">
</argument>
<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 [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK].
+ 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).
</description>
</method>
<method name="save_encrypted">
@@ -141,9 +159,11 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="key" type="PoolByteArray">
+ <argument index="1" name="key" type="PackedByteArray">
</argument>
<description>
+ Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]key[/code] to encrypt it. The output file uses an INI-style structure.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="save_encrypted_pass">
@@ -151,9 +171,11 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="pass" type="String">
+ <argument index="1" name="password" type="String">
</argument>
<description>
+ Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]password[/code] to encrypt it. The output file uses an INI-style structure.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="set_value">
@@ -166,7 +188,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Assigns a value to the specified key of the specified section. If the section and/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.
+ 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>
</method>
</methods>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 8a8d1ed9e8..6d5871508b 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core" version="3.2">
+<class name="ConfirmationDialog" inherits="AcceptDialog" version="4.0">
<brief_description>
Dialog for confirmation of actions.
</brief_description>
<description>
Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order).
+ To get cancel action, you can use:
+ [codeblock]
+ get_cancel().connect("pressed", self, "cancelled")
+ [/codeblock].
</description>
<tutorials>
</tutorials>
@@ -18,8 +22,9 @@
</method>
</methods>
<members>
- <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" override="true" default="Vector2( 200, 70 )" />
- <member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Please Confirm...&quot;" />
+ <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i( 200, 70 )" />
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i( 200, 100 )" />
+ <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Please Confirm...&quot;" />
</members>
<constants>
</constants>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index 8a3aac88b5..c285b448d8 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Container" inherits="Control" category="Core" version="3.2">
+<class name="Container" inherits="Control" version="4.0">
<brief_description>
Base node for containers.
</brief_description>
@@ -29,6 +29,9 @@
</description>
</method>
</methods>
+ <members>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
+ </members>
<signals>
<signal name="sort_children">
<description>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 75d5a72fb1..9dbb843902 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Control" inherits="CanvasItem" category="Core" version="3.2">
+<class name="Control" inherits="CanvasItem" version="4.0">
<brief_description>
All user interface nodes inherit from Control. A control's anchors and margins adapt its position and size relative to its parent.
</brief_description>
@@ -7,10 +7,12 @@
Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change.
For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes.
[b]User Interface nodes and input[/b]
- Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it.
+ Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [code]MainLoop._input_event[/code].
+ [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
+ Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it.
Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus.
Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
- [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector.
+ [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link>
@@ -87,10 +89,10 @@
Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input].
</description>
</method>
- <method name="add_color_override">
+ <method name="add_theme_color_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="color" type="Color">
</argument>
@@ -98,10 +100,10 @@
Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. If the [code]color[/code] is empty or invalid, the override is cleared and the color from assigned [Theme] is used.
</description>
</method>
- <method name="add_constant_override">
+ <method name="add_theme_constant_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="constant" type="int">
</argument>
@@ -109,10 +111,10 @@
Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is empty or invalid, the override is cleared and the constant from assigned [Theme] is used.
</description>
</method>
- <method name="add_font_override">
+ <method name="add_theme_font_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="font" type="Font">
</argument>
@@ -120,21 +122,21 @@
Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is empty or invalid, the override is cleared and the font from assigned [Theme] is used.
</description>
</method>
- <method name="add_icon_override">
+ <method name="add_theme_icon_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is empty or invalid, the override is cleared and the icon from assigned [Theme] is used.
</description>
</method>
- <method name="add_shader_override">
+ <method name="add_theme_shader_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="shader" type="Shader">
</argument>
@@ -142,10 +144,10 @@
Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is empty or invalid, the override is cleared and the shader from assigned [Theme] is used.
</description>
</method>
- <method name="add_stylebox_override">
+ <method name="add_theme_stylebox_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="stylebox" type="StyleBox">
</argument>
@@ -217,21 +219,6 @@
Returns [member margin_left] and [member margin_top]. See also [member rect_position].
</description>
</method>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
- [codeblock]
- func _ready():
- modulate = get_color("font_color", "Button") #get the color defined for button fonts
- [/codeblock]
- </description>
- </method>
<method name="get_combined_minimum_size" qualifiers="const">
<return type="Vector2">
</return>
@@ -239,17 +226,6 @@
Returns combined minimum size from [member rect_min_size] and [method get_minimum_size].
</description>
</method>
- <method name="get_constant" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
- </description>
- </method>
<method name="get_cursor_shape" qualifiers="const">
<return type="int" enum="Control.CursorShape">
</return>
@@ -298,17 +274,6 @@
Returns the control that has the keyboard focus or [code]null[/code] if none.
</description>
</method>
- <method name="get_font" qualifiers="const">
- <return type="Font">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
- </description>
- </method>
<method name="get_global_rect" qualifiers="const">
<return type="Rect2">
</return>
@@ -316,17 +281,6 @@
Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size].
</description>
</method>
- <method name="get_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
- </description>
- </method>
<method name="get_margin" qualifiers="const">
<return type="float">
</return>
@@ -371,12 +325,60 @@
Returns the rotation (in radians).
</description>
</method>
- <method name="get_stylebox" qualifiers="const">
+ <method name="get_theme_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
+ [codeblock]
+ func _ready():
+ modulate = get_theme_color("font_color", "Button") #get the color defined for button fonts
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_theme_constant" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
+ </description>
+ </method>
+ <method name="get_theme_font" qualifiers="const">
+ <return type="Font">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
+ </description>
+ </method>
+ <method name="get_theme_icon" qualifiers="const">
+ <return type="Texture2D">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
+ </description>
+ </method>
+ <method name="get_theme_stylebox" qualifiers="const">
<return type="StyleBox">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
@@ -409,128 +411,128 @@
Steal the focus from another control and become the focused control (see [member focus_mode]).
</description>
</method>
- <method name="has_color" qualifiers="const">
+ <method name="has_focus" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <description>
+ Returns [code]true[/code] if this is the current focused control. See [member focus_mode].
+ </description>
+ </method>
+ <method name="has_point" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
+ If not overridden, default behavior is checking if the point is within control's Rect.
+ [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
+ </description>
+ </method>
+ <method name="has_theme_color" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
</description>
</method>
- <method name="has_color_override" qualifiers="const">
+ <method name="has_theme_color_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
- <method name="has_constant" qualifiers="const">
+ <method name="has_theme_constant" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
</description>
</method>
- <method name="has_constant_override" qualifiers="const">
+ <method name="has_theme_constant_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
- <method name="has_focus" qualifiers="const">
+ <method name="has_theme_font" qualifiers="const">
<return type="bool">
</return>
- <description>
- Returns [code]true[/code] if this is the current focused control. See [member focus_mode].
- </description>
- </method>
- <method name="has_font" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
</description>
</method>
- <method name="has_font_override" qualifiers="const">
+ <method name="has_theme_font_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
- <method name="has_icon" qualifiers="const">
+ <method name="has_theme_icon" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
</description>
</method>
- <method name="has_icon_override" qualifiers="const">
+ <method name="has_theme_icon_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
- <method name="has_point" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
- If not overridden, default behavior is checking if the point is within control's Rect.
- [b]Node:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
- </description>
- </method>
- <method name="has_shader_override" qualifiers="const">
+ <method name="has_theme_shader_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
- <method name="has_stylebox" qualifiers="const">
+ <method name="has_theme_stylebox" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
</description>
</method>
- <method name="has_stylebox_override" qualifiers="const">
+ <method name="has_theme_stylebox_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] has a valid override in this [Control] node.
@@ -757,16 +759,6 @@
If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins.
</description>
</method>
- <method name="show_modal">
- <return type="void">
- </return>
- <argument index="0" name="exclusive" type="bool" default="false">
- </argument>
- <description>
- Displays a control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus.
- If [code]exclusive[/code] is [code]true[/code], other controls will not receive input and clicking outside this control will not close it.
- </description>
- </method>
<method name="warp_mouse">
<return type="void">
</return>
@@ -806,11 +798,11 @@
Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give keyboard focus to if the user presses Tab on a keyboard by default. You can change the key by editing the [code]ui_focus_next[/code] input action.
+ Tells Godot which node it should give keyboard focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_next[/code] input action.
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
</member>
<member name="focus_previous" type="NodePath" setter="set_focus_previous" getter="get_focus_previous" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab on a keyboard by default. You can change the key by editing the [code]ui_focus_prev[/code] input action.
+ Tells Godot which node it should give keyboard focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_prev[/code] input action.
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
</member>
<member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection" default="1">
@@ -846,7 +838,7 @@
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="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
- Enables whether rendering of 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.
+ 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.
</member>
<member name="rect_global_position" type="Vector2" setter="_set_global_position" getter="get_global_position">
The node's global position, relative to the world (usually to the top-left corner of the window).
@@ -905,11 +897,6 @@
Emitted when the node's minimum size changes.
</description>
</signal>
- <signal name="modal_closed">
- <description>
- Emitted when a modal [Control] is closed. See [method show_modal].
- </description>
- </signal>
<signal name="mouse_entered">
<description>
Emitted when the mouse enters the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it.
@@ -930,6 +917,10 @@
Emitted when one of the size flags changes. See [member size_flags_horizontal] and [member size_flags_vertical].
</description>
</signal>
+ <signal name="theme_changed">
+ <description>
+ </description>
+ </signal>
</signals>
<constants>
<constant name="FOCUS_NONE" value="0" enum="FocusMode">
@@ -957,10 +948,7 @@
Sent when the node loses focus.
</constant>
<constant name="NOTIFICATION_THEME_CHANGED" value="45">
- Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code] methods.
- </constant>
- <constant name="NOTIFICATION_MODAL_CLOSE" value="46">
- Sent when an open modal dialog closes. See [method show_modal].
+ Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_theme_*_override[/code] methods.
</constant>
<constant name="NOTIFICATION_SCROLL_BEGIN" value="47">
Sent when this node is inside a [ScrollContainer] which has begun being scrolled.
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index 050ca23e05..cba446fff8 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="ConvexPolygonShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Convex polygon shape for 2D physics.
</brief_description>
@@ -13,7 +13,7 @@
<method name="set_point_cloud">
<return type="void">
</return>
- <argument index="0" name="point_cloud" type="PoolVector2Array">
+ <argument index="0" name="point_cloud" type="PackedVector2Array">
</argument>
<description>
Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details.
@@ -21,7 +21,7 @@
</method>
</methods>
<members>
- <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )">
+ <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )">
The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
</member>
</members>
diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape3D.xml
index d15a0a7336..c036f80e2d 100644
--- a/doc/classes/ConvexPolygonShape.xml
+++ b/doc/classes/ConvexPolygonShape3D.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.2">
+<class name="ConvexPolygonShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Convex polygon shape for 3D physics.
</brief_description>
<description>
- Convex polygon shape resource, which can be added to a [PhysicsBody] or area.
+ Convex polygon shape resource, which can be added to a [PhysicsBody3D] or area.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" default="PoolVector3Array( )">
+ <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array( )">
The list of 3D points forming the convex polygon shape.
</member>
</members>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index bce7895973..10f1f18f0d 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Crypto" inherits="Reference" category="Core" version="3.2">
+<class name="Crypto" inherits="Reference" version="4.0">
<brief_description>
Access to advanced cryptographic functionalities.
</brief_description>
@@ -22,17 +22,18 @@
key.save("user://generated.key")
cert.save("user://generated.crt")
[/codeblock]
+ [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
<methods>
<method name="generate_random_bytes">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="size" type="int">
</argument>
<description>
- Generates a [PoolByteArray] of cryptographically secure random bytes with given [code]size[/code].
+ Generates a [PackedByteArray] of cryptographically secure random bytes with given [code]size[/code].
</description>
</method>
<method name="generate_rsa">
diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml
index 8c825c9e1c..fe7f4b63f0 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CryptoKey" inherits="Resource" category="Core" version="3.2">
+<class name="CryptoKey" inherits="Resource" version="4.0">
<brief_description>
A cryptographic key (RSA).
</brief_description>
<description>
The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource].
They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate.
+ [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml
deleted file mode 100644
index 2cedc78499..0000000000
--- a/doc/classes/CubeMap.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubeMap" inherits="Resource" category="Core" version="3.2">
- <brief_description>
- A CubeMap is a 6-sided 3D texture.
- </brief_description>
- <description>
- A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="get_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the [CubeMap]'s height.
- </description>
- </method>
- <method name="get_side" qualifiers="const">
- <return type="Image">
- </return>
- <argument index="0" name="side" type="int" enum="CubeMap.Side">
- </argument>
- <description>
- Returns an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5.
- </description>
- </method>
- <method name="get_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the [CubeMap]'s width.
- </description>
- </method>
- <method name="set_side">
- <return type="void">
- </return>
- <argument index="0" name="side" type="int" enum="CubeMap.Side">
- </argument>
- <argument index="1" name="image" type="Image">
- </argument>
- <description>
- Sets an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5.
- </description>
- </method>
- </methods>
- <members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="7">
- The render flags for the [CubeMap]. See the [code]FLAG_*[/code] constants for details.
- </member>
- <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7">
- The lossy storage quality of the [CubeMap] if the storage mode is set to STORAGE_COMPRESS_LOSSY.
- </member>
- <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0">
- The [CubeMap]'s storage mode. See [code]STORAGE_*[/code] constants.
- </member>
- </members>
- <constants>
- <constant name="STORAGE_RAW" value="0" enum="Storage">
- Store the [CubeMap] without any compression.
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage">
- Store the [CubeMap] with strong compression that reduces image quality.
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage">
- Store the [CubeMap] with moderate compression that doesn't reduce image quality.
- </constant>
- <constant name="SIDE_LEFT" value="0" enum="Side">
- Identifier for the left face of the [CubeMap].
- </constant>
- <constant name="SIDE_RIGHT" value="1" enum="Side">
- Identifier for the right face of the [CubeMap].
- </constant>
- <constant name="SIDE_BOTTOM" value="2" enum="Side">
- Identifier for the bottom face of the [CubeMap].
- </constant>
- <constant name="SIDE_TOP" value="3" enum="Side">
- Identifier for the top face of the [CubeMap].
- </constant>
- <constant name="SIDE_FRONT" value="4" enum="Side">
- Identifier for the front face of the [CubeMap].
- </constant>
- <constant name="SIDE_BACK" value="5" enum="Side">
- Identifier for the back face of the [CubeMap].
- </constant>
- <constant name="FLAG_MIPMAPS" value="1" enum="Flags">
- Generate mipmaps, to enable smooth zooming out of the texture.
- </constant>
- <constant name="FLAG_REPEAT" value="2" enum="Flags">
- Repeat (instead of clamp to edge).
- </constant>
- <constant name="FLAG_FILTER" value="4" enum="Flags">
- Turn on magnifying filter, to enable smooth zooming in of the texture.
- </constant>
- <constant name="FLAGS_DEFAULT" value="7" enum="Flags">
- Default flags. Generate mipmaps, repeat, and filter are enabled.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/CubeMesh.xml b/doc/classes/CubeMesh.xml
index 67e559ab07..1f64b4a21f 100644
--- a/doc/classes/CubeMesh.xml
+++ b/doc/classes/CubeMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubeMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="CubeMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Generate an axis-aligned cuboid [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/SpatialGizmo.xml b/doc/classes/Cubemap.xml
index 5cca1883b3..61cb1d43f0 100644
--- a/doc/classes/SpatialGizmo.xml
+++ b/doc/classes/Cubemap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialGizmo" inherits="Reference" category="Core" version="3.2">
+<class name="Cubemap" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/TextureArray.xml b/doc/classes/CubemapArray.xml
index 0a9ac1fb2e..627baf79e0 100644
--- a/doc/classes/TextureArray.xml
+++ b/doc/classes/CubemapArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureArray" inherits="TextureLayered" category="Core" version="3.2">
+<class name="CubemapArray" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
index 0fb559296e..26872e1f8e 100644
--- a/doc/classes/Curve.xml
+++ b/doc/classes/Curve.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve" inherits="Resource" category="Core" version="3.2">
+<class name="Curve" inherits="Resource" version="4.0">
<brief_description>
A mathematic curve.
</brief_description>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 4e449a2032..8ac6258e97 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve2D" inherits="Resource" category="Core" version="3.2">
+<class name="Curve2D" inherits="Resource" version="4.0">
<brief_description>
Describes a Bézier curve in 2D space.
</brief_description>
@@ -41,10 +41,10 @@
</description>
</method>
<method name="get_baked_points" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<description>
- Returns the cache of points as a [PoolVector2Array].
+ Returns the cache of points as a [PackedVector2Array].
</description>
</method>
<method name="get_closest_offset" qualifiers="const">
@@ -178,7 +178,7 @@
</description>
</method>
<method name="tessellate" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="max_stages" type="int" default="5">
</argument>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 4a0873a986..fe454d90cc 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve3D" inherits="Resource" category="Core" version="3.2">
+<class name="Curve3D" inherits="Resource" version="4.0">
<brief_description>
Describes a Bézier curve in 3D space.
</brief_description>
<description>
- This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes.
+ This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a [Path3D], but can be manually sampled for other purposes.
It keeps a cache of precalculated points along the curve, to speed up further calculations.
</description>
<tutorials>
@@ -41,24 +41,24 @@
</description>
</method>
<method name="get_baked_points" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
- Returns the cache of points as a [PoolVector3Array].
+ Returns the cache of points as a [PackedVector3Array].
</description>
</method>
<method name="get_baked_tilts" qualifiers="const">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<description>
- Returns the cache of tilts as a [PoolRealArray].
+ Returns the cache of tilts as a [PackedFloat32Array].
</description>
</method>
<method name="get_baked_up_vectors" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
- Returns the cache of up vectors as a [PoolVector3Array].
+ Returns the cache of up vectors as a [PackedVector3Array].
If [member up_vector_enabled] is [code]false[/code], the cache will be empty.
</description>
</method>
@@ -223,11 +223,11 @@
</argument>
<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.
- 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 [PathFollow], this tilt is an offset over the natural tilt the [PathFollow] calculates.
+ 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="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="max_stages" type="int" default="5">
</argument>
@@ -246,7 +246,7 @@
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="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 PathFollow.rotation_mode] is set to [constant PathFollow.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed.
+ 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>
</members>
<constants>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index e8df560a4c..bc6b69d2d1 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CurveTexture" inherits="Texture" category="Core" version="3.2">
+<class name="CurveTexture" inherits="Texture2D" version="4.0">
<brief_description>
A texture that shows a curve.
</brief_description>
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
index 8e9397791a..3a81e98c3a 100644
--- a/doc/classes/CylinderMesh.xml
+++ b/doc/classes/CylinderMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="CylinderMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Class representing a cylindrical [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/CylinderShape.xml b/doc/classes/CylinderShape3D.xml
index 5dff156775..eb12568e71 100644
--- a/doc/classes/CylinderShape.xml
+++ b/doc/classes/CylinderShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CylinderShape" inherits="Shape" category="Core" version="3.2">
+<class name="CylinderShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Cylinder shape for collisions.
</brief_description>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
new file mode 100644
index 0000000000..8c71b61553
--- /dev/null
+++ b/doc/classes/DTLSServer.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="DTLSServer" inherits="Reference" version="4.0">
+ <brief_description>
+ Helper class to implement a DTLS server.
+ </brief_description>
+ <description>
+ This class is used to store the state of a DTLS server. Upon [method setup] it converts connected [PacketPeerUDP] to [PacketPeerDTLS] accepting them via [method take_connection] as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation.
+ Below a small example of how to use it:
+ [codeblock]
+ # server.gd
+ extends Node
+
+ var dtls := DTLSServer.new()
+ var server := UDPServer.new()
+ var peers = []
+
+ func _ready():
+ server.listen(4242)
+ var key = load("key.key") # Your private key.
+ var cert = load("cert.crt") # Your X509 certificate.
+ dtls.setup(key, cert)
+
+ func _process(delta):
+ while server.is_connection_available():
+ var peer : PacketPeerUDP = server.take_connection()
+ var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer)
+ if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING:
+ continue # It is normal that 50% of the connections fails due to cookie exchange.
+ print("Peer connected!")
+ peers.append(dtls_peer)
+ for p in peers:
+ p.poll() # Must poll to update the state.
+ if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
+ while p.get_available_packet_count() &gt; 0:
+ print("Received message from client: %s" % p.get_packet().get_string_from_utf8())
+ p.put_packet("Hello DTLS client".to_utf8())
+ [/codeblock]
+ [codeblock]
+ # client.gd
+ extends Node
+
+ var dtls := PacketPeerDTLS.new()
+ var udp := PacketPeerUDP.new()
+ var connected = false
+
+ func _ready():
+ udp.connect_to_host("127.0.0.1", 4242)
+ dtls.connect_to_peer(udp, false) # Use true in production for certificate validation!
+
+ func _process(delta):
+ dtls.poll()
+ if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
+ if !connected:
+ # Try to contact server
+ dtls.put_packet("The answer is... 42!".to_utf8())
+ while dtls.get_available_packet_count() &gt; 0:
+ print("Connected: %s" % dtls.get_packet().get_string_from_utf8())
+ connected = true
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="setup">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="key" type="CryptoKey">
+ </argument>
+ <argument index="1" name="certificate" type="X509Certificate">
+ </argument>
+ <argument index="2" name="chain" type="X509Certificate" default="null">
+ </argument>
+ <description>
+ Setup the DTLS server to use the given [code]private_key[/code] and provide the given [code]certificate[/code] to clients. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate.
+ </description>
+ </method>
+ <method name="take_connection">
+ <return type="PacketPeerDTLS">
+ </return>
+ <argument index="0" name="udp_peer" type="PacketPeerUDP">
+ </argument>
+ <description>
+ Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]).
+ [b]Note[/b]: You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
index 270d948f5e..e1b6bb6866 100644
--- a/doc/classes/DampedSpringJoint2D.xml
+++ b/doc/classes/DampedSpringJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core" version="3.2">
+<class name="DampedSpringJoint2D" inherits="Joint2D" version="4.0">
<brief_description>
Damped spring constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
new file mode 100644
index 0000000000..f7329d1537
--- /dev/null
+++ b/doc/classes/Decal.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Decal" inherits="VisualInstance3D" version="4.0">
+ <brief_description>
+ Node that projects a texture onto a [MeshInstance3D].
+ </brief_description>
+ <description>
+ [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 postprocessing effect after.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture2D">
+ </return>
+ <argument index="0" name="type" type="int" enum="Decal.DecalTexture">
+ </argument>
+ <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].
+ One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example:
+ [codeblock]
+ for i in Decal.TEXTURE_MAX:
+ $NewDecal.set_texture(i, $OldDecal.get_texture(i))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Decal.DecalTexture">
+ </argument>
+ <argument index="1" name="texture" type="Texture2D">
+ </argument>
+ <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].
+ One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example:
+ [codeblock]
+ for i in Decal.TEXTURE_MAX:
+ $NewDecal.set_texture(i, $OldDecal.get_texture(i))
+ [/codeblock]
+ </description>
+ </method>
+ </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.
+ </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 an 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>
+ <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.
+ </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>
+ <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
+ Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity.
+ </member>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ Sets the size of the [AABB] used by the decal. The AABB goes from [code]-extents[/code] to [code]extents[/code].
+ </member>
+ <member name="lower_fade" type="float" setter="set_lower_fade" getter="get_lower_fade" default="0.3">
+ Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB].
+ </member>
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
+ Changes the [Color] of the Decal by multiplying it with this value.
+ </member>
+ <member name="normal_fade" type="float" setter="set_normal_fade" getter="get_normal_fade" default="0.0">
+ 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.
+ </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.
+ </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.
+ </member>
+ <member name="texture_normal" type="Texture2D" setter="set_texture" getter="get_texture">
+ [Texture2D] with the per-pixel normalmap for the decal. Use this to add extra detail to decals.
+ </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.
+ </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].
+ </member>
+ </members>
+ <constants>
+ <constant name="TEXTURE_ALBEDO" value="0" enum="DecalTexture">
+ [Texture2D] corresponding to [member texture_albedo].
+ </constant>
+ <constant name="TEXTURE_NORMAL" value="1" enum="DecalTexture">
+ [Texture2D] corresponding to [member texture_normal].
+ </constant>
+ <constant name="TEXTURE_ORM" value="2" enum="DecalTexture">
+ [Texture2D] corresponding to [member texture_orm].
+ </constant>
+ <constant name="TEXTURE_EMISSION" value="3" enum="DecalTexture">
+ [Texture2D] corresponding to [member texture_emission].
+ </constant>
+ <constant name="TEXTURE_MAX" value="4" enum="DecalTexture">
+ Max size of [enum DecalTexture] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 7cb6b1b754..385f4b7e59 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -1,19 +1,75 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Dictionary" category="Built-In Types" version="3.2">
+<class name="Dictionary" version="4.0">
<brief_description>
Dictionary type.
</brief_description>
<description>
- Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
- Erasing elements while iterating over them [b]is not supported[/b].
+ Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as an hash map or associative array.
+ You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code].
+ Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior.
+ [b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate].
Creating a dictionary:
[codeblock]
- var d = {4: 5, "A key": "A value", 28: [1, 2, 3]}
+ var my_dir = {} # Creates an empty dictionary.
+ var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
+ var another_dir = {
+ key1: value1,
+ key2: value2,
+ key3: value3,
+ }
+ [/codeblock]
+ You can access a dictionary's values by referencing the appropriate key. In the above example, [code]points_dir["White"][/code] will return [code]50[/code]. You can also write [code]points_dir.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).
+ [codeblock]
+ export(String, "White", "Yellow", "Orange") var my_color
+ var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
+
+ func _ready():
+ # We can't use dot syntax here as `my_color` is a variable.
+ var points = points_dir[my_color]
+ [/codeblock]
+ In the above code, [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code].
+ Dictionaries can contain more complex data:
+ [codeblock]
+ my_dir = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key.
[/codeblock]
To add a key to an existing dictionary, access it like an existing key and assign to it:
[codeblock]
- d[4] = "hello" # Add integer 4 as a key and assign the String "hello" as its value.
- d["Godot"] = 3.01 # Add String "Godot" as a key and assign the value 3.01 to it.
+ var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
+ points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value.
+ [/codeblock]
+ Finally, dictionaries can contain different types of keys and values in the same dictionary:
+ [codeblock]
+ # This is a valid dictionary.
+ # To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`.
+ # Indexing styles can be mixed and matched depending on your needs.
+ var my_dir = {
+ "String Key": 5,
+ 4: [1, 2, 3],
+ 7: "Hello",
+ "sub_dir": {"sub_key": "Nested value"},
+ }
+ [/codeblock]
+ [b]Note:[/b] Unlike [Array]s, you can't compare dictionaries directly:
+ [codeblock]
+ array1 = [1, 2, 3]
+ array2 = [1, 2, 3]
+
+ func compare_arrays():
+ print(array1 == array2) # Will print true.
+
+ dir1 = {"a": 1, "b": 2, "c": 3}
+ dir2 = {"a": 1, "b": 2, "c": 3}
+
+ func compare_dictionaries():
+ print(dir1 == dir2) # Will NOT print true.
+ [/codeblock]
+ You need to first calculate the dictionary's hash with [method hash] before you can compare them:
+ [codeblock]
+ dir1 = {"a": 1, "b": 2, "c": 3}
+ dir2 = {"a": 1, "b": 2, "c": 3}
+
+ func compare_dictionaries():
+ print(dir1.hash() == dir2.hash()) # Will print true.
[/codeblock]
</description>
<tutorials>
@@ -21,6 +77,8 @@
</tutorials>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the dictionary, removing all key/value pairs.
</description>
@@ -28,10 +86,10 @@
<method name="duplicate">
<return type="Dictionary">
</return>
- <argument index="0" name="deep" type="bool" default="False">
+ <argument index="0" name="deep" type="bool" default="false">
</argument>
<description>
- Creates a copy of the dictionary, and returns it.
+ 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.
</description>
</method>
<method name="empty">
@@ -55,7 +113,7 @@
</return>
<argument index="0" name="key" type="Variant">
</argument>
- <argument index="1" name="default" type="Variant" default="Null">
+ <argument index="1" name="default" type="Variant" default="null">
</argument>
<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.
diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight3D.xml
index 502256ae63..6c88dcf42e 100644
--- a/doc/classes/DirectionalLight.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DirectionalLight" inherits="Light" category="Core" version="3.2">
+<class name="DirectionalLight3D" inherits="Light3D" version="4.0">
<brief_description>
Directional light from a distance, as from the Sun.
</brief_description>
<description>
- A directional light is a type of [Light] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction.
+ A directional light is a type of [Light3D] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
@@ -12,23 +12,23 @@
<methods>
</methods>
<members>
- <member name="directional_shadow_bias_split_scale" type="float" setter="set_param" getter="get_param" default="0.25">
- Amount of extra bias for shadow splits that are far away. If self-shadowing occurs only on the splits far away, increasing this value can fix them.
- </member>
<member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false">
If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits.
</member>
- <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange" default="0">
+ <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight3D.ShadowDepthRange" default="0">
Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange].
</member>
+ <member name="directional_shadow_fade_start" type="float" setter="set_param" getter="get_param" default="0.8">
+ Proportion of [member directional_shadow_max_distance] at which point the shadow starts to fade. At [member directional_shadow_max_distance] the shadow will disappear.
+ </member>
<member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="100.0">
The maximum distance for shadow splits.
</member>
- <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight.ShadowMode" default="2">
+ <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight3D.ShadowMode" default="2">
The light's shadow rendering algorithm. See [enum ShadowMode].
</member>
- <member name="directional_shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="0.8">
- Can be used to fix special cases of self shadowing when objects are perpendicular to the light.
+ <member name="directional_shadow_pancake_size" type="float" setter="set_param" getter="get_param" default="20.0">
+ 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.
</member>
<member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param" default="0.1">
The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code].
@@ -39,7 +39,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 [code]SHADOW_PARALLEL_4_SPLITS[/code].
</member>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.1" />
</members>
<constants>
<constant name="SHADOW_ORTHOGONAL" value="0" enum="ShadowMode">
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 8aae85563a..ed4257a809 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="Reference" category="Core" version="3.2">
+<class name="Directory" inherits="Reference" version="4.0">
<brief_description>
Type used to handle the filesystem.
</brief_description>
<description>
Directory type. It is used to manage directories and their content (not restricted to the project folder).
+ When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking.
Here is an example on how to iterate through the files of a directory:
[codeblock]
func dir_contents(path):
@@ -12,7 +13,7 @@
if dir.open(path) == OK:
dir.list_dir_begin()
var file_name = dir.get_next()
- while (file_name != ""):
+ while file_name != "":
if dir.current_is_dir():
print("Found directory: " + file_name)
else:
@@ -33,7 +34,7 @@
</argument>
<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]).
- The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="copy">
@@ -45,7 +46,7 @@
</argument>
<description>
Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="current_is_dir" qualifiers="const">
@@ -145,7 +146,7 @@
</argument>
<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]).
- The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="make_dir_recursive">
@@ -155,7 +156,7 @@
</argument>
<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 error code constants defined in [@GlobalScope] ([code]0K[/code], [code]FAILED[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="open">
@@ -165,7 +166,7 @@
</argument>
<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]).
- The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="remove">
@@ -175,7 +176,7 @@
</argument>
<description>
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.
- Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="rename">
@@ -187,7 +188,7 @@
</argument>
<description>
Renames (move) the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
</methods>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
new file mode 100644
index 0000000000..7fe712753c
--- /dev/null
+++ b/doc/classes/DisplayServer.xml
@@ -0,0 +1,1053 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="DisplayServer" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="alert">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <argument index="1" name="title" type="String" default="&quot;Alert!&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clipboard_get" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clipboard_set">
+ <return type="void">
+ </return>
+ <argument index="0" name="clipboard" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="console_set_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="console_visible" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_sub_window">
+ <return type="int">
+ </return>
+ <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode">
+ </argument>
+ <argument index="1" name="rect" type="int">
+ </argument>
+ <argument index="2" name="arg2" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="cursor_get_shape" qualifiers="const">
+ <return type="int" enum="DisplayServer.CursorShape">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="cursor_set_custom_image">
+ <return type="void">
+ </return>
+ <argument index="0" name="cursor" type="Resource">
+ </argument>
+ <argument index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0">
+ </argument>
+ <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="cursor_set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="int" enum="DisplayServer.CursorShape">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="delete_sub_window">
+ <return type="void">
+ </return>
+ <argument index="0" name="window_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="dialog_input_text">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="title" type="String">
+ </argument>
+ <argument index="1" name="description" type="String">
+ </argument>
+ <argument index="2" name="existing_text" type="String">
+ </argument>
+ <argument index="3" name="callback" type="Callable">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="dialog_show">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="title" type="String">
+ </argument>
+ <argument index="1" name="description" type="String">
+ </argument>
+ <argument index="2" name="buttons" type="PackedStringArray">
+ </argument>
+ <argument index="3" name="callback" type="Callable">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="enable_for_stealing_focus">
+ <return type="void">
+ </return>
+ <argument index="0" name="process_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="force_process_and_drop_events">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_latin_keyboard_variant" qualifiers="const">
+ <return type="int" enum="DisplayServer.LatinKeyboardVariant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_screen_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_swap_ok_cancel">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_window_at_screen_position" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="position" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_window_list" qualifiers="const">
+ <return type="PackedInt32Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_add_check_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="label" type="String">
+ </argument>
+ <argument index="2" name="callback" type="Callable">
+ </argument>
+ <argument index="3" name="tag" type="Variant" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_add_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="label" type="String">
+ </argument>
+ <argument index="2" name="callback" type="Callable">
+ </argument>
+ <argument index="3" name="tag" type="Variant" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_add_separator">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_add_submenu_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="label" type="String">
+ </argument>
+ <argument index="2" name="submenu" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_clear">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_get_item_callback">
+ <return type="Callable">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_get_item_submenu">
+ <return type="String">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_get_item_tag">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_get_item_text">
+ <return type="String">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_is_item_checkable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_is_item_checked" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_remove_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_set_item_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <argument index="2" name="callback" type="Callable">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_set_item_checkable">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <argument index="2" name="checkable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_set_item_checked">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <argument index="2" name="checked" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_set_item_submenu">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <argument index="2" name="submenu" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_set_item_tag">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <argument index="2" name="tag" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="global_menu_set_item_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_root" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <argument index="2" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_feature" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="feature" type="int" enum="DisplayServer.Feature">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="ime_get_selection" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="ime_get_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_console_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="mouse_get_absolute_position" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="mouse_get_button_state" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="mouse_get_mode" qualifiers="const">
+ <return type="int" enum="DisplayServer.MouseMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="mouse_get_position" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="mouse_set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="mouse_warp_to_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_pause">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_play">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="volume" type="float">
+ </argument>
+ <argument index="2" name="audio_track" type="String">
+ </argument>
+ <argument index="3" name="subtitle_track" type="String">
+ </argument>
+ <argument index="4" name="arg4" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_stop">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_unpause">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="process_events">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_dpi" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_orientation" qualifiers="const">
+ <return type="int" enum="DisplayServer.ScreenOrientation">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_position" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_usable_rect" qualifiers="const">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_is_kept_on" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="screen_is_touchscreen" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_set_keep_on">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_set_orientation">
+ <return type="void">
+ </return>
+ <argument index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation">
+ </argument>
+ <argument index="1" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Image">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_native_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="filename" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="virtual_keyboard_get_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="virtual_keyboard_hide">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="virtual_keyboard_show">
+ <return type="void">
+ </return>
+ <argument index="0" name="existing_text" type="String">
+ </argument>
+ <argument index="1" name="position" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ </argument>
+ <argument index="2" name="max_length" type="int" default="-1">
+ </argument>
+ <argument index="3" name="cursor_start" type="int" default="-1">
+ </argument>
+ <argument index="4" name="cursor_end" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="vsync_is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="vsync_is_using_via_compositor" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="vsync_set_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="vsync_set_use_via_compositor">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_attach_instance_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance_id" type="int">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_can_draw" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_attached_instance_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_current_screen" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_max_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_min_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_mode" qualifiers="const">
+ <return type="int" enum="DisplayServer.WindowMode">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_position" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_real_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_get_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_move_to_foreground">
+ <return type="void">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_request_attention">
+ <return type="void">
+ </return>
+ <argument index="0" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_current_screen">
+ <return type="void">
+ </return>
+ <argument index="0" name="screen" type="int">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_drop_files_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callback" type="Callable">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <argument index="2" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_ime_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_ime_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2i">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_input_event_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callback" type="Callable">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_input_text_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callback" type="Callable">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_max_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_size" type="Vector2i">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_min_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="min_size" type="Vector2i">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2i">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_rect_changed_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callback" type="Callable">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2i">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="title" type="String">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_transient">
+ <return type="void">
+ </return>
+ <argument index="0" name="window_id" type="int">
+ </argument>
+ <argument index="1" name="parent_window_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="window_set_window_event_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callback" type="Callable">
+ </argument>
+ <argument index="1" name="window_id" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="FEATURE_GLOBAL_MENU" value="0" enum="Feature">
+ </constant>
+ <constant name="FEATURE_SUBWINDOWS" value="1" enum="Feature">
+ </constant>
+ <constant name="FEATURE_TOUCHSCREEN" value="2" enum="Feature">
+ </constant>
+ <constant name="FEATURE_MOUSE" value="3" enum="Feature">
+ </constant>
+ <constant name="FEATURE_MOUSE_WARP" value="4" enum="Feature">
+ </constant>
+ <constant name="FEATURE_CLIPBOARD" value="5" enum="Feature">
+ </constant>
+ <constant name="FEATURE_VIRTUAL_KEYBOARD" value="6" enum="Feature">
+ </constant>
+ <constant name="FEATURE_CURSOR_SHAPE" value="7" enum="Feature">
+ </constant>
+ <constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature">
+ </constant>
+ <constant name="FEATURE_NATIVE_VIDEO" value="9" enum="Feature">
+ </constant>
+ <constant name="FEATURE_NATIVE_DIALOG" value="10" enum="Feature">
+ </constant>
+ <constant name="FEATURE_CONSOLE_WINDOW" value="11" enum="Feature">
+ </constant>
+ <constant name="FEATURE_IME" value="12" enum="Feature">
+ </constant>
+ <constant name="FEATURE_WINDOW_TRANSPARENCY" value="13" enum="Feature">
+ </constant>
+ <constant name="FEATURE_HIDPI" value="14" enum="Feature">
+ </constant>
+ <constant name="FEATURE_ICON" value="15" enum="Feature">
+ </constant>
+ <constant name="FEATURE_NATIVE_ICON" value="16" enum="Feature">
+ </constant>
+ <constant name="FEATURE_ORIENTATION" value="17" enum="Feature">
+ </constant>
+ <constant name="FEATURE_SWAP_BUFFERS" value="18" enum="Feature">
+ </constant>
+ <constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
+ </constant>
+ <constant name="MOUSE_MODE_HIDDEN" value="1" enum="MouseMode">
+ </constant>
+ <constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode">
+ </constant>
+ <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode">
+ </constant>
+ <constant name="SCREEN_OF_MAIN_WINDOW" value="-1">
+ </constant>
+ <constant name="MAIN_WINDOW_ID" value="0">
+ </constant>
+ <constant name="INVALID_WINDOW_ID" value="-1">
+ </constant>
+ <constant name="SCREEN_LANDSCAPE" value="0" enum="ScreenOrientation">
+ </constant>
+ <constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation">
+ </constant>
+ <constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
+ </constant>
+ <constant name="SCREEN_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation">
+ </constant>
+ <constant name="SCREEN_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation">
+ </constant>
+ <constant name="SCREEN_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation">
+ </constant>
+ <constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation">
+ </constant>
+ <constant name="CURSOR_ARROW" value="0" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_IBEAM" value="1" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_POINTING_HAND" value="2" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_CROSS" value="3" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_WAIT" value="4" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_BUSY" value="5" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_DRAG" value="6" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_CAN_DROP" value="7" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_FORBIDDEN" value="8" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_VSIZE" value="9" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_HSIZE" value="10" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_MOVE" value="13" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_VSPLIT" value="14" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_HSPLIT" value="15" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_HELP" value="16" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_MAX" value="17" enum="CursorShape">
+ </constant>
+ <constant name="WINDOW_MODE_WINDOWED" value="0" enum="WindowMode">
+ </constant>
+ <constant name="WINDOW_MODE_MINIMIZED" value="1" enum="WindowMode">
+ </constant>
+ <constant name="WINDOW_MODE_MAXIMIZED" value="2" enum="WindowMode">
+ </constant>
+ <constant name="WINDOW_MODE_FULLSCREEN" value="3" enum="WindowMode">
+ </constant>
+ <constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags">
+ </constant>
+ <constant name="WINDOW_FLAG_BORDERLESS" value="1" enum="WindowFlags">
+ </constant>
+ <constant name="WINDOW_FLAG_ALWAYS_ON_TOP" value="2" enum="WindowFlags">
+ </constant>
+ <constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags">
+ </constant>
+ <constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags">
+ </constant>
+ <constant name="WINDOW_FLAG_MAX" value="5" enum="WindowFlags">
+ </constant>
+ <constant name="LATIN_KEYBOARD_QWERTY" value="0" enum="LatinKeyboardVariant">
+ </constant>
+ <constant name="LATIN_KEYBOARD_QWERTZ" value="1" enum="LatinKeyboardVariant">
+ </constant>
+ <constant name="LATIN_KEYBOARD_AZERTY" value="2" enum="LatinKeyboardVariant">
+ </constant>
+ <constant name="LATIN_KEYBOARD_QZERTY" value="3" enum="LatinKeyboardVariant">
+ </constant>
+ <constant name="LATIN_KEYBOARD_DVORAK" value="4" enum="LatinKeyboardVariant">
+ </constant>
+ <constant name="LATIN_KEYBOARD_NEO" value="5" enum="LatinKeyboardVariant">
+ </constant>
+ <constant name="LATIN_KEYBOARD_COLEMAK" value="6" enum="LatinKeyboardVariant">
+ </constant>
+ <constant name="WINDOW_EVENT_MOUSE_ENTER" value="0" enum="WindowEvent">
+ </constant>
+ <constant name="WINDOW_EVENT_MOUSE_EXIT" value="1" enum="WindowEvent">
+ </constant>
+ <constant name="WINDOW_EVENT_FOCUS_IN" value="2" enum="WindowEvent">
+ </constant>
+ <constant name="WINDOW_EVENT_FOCUS_OUT" value="3" enum="WindowEvent">
+ </constant>
+ <constant name="WINDOW_EVENT_CLOSE_REQUEST" value="4" enum="WindowEvent">
+ </constant>
+ <constant name="WINDOW_EVENT_GO_BACK_REQUEST" value="5" enum="WindowEvent">
+ </constant>
+ <constant name="WINDOW_EVENT_DPI_CHANGE" value="6" enum="WindowEvent">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
index 0820d4e1b6..0864c3ba36 100644
--- a/doc/classes/DynamicFont.xml
+++ b/doc/classes/DynamicFont.xml
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFont" inherits="Font" category="Core" version="3.2">
+<class name="DynamicFont" inherits="Font" version="4.0">
<brief_description>
DynamicFont renders vector font files at runtime.
</brief_description>
<description>
- DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths.
+ DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. DynamicFont also supports defining one or more fallbacks fonts, which will be used when displaying a character not supported by the main font.
+ DynamicFont uses the [url=https://www.freetype.org/]FreeType[/url] library for rasterization.
[codeblock]
var dynamic_font = DynamicFont.new()
dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf")
dynamic_font.size = 64
$"Label".set("custom_fonts/font", dynamic_font)
[/codeblock]
+ [b]Note:[/b] DynamicFont doesn't support features such as right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File &gt; Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font.
</description>
<tutorials>
</tutorials>
@@ -46,6 +48,7 @@
<argument index="0" name="type" type="int">
</argument>
<description>
+ Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
</description>
</method>
<method name="remove_fallback">
@@ -76,6 +79,7 @@
<argument index="1" name="value" type="int">
</argument>
<description>
+ Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
</description>
</method>
</methods>
@@ -96,17 +100,14 @@
The font data.
</member>
<member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color( 1, 1, 1, 1 )">
+ The font outline's color.
+ [b]Note:[/b] It's recommended to leave this at the default value so that you can adjust it in individual controls. For example, if the outline is made black here, it won't be possible to change its color using a Label's font outline modulate theme item.
</member>
<member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
+ The font outline's thickness in pixels (not relative to the font size).
</member>
<member name="size" type="int" setter="set_size" getter="get_size" default="16">
- The font size.
- </member>
- <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" default="false">
- If [code]true[/code], filtering is used.
- </member>
- <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" default="false">
- If [code]true[/code], mipmapping is used.
+ The font size in pixels.
</member>
</members>
<constants>
diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml
index ecdab32e80..2b4ec17bf1 100644
--- a/doc/classes/DynamicFontData.xml
+++ b/doc/classes/DynamicFontData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFontData" inherits="Resource" category="Core" version="3.2">
+<class name="DynamicFontData" inherits="Resource" version="4.0">
<brief_description>
Used with [DynamicFont] to describe the location of a font file.
</brief_description>
@@ -12,13 +12,13 @@
</methods>
<members>
<member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
- Controls whether the font should be rendered with anti-aliasing.
+ If [code]true[/code], the font is rendered with anti-aliasing.
</member>
<member name="font_path" type="String" setter="set_font_path" getter="get_font_path" default="&quot;&quot;">
The path to the vector font file.
</member>
<member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="DynamicFontData.Hinting" default="2">
- The font hinting mode used by FreeType.
+ The font hinting mode used by FreeType. See [enum Hinting] for options.
</member>
</members>
<constants>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 4e4e29dc4e..8cfd3b63d6 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.2">
+<class name="EditorExportPlugin" inherits="Reference" version="4.0">
<brief_description>
+ A script that is executed when exporting projects.
</brief_description>
<description>
</description>
@@ -10,7 +11,7 @@
<method name="_export_begin" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="features" type="PoolStringArray">
+ <argument index="0" name="features" type="PackedStringArray">
</argument>
<argument index="1" name="is_debug" type="bool">
</argument>
@@ -19,12 +20,14 @@
<argument index="3" name="flags" type="int">
</argument>
<description>
+ Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export.
</description>
</method>
<method name="_export_end" qualifiers="virtual">
<return type="void">
</return>
<description>
+ Virtual method to be overridden by the user. Called when the export is finished.
</description>
</method>
<method name="_export_file" qualifiers="virtual">
@@ -34,7 +37,7 @@
</argument>
<argument index="1" name="type" type="String">
</argument>
- <argument index="2" name="features" type="PoolStringArray">
+ <argument index="2" name="features" type="PackedStringArray">
</argument>
<description>
</description>
@@ -44,7 +47,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="file" type="PoolByteArray">
+ <argument index="1" name="file" type="PackedByteArray">
</argument>
<argument index="2" name="remap" type="bool">
</argument>
@@ -91,12 +94,20 @@
<description>
</description>
</method>
+ <method name="add_ios_project_static_lib">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="add_shared_object">
<return type="void">
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="tags" type="PoolStringArray">
+ <argument index="1" name="tags" type="PackedStringArray">
</argument>
<description>
</description>
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index 92622cc25d..eb03d3010f 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFeatureProfile" inherits="Reference" category="Core" version="3.2">
+<class name="EditorFeatureProfile" inherits="Reference" version="4.0">
<brief_description>
+ An editor feature profile which can be used to disable specific features.
</brief_description>
<description>
+ An editor feature profile can be used to disable specific features of the Godot editor. When disabled, the features won't appear in the editor, which makes the editor less cluttered. This is useful in education settings to reduce confusion or when working in a team. For example, artists and level designers could use a feature profile that disables the script editor to avoid accidentally making changes to files they aren't supposed to edit.
+ To manage editor feature profiles visually, use [b]Editor &gt; Manage Feature Profiles...[/b] at the top of the editor window.
</description>
<tutorials>
</tutorials>
@@ -13,32 +16,36 @@
<argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature">
</argument>
<description>
+ Returns the specified [code]feature[/code]'s human-readable name.
</description>
</method>
<method name="is_class_disabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<description>
+ 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.
</description>
</method>
<method name="is_class_editor_disabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<description>
+ 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.
</description>
</method>
<method name="is_class_property_disabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<description>
+ 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].
</description>
</method>
<method name="is_feature_disabled" qualifiers="const">
@@ -47,6 +54,7 @@
<argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature">
</argument>
<description>
+ Returns [code]true[/code] if the [code]feature[/code] is disabled. When a feature is disabled, it will disappear from the editor entirely.
</description>
</method>
<method name="load_from_file">
@@ -55,6 +63,7 @@
<argument index="0" name="path" type="String">
</argument>
<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">
@@ -63,38 +72,42 @@
<argument index="0" name="path" type="String">
</argument>
<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.
</description>
</method>
<method name="set_disable_class">
<return type="void">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<argument index="1" name="disable" type="bool">
</argument>
<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.
</description>
</method>
<method name="set_disable_class_editor">
<return type="void">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<argument index="1" name="disable" type="bool">
</argument>
<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.
</description>
</method>
<method name="set_disable_class_property">
<return type="void">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="disable" type="bool">
</argument>
<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].
</description>
</method>
<method name="set_disable_feature">
@@ -105,23 +118,31 @@
<argument index="1" name="disable" type="bool">
</argument>
<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.
</description>
</method>
</methods>
<constants>
<constant name="FEATURE_3D" value="0" enum="Feature">
+ The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog.
</constant>
<constant name="FEATURE_SCRIPT" value="1" enum="Feature">
+ The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display.
</constant>
<constant name="FEATURE_ASSET_LIB" value="2" enum="Feature">
+ The AssetLib tab. If this feature is disabled, the AssetLib tab won't display.
</constant>
<constant name="FEATURE_SCENE_TREE" value="3" enum="Feature">
+ Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only.
</constant>
<constant name="FEATURE_IMPORT_DOCK" value="4" enum="Feature">
+ The Import dock. If this feature is disabled, the Import dock won't be visible.
</constant>
<constant name="FEATURE_NODE_DOCK" value="5" enum="Feature">
+ The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor.
</constant>
<constant name="FEATURE_FILESYSTEM_DOCK" value="6" enum="Feature">
+ The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible.
</constant>
<constant name="FEATURE_MAX" value="7" enum="Feature">
Represents the size of the [enum Feature] enum.
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 6b1215949a..084459e518 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core" version="3.2">
+<class name="EditorFileDialog" inherits="ConfirmationDialog" version="4.0">
<brief_description>
+ A modified version of [FileDialog] used by the editor.
</brief_description>
<description>
</description>
@@ -59,14 +60,13 @@
<member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode" default="0">
The view format in which the [EditorFileDialog] displays resources to the user.
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="EditorFileDialog.Mode" default="4">
- The purpose of the [EditorFileDialog], which defines the allowed behaviors.
+ <member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="EditorFileDialog.FileMode" default="4">
+ The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]
</member>
- <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" override="true" default="true" />
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
</member>
- <member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
+ <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
@@ -84,7 +84,7 @@
</description>
</signal>
<signal name="files_selected">
- <argument index="0" name="paths" type="PoolStringArray">
+ <argument index="0" name="paths" type="PackedStringArray">
</argument>
<description>
Emitted when multiple files are selected.
@@ -92,19 +92,19 @@
</signal>
</signals>
<constants>
- <constant name="MODE_OPEN_FILE" value="0" enum="Mode">
+ <constant name="FILE_MODE_OPEN_FILE" value="0" enum="FileMode">
The [EditorFileDialog] can select only one file. Accepting the window will open the file.
</constant>
- <constant name="MODE_OPEN_FILES" value="1" enum="Mode">
+ <constant name="FILE_MODE_OPEN_FILES" value="1" enum="FileMode">
The [EditorFileDialog] can select multiple files. Accepting the window will open all files.
</constant>
- <constant name="MODE_OPEN_DIR" value="2" enum="Mode">
+ <constant name="FILE_MODE_OPEN_DIR" value="2" enum="FileMode">
The [EditorFileDialog] can select only one directory. Accepting the window will open the directory.
</constant>
- <constant name="MODE_OPEN_ANY" value="3" enum="Mode">
+ <constant name="FILE_MODE_OPEN_ANY" value="3" enum="FileMode">
The [EditorFileDialog] can select a file or directory. Accepting the window will open it.
</constant>
- <constant name="MODE_SAVE_FILE" value="4" enum="Mode">
+ <constant name="FILE_MODE_SAVE_FILE" value="4" enum="FileMode">
The [EditorFileDialog] can select only one file. Accepting the window will save the file.
</constant>
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 798658c8d0..9bb51af2d0 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileSystem" inherits="Node" category="Core" version="3.2">
+<class name="EditorFileSystem" inherits="Node" version="4.0">
<brief_description>
Resource filesystem, as the editor sees it.
</brief_description>
<description>
This object holds information of all resources in the filesystem, their types, etc.
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_filesystem].
</description>
<tutorials>
</tutorials>
@@ -75,6 +76,7 @@
<return type="void">
</return>
<description>
+ Scans the script files and updates the list of custom class names.
</description>
</method>
</methods>
@@ -85,14 +87,14 @@
</description>
</signal>
<signal name="resources_reimported">
- <argument index="0" name="resources" type="PoolStringArray">
+ <argument index="0" name="resources" type="PackedStringArray">
</argument>
<description>
Remitted if a resource is reimported.
</description>
</signal>
<signal name="resources_reload">
- <argument index="0" name="resources" type="PoolStringArray">
+ <argument index="0" name="resources" type="PackedStringArray">
</argument>
<description>
</description>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index cb2ed28b38..096fe5df8f 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileSystemDirectory" inherits="Object" category="Core" version="3.2">
+<class name="EditorFileSystemDirectory" inherits="Object" version="4.0">
<brief_description>
A directory for the resource filesystem.
</brief_description>
@@ -78,7 +78,7 @@
</description>
</method>
<method name="get_file_type" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 0da87a9371..0aac59c727 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorImportPlugin" inherits="ResourceImporter" category="Core" version="3.2">
+<class name="EditorImportPlugin" inherits="ResourceImporter" version="4.0">
<brief_description>
Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.
</brief_description>
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 450d2bf64c..2f62fe9e40 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInspector" inherits="ScrollContainer" category="Core" version="3.2">
+<class name="EditorInspector" inherits="ScrollContainer" version="4.0">
<brief_description>
+ A tab used to edit properties of the selected node.
</brief_description>
<description>
+ The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as the Sprite2D then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow.
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_inspector].
</description>
<tutorials>
</tutorials>
@@ -24,6 +27,12 @@
<description>
</description>
</signal>
+ <signal name="property_deleted">
+ <argument index="0" name="property" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
<signal name="property_edited">
<argument index="0" name="property" type="String">
</argument>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index a713e06585..3cc624f49b 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInspectorPlugin" inherits="Reference" category="Core" version="3.2">
+<class name="EditorInspectorPlugin" inherits="Reference" version="4.0">
<brief_description>
Plugin for adding custom property editors on inspector.
</brief_description>
@@ -40,7 +40,7 @@
</return>
<argument index="0" name="label" type="String">
</argument>
- <argument index="1" name="properties" type="PoolStringArray">
+ <argument index="1" name="properties" type="PackedStringArray">
</argument>
<argument index="2" name="editor" type="Control">
</argument>
@@ -100,7 +100,7 @@
<argument index="5" name="usage" type="int">
</argument>
<description>
- Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]
+ Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 20ae0f3391..499c3b8271 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInterface" inherits="Node" category="Core" version="3.2">
+<class name="EditorInterface" inherits="Node" version="4.0">
<brief_description>
Godot editor's interface.
</brief_description>
<description>
EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], [ScriptEditor], the editor viewport, and information about scenes.
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorPlugin.get_editor_interface].
</description>
<tutorials>
</tutorials>
@@ -52,6 +53,12 @@
Returns the editor [Viewport].
</description>
</method>
+ <method name="get_file_system_dock">
+ <return type="FileSystemDock">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_inspector" qualifiers="const">
<return type="EditorInspector">
</return>
@@ -127,7 +134,7 @@
<argument index="1" name="preview_size" type="int">
</argument>
<description>
- Returns mesh previews rendered at the given size as an [Array] of [Texture]s.
+ Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s.
</description>
</method>
<method name="open_scene_from_path">
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 22e4a21757..6d695ddeea 100644
--- a/doc/classes/EditorSpatialGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core" version="3.2">
+<class name="EditorNode3DGizmo" inherits="Node3DGizmo" version="4.0">
<brief_description>
- Custom gizmo for editing Spatial objects.
+ Custom gizmo for editing Node3D objects.
</brief_description>
<description>
- Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See [EditorSpatialGizmoPlugin] for more information.
+ Custom gizmo that is used for providing custom visualization and editing (handles) for Node3D objects. See [EditorNode3DGizmoPlugin] for more information.
</description>
<tutorials>
</tutorials>
@@ -12,7 +12,7 @@
<method name="add_collision_segments">
<return type="void">
</return>
- <argument index="0" name="segments" type="PoolVector3Array">
+ <argument index="0" name="segments" type="PackedVector3Array">
</argument>
<description>
</description>
@@ -29,7 +29,7 @@
<method name="add_handles">
<return type="void">
</return>
- <argument index="0" name="handles" type="PoolVector3Array">
+ <argument index="0" name="handles" type="PackedVector3Array">
</argument>
<argument index="1" name="material" type="Material">
</argument>
@@ -45,12 +45,14 @@
<method name="add_lines">
<return type="void">
</return>
- <argument index="0" name="lines" type="PoolVector3Array">
+ <argument index="0" name="lines" type="PackedVector3Array">
</argument>
<argument index="1" name="material" type="Material">
</argument>
<argument index="2" name="billboard" type="bool" default="false">
</argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
<description>
Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].
</description>
@@ -76,6 +78,8 @@
</argument>
<argument index="1" name="default_scale" type="float" default="1">
</argument>
+ <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
<description>
Adds an unscaled billboard for visualization. Call this function during [method redraw].
</description>
@@ -120,17 +124,17 @@
</description>
</method>
<method name="get_plugin" qualifiers="const">
- <return type="EditorSpatialGizmoPlugin">
+ <return type="EditorNode3DGizmoPlugin">
</return>
<description>
- Returns the [EditorSpatialGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorSpatialGizmoPlugin.get_material].
+ Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material].
</description>
</method>
<method name="get_spatial_node" qualifiers="const">
- <return type="Spatial">
+ <return type="Node3D">
</return>
<description>
- Returns the Spatial node associated with this gizmo.
+ Returns the Node3D node associated with this gizmo.
</description>
</method>
<method name="is_handle_highlighted" qualifiers="virtual">
@@ -146,7 +150,7 @@
<return type="void">
</return>
<description>
- This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called).
+ This function is called when the Node3D this gizmo refers to changes (the [method Node3D.update_gizmo] is called).
</description>
</method>
<method name="set_handle" qualifiers="virtual">
@@ -154,13 +158,13 @@
</return>
<argument index="0" name="index" type="int">
</argument>
- <argument index="1" name="camera" type="Camera">
+ <argument index="1" name="camera" type="Camera3D">
</argument>
<argument index="2" name="point" type="Vector2">
</argument>
<description>
This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
- The [Camera] is also provided so screen coordinates can be converted to raycasts.
+ The [Camera3D] is also provided so screen coordinates can be converted to raycasts.
</description>
</method>
<method name="set_hidden">
diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 777d558a8e..ca75b47fbf 100644
--- a/doc/classes/EditorSpatialGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSpatialGizmoPlugin" inherits="Resource" category="Core" version="3.2">
+<class name="EditorNode3DGizmoPlugin" inherits="Resource" version="4.0">
<brief_description>
- Used by the editor to define Spatial gizmo types.
+ Used by the editor to define Node3D gizmo types.
</brief_description>
<description>
- EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorSpatialGizmoPlugin] for the simpler gizmos, or creating a new [EditorSpatialGizmo] type. See the tutorial in the documentation for more info.
+ EditorNode3DGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorNode3DGizmoPlugin] for the simpler gizmos, or creating a new [EditorNode3DGizmo] type. See the tutorial in the documentation for more info.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link>
@@ -15,7 +15,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="material" type="SpatialMaterial">
+ <argument index="1" name="material" type="StandardMaterial3D">
</argument>
<description>
Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.
@@ -31,7 +31,7 @@
<method name="commit_handle" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="gizmo" type="EditorSpatialGizmo">
+ <argument index="0" name="gizmo" type="EditorNode3DGizmo">
</argument>
<argument index="1" name="index" type="int">
</argument>
@@ -44,12 +44,12 @@
</description>
</method>
<method name="create_gizmo" qualifiers="virtual">
- <return type="EditorSpatialGizmo">
+ <return type="EditorNode3DGizmo">
</return>
- <argument index="0" name="spatial" type="Spatial">
+ <argument index="0" name="spatial" type="Node3D">
</argument>
<description>
- Override this method to return a custom [EditorSpatialGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. (See also [method has_gizmo])
+ Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method has_gizmo].
</description>
</method>
<method name="create_handle_material">
@@ -60,7 +60,7 @@
<argument index="1" name="billboard" type="bool" default="false">
</argument>
<description>
- Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_handles]. Should not be overridden.
+ 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.
</description>
</method>
<method name="create_icon_material">
@@ -68,14 +68,14 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<argument index="2" name="on_top" type="bool" default="false">
</argument>
<argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<description>
- Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_unscaled_billboard]. Should not be overridden.
+ 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">
@@ -92,13 +92,13 @@
<argument index="4" name="use_vertex_color" type="bool" default="false">
</argument>
<description>
- Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_mesh] and [method EditorSpatialGizmo.add_lines]. Should not be overridden.
+ 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_handle_name" qualifiers="virtual">
<return type="String">
</return>
- <argument index="0" name="gizmo" type="EditorSpatialGizmo">
+ <argument index="0" name="gizmo" type="EditorNode3DGizmo">
</argument>
<argument index="1" name="index" type="int">
</argument>
@@ -109,7 +109,7 @@
<method name="get_handle_value" qualifiers="virtual">
<return type="Variant">
</return>
- <argument index="0" name="gizmo" type="EditorSpatialGizmo">
+ <argument index="0" name="gizmo" type="EditorNode3DGizmo">
</argument>
<argument index="1" name="index" type="int">
</argument>
@@ -118,14 +118,14 @@
</description>
</method>
<method name="get_material">
- <return type="SpatialMaterial">
+ <return type="StandardMaterial3D">
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="gizmo" type="EditorSpatialGizmo">
+ <argument index="1" name="gizmo" type="EditorNode3DGizmo">
</argument>
<description>
- Gets material from the internal list of materials. If an [EditorSpatialGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
+ Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
</description>
</method>
<method name="get_name" qualifiers="virtual">
@@ -144,16 +144,16 @@
<method name="has_gizmo" qualifiers="virtual">
<return type="bool">
</return>
- <argument index="0" name="spatial" type="Spatial">
+ <argument index="0" name="spatial" type="Node3D">
</argument>
<description>
- Override this method to define which Spatial nodes have a gizmo from this plugin. Whenever a [Spatial] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorSpatialGizmo] assigned and is added to this plugin's list of active gizmos.
+ 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">
<return type="bool">
</return>
- <argument index="0" name="gizmo" type="EditorSpatialGizmo">
+ <argument index="0" name="gizmo" type="EditorNode3DGizmo">
</argument>
<argument index="1" name="index" type="int">
</argument>
@@ -165,13 +165,13 @@
<return type="bool">
</return>
<description>
- Override this method to define whether Spatial with this gizmo should be selecteble even when the gizmo is hidden.
+ Override this method to define whether Node3D with this gizmo should be selecteble even when the gizmo is hidden.
</description>
</method>
<method name="redraw" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="gizmo" type="EditorSpatialGizmo">
+ <argument index="0" name="gizmo" type="EditorNode3DGizmo">
</argument>
<description>
Callback to redraw the provided gizmo. Called for this plugin's active gizmos.
@@ -180,11 +180,11 @@
<method name="set_handle" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="gizmo" type="EditorSpatialGizmo">
+ <argument index="0" name="gizmo" type="EditorNode3DGizmo">
</argument>
<argument index="1" name="index" type="int">
</argument>
- <argument index="2" name="camera" type="Camera">
+ <argument index="2" name="camera" type="Camera3D">
</argument>
<argument index="3" name="point" type="Vector2">
</argument>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 89e2f0580b..19583fca28 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorPlugin" inherits="Node" category="Core" version="3.2">
+<class name="EditorPlugin" inherits="Node" version="4.0">
<brief_description>
Used by the editor to extend its functionality.
</brief_description>
@@ -67,11 +67,11 @@
</argument>
<argument index="2" name="script" type="Script">
</argument>
- <argument index="3" name="icon" type="Texture">
+ <argument index="3" name="icon" type="Texture2D">
</argument>
<description>
Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
- When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.
+ When given node or resource is selected, the base type will be instanced (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword.
During run-time, this will be a simple object with a script so this function does not need to be called then.
</description>
@@ -111,7 +111,7 @@
<method name="add_spatial_gizmo_plugin">
<return type="void">
</return>
- <argument index="0" name="plugin" type="EditorSpatialGizmoPlugin">
+ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
</argument>
<description>
</description>
@@ -229,7 +229,7 @@
<method name="forward_spatial_gui_input" qualifiers="virtual">
<return type="bool">
</return>
- <argument index="0" name="camera" type="Camera">
+ <argument index="0" name="camera" type="Camera3D">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
@@ -253,7 +253,7 @@
</description>
</method>
<method name="get_breakpoints" qualifiers="virtual">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code].
@@ -267,15 +267,27 @@
</description>
</method>
<method name="get_plugin_icon" qualifiers="virtual">
- <return type="Object">
+ <return type="Texture2D">
</return>
<description>
+ Override this method in your plugin to return a [Texture2D] in order to give it an icon.
+ For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
+ Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
+ [codeblock]
+ func get_plugin_icon():
+ # You can use a custom icon:
+ return preload("res://addons/my_plugin/my_plugin_icon.svg")
+ # Or use a built-in icon:
+ return get_editor_interface().get_base_control().get_icon("Node", "EditorIcons")
+ [/codeblock]
</description>
</method>
<method name="get_plugin_name" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
+ For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
</description>
</method>
<method name="get_script_create_dialog">
@@ -438,7 +450,7 @@
<method name="remove_spatial_gizmo_plugin">
<return type="void">
</return>
- <argument index="0" name="plugin" type="EditorSpatialGizmoPlugin">
+ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
</argument>
<description>
</description>
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 5c24f0bebc..4da3b58b94 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorProperty" inherits="Container" category="Core" version="3.2">
+<class name="EditorProperty" inherits="Container" version="4.0">
<brief_description>
Custom control to edit properties for adding into the inspector.
</brief_description>
@@ -21,11 +21,11 @@
<method name="emit_changed">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
- <argument index="2" name="field" type="String" default="&quot;&quot;">
+ <argument index="2" name="field" type="StringName" default="@&quot;&quot;">
</argument>
<argument index="3" name="changing" type="bool" default="false">
</argument>
@@ -41,7 +41,7 @@
</description>
</method>
<method name="get_edited_property">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property.
@@ -78,6 +78,8 @@
<member name="checked" type="bool" setter="set_checked" getter="is_checked" default="false">
Used by the inspector, when the property is checked.
</member>
+ <member name="deletable" type="bool" setter="set_deletable" getter="is_deletable" default="false">
+ </member>
<member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false">
Used by the inspector, when the property must draw with error color.
</member>
@@ -93,7 +95,7 @@
</members>
<signals>
<signal name="multiple_properties_changed">
- <argument index="0" name="properties" type="PoolStringArray">
+ <argument index="0" name="properties" type="PackedStringArray">
</argument>
<argument index="1" name="value" type="Array">
</argument>
@@ -102,7 +104,7 @@
</description>
</signal>
<signal name="object_id_selected">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -111,16 +113,16 @@
</description>
</signal>
<signal name="property_changed">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
- <argument index="1" name="value" type="Nil">
+ <argument index="1" name="value" type="Variant">
</argument>
<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="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="bool" type="String">
</argument>
@@ -128,17 +130,23 @@
Emitted when a property was checked. Used internally.
</description>
</signal>
+ <signal name="property_deleted">
+ <argument index="0" name="property" type="StringName">
+ </argument>
+ <description>
+ </description>
+ </signal>
<signal name="property_keyed">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<description>
Emit it if you want to add this value as an animation key (check for keying being enabled first).
</description>
</signal>
<signal name="property_keyed_with_value">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
- <argument index="1" name="value" type="Nil">
+ <argument index="1" name="value" type="Variant">
</argument>
<description>
Emit it if you want to key a property with a single value.
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 2638836c68..1976eb802c 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.2">
+<class name="EditorResourceConversionPlugin" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index 9d3f4b0b12..0c1d969518 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreview" inherits="Node" category="Core" version="3.2">
+<class name="EditorResourcePreview" inherits="Node" version="4.0">
<brief_description>
Helper to generate previews of resources or files.
</brief_description>
<description>
This object is used to generate previews for resources of files.
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_previewer].
</description>
<tutorials>
</tutorials>
@@ -34,7 +35,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="receiver_func" type="String">
+ <argument index="2" name="receiver_func" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant">
</argument>
@@ -49,7 +50,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="receiver_func" type="String">
+ <argument index="2" name="receiver_func" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant">
</argument>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index 4e61943c8f..e935bf19fc 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core" version="3.2">
+<class name="EditorResourcePreviewGenerator" inherits="Reference" version="4.0">
<brief_description>
Custom generator of previews.
</brief_description>
@@ -18,7 +18,7 @@
</description>
</method>
<method name="generate" qualifiers="virtual">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="from" type="Resource">
</argument>
@@ -31,7 +31,7 @@
</description>
</method>
<method name="generate_from_path" qualifiers="virtual">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="path" type="String">
</argument>
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index 96d8ce698d..db85b859e5 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.2">
+<class name="EditorSceneImporter" inherits="Reference" version="4.0">
<brief_description>
Imports scenes from third-parties' 3D files.
</brief_description>
diff --git a/doc/classes/EditorSceneImporterAssimp.xml b/doc/classes/EditorSceneImporterAssimp.xml
index e2d73be870..c72d4ee25a 100644
--- a/doc/classes/EditorSceneImporterAssimp.xml
+++ b/doc/classes/EditorSceneImporterAssimp.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" category="Core" version="3.2">
+<class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" version="4.0">
<brief_description>
- Multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url].
+ FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url].
</brief_description>
<description>
- This is a multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. See [url=https://assimp-docs.readthedocs.io/en/latest/about/intoduction.html#installation]this page[/url] for a full list of supported formats.
+ This is an FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. It currently has many known limitations and works best with static meshes. Most animated meshes won't import correctly.
If exporting a FBX scene from Autodesk Maya, use these FBX export settings:
[codeblock]
- Smoothing Groups
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index df6cdd4b35..56fc0e3d1a 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.2">
+<class name="EditorScenePostImport" inherits="Reference" version="4.0">
<brief_description>
Post-processes scenes after import.
</brief_description>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 981e0a6180..e96044bf48 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScript" inherits="Reference" category="Core" version="3.2">
+<class name="EditorScript" inherits="Reference" version="4.0">
<brief_description>
Base script that can be used to add extension functions to the editor.
</brief_description>
<description>
- Scripts extending this class and implementing its [method _run] method can be executed from the Script Editor's [b]File &gt; Run[/b] menu option (or by pressing [code]Ctrl+Shift+X[/code]) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using [EditorPlugin]s instead.
+ Scripts extending this class and implementing its [method _run] method can be executed from the Script Editor's [b]File &gt; Run[/b] menu option (or by pressing [kbd]Ctrl + Shift + X[/kbd]) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using [EditorPlugin]s instead.
[b]Note:[/b] Extending scripts need to have [code]tool[/code] mode enabled.
[b]Example script:[/b]
[codeblock]
diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml
index 57df71ab01..1ff9744b70 100644
--- a/doc/classes/EditorSelection.xml
+++ b/doc/classes/EditorSelection.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSelection" inherits="Object" category="Core" version="3.2">
+<class name="EditorSelection" inherits="Object" version="4.0">
<brief_description>
Manages the SceneTree selection in the editor.
</brief_description>
<description>
This object manages the SceneTree selection in the editor.
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_selection].
</description>
<tutorials>
</tutorials>
@@ -26,7 +27,7 @@
</description>
</method>
<method name="get_selected_nodes">
- <return type="Array">
+ <return type="Node[]">
</return>
<description>
Gets the list of selected nodes.
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 5395a8fcb0..19921ff5c8 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSettings" inherits="Resource" category="Core" version="3.2">
+<class name="EditorSettings" inherits="Resource" version="4.0">
<brief_description>
Object that holds the project-independent editor settings.
</brief_description>
@@ -11,6 +11,7 @@
settings.get(prop)
list_of_settings = settings.get_property_list()
[/codeblock]
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_editor_settings].
</description>
<tutorials>
</tutorials>
@@ -21,7 +22,10 @@
<argument index="0" name="info" type="Dictionary">
</argument>
<description>
- Adds a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String].
+ Adds a custom property info to a property. The dictionary must contain:
+ - [code]name[/code]: [String] (the name of the property)
+ - [code]type[/code]: [int] (see [enum Variant.Type])
+ - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String]
[b]Example:[/b]
[codeblock]
editor_settings.set("category/property_name", 0)
@@ -47,7 +51,7 @@
</description>
</method>
<method name="get_favorites" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Gets the list of favorite files and directories for this project.
@@ -73,7 +77,7 @@
</description>
</method>
<method name="get_recent_dirs" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Gets the list of recently visited folders in the file dialog for this project.
@@ -123,7 +127,7 @@
<method name="set_favorites">
<return type="void">
</return>
- <argument index="0" name="dirs" type="PoolStringArray">
+ <argument index="0" name="dirs" type="PackedStringArray">
</argument>
<description>
Sets the list of favorite files and directories for this project.
@@ -132,7 +136,7 @@
<method name="set_initial_value">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -156,7 +160,7 @@
<method name="set_recent_dirs">
<return type="void">
</return>
- <argument index="0" name="dirs" type="PoolStringArray">
+ <argument index="0" name="dirs" type="PackedStringArray">
</argument>
<description>
Sets the list of recently visited folders in the file dialog for this project.
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index bf01ebfe82..381f4fae04 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSpinSlider" inherits="Range" category="Core" version="3.2">
+<class name="EditorSpinSlider" inherits="Range" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml
index f67c1c9eb5..bb356c2183 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorVCSInterface" inherits="Object" category="Core" version="3.2">
+<class name="EditorVCSInterface" inherits="Object" version="4.0">
<brief_description>
Version Control System (VCS) interface which reads and writes to the local VCS in use.
</brief_description>
@@ -34,13 +34,6 @@
- [code]"offset"[/code] to store the offset of the line change since the first contextual line content.
</description>
</method>
- <method name="get_is_vcs_intialized">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code].
- </description>
- </method>
<method name="get_modified_files_data">
<return type="Dictionary">
</return>
@@ -58,14 +51,14 @@
<return type="String">
</return>
<description>
- Return the project name of the VCS working directory
+ Returns the project name of the VCS working directory.
</description>
</method>
<method name="get_vcs_name">
<return type="String">
</return>
<description>
- Return the name of the VCS if the VCS has been initialized, else return an empty string.
+ Returns the name of the VCS if the VCS has been initialized, else return an empty string.
</description>
</method>
<method name="initialize">
@@ -74,7 +67,7 @@
<argument index="0" name="project_root_path" type="String">
</argument>
<description>
- Initialize the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns [code]true[/code] if no failure occurs, else returns [code]false[/code].
+ Initializes the VCS 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>
</method>
<method name="is_addon_ready">
@@ -84,6 +77,13 @@
Returns [code]true[/code] if the addon is ready to respond to function calls, else returns [code]false[/code].
</description>
</method>
+ <method name="is_vcs_initialized">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code].
+ </description>
+ </method>
<method name="shut_down">
<return type="bool">
</return>
@@ -97,7 +97,7 @@
<argument index="0" name="file_path" type="String">
</argument>
<description>
- Stage the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path.
+ 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">
@@ -106,7 +106,7 @@
<argument index="0" name="file_path" type="String">
</argument>
<description>
- Unstage the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path.
+ Unstages the file 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>
</method>
</methods>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index 7221aa845b..fc68b47645 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EncodedObjectAsID" inherits="Reference" category="Core" version="3.2">
+<class name="EncodedObjectAsID" inherits="Reference" version="4.0">
<brief_description>
Holds a reference to an [Object]'s instance ID.
</brief_description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 187e13d7bd..12701d8688 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Engine" inherits="Object" category="Core" version="3.2">
+<class name="Engine" inherits="Object" version="4.0">
<brief_description>
- Access to basic engine properties.
+ Access to engine properties.
</brief_description>
<description>
- The [Engine] class allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others.
+ The [Engine] singleton allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others.
</description>
<tutorials>
</tutorials>
@@ -41,7 +41,7 @@
<return type="int">
</return>
<description>
- Returns the total number of frames drawn.
+ Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_idle_frames].
</description>
</method>
<method name="get_frames_per_second" qualifiers="const">
@@ -51,6 +51,13 @@
Returns the frames per second of the running game.
</description>
</method>
+ <method name="get_idle_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total number of frames passed since engine initialization which is advanced on each [b]idle frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn].
+ </description>
+ </method>
<method name="get_license_info" qualifiers="const">
<return type="Dictionary">
</return>
@@ -72,6 +79,13 @@
Returns the main loop object (see [MainLoop] and [SceneTree]).
</description>
</method>
+ <method name="get_physics_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b].
+ </description>
+ </method>
<method name="get_physics_interpolation_fraction" qualifiers="const">
<return type="float">
</return>
@@ -85,6 +99,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments.
</description>
</method>
<method name="get_version_info" qualifiers="const">
@@ -116,6 +131,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope.
</description>
</method>
<method name="is_in_physics_frame" qualifiers="const">
@@ -131,9 +147,10 @@
If [code]true[/code], it is running inside the editor. Useful for tool scripts.
</member>
<member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60">
- The number of fixed iterations per second (for fixed process and physics).
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage.
</member>
<member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5">
+ Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
</member>
<member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0">
The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit.
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 2b44eb81b1..3642d92771 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Environment" inherits="Resource" category="Core" version="3.2">
+<class name="Environment" inherits="Resource" version="4.0">
<brief_description>
Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.
</brief_description>
@@ -21,6 +21,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the glow level [code]idx[/code] is specified, [code]false[/code] otherwise.
</description>
</method>
<method name="set_glow_level">
@@ -31,132 +32,92 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ Enables or disables the glow level at index [code]idx[/code]. 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>
<members>
<member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0">
- Global brightness value of the rendered scene (default value is 1).
+ The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
</member>
- <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
- Applies the provided [Texture] resource to affect the global color aspect of the rendered scene.
+ <member name="adjustment_color_correction" type="Texture2D" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
+ Applies the provided [Texture2D] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
</member>
<member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0">
- Global contrast value of the rendered scene (default value is 1).
+ The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
</member>
<member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false">
- Enables the adjustment_* options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene.
+ If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene.
</member>
<member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0">
- Global color saturation value of the rendered scene (default value is 1).
+ 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 )">
- [Color] of the ambient light.
+ The ambient light's [Color].
</member>
<member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0">
- Energy of the ambient light. The higher the value, the stronger the light.
+ The ambient light's energy. The higher the value, the stronger the light.
+ </member>
+ <member name="ambient_light_occlusion_color" type="Color" setter="set_ao_color" getter="get_ao_color" default="Color( 0, 0, 0, 1 )">
</member>
<member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0">
Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
</member>
+ <member name="ambient_light_source" type="int" setter="set_ambient_source" getter="get_ambient_source" enum="Environment.AmbientSource" default="0">
+ </member>
<member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" default="false">
- Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light.
+ If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.
</member>
<member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0">
- Maximum luminance value for the auto exposure.
+ The maximum luminance value for the auto exposure.
</member>
<member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05">
- Minimum luminance value for the auto exposure.
+ The minimum luminance value for the auto exposure.
</member>
<member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4">
- Scale of the auto exposure effect. Affects the intensity of auto exposure.
+ The scale of the auto exposure effect. Affects the intensity of auto exposure.
</member>
<member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5">
- Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
+ The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
</member>
<member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1">
- The id of the camera feed to show in the background.
+ The ID of the camera feed to show in the background.
</member>
<member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0">
- Maximum layer id (if using Layer background mode).
+ The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode.
</member>
<member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )">
- Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes).
+ The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] background mode.
</member>
<member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0">
- Power of light emitted by the background.
+ The power of the light emitted by the background.
</member>
<member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0">
- Defines the mode of background.
- </member>
- <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky">
- [Sky] resource defined as background.
- </member>
- <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0">
- [Sky] resource's custom field of view.
- </member>
- <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
- [Sky] resource's rotation expressed as a [Basis]
- </member>
- <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )">
- [Sky] resource's rotation expressed as euler angles in radians
- </member>
- <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )">
- [Sky] resource's rotation expressed as euler angles in degrees
- </member>
- <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1">
- Amount of far blur.
- </member>
- <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0">
- Distance from the camera where the far blur effect affects the rendering.
- </member>
- <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false">
- Enables the far blur effect.
- </member>
- <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality" default="1">
- Quality of the far blur quality.
- </member>
- <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0">
- Transition between no-blur area and far blur.
- </member>
- <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" default="0.1">
- Amount of near blur.
- </member>
- <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0">
- Distance from the camera where the near blur effect affects the rendering.
- </member>
- <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false">
- Enables the near blur effect.
- </member>
- <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality" default="1">
- Quality of the near blur quality.
- </member>
- <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0">
- Transition between near blur and no-blur area.
+ The background mode. See [enum BGMode] for possible values.
</member>
<member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" default="Color( 0.5, 0.6, 0.7, 1 )">
- Fog's [Color].
+ The fog's [Color].
</member>
<member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" default="10.0">
- Fog's depth starting distance from the camera.
+ The fog's depth starting distance from the camera.
</member>
<member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" default="1.0">
- Value defining the fog depth intensity.
+ The fog depth's intensity curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve.
</member>
<member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" default="true">
- Enables the fog depth.
+ If [code]true[/code], the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera).
</member>
<member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end" default="100.0">
- Fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value.
+ The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera3D.far] value.
</member>
<member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false">
- Enables the fog. Needs [member fog_height_enabled] and/or [member fog_depth_enabled] to actually display fog.
+ If [code]true[/code], fog effects are enabled. [member fog_height_enabled] and/or [member fog_depth_enabled] must be set to [code]true[/code] to actually display fog.
</member>
<member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" default="1.0">
- Value defining the fog height intensity.
+ The height fog's intensity. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve.
</member>
<member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" default="false">
- Enables the fog height.
+ If [code]true[/code], the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader.
</member>
<member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" default="0.0">
The Y coordinate where the height fog will be the most intense. If this value is greater than [member fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom.
@@ -165,135 +126,165 @@
The Y coordinate where the height fog will be the least intense. If this value is greater than [member fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top.
</member>
<member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" default="0.0">
- Amount of sun that affects the fog rendering.
+ The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight3D node in the scene.
</member>
<member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" default="Color( 1, 0.9, 0.7, 1 )">
- Sun [Color].
+ The depth fog's [Color] when looking towards the sun.
</member>
<member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" default="1.0">
- Amount of light that the fog transmits.
+ The intensity of the fog light transmittance effect. Amount of light that the fog transmits.
</member>
<member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false">
- Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog.
- </member>
- <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false">
- Smooths out blockiness created by sampling higher levels.
+ Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life.
</member>
<member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2">
- Glow blending mode.
+ The glow blending mode.
</member>
<member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" default="0.0">
- Bloom value (global glow).
+ The bloom's intensity. If set to a value higher than [code]0[/code], this will make glow visible in areas darker than the [member glow_hdr_threshold].
</member>
<member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" default="false">
- Enables glow rendering.
+ If [code]true[/code], the glow effect is enabled.
</member>
<member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap" default="12.0">
+ The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.
</member>
<member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale" default="2.0">
- Bleed scale of the HDR glow.
+ The bleed scale of the HDR glow.
</member>
<member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0">
- Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well.
+ The lower threshold of the HDR glow. When using the GLES2 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">
- Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR.
+ The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
</member>
<member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false">
- First level of glow (most local).
+ If [code]true[/code], the 1st level of glow is enabled. This is the most "local" level (least blurry).
</member>
<member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false">
- Second level of glow.
+ If [code]true[/code], the 2th level of glow is enabled.
</member>
<member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true">
- Third level of glow.
+ If [code]true[/code], the 3th level of glow is enabled.
</member>
<member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false">
- Fourth level of glow.
+ If [code]true[/code], the 4th level of glow is enabled.
</member>
<member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true">
- Fifth level of glow.
+ If [code]true[/code], the 5th level of glow is enabled.
</member>
<member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false">
- Sixth level of glow.
+ If [code]true[/code], the 6th level of glow is enabled.
</member>
<member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false">
- Seventh level of glow (most global).
+ If [code]true[/code], the 7th level of glow is enabled. This is the most "global" level (blurriest).
+ </member>
+ <member name="glow_mix" type="float" setter="set_glow_mix" getter="get_glow_mix" default="0.05">
</member>
<member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0">
- Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR.
+ The glow strength. When using the GLES2 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">
+ </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">
+ </member>
+ <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )">
</member>
<member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2">
+ The depth tolerance for screen-space reflections.
</member>
<member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false">
+ If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others.
</member>
<member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15">
+ The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection).
</member>
<member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0">
+ The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection.
</member>
<member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" default="64">
- </member>
- <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough" default="true">
+ The maximum number of steps for screen-space reflections. Higher values are slower.
</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.
</member>
<member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" default="0.01">
+ The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion.
</member>
<member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3">
- </member>
- <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" default="Color( 0, 0, 0, 1 )">
+ The screen-space ambient occlusion blur quality. See [enum SSAOBlur] for possible values.
</member>
<member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0">
+ The screen-space ambient occlusion edge sharpness.
</member>
<member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" default="false">
+ If [code]true[/code], the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues.
</member>
<member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0">
- </member>
- <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" default="1.0">
+ The primary screen-space ambient occlusion intensity. See also [member ssao_radius].
</member>
<member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0">
- </member>
- <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality" default="1">
+ The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than [code]0[/code] will make the SSAO effect visible in direct light.
</member>
<member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0">
- </member>
- <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" default="0.0">
+ The primary screen-space ambient occlusion radius.
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0">
- Default exposure for tonemap.
+ The default exposure used for tonemapping.
</member>
<member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0">
- Tonemapping mode.
+ 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">
- White reference value for tonemap.
+ The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR].
</member>
</members>
<constants>
- <constant name="BG_KEEP" value="5" enum="BGMode">
- Keep on screen every pixel drawn in the background.
- </constant>
<constant name="BG_CLEAR_COLOR" value="0" enum="BGMode">
- Clear the background using the project's clear color.
+ Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color].
</constant>
<constant name="BG_COLOR" value="1" enum="BGMode">
- Clear the background using a custom clear color.
+ Clears the background using a custom clear color.
</constant>
<constant name="BG_SKY" value="2" enum="BGMode">
- Display a user-defined sky in the background.
+ Displays a user-defined sky in the background.
</constant>
- <constant name="BG_COLOR_SKY" value="3" enum="BGMode">
- Clear the background using a custom clear color and allows defining a sky for shading and reflection.
+ <constant name="BG_CANVAS" value="3" enum="BGMode">
+ Displays a [CanvasLayer] in the background.
</constant>
- <constant name="BG_CANVAS" value="4" enum="BGMode">
- Display a [CanvasLayer] in the background.
+ <constant name="BG_KEEP" value="4" enum="BGMode">
+ Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera.
</constant>
- <constant name="BG_CAMERA_FEED" value="6" enum="BGMode">
- Display a camera feed in the background.
+ <constant name="BG_CAMERA_FEED" value="5" enum="BGMode">
+ Displays a camera feed in the background.
</constant>
- <constant name="BG_MAX" value="7" enum="BGMode">
+ <constant name="BG_MAX" value="6" enum="BGMode">
Represents the size of the [enum BGMode] enum.
</constant>
+ <constant name="AMBIENT_SOURCE_BG" value="0" enum="AmbientSource">
+ Gather ambient light from whichever source is specified as the background.
+ </constant>
+ <constant name="AMBIENT_SOURCE_DISABLED" value="1" enum="AmbientSource">
+ Disable ambient light.
+ </constant>
+ <constant name="AMBIENT_SOURCE_COLOR" value="2" enum="AmbientSource">
+ Specify a specific [Color] for ambient light.
+ </constant>
+ <constant name="AMBIENT_SOURCE_SKY" value="3" enum="AmbientSource">
+ Gather ambient light from the [Sky] regardless of what the background is.
+ </constant>
+ <constant name="REFLECTION_SOURCE_BG" value="0" enum="ReflectionSource">
+ Use the background for reflections.
+ </constant>
+ <constant name="REFLECTION_SOURCE_DISABLED" value="1" enum="ReflectionSource">
+ Disable reflections.
+ </constant>
+ <constant name="REFLECTION_SOURCE_SKY" value="2" enum="ReflectionSource">
+ Use the [Sky] for reflections regardless of what the background is.
+ </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.
</constant>
@@ -301,10 +292,13 @@
Screen glow blending mode. Increases brightness, used frequently with bloom.
</constant>
<constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="GlowBlendMode">
- Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom.
+ Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
</constant>
<constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="GlowBlendMode">
- Replace glow blending mode. Replaces all pixels' color by the glow value.
+ Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
+ </constant>
+ <constant name="GLOW_BLEND_MODE_MIX" value="4" enum="GlowBlendMode">
+ Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
</constant>
<constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper">
Linear tonemapper operator. Reads the linear data and passes it on unmodified.
@@ -318,28 +312,17 @@
<constant name="TONE_MAPPER_ACES" value="3" enum="ToneMapper">
Academy Color Encoding System tonemapper operator.
</constant>
- <constant name="DOF_BLUR_QUALITY_LOW" value="0" enum="DOFBlurQuality">
- Low depth-of-field blur quality.
- </constant>
- <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1" enum="DOFBlurQuality">
- Medium depth-of-field blur quality.
- </constant>
- <constant name="DOF_BLUR_QUALITY_HIGH" value="2" enum="DOFBlurQuality">
- High depth-of-field blur quality.
- </constant>
<constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur">
+ No blur for the screen-space ambient occlusion effect (fastest).
</constant>
<constant name="SSAO_BLUR_1x1" value="1" enum="SSAOBlur">
+ 1×1 blur for the screen-space ambient occlusion effect.
</constant>
<constant name="SSAO_BLUR_2x2" value="2" enum="SSAOBlur">
+ 2×2 blur for the screen-space ambient occlusion effect.
</constant>
<constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur">
- </constant>
- <constant name="SSAO_QUALITY_LOW" value="0" enum="SSAOQuality">
- </constant>
- <constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality">
- </constant>
- <constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality">
+ 3×3 blur for the screen-space ambient occlusion effect. Increases the radius of the blur for a smoother look, but can result in checkerboard-like artifacts.
</constant>
</constants>
</class>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index f85413b8b4..fcd1aa43c0 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Expression" inherits="Reference" category="Core" version="3.2">
+<class name="Expression" inherits="Reference" version="4.0">
<brief_description>
A class that stores an expression you can execute.
</brief_description>
@@ -59,7 +59,7 @@
</return>
<argument index="0" name="expression" type="String">
</argument>
- <argument index="1" name="input_names" type="PoolStringArray" default="PoolStringArray( )">
+ <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray( )">
</argument>
<description>
Parses the expression and returns an [enum Error] code.
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 9eff0a4d27..17c65731ff 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="File" inherits="Reference" category="Core" version="3.2">
+<class name="File" inherits="Reference" version="4.0">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
@@ -87,16 +87,16 @@
</description>
</method>
<method name="get_buffer" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="len" type="int">
</argument>
<description>
- Returns next [code]len[/code] bytes of the file as a [PoolByteArray].
+ Returns next [code]len[/code] bytes of the file as a [PackedByteArray].
</description>
</method>
<method name="get_csv_line" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="delim" type="String" default="&quot;,&quot;">
</argument>
@@ -252,7 +252,7 @@
</argument>
<argument index="1" name="mode_flags" type="int" enum="File.ModeFlags">
</argument>
- <argument index="2" name="key" type="PoolByteArray">
+ <argument index="2" name="key" type="PackedByteArray">
</argument>
<description>
Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
@@ -297,6 +297,7 @@
</argument>
<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].
</description>
</method>
<method name="store_32">
@@ -306,6 +307,7 @@
</argument>
<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].
</description>
</method>
<method name="store_64">
@@ -315,6 +317,7 @@
</argument>
<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).
</description>
</method>
<method name="store_8">
@@ -324,12 +327,13 @@
</argument>
<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].
</description>
</method>
<method name="store_buffer">
<return type="void">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Stores the given array of bytes in the file.
@@ -338,12 +342,12 @@
<method name="store_csv_line">
<return type="void">
</return>
- <argument index="0" name="values" type="PoolStringArray">
+ <argument index="0" name="values" type="PackedStringArray">
</argument>
<argument index="1" name="delim" type="String" default="&quot;,&quot;">
</argument>
<description>
- Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long.
+ Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long.
Text will be encoded as UTF-8.
</description>
</method>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index d8f4ca21c8..99563ee367 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.2">
+<class name="FileDialog" inherits="ConfirmationDialog" version="4.0">
<brief_description>
Dialog for selecting files or directories in the filesystem.
</brief_description>
@@ -68,19 +68,19 @@
The currently selected file path of the file dialog.
</member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
- <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters" default="PoolStringArray( )">
- The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
+ <member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="FileDialog.FileMode" default="4">
+ The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode" default="4">
- The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants.
+ <member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )">
+ The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
</member>
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
- If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant MODE_OPEN_FILE] will change the window title to "Open a File").
+ 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="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>
- <member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
+ <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
@@ -98,7 +98,7 @@
</description>
</signal>
<signal name="files_selected">
- <argument index="0" name="paths" type="PoolStringArray">
+ <argument index="0" name="paths" type="PackedStringArray">
</argument>
<description>
Emitted when the user selects multiple files.
@@ -106,19 +106,19 @@
</signal>
</signals>
<constants>
- <constant name="MODE_OPEN_FILE" value="0" enum="Mode">
+ <constant name="FILE_MODE_OPEN_FILE" value="0" enum="FileMode">
The dialog allows selecting one, and only one file.
</constant>
- <constant name="MODE_OPEN_FILES" value="1" enum="Mode">
+ <constant name="FILE_MODE_OPEN_FILES" value="1" enum="FileMode">
The dialog allows selecting multiple files.
</constant>
- <constant name="MODE_OPEN_DIR" value="2" enum="Mode">
+ <constant name="FILE_MODE_OPEN_DIR" value="2" enum="FileMode">
The dialog only allows selecting a directory, disallowing the selection of any file.
</constant>
- <constant name="MODE_OPEN_ANY" value="3" enum="Mode">
+ <constant name="FILE_MODE_OPEN_ANY" value="3" enum="FileMode">
The dialog allows selecting one file or directory.
</constant>
- <constant name="MODE_SAVE_FILE" value="4" enum="Mode">
+ <constant name="FILE_MODE_SAVE_FILE" value="4" enum="FileMode">
The dialog will warn when a file exists.
</constant>
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
@@ -133,16 +133,22 @@
</constants>
<theme_items>
<theme_item name="files_disabled" type="Color" default="Color( 0, 0, 0, 0.7 )">
+ The color tint for disabled files (when the [FileDialog] is used in open folder mode).
</theme_item>
- <theme_item name="folder" type="Texture">
+ <theme_item name="folder" type="Texture2D">
+ Custom icon for folders.
</theme_item>
<theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ The color modulation applied to the folder icon.
</theme_item>
- <theme_item name="parent_folder" type="Texture">
+ <theme_item name="parent_folder" type="Texture2D">
+ Custom icon for the parent folder arrow.
</theme_item>
- <theme_item name="reload" type="Texture">
+ <theme_item name="reload" type="Texture2D">
+ Custom icon for the reload button.
</theme_item>
- <theme_item name="toggle_hidden" type="Texture">
+ <theme_item name="toggle_hidden" type="Texture2D">
+ Custom icon for the toggle hidden button.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
new file mode 100644
index 0000000000..fdf29f89b2
--- /dev/null
+++ b/doc/classes/FileSystemDock.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FileSystemDock" inherits="VBoxContainer" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="can_drop_data_fw" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="arg0" type="Vector2">
+ </argument>
+ <argument index="1" name="arg1" type="Variant">
+ </argument>
+ <argument index="2" name="arg2" type="Control">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="drop_data_fw">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="Vector2">
+ </argument>
+ <argument index="1" name="arg1" type="Variant">
+ </argument>
+ <argument index="2" name="arg2" type="Control">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_drag_data_fw">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="arg0" type="Vector2">
+ </argument>
+ <argument index="1" name="arg1" type="Control">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="navigate_to_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="display_mode_changed">
+ <description>
+ </description>
+ </signal>
+ <signal name="file_removed">
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="files_moved">
+ <argument index="0" name="old_file" type="String">
+ </argument>
+ <argument index="1" name="new_file" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="folder_moved">
+ <argument index="0" name="old_folder" type="String">
+ </argument>
+ <argument index="1" name="new_file" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="folder_removed">
+ <argument index="0" name="folder" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="inherit">
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="instance">
+ <argument index="0" name="files" type="PackedStringArray">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index f7de79913c..882f819e37 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Font" inherits="Resource" category="Core" version="3.2">
+<class name="Font" inherits="Resource" version="4.0">
<brief_description>
Internationalized font and text drawing support.
</brief_description>
@@ -85,12 +85,14 @@
<argument index="1" name="width" type="float">
</argument>
<description>
+ Returns the size that the string would have with word wrapping enabled with a fixed [code]width[/code].
</description>
</method>
<method name="has_outline" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the font has an outline.
</description>
</method>
<method name="is_distance_field_hint" qualifiers="const">
diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml
index 9803ae0838..bf0c0b0d34 100644
--- a/doc/classes/FuncRef.xml
+++ b/doc/classes/FuncRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FuncRef" inherits="Reference" category="Core" version="3.2">
+<class name="FuncRef" inherits="Reference" version="4.0">
<brief_description>
Reference to a function in an object.
</brief_description>
@@ -36,7 +36,7 @@
<method name="set_function">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
The name of the referenced function to call on the object, without parentheses or any parameters.
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index a9192d1942..23dd562653 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbe" inherits="VisualInstance" category="Core" version="3.2">
+<class name="GIProbe" inherits="VisualInstance3D" version="4.0">
<brief_description>
+ Real-time global illumination (GI) probe.
</brief_description>
<description>
+ [GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
+ Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/gi_probes/quality].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
@@ -16,45 +19,40 @@
<argument index="1" name="create_visual_debug" type="bool" default="false">
</argument>
<description>
+ Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring.
</description>
</method>
<method name="debug_bake">
<return type="void">
</return>
<description>
+ Calls [method bake] with [code]create_visual_debug[/code] enabled.
</description>
</method>
</methods>
<members>
- <member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5">
- </member>
- <member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false">
- </member>
<member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data">
- </member>
- <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="4">
- </member>
- <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
+ The [GIProbeData] resource that holds the data for this [GIProbe].
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )">
- </member>
- <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
- </member>
- <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
- </member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
+ The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
</member>
<member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1">
+ Number of times to subdivide the grid that the [GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
</member>
</members>
<constants>
<constant name="SUBDIV_64" value="0" enum="Subdiv">
+ Use 64 subdivisions. This is the lowest quality setting, but the fastest. Use it if you can, but especially use it on lower-end hardware.
</constant>
<constant name="SUBDIV_128" value="1" enum="Subdiv">
+ Use 128 subdivisions. This is the default quality setting.
</constant>
<constant name="SUBDIV_256" value="2" enum="Subdiv">
+ Use 256 subdivisions.
</constant>
<constant name="SUBDIV_512" value="3" enum="Subdiv">
+ Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware this could cause the GPU to stall.
</constant>
<constant name="SUBDIV_MAX" value="4" enum="Subdiv">
Represents the size of the [enum Subdiv] enum.
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml
index 84bd695f43..228e1afb4c 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/GIProbeData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbeData" inherits="Resource" category="Core" version="3.2">
+<class name="GIProbeData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -7,29 +7,83 @@
<tutorials>
</tutorials>
<methods>
+ <method name="allocate">
+ <return type="void">
+ </return>
+ <argument index="0" name="to_cell_xform" type="Transform">
+ </argument>
+ <argument index="1" name="aabb" type="AABB">
+ </argument>
+ <argument index="2" name="octree_size" type="Vector3">
+ </argument>
+ <argument index="3" name="octree_cells" type="PackedByteArray">
+ </argument>
+ <argument index="4" name="data_cells" type="PackedByteArray">
+ </argument>
+ <argument index="5" name="distance_field" type="PackedByteArray">
+ </argument>
+ <argument index="6" name="level_counts" type="PackedInt32Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bounds" qualifiers="const">
+ <return type="AABB">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_data_cells" qualifiers="const">
+ <return type="PackedByteArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_level_counts" qualifiers="const">
+ <return type="PackedInt32Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_octree_cells" qualifiers="const">
+ <return type="PackedByteArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_octree_size" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_to_cell_xform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<members>
- <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.4">
+ <member name="anisotropy_strength" type="float" setter="set_anisotropy_strength" getter="get_anisotropy_strength" default="0.5">
</member>
- <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 1, 1, 1 )">
+ <member name="ao" type="float" setter="set_ao" getter="get_ao" default="0.0">
</member>
- <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0">
+ <member name="ao_size" type="float" setter="set_ao_size" getter="get_ao_size" default="0.5">
</member>
- <member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false">
+ <member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5">
</member>
- <member name="dynamic_data" type="PoolIntArray" setter="set_dynamic_data" getter="get_dynamic_data" default="PoolIntArray( )">
- </member>
- <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="1">
+ <member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="4.0">
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
</member>
- <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.4">
+ <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
</member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0">
+ <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
</member>
- <member name="to_cell_xform" type="Transform" setter="set_to_cell_xform" getter="get_to_cell_xform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
</member>
</members>
<constants>
diff --git a/doc/classes/Particles2D.xml b/doc/classes/GPUParticles2D.xml
index 7c7b42ce88..ee67b5052c 100644
--- a/doc/classes/Particles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Particles2D" inherits="Node2D" category="Core" version="3.2">
+<class name="GPUParticles2D" inherits="Node2D" version="4.0">
<brief_description>
2D particle emitter.
</brief_description>
<description>
- 2D particle node used to create a variety of particle systems and effects. [Particles2D] features an emitter that generates some number of particles at a given rate.
+ 2D particle node used to create a variety of particle systems and effects. [GPUParticles2D] features an emitter that generates some number of particles at a given rate.
Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
@@ -30,10 +30,10 @@
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
Number of particles emitted in one emission cycle.
</member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0">
- Particle draw order. Uses [code]DRAW_ORDER_*[/code] values.
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles2D.DrawOrder" default="0">
+ Particle draw order. Uses [enum DrawOrder] values.
</member>
- <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
+ <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="false">
If [code]true[/code], particles are being emitted.
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
@@ -51,8 +51,9 @@
<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>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
Normal map to be used for the [member texture] property.
+ [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="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.
@@ -69,7 +70,7 @@
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
</member>
<member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )">
diff --git a/doc/classes/Particles.xml b/doc/classes/GPUParticles3D.xml
index 7bfea8bce4..add8f28bf8 100644
--- a/doc/classes/Particles.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Particles" inherits="GeometryInstance" category="Core" version="3.2">
+<class name="GPUParticles3D" inherits="GeometryInstance3D" version="4.0">
<brief_description>
3D particle emitter.
</brief_description>
<description>
- 3D particle node used to create a variety of particle systems and effects. [Particles] features an emitter that generates some number of particles at a given rate.
+ 3D particle node used to create a variety of particle systems and effects. [GPUParticles3D] features an emitter that generates some number of particles at a given rate.
Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link>
</tutorials>
<methods>
<method name="capture_aabb" qualifiers="const">
@@ -50,8 +50,8 @@
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
Number of particles to emit.
</member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder" default="0">
- Particle draw order. Uses [code]DRAW_ORDER_*[/code] values.
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles3D.DrawOrder" default="0">
+ Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh">
[Mesh] that is drawn for the first draw pass.
@@ -68,7 +68,7 @@
<member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes" default="1">
The number of draw passes when rendering particles.
</member>
- <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
+ <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="false">
If [code]true[/code], particles are being emitted.
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint3D.xml
index bc34f3ac0d..ae86ab7365 100644
--- a/doc/classes/Generic6DOFJoint.xml
+++ b/doc/classes/Generic6DOFJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.2">
+<class name="Generic6DOFJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation.
</brief_description>
@@ -12,7 +12,7 @@
<method name="get_flag_x" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag">
</argument>
<description>
</description>
@@ -20,7 +20,7 @@
<method name="get_flag_y" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag">
</argument>
<description>
</description>
@@ -28,7 +28,7 @@
<method name="get_flag_z" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag">
</argument>
<description>
</description>
@@ -36,7 +36,7 @@
<method name="get_param_x" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param">
</argument>
<description>
</description>
@@ -44,7 +44,7 @@
<method name="get_param_y" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param">
</argument>
<description>
</description>
@@ -52,7 +52,7 @@
<method name="get_param_z" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param">
</argument>
<description>
</description>
@@ -60,7 +60,7 @@
<method name="set_flag_x">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag">
</argument>
<argument index="1" name="value" type="bool">
</argument>
@@ -70,7 +70,7 @@
<method name="set_flag_y">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag">
</argument>
<argument index="1" name="value" type="bool">
</argument>
@@ -80,7 +80,7 @@
<method name="set_flag_z">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag">
</argument>
<argument index="1" name="value" type="bool">
</argument>
@@ -90,7 +90,7 @@
<method name="set_param_x">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -100,7 +100,7 @@
<method name="set_param_y">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -110,7 +110,7 @@
<method name="set_param_z">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -373,6 +373,12 @@
<constant name="PARAM_LINEAR_MOTOR_FORCE_LIMIT" value="6" enum="Param">
The maximum force the linear motor will apply while trying to reach the velocity target.
</constant>
+ <constant name="PARAM_LINEAR_SPRING_STIFFNESS" value="7" enum="Param">
+ </constant>
+ <constant name="PARAM_LINEAR_SPRING_DAMPING" value="8" enum="Param">
+ </constant>
+ <constant name="PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT" value="9" enum="Param">
+ </constant>
<constant name="PARAM_ANGULAR_LOWER_LIMIT" value="10" enum="Param">
The minimum rotation in negative direction to break loose and rotate around the axes.
</constant>
@@ -400,6 +406,12 @@
<constant name="PARAM_ANGULAR_MOTOR_FORCE_LIMIT" value="18" enum="Param">
Maximum acceleration for the motor at the axes.
</constant>
+ <constant name="PARAM_ANGULAR_SPRING_STIFFNESS" value="19" enum="Param">
+ </constant>
+ <constant name="PARAM_ANGULAR_SPRING_DAMPING" value="20" enum="Param">
+ </constant>
+ <constant name="PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT" value="21" enum="Param">
+ </constant>
<constant name="PARAM_MAX" value="22" enum="Param">
Represents the size of the [enum Param] enum.
</constant>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml
index 3824baa4dc..4d6f7b60a3 100644
--- a/doc/classes/Geometry.xml
+++ b/doc/classes/Geometry.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Geometry" inherits="Object" category="Core" version="3.2">
+<class name="Geometry" inherits="Object" version="4.0">
<brief_description>
+ Helper node to calculate generic geometry operations.
</brief_description>
<description>
+ Geometry provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations.
</description>
<tutorials>
</tutorials>
@@ -49,9 +51,9 @@
</description>
</method>
<method name="clip_polygon">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
- <argument index="0" name="points" type="PoolVector3Array">
+ <argument index="0" name="points" type="PackedVector3Array">
</argument>
<argument index="1" name="plane" type="Plane">
</argument>
@@ -62,30 +64,30 @@
<method name="clip_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code].
- If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distiguished by calling [method is_polygon_clockwise].
+ 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].
</description>
</method>
<method name="clip_polyline_with_polygon_2d">
<return type="Array">
</return>
- <argument index="0" name="polyline" type="PoolVector2Array">
+ <argument index="0" name="polyline" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon" type="PoolVector2Array">
+ <argument index="1" name="polygon" type="PackedVector2Array">
</argument>
<description>
Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape.
</description>
</method>
<method name="convex_hull_2d">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<description>
Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one.
@@ -94,13 +96,13 @@
<method name="exclude_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
- The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distiguished by calling [method is_polygon_clockwise].
+ 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">
@@ -113,7 +115,7 @@
<argument index="2" name="s2" type="Vector3">
</argument>
<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 ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
</description>
</method>
<method name="get_closest_point_to_segment_2d">
@@ -126,7 +128,7 @@
<argument index="2" name="s2" type="Vector2">
</argument>
<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 ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
</description>
</method>
<method name="get_closest_point_to_segment_uncapped">
@@ -139,7 +141,7 @@
<argument index="2" name="s2" type="Vector3">
</argument>
<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 ([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.
</description>
</method>
<method name="get_closest_point_to_segment_uncapped_2d">
@@ -152,11 +154,11 @@
<argument index="2" name="s2" type="Vector2">
</argument>
<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 ([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.
</description>
</method>
<method name="get_closest_points_between_segments">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="p1" type="Vector3">
</argument>
@@ -167,11 +169,11 @@
<argument index="3" name="q2" type="Vector3">
</argument>
<description>
- Given the two 3d segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
</description>
</method>
<method name="get_closest_points_between_segments_2d">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="p1" type="Vector2">
</argument>
@@ -182,7 +184,7 @@
<argument index="3" name="q2" type="Vector2">
</argument>
<description>
- Given the two 2d segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
</description>
</method>
<method name="get_uv84_normal_bit">
@@ -191,14 +193,15 @@
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
+ Used internally by the engine.
</description>
</method>
<method name="intersect_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Intersects [code]polygon_a[/code] with [code]polygon_b[/code] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs.
@@ -208,9 +211,9 @@
<method name="intersect_polyline_with_polygon_2d">
<return type="Array">
</return>
- <argument index="0" name="polyline" type="PoolVector2Array">
+ <argument index="0" name="polyline" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon" type="PoolVector2Array">
+ <argument index="1" name="polygon" type="PackedVector2Array">
</argument>
<description>
Intersects [code]polyline[/code] with [code]polygon[/code] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape.
@@ -234,7 +237,7 @@
</return>
<argument index="0" name="point" type="Vector2">
</argument>
- <argument index="1" name="polygon" type="PoolVector2Array">
+ <argument index="1" name="polygon" type="PackedVector2Array">
</argument>
<description>
Returns [code]true[/code] if [code]point[/code] is inside [code]polygon[/code] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code].
@@ -243,7 +246,7 @@
<method name="is_polygon_clockwise">
<return type="bool">
</return>
- <argument index="0" name="polygon" type="PoolVector2Array">
+ <argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<description>
Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code].
@@ -268,7 +271,7 @@
<method name="make_atlas">
<return type="Dictionary">
</return>
- <argument index="0" name="sizes" type="PoolVector2Array">
+ <argument index="0" name="sizes" type="PackedVector2Array">
</argument>
<description>
Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
@@ -277,9 +280,9 @@
<method name="merge_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons.
@@ -289,7 +292,7 @@
<method name="offset_polygon_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon" type="PoolVector2Array">
+ <argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
@@ -304,7 +307,7 @@
<method name="offset_polyline_2d">
<return type="Array">
</return>
- <argument index="0" name="polyline" type="PoolVector2Array">
+ <argument index="0" name="polyline" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
@@ -348,7 +351,7 @@
<argument index="4" name="c" type="Vector3">
</argument>
<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 [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.
</description>
</method>
<method name="segment_intersects_circle">
@@ -363,11 +366,11 @@
<argument index="3" name="circle_radius" type="float">
</argument>
<description>
- Given the 2d segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).
+ Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).
</description>
</method>
<method name="segment_intersects_convex">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Vector3">
</argument>
@@ -376,11 +379,11 @@
<argument index="2" name="planes" type="Array">
</argument>
<description>
- Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PoolVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
+ Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
</description>
</method>
<method name="segment_intersects_cylinder">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Vector3">
</argument>
@@ -391,7 +394,7 @@
<argument index="3" name="radius" type="float">
</argument>
<description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PoolVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
</description>
</method>
<method name="segment_intersects_segment_2d">
@@ -410,7 +413,7 @@
</description>
</method>
<method name="segment_intersects_sphere">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Vector3">
</argument>
@@ -421,7 +424,7 @@
<argument index="3" name="sphere_radius" type="float">
</argument>
<description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PoolVector3Array]. If yes, returns a [PoolVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
</description>
</method>
<method name="segment_intersects_triangle">
@@ -442,21 +445,21 @@
</description>
</method>
<method name="triangulate_delaunay_2d">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<description>
- Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned.
+ Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
<method name="triangulate_polygon">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
- <argument index="0" name="polygon" type="PoolVector2Array">
+ <argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<description>
- Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned.
+ Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
</methods>
diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance3D.xml
index 02f2c27043..cc85ce295b 100644
--- a/doc/classes/GeometryInstance.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.2">
+<class name="GeometryInstance3D" inherits="VisualInstance3D" version="4.0">
<brief_description>
Base node for geometry-based visual instances.
</brief_description>
@@ -9,10 +9,10 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
+ <method name="get_shader_instance_uniform" qualifiers="const">
+ <return type="Variant">
</return>
- <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
+ <argument index="0" name="uniform" type="StringName">
</argument>
<description>
</description>
@@ -26,72 +26,80 @@
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_flag">
+ <method name="set_shader_instance_uniform">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
+ <argument index="0" name="uniform" type="StringName">
</argument>
- <argument index="1" name="value" type="bool">
+ <argument index="1" name="value" type="Variant">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance.ShadowCastingSetting" default="1">
+ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting" default="1">
The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values.
</member>
<member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0">
- The extra distance added to the GeometryInstance's bounding box ([AABB]) to increase its cull box.
+ The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box.
+ </member>
+ <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0">
+ </member>
+ <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
</member>
<member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0">
- The GeometryInstance's max LOD distance.
+ The GeometryInstance3D's max LOD distance.
[b]Note:[/b] This property currently has no effect.
</member>
<member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" default="0.0">
- The GeometryInstance's max LOD margin.
+ The GeometryInstance3D's max LOD margin.
[b]Note:[/b] This property currently has no effect.
</member>
<member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance" default="0.0">
- The GeometryInstance's min LOD distance.
+ The GeometryInstance3D's min LOD distance.
[b]Note:[/b] This property currently has no effect.
</member>
<member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" default="0.0">
- The GeometryInstance's min LOD margin.
+ The GeometryInstance3D's min LOD margin.
[b]Note:[/b] This property currently has no effect.
</member>
<member name="material_override" type="Material" setter="set_material_override" getter="get_material_override">
The material override for the whole geometry.
If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
</member>
- <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe] or [BakedLightmap].
- </member>
</members>
<constants>
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
Will not cast any shadows.
</constant>
<constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
- Will cast shadows from all visible faces in the GeometryInstance.
+ Will cast shadows from all visible faces in the GeometryInstance3D.
Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
</constant>
<constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting">
- Will cast shadows from all visible faces in the GeometryInstance.
+ Will cast shadows from all visible faces in the GeometryInstance3D.
Will not take culling into account, so all faces will be taken into account when shadow casting.
</constant>
<constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting">
Will only show the shadows casted from this object.
In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
</constant>
- <constant name="FLAG_USE_BAKED_LIGHT" value="0" enum="Flags">
- Will allow the GeometryInstance to be used when baking lights using a [GIProbe] or [BakedLightmap].
+ <constant name="GI_MODE_DISABLED" value="0" enum="GIMode">
+ </constant>
+ <constant name="GI_MODE_BAKED" value="1" enum="GIMode">
+ </constant>
+ <constant name="GI_MODE_DYNAMIC" value="2" enum="GIMode">
+ </constant>
+ <constant name="LIGHTMAP_SCALE_1X" value="0" enum="LightmapScale">
+ </constant>
+ <constant name="LIGHTMAP_SCALE_2X" value="1" enum="LightmapScale">
+ </constant>
+ <constant name="LIGHTMAP_SCALE_4X" value="2" enum="LightmapScale">
</constant>
- <constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="Flags">
- Unused in this class, exposed for consistency with [enum VisualServer.InstanceFlags].
+ <constant name="LIGHTMAP_SCALE_8X" value="3" enum="LightmapScale">
</constant>
- <constant name="FLAG_MAX" value="2" enum="Flags">
- Represents the size of the [enum Flags] enum.
+ <constant name="LIGHTMAP_SCALE_MAX" value="4" enum="LightmapScale">
</constant>
</constants>
</class>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 247a7afe85..05aebef9de 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Gradient" inherits="Resource" category="Core" version="3.2">
+<class name="Gradient" inherits="Resource" version="4.0">
<brief_description>
A color interpolator resource which can be used to generate colors between user-defined color points.
</brief_description>
@@ -87,11 +87,11 @@
</method>
</methods>
<members>
- <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors" default="PoolColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )">
- Gradient's colors returned as a [PoolColorArray].
+ <member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )">
+ Gradient's colors returned as a [PackedColorArray].
</member>
- <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets" default="PoolRealArray( 0, 1 )">
- Gradient's offsets returned as a [PoolRealArray].
+ <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array( 0, 1 )">
+ Gradient's offsets returned as a [PackedFloat32Array].
</member>
</members>
<constants>
diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml
index 3492b2e261..242a78b2e4 100644
--- a/doc/classes/GradientTexture.xml
+++ b/doc/classes/GradientTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GradientTexture" inherits="Texture" category="Core" version="3.2">
+<class name="GradientTexture" inherits="Texture2D" version="4.0">
<brief_description>
Gradient-filled texture.
</brief_description>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 80e9b152ef..9d00ffe233 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphEdit" inherits="Control" category="Core" version="3.2">
+<class name="GraphEdit" inherits="Control" version="4.0">
<brief_description>
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
</brief_description>
@@ -49,11 +49,11 @@
<method name="connect_node">
<return type="int" enum="Error">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
@@ -64,11 +64,11 @@
<method name="disconnect_node">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
@@ -87,16 +87,18 @@
<return type="HBoxContainer">
</return>
<description>
+ Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph.
+ Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of it's children use their [member CanvasItem.visible] property instead.
</description>
</method>
<method name="is_node_connected">
<return type="bool">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
@@ -147,17 +149,18 @@
<method name="set_connection_activity">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
<argument index="4" name="amount" type="float">
</argument>
<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 [code]activity[/code] theme property.
</description>
</method>
<method name="set_selected">
@@ -192,65 +195,65 @@
<signals>
<signal name="_begin_node_move">
<description>
- Signal sent at the beginning of a GraphNode movement.
+ Emitted at the beginning of a GraphNode movement.
</description>
</signal>
<signal name="_end_node_move">
<description>
- Signal sent at the end of a GraphNode movement.
+ Emitted at the end of a GraphNode movement.
</description>
</signal>
<signal name="connection_from_empty">
- <argument index="0" name="to" type="String">
+ <argument index="0" name="to" type="StringName">
</argument>
<argument index="1" name="to_slot" type="int">
</argument>
<argument index="2" name="release_position" type="Vector2">
</argument>
<description>
- Signal sent when user dragging connection from input port into empty space of the graph.
+ 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="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_slot" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_slot" type="int">
</argument>
<description>
- Signal sent 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 [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.
</description>
</signal>
<signal name="connection_to_empty">
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_slot" type="int">
</argument>
<argument index="2" name="release_position" type="Vector2">
</argument>
<description>
- Signal sent when user dragging connection from output port into empty space of the graph.
+ Emitted when user dragging connection from output port into empty space of the graph.
</description>
</signal>
<signal name="copy_nodes_request">
<description>
- Signal sent when the user presses [code]Ctrl + C[/code].
+ Emitted when the user presses [kbd]Ctrl + C[/kbd].
</description>
</signal>
<signal name="delete_nodes_request">
<description>
- Signal sent when a GraphNode is attempted to be removed from the GraphEdit.
+ Emitted when a GraphNode is attempted to be removed from the GraphEdit.
</description>
</signal>
<signal name="disconnection_request">
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_slot" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_slot" type="int">
</argument>
@@ -270,9 +273,15 @@
Emitted when a GraphNode is selected.
</description>
</signal>
+ <signal name="node_unselected">
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ </description>
+ </signal>
<signal name="paste_nodes_request">
<description>
- Signal sent when the user presses [code]Ctrl + V[/code].
+ Emitted when the user presses [kbd]Ctrl + V[/kbd].
</description>
</signal>
<signal name="popup_request">
@@ -286,6 +295,7 @@
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
+ Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code.
</description>
</signal>
</signals>
@@ -299,22 +309,37 @@
<theme_item name="bezier_len_pos" type="int" default="80">
</theme_item>
<theme_item name="bg" type="StyleBox">
+ The background drawn under the grid.
</theme_item>
<theme_item name="grid_major" type="Color" default="Color( 1, 1, 1, 0.2 )">
+ Color of major grid lines.
</theme_item>
<theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )">
+ Color of minor grid lines.
</theme_item>
- <theme_item name="minus" type="Texture">
+ <theme_item name="minus" type="Texture2D">
+ The icon for the zoom out button.
</theme_item>
- <theme_item name="more" type="Texture">
+ <theme_item name="more" type="Texture2D">
+ The icon for the zoom in button.
</theme_item>
<theme_item name="port_grab_distance_horizontal" type="int" default="48">
+ The horizontal range within which a port can be grabbed (on both sides).
</theme_item>
<theme_item name="port_grab_distance_vertical" type="int" default="6">
+ The vertical range within which a port can be grabbed (on both sides).
+ </theme_item>
+ <theme_item name="reset" type="Texture2D">
+ The icon for the zoom reset button.
+ </theme_item>
+ <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )">
+ The fill color of the selection rectangle.
</theme_item>
- <theme_item name="reset" type="Texture">
+ <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )">
+ The outline color of the selection rectangle.
</theme_item>
- <theme_item name="snap" type="Texture">
+ <theme_item name="snap" type="Texture2D">
+ The icon for the snap toggle button.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index 8470a346ff..33074536da 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphNode" inherits="Container" category="Core" version="3.2">
+<class name="GraphNode" inherits="Container" version="4.0">
<brief_description>
- A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
+ A GraphNode is a container with potentially several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
</brief_description>
<description>
- A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.
+ A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes referred to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any [Control]-derived child node to it.
+ After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further.
+ In the Inspector you can enable (show) or disable (hide) slots. By default all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections.
</description>
<tutorials>
</tutorials>
@@ -164,11 +166,17 @@
</argument>
<argument index="6" name="color_right" type="Color">
</argument>
- <argument index="7" name="custom_left" type="Texture" default="null">
+ <argument index="7" name="custom_left" type="Texture2D" default="null">
</argument>
- <argument index="8" name="custom_right" type="Texture" default="null">
+ <argument index="8" name="custom_right" type="Texture2D" default="null">
</argument>
<description>
+ Sets properties of the slot with ID [code]idx[/code].
+ If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side.
+ [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected.
+ [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side.
+ [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port.
+ [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode.
</description>
</method>
</methods>
@@ -176,25 +184,33 @@
<member name="comment" type="bool" setter="set_comment" getter="is_comment" default="false">
If [code]true[/code], the GraphNode is a comment node.
</member>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].
[b]Note:[/b] You cannot use position directly, as [GraphEdit] is a [Container].
</member>
<member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0">
+ Sets the overlay shown above the GraphNode. See [enum Overlay].
</member>
<member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false">
+ If [code]true[/code], the user can resize the GraphNode.
+ [b]Note:[/b] Dragging the handle will only emit the [signal resize_request] signal, the GraphNode needs to be resized manually.
</member>
<member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false">
+ If [code]true[/code], the GraphNode is selected.
</member>
<member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" default="false">
+ If [code]true[/code], the close button will be visible.
+ [b]Note:[/b] Pressing it will only emit the [signal close_request] signal, the GraphNode needs to be removed manually.
</member>
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
+ The text displayed in the GraphNode's title bar.
</member>
</members>
<signals>
<signal name="close_request">
<description>
- Signal sent on closing the GraphNode.
+ Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see [member show_close]).
</description>
</signal>
<signal name="dragged">
@@ -203,72 +219,93 @@
<argument index="1" name="to" type="Vector2">
</argument>
<description>
- Signal sent when the GraphNode is dragged.
+ Emitted when the GraphNode is dragged.
</description>
</signal>
<signal name="offset_changed">
<description>
- Signal sent when the GraphNode is moved.
+ Emitted when the GraphNode is moved.
</description>
</signal>
<signal name="raise_request">
<description>
- Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
+ Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
</description>
</signal>
<signal name="resize_request">
<argument index="0" name="new_minsize" type="Vector2">
</argument>
<description>
+ Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]).
</description>
</signal>
</signals>
<constants>
<constant name="OVERLAY_DISABLED" value="0" enum="Overlay">
+ No overlay is shown.
</constant>
<constant name="OVERLAY_BREAKPOINT" value="1" enum="Overlay">
+ Show overlay set in the [code]breakpoint[/code] theme property.
</constant>
<constant name="OVERLAY_POSITION" value="2" enum="Overlay">
+ Show overlay set in the [code]position[/code] theme property.
</constant>
</constants>
<theme_items>
<theme_item name="breakpoint" type="StyleBox">
+ The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT].
</theme_item>
- <theme_item name="close" type="Texture">
+ <theme_item name="close" type="Texture2D">
+ The icon for the close button, visible when [member show_close] is enabled.
</theme_item>
<theme_item name="close_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ The color modulation applied to the close button icon.
</theme_item>
<theme_item name="close_offset" type="int" default="18">
+ The vertical offset of the close button.
</theme_item>
<theme_item name="comment" type="StyleBox">
+ The [StyleBox] used when [member comment] is enabled.
</theme_item>
<theme_item name="commentfocus" type="StyleBox">
+ The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused.
</theme_item>
<theme_item name="defaultfocus" type="StyleBox">
</theme_item>
<theme_item name="defaultframe" type="StyleBox">
</theme_item>
<theme_item name="frame" type="StyleBox">
+ The default background for [GraphNode].
</theme_item>
- <theme_item name="port" type="Texture">
+ <theme_item name="port" type="Texture2D">
+ The icon used for representing ports.
</theme_item>
<theme_item name="port_offset" type="int" default="3">
+ Horizontal offset for the ports.
</theme_item>
<theme_item name="position" type="StyleBox">
+ The background used when [member overlay] is set to [constant OVERLAY_POSITION].
</theme_item>
- <theme_item name="resizer" type="Texture">
+ <theme_item name="resizer" type="Texture2D">
+ The icon used for resizer, visible when [member resizable] is enabled.
</theme_item>
<theme_item name="resizer_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ The color modulation applied to the resizer icon.
</theme_item>
<theme_item name="selectedframe" type="StyleBox">
+ The background used when the [GraphNode] is selected.
</theme_item>
<theme_item name="separation" type="int" default="1">
+ The vertical distance between ports.
</theme_item>
<theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ Color of the title text.
</theme_item>
<theme_item name="title_font" type="Font">
+ Font used for the title text.
</theme_item>
<theme_item name="title_offset" type="int" default="20">
+ Vertical offset of the title text.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml
index e8c764f412..e13dc43104 100644
--- a/doc/classes/GridContainer.xml
+++ b/doc/classes/GridContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GridContainer" inherits="Container" category="Core" version="3.2">
+<class name="GridContainer" inherits="Container" version="4.0">
<brief_description>
Grid container used to arrange elements in a grid like layout.
</brief_description>
@@ -15,14 +15,15 @@
<member name="columns" type="int" setter="set_columns" getter="get_columns" default="1">
The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its children to accommodate the new layout.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
</members>
<constants>
</constants>
<theme_items>
<theme_item name="hseparation" type="int" default="4">
+ The horizontal separation of children nodes.
</theme_item>
<theme_item name="vseparation" type="int" default="4">
+ The vertical separation of children nodes.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml
index 6b87fa5cfe..643b7aefea 100644
--- a/doc/classes/GrooveJoint2D.xml
+++ b/doc/classes/GrooveJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.2">
+<class name="GrooveJoint2D" inherits="Joint2D" version="4.0">
<brief_description>
Groove constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml
index e2abbe16cc..7c76b8b001 100644
--- a/doc/classes/HBoxContainer.xml
+++ b/doc/classes/HBoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HBoxContainer" inherits="BoxContainer" category="Core" version="3.2">
+<class name="HBoxContainer" inherits="BoxContainer" version="4.0">
<brief_description>
Horizontal box container.
</brief_description>
@@ -14,6 +14,7 @@
</constants>
<theme_items>
<theme_item name="separation" type="int" default="4">
+ The horizontal space between the [HBoxContainer]'s elements.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml
index 14ace8bc76..963454dab8 100644
--- a/doc/classes/HScrollBar.xml
+++ b/doc/classes/HScrollBar.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HScrollBar" inherits="ScrollBar" category="Core" version="3.2">
+<class name="HScrollBar" inherits="ScrollBar" version="4.0">
<brief_description>
Horizontal scroll bar.
</brief_description>
<description>
- Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max).
+ Horizontal version of [ScrollBar], which goes from left (min) to right (max).
</description>
<tutorials>
</tutorials>
@@ -13,23 +13,32 @@
<constants>
</constants>
<theme_items>
- <theme_item name="decrement" type="Texture">
+ <theme_item name="decrement" type="Texture2D">
+ Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
- <theme_item name="decrement_highlight" type="Texture">
+ <theme_item name="decrement_highlight" type="Texture2D">
+ Displayed when the mouse cursor hovers over the decrement button.
</theme_item>
<theme_item name="grabber" type="StyleBox">
+ Used as texture for the grabber, the draggable element representing current scroll.
</theme_item>
<theme_item name="grabber_highlight" type="StyleBox">
+ Used when the mouse hovers over the grabber.
</theme_item>
<theme_item name="grabber_pressed" type="StyleBox">
+ Used when the grabber is being dragged.
</theme_item>
- <theme_item name="increment" type="Texture">
+ <theme_item name="increment" type="Texture2D">
+ Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
- <theme_item name="increment_highlight" type="Texture">
+ <theme_item name="increment_highlight" type="Texture2D">
+ Displayed when the mouse cursor hovers over the increment button.
</theme_item>
<theme_item name="scroll" type="StyleBox">
+ Used as background of this [ScrollBar].
</theme_item>
<theme_item name="scroll_focus" type="StyleBox">
+ Used as background when the [ScrollBar] has the GUI focus.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml
index c34364c573..5b418d6428 100644
--- a/doc/classes/HSeparator.xml
+++ b/doc/classes/HSeparator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSeparator" inherits="Separator" category="Core" version="3.2">
+<class name="HSeparator" inherits="Separator" version="4.0">
<brief_description>
Horizontal separator.
</brief_description>
@@ -14,8 +14,10 @@
</constants>
<theme_items>
<theme_item name="separation" type="int" default="4">
+ The height of the area covered by the separator. Effectively works like a minimum height.
</theme_item>
<theme_item name="separator" type="StyleBox">
+ The style for the separator line. Works best with [StyleBoxLine].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
index 2fef4669d2..afe9d10d2e 100644
--- a/doc/classes/HSlider.xml
+++ b/doc/classes/HSlider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSlider" inherits="Slider" category="Core" version="3.2">
+<class name="HSlider" inherits="Slider" version="4.0">
<brief_description>
Horizontal slider.
</brief_description>
@@ -13,23 +13,25 @@
<constants>
</constants>
<theme_items>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="grabber" type="Texture">
+ <theme_item name="grabber" type="Texture2D">
+ The texture for the grabber (the draggable element).
</theme_item>
<theme_item name="grabber_area" type="StyleBox">
+ The background of the area to the left of the grabber.
</theme_item>
- <theme_item name="grabber_disabled" type="Texture">
- </theme_item>
- <theme_item name="grabber_disabled" type="StyleBox">
+ <theme_item name="grabber_area_highlight" type="StyleBox">
</theme_item>
- <theme_item name="grabber_highlight" type="Texture">
+ <theme_item name="grabber_disabled" type="Texture2D">
+ The texture for the grabber when it's disabled.
</theme_item>
- <theme_item name="grabber_highlight" type="StyleBox">
+ <theme_item name="grabber_highlight" type="Texture2D">
+ The texture for the grabber when it's focused.
</theme_item>
<theme_item name="slider" type="StyleBox">
+ The background for the whole slider. Determines the height of the [code]grabber_area[/code].
</theme_item>
- <theme_item name="tick" type="Texture">
+ <theme_item name="tick" type="Texture2D">
+ The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index 3a425705c6..f6e9f33c20 100644
--- a/doc/classes/HSplitContainer.xml
+++ b/doc/classes/HSplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSplitContainer" inherits="SplitContainer" category="Core" version="3.2">
+<class name="HSplitContainer" inherits="SplitContainer" version="4.0">
<brief_description>
Horizontal split container.
</brief_description>
@@ -14,12 +14,15 @@
</constants>
<theme_items>
<theme_item name="autohide" type="int" default="1">
+ Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
<theme_item name="bg" type="StyleBox">
</theme_item>
- <theme_item name="grabber" type="Texture">
+ <theme_item name="grabber" type="Texture2D">
+ The icon used for the grabber drawn in the middle area.
</theme_item>
<theme_item name="separation" type="int" default="12">
+ The space between sides of the container.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 52e4b94051..76153ae041 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPClient" inherits="Reference" category="Core" version="3.2">
+<class name="HTTPClient" inherits="Reference" version="4.0">
<brief_description>
Hyper-text transfer protocol client.
</brief_description>
@@ -55,7 +55,7 @@
</description>
</method>
<method name="get_response_headers">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the response headers.
@@ -79,7 +79,7 @@
<return type="int" enum="HTTPClient.Status">
</return>
<description>
- Returns a [code]STATUS_*[/code] enum constant. Need to call [method poll] in order to get status updates.
+ Returns a [enum Status] constant. Need to call [method poll] in order to get status updates.
</description>
</method>
<method name="has_response" qualifiers="const">
@@ -100,7 +100,7 @@
<return type="int" enum="Error">
</return>
<description>
- This needs to be called in order to have any request processed. Check results with [method get_status]
+ This needs to be called in order to have any request processed. Check results with [method get_status].
</description>
</method>
<method name="query_string_from_dict">
@@ -112,19 +112,19 @@
Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
[codeblock]
var fields = {"username": "user", "password": "pass"}
- String query_string = http_client.query_string_from_dict(fields)
+ var query_string = http_client.query_string_from_dict(fields)
# Returns "username=user&amp;password=pass"
[/codeblock]
Furthermore, if a key has a [code]null[/code] value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added.
[codeblock]
var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]}
- String query_string = http_client.query_string_from_dict(fields)
+ var query_string = http_client.query_string_from_dict(fields)
# Returns "single=123&amp;not_valued&amp;multiple=22&amp;multiple=33&amp;multiple=44"
[/codeblock]
</description>
</method>
<method name="read_response_body_chunk">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Reads one chunk from the response.
@@ -137,13 +137,13 @@
</argument>
<argument index="1" name="url" type="String">
</argument>
- <argument index="2" name="headers" type="PoolStringArray">
+ <argument index="2" name="headers" type="PackedStringArray">
</argument>
<argument index="3" name="body" type="String" default="&quot;&quot;">
</argument>
<description>
Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
- Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code].
+ Headers are HTTP request headers. For available HTTP methods, see [enum Method].
To create a POST request with query strings to push to the server, do:
[codeblock]
var fields = {"username" : "user", "password" : "pass"}
@@ -160,25 +160,16 @@
</argument>
<argument index="1" name="url" type="String">
</argument>
- <argument index="2" name="headers" type="PoolStringArray">
+ <argument index="2" name="headers" type="PackedStringArray">
</argument>
- <argument index="3" name="body" type="PoolByteArray">
+ <argument index="3" name="body" type="PackedByteArray">
</argument>
<description>
Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
- Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code].
+ Headers are HTTP request headers. For available HTTP methods, see [enum Method].
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
</method>
- <method name="set_read_chunk_size">
- <return type="void">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Sets the size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk].
- </description>
- </method>
</methods>
<members>
<member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false">
@@ -187,6 +178,9 @@
<member name="connection" type="StreamPeer" setter="set_connection" getter="get_connection">
The connection to use for this client.
</member>
+ <member name="read_chunk_size" type="int" setter="set_read_chunk_size" getter="get_read_chunk_size" default="4096">
+ The size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk].
+ </member>
</members>
<constants>
<constant name="METHOD_GET" value="0" enum="Method">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index d0e8a5972f..53ca1fc6a9 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -1,11 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPRequest" inherits="Node" category="Core" version="3.2">
+<class name="HTTPRequest" inherits="Node" version="4.0">
<brief_description>
A node with the ability to send HTTP(S) requests.
</brief_description>
<description>
A node with the ability to send HTTP requests. Uses [HTTPClient] internally.
Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.
+ [b]Example of contacting a REST API and printing one of its returned fields:[/b]
+ [codeblock]
+ func _ready():
+ # 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")
+
+ # Perform the HTTP request. The URL below returns some JSON as of writing.
+ var error = http_request.request("https://httpbin.org/get")
+ if error != OK:
+ push_error("An error occurred in the HTTP request.")
+
+
+ # Called when the HTTP request is completed.
+ func _http_request_completed(result, response_code, headers, body):
+ var response = parse_json(body.get_string_from_utf8())
+
+ # Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
+ print(response.headers["User-Agent"])
+ [/codeblock]
[b]Example of loading and displaying an image using HTTPRequest:[/b]
[codeblock]
func _ready():
@@ -67,7 +88,7 @@
<return type="int" enum="HTTPClient.Status">
</return>
<description>
- Returns the current status of the underlying [HTTPClient]. See [code]STATUS_*[/code] enum on [HTTPClient].
+ Returns the current status of the underlying [HTTPClient]. See [enum HTTPClient.Status].
</description>
</method>
<method name="request">
@@ -75,7 +96,7 @@
</return>
<argument index="0" name="url" type="String">
</argument>
- <argument index="1" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )">
+ <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )">
</argument>
<argument index="2" name="ssl_validate_domain" type="bool" default="true">
</argument>
@@ -93,6 +114,10 @@
<member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1">
Maximum allowed size for response bodies.
</member>
+ <member name="download_chunk_size" type="int" setter="set_download_chunk_size" getter="get_download_chunk_size" default="4096">
+ The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size].
+ Set this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory.
+ </member>
<member name="download_file" type="String" setter="set_download_file" getter="get_download_file" default="&quot;&quot;">
The file to download into. Will output any received file into it.
</member>
@@ -111,9 +136,9 @@
</argument>
<argument index="1" name="response_code" type="int">
</argument>
- <argument index="2" name="headers" type="PoolStringArray">
+ <argument index="2" name="headers" type="PackedStringArray">
</argument>
- <argument index="3" name="body" type="PoolByteArray">
+ <argument index="3" name="body" type="PackedByteArray">
</argument>
<description>
Emitted when a request is completed.
@@ -145,7 +170,7 @@
Request exceeded its maximum size limit, see [member body_size_limit].
</constant>
<constant name="RESULT_REQUEST_FAILED" value="8" enum="Result">
- Request failed. (Unused)
+ Request failed (currently unused).
</constant>
<constant name="RESULT_DOWNLOAD_FILE_CANT_OPEN" value="9" enum="Result">
HTTPRequest couldn't open the download file.
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index 802b186ef3..f8152c813e 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HashingContext" inherits="Reference" category="Core" version="3.2">
+<class name="HashingContext" inherits="Reference" version="4.0">
<brief_description>
Context to compute cryptographic hashes over multiple iterations.
</brief_description>
@@ -27,12 +27,13 @@
# Print the result as hex string and array.
printt(res.hex_encode(), Array(res))
[/codeblock]
+ [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
<methods>
<method name="finish">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Closes the current context, and return the computed hash.
@@ -50,7 +51,7 @@
<method name="update">
<return type="int" enum="Error">
</return>
- <argument index="0" name="chunk" type="PoolByteArray">
+ <argument index="0" name="chunk" type="PackedByteArray">
</argument>
<description>
Updates the computation with the given [code]chunk[/code] of data.
diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape3D.xml
index cb7da8af26..6d230bdab8 100644
--- a/doc/classes/HeightMapShape.xml
+++ b/doc/classes/HeightMapShape3D.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HeightMapShape" inherits="Shape" category="Core" version="3.2">
+<class name="HeightMapShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Height map shape for 3D physics (Bullet only).
</brief_description>
<description>
- Height map shape resource, which can be added to a [PhysicsBody] or [Area].
+ Height map shape resource, which can be added to a [PhysicsBody3D] or [Area3D].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="map_data" type="PoolRealArray" setter="set_map_data" getter="get_map_data" default="PoolRealArray( 0, 0, 0, 0 )">
+ <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array( 0, 0, 0, 0 )">
Height map data, pool array must be of [member map_width] * [member map_depth] size.
</member>
<member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2">
diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint3D.xml
index 4582e36da6..2d4480cb20 100644
--- a/doc/classes/HingeJoint.xml
+++ b/doc/classes/HingeJoint3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HingeJoint" inherits="Joint" category="Core" version="3.2">
+<class name="HingeJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
A hinge between two 3D bodies.
</brief_description>
<description>
- A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though.
+ A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though.
</description>
<tutorials>
</tutorials>
@@ -12,37 +12,41 @@
<method name="get_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag">
</argument>
<description>
+ Returns the value of the specified flag.
</description>
</method>
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="HingeJoint.Param">
+ <argument index="0" name="param" type="int" enum="HingeJoint3D.Param">
</argument>
<description>
+ Returns the value of the specified parameter.
</description>
</method>
<method name="set_flag">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
+ <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag">
</argument>
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ If [code]true[/code], enables the specified flag.
</description>
</method>
<method name="set_param">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="HingeJoint.Param">
+ <argument index="0" name="param" type="int" enum="HingeJoint3D.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
<description>
+ Sets the value of the specified parameter.
</description>
</method>
</methods>
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index b8b5f0bd39..152f381a83 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="IP" inherits="Object" category="Core" version="3.2">
+<class name="IP" inherits="Object" version="4.0">
<brief_description>
Internet protocol (IP) support functions such as DNS resolution.
</brief_description>
@@ -65,7 +65,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns a queued hostname's status as a [code]RESOLVER_STATUS_*[/code] constant, given its queue [code]id[/code].
+ Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code].
</description>
</method>
<method name="resolve_hostname">
@@ -76,7 +76,7 @@
<argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
</argument>
<description>
- Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [code]TYPE_*[/code] 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 [code]ip_type[/code].
</description>
</method>
<method name="resolve_hostname_queue_item">
@@ -87,7 +87,7 @@
<argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
</argument>
<description>
- Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [code]TYPE_*[/code] 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 [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.
</description>
</method>
</methods>
diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml
deleted file mode 100644
index 2a97c40ef8..0000000000
--- a/doc/classes/IP_Unix.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="IP_Unix" inherits="IP" category="Core" version="3.2">
- <brief_description>
- UNIX IP support. See [IP].
- </brief_description>
- <description>
- UNIX-specific implementation of IP support functions. See [IP].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index c6d63035d1..55d2275194 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Image" inherits="Resource" category="Core" version="3.2">
+<class name="Image" inherits="Resource" version="4.0">
<brief_description>
Image datatype.
</brief_description>
<description>
- Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
+ Native image datatype. Contains image data, which can be converted to a [Texture2D], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
+ [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import.
</description>
<tutorials>
</tutorials>
@@ -71,6 +72,7 @@
<argument index="0" name="bump_scale" type="float" default="1.0">
</argument>
<description>
+ Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel.
</description>
</method>
<method name="clear_mipmaps">
@@ -85,12 +87,24 @@
</return>
<argument index="0" name="mode" type="int" enum="Image.CompressMode">
</argument>
- <argument index="1" name="source" type="int" enum="Image.CompressSource">
+ <argument index="1" name="source" type="int" enum="Image.CompressSource" default="0">
</argument>
- <argument index="2" name="lossy_quality" type="float">
+ <argument index="2" name="lossy_quality" type="float" default="0.7">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Image.CompressMode">
+ </argument>
+ <argument index="1" name="channels" type="int" enum="Image.UsedChannels">
+ </argument>
+ <argument index="2" name="lossy_quality" type="float" default="0.7">
</argument>
<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 [code]COMPRESS_*[/code] constants.
</description>
</method>
<method name="convert">
@@ -99,7 +113,7 @@
<argument index="0" name="format" type="int" enum="Image.Format">
</argument>
<description>
- Converts the image's format. See [code]FORMAT_*[/code] constants.
+ Converts the image's format. See [enum Format] constants.
</description>
</method>
<method name="copy_from">
@@ -123,7 +137,7 @@
<argument index="3" name="format" type="int" enum="Image.Format">
</argument>
<description>
- Creates an empty image of given size and format. See [code]FORMAT_*[/code] 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 [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
</description>
</method>
<method name="create_from_data">
@@ -137,10 +151,10 @@
</argument>
<argument index="3" name="format" type="int" enum="Image.Format">
</argument>
- <argument index="4" name="data" type="PoolByteArray">
+ <argument index="4" name="data" type="PackedByteArray">
</argument>
<description>
- Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
+ Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
</description>
</method>
<method name="crop">
@@ -165,14 +179,15 @@
<return type="int" enum="Image.AlphaMode">
</return>
<description>
- Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found.
+ Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found.
</description>
</method>
- <method name="expand_x2_hq2x">
- <return type="void">
+ <method name="detect_used_channels">
+ <return type="int" enum="Image.UsedChannels">
</return>
+ <argument index="0" name="source" type="int" enum="Image.CompressSource" default="0">
+ </argument>
<description>
- Stretches the image and enlarges it by a factor of 2. No interpolation is done.
</description>
</method>
<method name="fill">
@@ -215,7 +230,7 @@
</description>
</method>
<method name="get_data" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the image's raw data.
@@ -225,7 +240,7 @@
<return type="int" enum="Image.Format">
</return>
<description>
- Returns the image's format. See [code]FORMAT_*[/code] constants.
+ Returns the image's format. See [enum Format] constants.
</description>
</method>
<method name="get_height" qualifiers="const">
@@ -252,7 +267,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
- Returns the color of the pixel at [code](x, y)[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixelv], but two integer arguments instead of a Vector2 argument.
+ Returns the color of the pixel at [code](x, y)[/code]. This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2] argument.
</description>
</method>
<method name="get_pixelv" qualifiers="const">
@@ -261,7 +276,7 @@
<argument index="0" name="src" type="Vector2">
</argument>
<description>
- Returns the color of the pixel at [code]src[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixel], but with a Vector2 argument instead of two integer arguments.
+ Returns the color of the pixel at [code]src[/code]. This is the same as [method get_pixel], but with a [Vector2] argument instead of two integer arguments.
</description>
</method>
<method name="get_rect" qualifiers="const">
@@ -284,7 +299,7 @@
<return type="Rect2">
</return>
<description>
- Returns a [Rect2] enclosing the visible portion of the image.
+ Returns a [Rect2] 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">
@@ -328,13 +343,13 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Loads an image from file [code]path[/code].
+ Loads an image from file [code]path[/code]. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
</description>
</method>
<method name="load_jpg_from_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Loads an image from the binary contents of a JPEG file.
@@ -343,7 +358,7 @@
<method name="load_png_from_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Loads an image from the binary contents of a PNG file.
@@ -352,19 +367,12 @@
<method name="load_webp_from_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Loads an image from the binary contents of a WebP file.
</description>
</method>
- <method name="lock">
- <return type="void">
- </return>
- <description>
- Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel.
- </description>
- </method>
<method name="normalmap_to_xy">
<return type="void">
</return>
@@ -405,6 +413,7 @@
<return type="Image">
</return>
<description>
+ Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image.
</description>
</method>
<method name="save_exr" qualifiers="const">
@@ -437,14 +446,11 @@
<argument index="2" name="color" type="Color">
</argument>
<description>
- Sets the [Color] of the pixel at [code](x, y)[/code] if the image is locked. Example:
+ Sets the [Color] of the pixel at [code](x, y)[/code]. Example:
[codeblock]
var img = Image.new()
img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
- img.lock()
- img.set_pixel(x, y, color) # Works
- img.unlock()
- img.set_pixel(x, y, color) # Does not have an effect
+ img.set_pixel(x, y, color)
[/codeblock]
</description>
</method>
@@ -456,14 +462,11 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
- Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code] if the image is locked. Note that the [code]dst[/code] values must be integers. Example:
+ Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code]. Note that the [code]dst[/code] values must be integers. Example:
[codeblock]
var img = Image.new()
img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
- img.lock()
- img.set_pixelv(Vector2(x, y), color) # Works
- img.unlock()
- img.set_pixelv(Vector2(x, y), color) # Does not have an effect
+ img.set_pixelv(Vector2(x, y), color)
[/codeblock]
</description>
</method>
@@ -481,29 +484,24 @@
Converts the raw data from the sRGB colorspace to a linear scale.
</description>
</method>
- <method name="unlock">
- <return type="void">
- </return>
- <description>
- Unlocks the data and prevents changes.
- </description>
- </method>
</methods>
<members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PoolByteArray( ),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
- Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants.
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PackedByteArray( ),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
+ Holds all of the image's color data in a given format. See [enum Format] constants.
</member>
</members>
<constants>
- <constant name="MAX_WIDTH" value="16384">
+ <constant name="MAX_WIDTH" value="16777216">
The maximal width allowed for [Image] resources.
</constant>
- <constant name="MAX_HEIGHT" value="16384">
+ <constant name="MAX_HEIGHT" value="16777216">
The maximal height allowed for [Image] resources.
</constant>
<constant name="FORMAT_L8" value="0" enum="Format">
+ Texture format with a single 8-bit depth representing luminance.
</constant>
<constant name="FORMAT_LA8" value="1" enum="Format">
+ OpenGL texture format with two values, luminance and alpha each stored with 8 bits.
</constant>
<constant name="FORMAT_R8" value="2" enum="Format">
OpenGL texture format [code]RED[/code] with a single component and a bitdepth of 8.
@@ -522,8 +520,7 @@
<constant name="FORMAT_RGBA4444" value="6" enum="Format">
OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 4.
</constant>
- <constant name="FORMAT_RGBA5551" value="7" enum="Format">
- OpenGL texture format [code]GL_RGB5_A1[/code] where 5 bits of depth for each component of RGB and one bit for alpha.
+ <constant name="FORMAT_RGB565" value="7" enum="Format">
</constant>
<constant name="FORMAT_RF" value="8" enum="Format">
OpenGL texture format [code]GL_R32F[/code] where there's one component, a 32-bit floating-point value.
@@ -620,7 +617,11 @@
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8_PUNCHTHROUGH_ALPHA1[/code] variant), which compresses RGBA data to make alpha either fully transparent or fully opaque.
[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
- <constant name="FORMAT_MAX" value="37" enum="Format">
+ <constant name="FORMAT_ETC2_RA_AS_RG" value="37" enum="Format">
+ </constant>
+ <constant name="FORMAT_DXT5_RA_AS_RG" value="38" enum="Format">
+ </constant>
+ <constant name="FORMAT_MAX" value="39" enum="Format">
Represents the size of the [enum Format] enum.
</constant>
<constant name="INTERPOLATE_NEAREST" value="0" enum="Interpolation">
@@ -643,26 +644,49 @@
Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images.
</constant>
<constant name="ALPHA_NONE" value="0" enum="AlphaMode">
+ Image does not have alpha.
</constant>
<constant name="ALPHA_BIT" value="1" enum="AlphaMode">
+ Image stores alpha in a single bit.
</constant>
<constant name="ALPHA_BLEND" value="2" enum="AlphaMode">
+ Image uses alpha.
</constant>
<constant name="COMPRESS_S3TC" value="0" enum="CompressMode">
+ Use S3TC compression.
</constant>
<constant name="COMPRESS_PVRTC2" value="1" enum="CompressMode">
+ Use PVRTC2 compression.
</constant>
<constant name="COMPRESS_PVRTC4" value="2" enum="CompressMode">
+ Use PVRTC4 compression.
</constant>
<constant name="COMPRESS_ETC" value="3" enum="CompressMode">
+ Use ETC compression.
</constant>
<constant name="COMPRESS_ETC2" value="4" enum="CompressMode">
+ Use ETC2 compression.
+ </constant>
+ <constant name="USED_CHANNELS_L" value="0" enum="UsedChannels">
+ </constant>
+ <constant name="USED_CHANNELS_LA" value="1" enum="UsedChannels">
+ </constant>
+ <constant name="USED_CHANNELS_R" value="2" enum="UsedChannels">
+ </constant>
+ <constant name="USED_CHANNELS_RG" value="3" enum="UsedChannels">
+ </constant>
+ <constant name="USED_CHANNELS_RGB" value="4" enum="UsedChannels">
+ </constant>
+ <constant name="USED_CHANNELS_RGBA" value="5" enum="UsedChannels">
</constant>
<constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource">
+ Source texture (before compression) is a regular texture. Default for all textures.
</constant>
<constant name="COMPRESS_SOURCE_SRGB" value="1" enum="CompressSource">
+ Source texture (before compression) is in sRGB space.
</constant>
<constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource">
+ Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels).
</constant>
</constants>
</class>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index 03bf739760..d122d74e85 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -1,39 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImageTexture" inherits="Texture" category="Core" version="3.2">
+<class name="ImageTexture" inherits="Texture2D" version="4.0">
<brief_description>
- A [Texture] based on an [Image].
+ A [Texture2D] based on an [Image].
</brief_description>
<description>
- A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image].
+ A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image].
+ [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="create">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="format" type="int" enum="Image.Format">
- </argument>
- <argument index="3" name="flags" type="int" default="7">
- </argument>
- <description>
- Create a new [ImageTexture] with [code]width[/code] and [code]height[/code].
- [code]format[/code] is a value from [enum Image.Format], [code]flags[/code] is any combination of [enum Texture.Flags].
- </description>
- </method>
<method name="create_from_image">
<return type="void">
</return>
<argument index="0" name="image" type="Image">
</argument>
- <argument index="1" name="flags" type="int" default="7">
- </argument>
<description>
- Create a new [ImageTexture] from an [Image] with [code]flags[/code] from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format].
+ Create a new [ImageTexture] from an [Image].
</description>
</method>
<method name="get_format" qualifiers="const">
@@ -43,52 +26,27 @@
Returns the format of the [ImageTexture], one of [enum Image.Format].
</description>
</method>
- <method name="load">
- <return type="int" enum="Error">
+ <method name="set_size_override">
+ <return type="void">
</return>
- <argument index="0" name="path" type="String">
+ <argument index="0" name="size" type="Vector2">
</argument>
<description>
- Load an [ImageTexture] from a file path.
+ Resizes the [ImageTexture] to the specified dimensions.
</description>
</method>
- <method name="set_data">
+ <method name="update">
<return type="void">
</return>
<argument index="0" name="image" type="Image">
</argument>
- <description>
- Sets the [Image] of this [ImageTexture].
- </description>
- </method>
- <method name="set_size_override">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
+ <argument index="1" name="immediate" type="bool" default="false">
</argument>
<description>
- Resizes the [ImageTexture] to the specified dimensions.
+ Replaces the texture's data with a new [code]image[/code]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call.
</description>
</method>
</methods>
- <members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" />
- <member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7">
- The storage quality for [constant STORAGE_COMPRESS_LOSSY].
- </member>
- <member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage" default="0">
- The storage type (raw, lossy, or compressed).
- </member>
- </members>
<constants>
- <constant name="STORAGE_RAW" value="0" enum="Storage">
- [Image] data is stored raw and unaltered.
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage">
- [Image] data is compressed with a lossy algorithm. You can set the storage quality with [member lossy_quality].
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage">
- [Image] data is compressed with a lossless algorithm.
- </constant>
</constants>
</class>
diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml
new file mode 100644
index 0000000000..d06b44afa9
--- /dev/null
+++ b/doc/classes/ImageTextureLayered.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ImageTextureLayered" inherits="TextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="create_from_images">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="images" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="update_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Image">
+ </argument>
+ <argument index="1" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry3D.xml
index ddfd3d74d5..d2d663847f 100644
--- a/doc/classes/ImmediateGeometry.xml
+++ b/doc/classes/ImmediateGeometry3D.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.2">
+<class name="ImmediateGeometry3D" inherits="GeometryInstance3D" version="4.0">
<brief_description>
Draws simple geometry from code.
</brief_description>
<description>
Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
+ See also [ArrayMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
+ [b]Note:[/b] ImmediateGeometry3D is best suited to small amounts of mesh data that change every frame. It will be slow when handling large amounts of mesh data. If mesh data doesn't change often, use [ArrayMesh], [MeshDataTool] or [SurfaceTool] instead.
+ [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
</tutorials>
@@ -30,7 +33,7 @@
<argument index="0" name="position" type="Vector3">
</argument>
<description>
- Adds a vertex with the currently set color/uv/etc.
+ Adds a vertex in local coordinate space with the currently set color/uv/etc.
</description>
</method>
<method name="begin">
@@ -38,11 +41,11 @@
</return>
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
- <argument index="1" name="texture" type="Texture" default="null">
+ <argument index="1" name="texture" type="Texture2D" default="null">
</argument>
<description>
- Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references.
- For the type of primitive, use the [Mesh].[code]PRIMITIVE_*[/code] enumerations.
+ Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references.
+ For the type of primitive, see the [enum Mesh.PrimitiveType] enum.
</description>
</method>
<method name="clear">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 6d4adfad51..fc3c3776ce 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Input" inherits="Object" category="Core" version="3.2">
+<class name="Input" inherits="Object" version="4.0">
<brief_description>
- A Singleton that deals with inputs.
+ A singleton that deals with inputs.
</brief_description>
<description>
- A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project &gt; Project Settings[/b], or with the [InputMap] class.
+ A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project &gt; Project Settings[/b], or with the [InputMap] class.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link>
@@ -13,7 +13,7 @@
<method name="action_press">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="strength" type="float" default="1.0">
</argument>
@@ -26,7 +26,7 @@
<method name="action_release">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
If the specified action is already pressed, this will release it.
@@ -54,7 +54,7 @@
<method name="get_action_strength" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1.
@@ -96,7 +96,7 @@
<argument index="1" name="axis" type="int">
</argument>
<description>
- Returns the current value of the joypad axis at given index (see [enum JoystickList]).
+ Returns the current value of the joypad axis at given index (see [enum JoyAxisList]).
</description>
</method>
<method name="get_joy_axis_index_from_string">
@@ -114,7 +114,7 @@
<argument index="0" name="axis_index" type="int">
</argument>
<description>
- Receives a [enum JoystickList] axis and returns its equivalent name as a string.
+ Receives a [enum JoyAxisList] axis and returns its equivalent name as a string.
</description>
</method>
<method name="get_joy_button_index_from_string">
@@ -132,7 +132,7 @@
<argument index="0" name="button_index" type="int">
</argument>
<description>
- Receives a gamepad button from [enum JoystickList] and returns its equivalent name as a string.
+ Receives a gamepad button from [enum JoyButtonList] and returns its equivalent name as a string.
</description>
</method>
<method name="get_joy_guid" qualifiers="const">
@@ -202,7 +202,7 @@
<method name="is_action_just_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button.
@@ -212,7 +212,7 @@
<method name="is_action_just_released" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button.
@@ -221,7 +221,7 @@
<method name="is_action_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed.
@@ -235,7 +235,7 @@
<argument index="1" name="button" type="int">
</argument>
<description>
- Returns [code]true[/code] if you are pressing the joypad button (see [enum JoystickList]).
+ Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButtonList]).
</description>
</method>
<method name="is_joy_known">
@@ -244,16 +244,16 @@
<argument index="0" name="device" type="int">
</argument>
<description>
- Returns [code]true[/code] if the system knows the specified device. This means that it sets all button and axis indices exactly as defined in [enum JoystickList]. Unknown joypads are not expected to match these constants, but you can still retrieve events from them.
+ 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">
</return>
- <argument index="0" name="scancode" type="int">
+ <argument index="0" name="keycode" type="int">
</argument>
<description>
- Returns [code]true[/code] if you are pressing the key. You can pass a [enum KeyList] constant.
+ Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant.
</description>
</method>
<method name="is_mouse_button_pressed" qualifiers="const">
@@ -277,6 +277,8 @@
<argument index="3" name="guid" type="String">
</argument>
<description>
+ Notifies the [Input] singleton that a connection has changed, to update the state for the [code]device[/code] index.
+ This is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally.
</description>
</method>
<method name="parse_input_event">
@@ -314,7 +316,7 @@
<argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
- Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See enum [code]CURSOR_*[/code] for the list of shapes.
+ 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.
[b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed.
@@ -347,7 +349,8 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Whether to accumulate similar input events sent by the operating system. Enabled by default.
+ 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">
diff --git a/doc/classes/InputDefault.xml b/doc/classes/InputDefault.xml
deleted file mode 100644
index e96b885d10..0000000000
--- a/doc/classes/InputDefault.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputDefault" inherits="Input" category="Core" version="3.2">
- <brief_description>
- Default implementation of the [Input] class.
- </brief_description>
- <description>
- Default implementation of the [Input] class, used internally by the editor and games for default input management.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index d412ce09e2..413e217b45 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEvent" inherits="Resource" category="Core" version="3.2">
+<class name="InputEvent" inherits="Resource" version="4.0">
<brief_description>
- Generic input event
+ Generic input event.
</brief_description>
<description>
Base class of all sort of input event. See [method Node._input].
@@ -31,7 +31,7 @@
<method name="get_action_strength" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion].
@@ -40,7 +40,7 @@
<method name="is_action" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if this input event matches a pre-defined action of any type.
@@ -49,7 +49,7 @@
<method name="is_action_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="allow_echo" type="bool" default="false">
</argument>
@@ -60,7 +60,7 @@
<method name="is_action_released" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
@@ -111,6 +111,7 @@
<members>
<member name="device" type="int" setter="set_device" getter="get_device" default="0">
The event's device ID.
+ [b]Note:[/b] This device ID will always be [code]-1[/code] for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index 46c47e357f..1c38ff8e8f 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventAction" inherits="InputEvent" category="Core" version="3.2">
+<class name="InputEventAction" inherits="InputEvent" version="4.0">
<brief_description>
Input event type for actions.
</brief_description>
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="action" type="String" setter="set_action" getter="get_action" default="&quot;&quot;">
+ <member name="action" type="StringName" setter="set_action" getter="get_action" default="@&quot;&quot;">
The action's name. Actions are accessed via this [String].
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
diff --git a/doc/classes/PlaneShape.xml b/doc/classes/InputEventFromWindow.xml
index b94bb8e613..7cd5b7d179 100644
--- a/doc/classes/PlaneShape.xml
+++ b/doc/classes/InputEventFromWindow.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PlaneShape" inherits="Shape" category="Core" version="3.2">
+<class name="InputEventFromWindow" inherits="InputEvent" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )">
+ <member name="window_id" type="int" setter="set_window_id" getter="get_window_id" default="0">
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml
index 59750a0902..861ec026cd 100644
--- a/doc/classes/InputEventGesture.xml
+++ b/doc/classes/InputEventGesture.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventGesture" inherits="InputEventWithModifiers" category="Core" version="3.2">
+<class name="InputEventGesture" inherits="InputEventWithModifiers" version="4.0">
<brief_description>
+ Base class for touch control gestures.
</brief_description>
<description>
</description>
@@ -10,6 +11,7 @@
</methods>
<members>
<member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )">
+ The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] that received this gesture.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index dcdda83681..7876bace75 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.2">
+<class name="InputEventJoypadButton" inherits="InputEvent" version="4.0">
<brief_description>
Input event for gamepad buttons.
</brief_description>
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0">
- Button identifier. One of the [enum JoystickList] button constants.
+ Button identifier. One of the [enum JoyButtonList] button constants.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released.
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index eb05cd2f99..bfd961ce1f 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.2">
+<class name="InputEventJoypadMotion" inherits="InputEvent" version="4.0">
<brief_description>
Input event type for gamepad joysticks and other motions. For buttons, see [code]InputEventJoypadButton[/code].
</brief_description>
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="axis" type="int" setter="set_axis" getter="get_axis" default="0">
- Axis identifier. Use one of the [enum JoystickList] axis constants.
+ Axis identifier. Use one of the [enum JoyAxisList] axis constants.
</member>
<member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" default="0.0">
Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position.
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index cf9faaa26d..767e67c615 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.2">
+<class name="InputEventKey" inherits="InputEventWithModifiers" version="4.0">
<brief_description>
Input event type for keyboard events.
</brief_description>
@@ -10,11 +10,20 @@
<link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
<methods>
- <method name="get_scancode_with_modifiers" qualifiers="const">
+ <method name="get_keycode_with_modifiers" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the scancode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers].
+ Returns the keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers].
+ To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
+ </description>
+ </method>
+ <method name="get_physical_keycode_with_modifiers" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers].
+ To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_physical_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
</description>
</method>
</methods>
@@ -22,14 +31,19 @@
<member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false">
If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down.
</member>
+ <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0">
+ The key keycode, which corresponds to one of the [enum KeyList] constants. Represent key in the current keyboard layout.
+ To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
+ </member>
+ <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0">
+ Key physical keycode, which corresponds to one of the [enum KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.
+ To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
+ </member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
</member>
- <member name="scancode" type="int" setter="set_scancode" getter="get_scancode" default="0">
- Key scancode, one of the [enum KeyList] constants.
- </member>
<member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0">
- Key Unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information.
+ The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method Window.set_ime_active] for more information.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml
index fe77e46c6c..13bb9d8b85 100644
--- a/doc/classes/InputEventMIDI.xml
+++ b/doc/classes/InputEventMIDI.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMIDI" inherits="InputEvent" category="Core" version="3.2">
+<class name="InputEventMIDI" inherits="InputEvent" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml
index f5add435f5..3e539b2f97 100644
--- a/doc/classes/InputEventMagnifyGesture.xml
+++ b/doc/classes/InputEventMagnifyGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMagnifyGesture" inherits="InputEventGesture" category="Core" version="3.2">
+<class name="InputEventMagnifyGesture" inherits="InputEventGesture" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index 56ba33702b..e3c9d688d2 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core" version="3.2">
+<class name="InputEventMouse" inherits="InputEventWithModifiers" version="4.0">
<brief_description>
Base input event type for mouse events.
</brief_description>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index 4cf7174ab1..b83588a877 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core" version="3.2">
+<class name="InputEventMouseButton" inherits="InputEventMouse" version="4.0">
<brief_description>
Input event type for mouse button events.
</brief_description>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 5cd6a0c285..97b9d5247a 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core" version="3.2">
+<class name="InputEventMouseMotion" inherits="InputEventMouse" version="4.0">
<brief_description>
Input event type for mouse motion events.
</brief_description>
@@ -16,7 +16,8 @@
Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code].
</member>
<member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )">
- The mouse position relative to the previous position (position at the last frame).
+ The mouse position relative to the previous position (position at the last frame).
+ [b]Note:[/b] Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of [code]Vector2(0, 0)[/code] when the user stops moving the mouse.
</member>
<member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )">
The mouse speed in pixels per second.
diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml
index dab2c74543..83161cd163 100644
--- a/doc/classes/InputEventPanGesture.xml
+++ b/doc/classes/InputEventPanGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventPanGesture" inherits="InputEventGesture" category="Core" version="3.2">
+<class name="InputEventPanGesture" inherits="InputEventGesture" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index be2eafbe7c..a315e4ddfb 100644
--- a/doc/classes/InputEventScreenDrag.xml
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.2">
+<class name="InputEventScreenDrag" inherits="InputEventFromWindow" version="4.0">
<brief_description>
Input event type for screen drag events. Only available on mobile devices.
</brief_description>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index 6239fbc949..16a3cf8353 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.2">
+<class name="InputEventScreenTouch" inherits="InputEventFromWindow" version="4.0">
<brief_description>
Input event type for screen touch events.
(only available on mobile devices)
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index 9b31dd4639..cc7de2ca32 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.2">
+<class name="InputEventWithModifiers" inherits="InputEventFromWindow" version="4.0">
<brief_description>
Base class for keys events with modifiers.
</brief_description>
<description>
- Contains keys events information with modifiers support like [code]Shift[/code] or [code]Alt[/code]. See [method Node._input].
+ Contains keys events information with modifiers support like [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See [method Node._input].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
@@ -13,19 +13,19 @@
</methods>
<members>
<member name="alt" type="bool" setter="set_alt" getter="get_alt" default="false">
- State of the [code]Alt[/code] modifier.
+ State of the [kbd]Alt[/kbd] modifier.
</member>
<member name="command" type="bool" setter="set_command" getter="get_command" default="false">
- State of the [code]Command[/code] modifier.
+ State of the [kbd]Cmd[/kbd] modifier.
</member>
<member name="control" type="bool" setter="set_control" getter="get_control" default="false">
- State of the [code]Ctrl[/code] modifier.
+ State of the [kbd]Ctrl[/kbd] modifier.
</member>
<member name="meta" type="bool" setter="set_metakey" getter="get_metakey" default="false">
- State of the [code]Meta[/code] modifier.
+ State of the [kbd]Meta[/kbd] modifier.
</member>
<member name="shift" type="bool" setter="set_shift" getter="get_shift" default="false">
- State of the [code]Shift[/code] modifier.
+ State of the [kbd]Shift[/kbd] modifier.
</member>
</members>
<constants>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 6bbb402b15..da93d7fb53 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputMap" inherits="Object" category="Core" version="3.2">
+<class name="InputMap" inherits="Object" version="4.0">
<brief_description>
Singleton that manages [InputEventAction].
</brief_description>
@@ -13,7 +13,7 @@
<method name="action_add_event">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
@@ -24,7 +24,7 @@
<method name="action_erase_event">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
@@ -35,7 +35,7 @@
<method name="action_erase_events">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Removes all events from an action.
@@ -44,7 +44,7 @@
<method name="action_has_event">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
@@ -55,17 +55,18 @@
<method name="action_set_deadzone">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="deadzone" type="float">
</argument>
<description>
+ Sets a deadzone value for the action.
</description>
</method>
<method name="add_action">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="deadzone" type="float" default="0.5">
</argument>
@@ -77,7 +78,7 @@
<method name="erase_action">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Removes an action from the [InputMap].
@@ -88,7 +89,7 @@
</return>
<argument index="0" name="event" type="InputEvent">
</argument>
- <argument index="1" name="action" type="String">
+ <argument index="1" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
@@ -97,7 +98,7 @@
<method name="get_action_list">
<return type="Array">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns an array of [InputEvent]s associated with a given action.
@@ -113,7 +114,7 @@
<method name="has_action" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index 4b98166ef2..39827f6604 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InstancePlaceholder" inherits="Node" category="Core" version="3.2">
+<class name="InstancePlaceholder" inherits="Node" version="4.0">
<brief_description>
Placeholder for the root [Node] of a [PackedScene].
</brief_description>
<description>
- Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an InstancePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling [method replace_by_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
- The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
+ Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
+ The [InstancePlaceholder] does not have a transform. This causes any child nodes to be positioned relatively to the [Viewport] from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
</description>
<tutorials>
</tutorials>
@@ -24,7 +24,7 @@
<return type="String">
</return>
<description>
- Gets the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance].
+ Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance].
</description>
</method>
<method name="get_stored_values">
@@ -35,15 +35,6 @@
<description>
</description>
</method>
- <method name="replace_by_instance">
- <return type="void">
- </return>
- <argument index="0" name="custom_scene" type="PackedScene" default="null">
- </argument>
- <description>
- Replaces this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided.
- </description>
- </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml
deleted file mode 100644
index ca3a5d0733..0000000000
--- a/doc/classes/InterpolatedCamera.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.2">
- <brief_description>
- Camera which moves toward another node.
- </brief_description>
- <description>
- InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
- If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="set_target">
- <return type="void">
- </return>
- <argument index="0" name="target" type="Object">
- </argument>
- <description>
- Sets the node to move toward and orient with.
- </description>
- </method>
- </methods>
- <members>
- <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled" default="false">
- If [code]true[/code], and a target is set, the camera will move automatically.
- </member>
- <member name="speed" type="float" setter="set_speed" getter="get_speed" default="1.0">
- How quickly the camera moves toward its target. Higher values will result in tighter camera motion.
- </member>
- <member name="target" type="NodePath" setter="set_target_path" getter="get_target_path" default="NodePath(&quot;&quot;)">
- The target's [NodePath].
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index c82d6a27c0..25420bd77b 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ItemList" inherits="Control" category="Core" version="3.2">
+<class name="ItemList" inherits="Control" version="4.0">
<brief_description>
Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
</brief_description>
<description>
This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list.
- 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 Enter.
+ 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.
</description>
<tutorials>
</tutorials>
@@ -13,7 +14,7 @@
<method name="add_icon_item">
<return type="void">
</return>
- <argument index="0" name="icon" type="Texture">
+ <argument index="0" name="icon" type="Texture2D">
</argument>
<argument index="1" name="selectable" type="bool" default="true">
</argument>
@@ -26,7 +27,7 @@
</return>
<argument index="0" name="text" type="String">
</argument>
- <argument index="1" name="icon" type="Texture" default="null">
+ <argument index="1" name="icon" type="Texture2D" default="null">
</argument>
<argument index="2" name="selectable" type="bool" default="true">
</argument>
@@ -57,7 +58,8 @@
<argument index="1" name="exact" type="bool" default="false">
</argument>
<description>
- Given a position within the control return the item (if any) at that point.
+ 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.
</description>
</method>
<method name="get_item_count" qualifiers="const">
@@ -86,7 +88,7 @@
</description>
</method>
<method name="get_item_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -109,6 +111,7 @@
<argument index="0" name="idx" type="int">
</argument>
<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_metadata" qualifiers="const">
@@ -139,7 +142,7 @@
</description>
</method>
<method name="get_selected_items">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns an array with the indexes of the selected items.
@@ -174,6 +177,7 @@
<argument index="0" name="idx" type="int">
</argument>
<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">
@@ -274,7 +278,7 @@
</argument>
<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 Enter).
+ Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing [kbd]Enter[/kbd]).
</description>
</method>
<method name="set_item_icon">
@@ -282,10 +286,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="icon" type="Texture">
+ <argument index="1" name="icon" type="Texture2D">
</argument>
<description>
- Sets (or replaces) the icon's [Texture] associated with the specified index.
+ Sets (or replaces) the icon's [Texture2D] associated with the specified index.
</description>
</method>
<method name="set_item_icon_modulate">
@@ -307,6 +311,7 @@
<argument index="1" name="rect" type="Rect2">
</argument>
<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">
@@ -314,9 +319,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="rect" type="bool">
+ <argument index="1" name="transposed" type="bool">
</argument>
<description>
+ Sets whether the item icon will be drawn transposed.
</description>
</method>
<method name="set_item_metadata">
@@ -409,26 +415,33 @@
If [code]true[/code], the control will automatically resize the height to fit its content.
</member>
<member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width" default="0">
- Sets the default column width in pixels. If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width.
+ The width all columns will be adjusted to.
+ A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width.
</member>
<member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2( 0, 0 )">
- Sets the default icon size in pixels.
+ The size all icons will be adjusted to.
+ If either X or Y component is not greater than zero, icon size won't be affected.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
<member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode" default="1">
- Sets the default position of the icon to either [constant ICON_MODE_LEFT] or [constant ICON_MODE_TOP].
+ The icon position, whether above or to the left of the text. See the [enum IconMode] constants.
</member>
<member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale" default="1.0">
- Sets the icon size to its initial size multiplied by the specified scale.
+ The scale of icon applied after [member fixed_icon_size] and transposing takes effect.
</member>
<member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns" default="1">
- Sets the maximum columns the list will have. If set to anything other than the default, the content will be split among the specified columns.
+ Maximum columns the list will have.
+ If greater than zero, the content will be split among the specified columns.
+ A value of zero means unlimited columns, i.e. all items will be put in the same row.
</member>
<member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines" default="1">
+ Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.
+ [b]Note:[/b] This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero.
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width" default="false">
- If set to [code]true[/code], all columns will have the same width specified by [member fixed_column_width].
+ Whether all columns will have the same width.
+ If [code]true[/code], the width is equal to the largest column width of all columns.
</member>
<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.
@@ -439,7 +452,7 @@
<argument index="0" name="index" type="int">
</argument>
<description>
- Triggered when specified list item is activated via double-clicking or by pressing Enter.
+ Triggered when specified list item is activated via double-clicking or by pressing [kbd]Enter[/kbd].
</description>
</signal>
<signal name="item_rmb_selected">
@@ -486,44 +499,60 @@
</signals>
<constants>
<constant name="ICON_MODE_TOP" value="0" enum="IconMode">
+ Icon is drawn above the text.
</constant>
<constant name="ICON_MODE_LEFT" value="1" enum="IconMode">
+ Icon is drawn to the left of the text.
</constant>
<constant name="SELECT_SINGLE" value="0" enum="SelectMode">
Only allow selecting a single item.
</constant>
<constant name="SELECT_MULTI" value="1" enum="SelectMode">
- Allows selecting multiple items by holding Ctrl or Shift.
+ Allows selecting multiple items by holding [kbd]Ctrl[/kbd] or [kbd]Shift[/kbd].
</constant>
</constants>
<theme_items>
<theme_item name="bg" type="StyleBox">
+ Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused.
</theme_item>
<theme_item name="bg_focus" type="StyleBox">
+ [StyleBox] used when the [ItemList] is being focused.
</theme_item>
<theme_item name="cursor" type="StyleBox">
+ [StyleBox] used for the cursor, when the [ItemList] is being focused.
</theme_item>
<theme_item name="cursor_unfocused" type="StyleBox">
+ [StyleBox] used for the cursor, when the [ItemList] is not being focused.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the item's text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )">
+ Default text [Color] of the item.
</theme_item>
<theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the item is selected.
</theme_item>
<theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
+ [Color] of the guideline. The guideline is a line drawn between each row of items.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ The horizontal spacing between items.
</theme_item>
<theme_item name="icon_margin" type="int" default="4">
+ The spacing between item's icon and text.
</theme_item>
<theme_item name="line_separation" type="int" default="2">
+ The vertical spacing between each line of text.
</theme_item>
<theme_item name="selected" type="StyleBox">
+ [StyleBox] for the selected items, used when the [ItemList] is not being focused.
</theme_item>
<theme_item name="selected_focus" type="StyleBox">
+ [StyleBox] for the selected items, used when the [ItemList] is being focused.
</theme_item>
<theme_item name="vseparation" type="int" default="2">
+ The vertical spacing between items.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ResourceFormatSaverCrypto.xml b/doc/classes/JNISingleton.xml
index 2f7d224dab..84ab1a49c1 100644
--- a/doc/classes/ResourceFormatSaverCrypto.xml
+++ b/doc/classes/JNISingleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaverCrypto" inherits="ResourceFormatSaver" category="Core" version="3.2">
+<class name="JNISingleton" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index e834f5cb39..7bd2edcb1c 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSON" inherits="Object" category="Core" version="3.2">
+<class name="JSON" inherits="Object" version="4.0">
<brief_description>
Helper class for parsing JSON data.
</brief_description>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index 98db123f5b..4444e08593 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParseResult" inherits="Reference" category="Core" version="3.2">
+<class name="JSONParseResult" inherits="Reference" version="4.0">
<brief_description>
Data class wrapper for decoded JSON.
</brief_description>
@@ -12,13 +12,13 @@
</methods>
<members>
<member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
- The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants.
+ The error type if the JSON source was not successfully parsed. See the [enum Error] constants.
</member>
<member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1">
The line number where the error occurred if JSON source was not successfully parsed.
</member>
<member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default="&quot;&quot;">
- The error message if JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants.
+ The error message if JSON source was not successfully parsed. See the [enum Error] constants.
</member>
<member name="result" type="Variant" setter="set_result" getter="get_result">
A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with braces ([code][][/code]), an [Array] will be returned.
diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml
index 10d9e5943e..1e74159f58 100644
--- a/doc/classes/JSONRPC.xml
+++ b/doc/classes/JSONRPC.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONRPC" inherits="Object" category="Core" version="3.2">
+<class name="JSONRPC" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ResourceFormatLoaderCrypto.xml b/doc/classes/JavaClass.xml
index 8bc7d50c75..69b7a9b718 100644
--- a/doc/classes/ResourceFormatLoaderCrypto.xml
+++ b/doc/classes/JavaClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderCrypto" inherits="ResourceFormatLoader" category="Core" version="3.2">
+<class name="JavaClass" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml
new file mode 100644
index 0000000000..7bad336af9
--- /dev/null
+++ b/doc/classes/JavaClassWrapper.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JavaClassWrapper" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="wrap">
+ <return type="JavaClass">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index 7737001a6c..68f6c32a53 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaScript" inherits="Object" category="Core" version="3.2">
+<class name="JavaScript" inherits="Object" version="4.0">
<brief_description>
Singleton that connects the engine with the browser's JavaScript context in HTML5 export.
</brief_description>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index 63d083d470..fb0e184c26 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Joint2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Joint2D" inherits="Node2D" version="4.0">
<brief_description>
Base node for all joint constraints in 2D physics.
</brief_description>
diff --git a/doc/classes/Joint.xml b/doc/classes/Joint3D.xml
index fe50cdac10..15bef960f6 100644
--- a/doc/classes/Joint.xml
+++ b/doc/classes/Joint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Joint" inherits="Spatial" category="Core" version="3.2">
+<class name="Joint3D" inherits="Node3D" version="4.0">
<brief_description>
Base class for all 3D joints.
</brief_description>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index 99a83765eb..6b2bbeb895 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core" version="3.2">
+<class name="KinematicBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
Kinematic body 2D node.
</brief_description>
@@ -13,11 +13,18 @@
<link>https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link>
</tutorials>
<methods>
+ <method name="get_floor_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
<method name="get_floor_velocity" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the velocity of the floor. Only updates when calling [method move_and_slide].
+ Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
</description>
</method>
<method name="get_slide_collision">
@@ -84,7 +91,7 @@
</return>
<argument index="0" name="linear_velocity" type="Vector2">
</argument>
- <argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="up_direction" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<argument index="2" name="stop_on_slope" type="bool" default="false">
</argument>
@@ -96,8 +103,9 @@
</argument>
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
- [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
- [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
+ [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
@@ -112,7 +120,7 @@
</argument>
<argument index="1" name="snap" type="Vector2">
</argument>
- <argument index="2" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="up_direction" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<argument index="3" name="stop_on_slope" type="bool" default="false">
</argument>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody3D.xml
index 2fab689f89..5477c6bab6 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody" inherits="PhysicsBody" category="Core" version="3.2">
+<class name="KinematicBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
Kinematic body 3D node.
</brief_description>
<description>
Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses:
[b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- [b]Kinematic characters:[/b] KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
@@ -15,25 +15,33 @@
<method name="get_axis_lock" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis">
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
</argument>
<description>
+ Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z].
+ </description>
+ </method>
+ <method name="get_floor_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
</description>
</method>
<method name="get_floor_velocity" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Returns the velocity of the floor. Only updates when calling [method move_and_slide].
+ Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
</description>
</method>
<method name="get_slide_collision">
- <return type="KinematicCollision">
+ <return type="KinematicCollision3D">
</return>
<argument index="0" name="slide_idx" type="int">
</argument>
<description>
- Returns a [KinematicCollision], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
</description>
</method>
<method name="get_slide_count" qualifiers="const">
@@ -65,7 +73,7 @@
</description>
</method>
<method name="move_and_collide">
- <return type="KinematicCollision">
+ <return type="KinematicCollision3D">
</return>
<argument index="0" name="rel_vec" type="Vector3">
</argument>
@@ -76,7 +84,7 @@
<argument index="3" name="test_only" type="bool" default="false">
</argument>
<description>
- Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision.
+ Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
</description>
</method>
@@ -85,7 +93,7 @@
</return>
<argument index="0" name="linear_velocity" type="Vector3">
</argument>
- <argument index="1" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="1" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )">
</argument>
<argument index="2" name="stop_on_slope" type="bool" default="false">
</argument>
@@ -96,13 +104,14 @@
<argument index="5" name="infinite_inertia" type="bool" default="true">
</argument>
<description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
- [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
- [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
- If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code].
+ Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
+ [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
+ If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
- If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody] nodes like with [StaticBody].
+ If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody3D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D].
Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
</description>
</method>
@@ -113,7 +122,7 @@
</argument>
<argument index="1" name="snap" type="Vector3">
</argument>
- <argument index="2" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )">
</argument>
<argument index="3" name="stop_on_slope" type="bool" default="false">
</argument>
@@ -125,17 +134,18 @@
</argument>
<description>
Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
- As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting[code]snap[/code] to[code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
+ As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
</description>
</method>
<method name="set_axis_lock">
<return type="void">
</return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis">
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
</argument>
<argument index="1" name="lock" type="bool">
</argument>
<description>
+ Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z].
</description>
</method>
<method name="test_move">
@@ -153,18 +163,18 @@
</method>
</methods>
<members>
- <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
- If the body is at least this close to another body, this body will consider them to be colliding.
- </member>
- <member name="move_lock_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ <member name="axis_lock_motion_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
Lock the body's X axis movement.
</member>
- <member name="move_lock_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ <member name="axis_lock_motion_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
Lock the body's Y axis movement.
</member>
- <member name="move_lock_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ <member name="axis_lock_motion_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
Lock the body's Z axis movement.
</member>
+ <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
+ If the body is at least this close to another body, this body will consider them to be colliding.
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index 51c2277fb2..ec6e16e25a 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.2">
+<class name="KinematicCollision2D" inherits="Reference" version="4.0">
<brief_description>
Collision data for [KinematicBody2D] collisions.
</brief_description>
@@ -16,7 +16,7 @@
The colliding body.
</member>
<member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
- The colliding body's unique [RID].
+ The colliding body's unique instance ID. See [method Object.get_instance_id].
</member>
<member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
The colliding body's metadata. See [Object].
@@ -37,7 +37,7 @@
The colliding body's shape's normal at the point of collision.
</member>
<member name="position" type="Vector2" setter="" getter="get_position" default="Vector2( 0, 0 )">
- The point of collision.
+ The point of collision, in global coordinates.
</member>
<member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2( 0, 0 )">
The moving object's remaining movement vector.
diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision3D.xml
index 44447c8fc8..f3248a9ca1 100644
--- a/doc/classes/KinematicCollision.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision" inherits="Reference" category="Core" version="3.2">
+<class name="KinematicCollision3D" inherits="Reference" version="4.0">
<brief_description>
- Collision data for [KinematicBody] collisions.
+ Collision data for [KinematicBody3D] collisions.
</brief_description>
<description>
- Contains collision data for [KinematicBody] collisions. When a [KinematicBody] is moved using [method KinematicBody.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned.
+ Contains collision data for [KinematicBody3D] collisions. When a [KinematicBody3D] is moved using [method KinematicBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision3D object is returned.
This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
</description>
<tutorials>
@@ -16,7 +16,7 @@
The colliding body.
</member>
<member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
- The colliding body's unique [RID].
+ The colliding body's unique instance ID. See [method Object.get_instance_id].
</member>
<member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
The colliding body's metadata. See [Object].
@@ -25,7 +25,7 @@
The colliding body's shape.
</member>
<member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0">
- The colliding shape's index. See [CollisionObject].
+ The colliding shape's index. See [CollisionObject3D].
</member>
<member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3( 0, 0, 0 )">
The colliding object's velocity.
@@ -37,7 +37,7 @@
The colliding body's shape's normal at the point of collision.
</member>
<member name="position" type="Vector3" setter="" getter="get_position" default="Vector3( 0, 0, 0 )">
- The point of collision.
+ The point of collision, in global coordinates.
</member>
<member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3( 0, 0, 0 )">
The moving object's remaining movement vector.
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 4d1584e9de..263fb6c022 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Label" inherits="Control" category="Core" version="3.2">
+<class name="Label" inherits="Control" version="4.0">
<brief_description>
Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel].
</brief_description>
@@ -41,7 +41,7 @@
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0">
- Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants.
+ Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum Align] constants.
</member>
<member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false">
If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text.
@@ -67,7 +67,7 @@
If [code]true[/code], all the text displays as UPPERCASE.
</member>
<member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign" default="0">
- Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants.
+ Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum VAlign] 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.
@@ -101,22 +101,31 @@
</constants>
<theme_items>
<theme_item name="font" type="Font">
+ [Font] used for the [Label]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Default text [Color] of the [Label].
</theme_item>
<theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )">
+ [Color] of the text's shadow effect.
</theme_item>
<theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of [Font]'s outline. See [member DynamicFont.outline_color].
</theme_item>
<theme_item name="line_spacing" type="int" default="3">
+ Vertical space between lines in multiline [Label].
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Background [StyleBox] for the [Label].
</theme_item>
<theme_item name="shadow_as_outline" type="int" default="0">
+ Boolean value. If set to 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline.
</theme_item>
<theme_item name="shadow_offset_x" type="int" default="1">
+ The horizontal offset of the text's shadow.
</theme_item>
<theme_item name="shadow_offset_y" type="int" default="1">
+ The vertical offset of the text's shadow.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml
index 4dbda34a46..a1d172e4b1 100644
--- a/doc/classes/LargeTexture.xml
+++ b/doc/classes/LargeTexture.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LargeTexture" inherits="Texture" category="Core" version="3.2">
+<class name="LargeTexture" inherits="Texture2D" version="4.0">
<brief_description>
- A [Texture] capable of storing many smaller textures with offsets.
+ A [Texture2D] capable of storing many smaller textures with offsets.
</brief_description>
<description>
- A [Texture] capable of storing many smaller textures with offsets.
- You can dynamically add pieces ([Texture]s) to this [LargeTexture] using different offsets.
+ A [Texture2D] capable of storing many smaller textures with offsets.
+ You can dynamically add pieces ([Texture2D]s) to this [LargeTexture] using different offsets.
</description>
<tutorials>
</tutorials>
@@ -15,7 +15,7 @@
</return>
<argument index="0" name="ofs" type="Vector2">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Adds [code]texture[/code] to this [LargeTexture], starting on offset [code]ofs[/code].
@@ -45,12 +45,12 @@
</description>
</method>
<method name="get_piece_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the [Texture] of the piece with the index [code]idx[/code].
+ Returns the [Texture2D] of the piece with the index [code]idx[/code].
</description>
</method>
<method name="set_piece_offset">
@@ -69,10 +69,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
- Sets the [Texture] of the piece with index [code]idx[/code] to [code]texture[/code].
+ Sets the [Texture2D] of the piece with index [code]idx[/code] to [code]texture[/code].
</description>
</method>
<method name="set_size">
@@ -85,9 +85,6 @@
</description>
</method>
</methods>
- <members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml
deleted file mode 100644
index 6ef7c2652d..0000000000
--- a/doc/classes/Light.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Light" inherits="VisualInstance" category="Core" version="3.2">
- <brief_description>
- Provides a base class for different kinds of light nodes.
- </brief_description>
- <description>
- Light is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
- </description>
- <tutorials>
- <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
- </tutorials>
- <methods>
- <method name="get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="Light.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="Light.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <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.
- </member>
- <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light.BakeMode" default="1">
- The light's bake mode. See [enum BakeMode].
- </member>
- <member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
- The light's color.
- </member>
- <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
- The light will affect objects in the selected layers.
- </member>
- <member name="light_energy" type="float" setter="set_param" getter="get_param" default="1.0">
- The light's strength multiplier.
- </member>
- <member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
- Secondary multiplier used with indirect light (light bounces). This works on both [BakedLightmap] and [GIProbe].
- </member>
- <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">
- If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
- </member>
- <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.
- </member>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.15">
- Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed.
- </member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )">
- The color of shadows cast by this light.
- </member>
- <member name="shadow_contact" type="float" setter="set_param" getter="get_param" default="0.0">
- Attempts to reduce [member shadow_bias] gap.
- </member>
- <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false">
- If [code]true[/code], the light will cast shadows.
- </member>
- <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false">
- </member>
- </members>
- <constants>
- <constant name="PARAM_ENERGY" value="0" enum="Param">
- </constant>
- <constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param">
- </constant>
- <constant name="PARAM_SPECULAR" value="2" enum="Param">
- </constant>
- <constant name="PARAM_RANGE" value="3" enum="Param">
- </constant>
- <constant name="PARAM_ATTENUATION" value="4" enum="Param">
- </constant>
- <constant name="PARAM_SPOT_ANGLE" value="5" enum="Param">
- </constant>
- <constant name="PARAM_SPOT_ATTENUATION" value="6" enum="Param">
- </constant>
- <constant name="PARAM_CONTACT_SHADOW_SIZE" value="7" enum="Param">
- </constant>
- <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param">
- </constant>
- <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param">
- </constant>
- <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param">
- </constant>
- <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param">
- </constant>
- <constant name="PARAM_SHADOW_NORMAL_BIAS" value="12" enum="Param">
- </constant>
- <constant name="PARAM_SHADOW_BIAS" value="13" enum="Param">
- </constant>
- <constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="Param">
- </constant>
- <constant name="PARAM_MAX" value="15" enum="Param">
- Represents the size of the [enum Param] enum.
- </constant>
- <constant name="BAKE_DISABLED" value="0" enum="BakeMode">
- Light is ignored when baking.
- [b]Note:[/b] Hiding a light does [i]not[/i] affect baking.
- </constant>
- <constant name="BAKE_INDIRECT" value="1" enum="BakeMode">
- Only indirect lighting will be baked (default).
- </constant>
- <constant name="BAKE_ALL" value="2" enum="BakeMode">
- Both direct and indirect light will be baked.
- [b]Note:[/b] You should hide the light if you don't want it to appear twice (dynamic and baked).
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index f61be5a5af..2862190d4d 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Light2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Light2D" inherits="Node2D" version="4.0">
<brief_description>
Casts light in a 2D environment.
</brief_description>
@@ -8,7 +8,7 @@
[b]Note:[/b] Light2D can also be used as a mask.
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<methods>
</methods>
@@ -26,7 +26,7 @@
The Light2D's energy value. The larger the value, the stronger the light.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode" default="0">
- The Light2D's mode. See [code]MODE_*[/code] constants for values.
+ The Light2D's mode. See [enum Mode] constants for values.
</member>
<member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )">
The offset of the Light2D's [code]texture[/code].
@@ -64,14 +64,11 @@
<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth" default="0.0">
Smoothing value for shadows.
</member>
- <member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length" default="0.0">
- Smooth shadow gradient length.
- </member>
<member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask" default="1">
- The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows.
+ The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows.
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
- [Texture] used for the Light2D's appearance.
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ [Texture2D] used for the Light2D's appearance.
</member>
<member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale" default="1.0">
The [code]texture[/code]'s scale factor.
@@ -93,19 +90,10 @@
<constant name="SHADOW_FILTER_NONE" value="0" enum="ShadowFilter">
No filter applies to the shadow map. See [member shadow_filter].
</constant>
- <constant name="SHADOW_FILTER_PCF3" value="1" enum="ShadowFilter">
- Percentage closer filtering (3 samples) applies to the shadow map. See [member shadow_filter].
- </constant>
- <constant name="SHADOW_FILTER_PCF5" value="2" enum="ShadowFilter">
+ <constant name="SHADOW_FILTER_PCF5" value="1" enum="ShadowFilter">
Percentage closer filtering (5 samples) applies to the shadow map. See [member shadow_filter].
</constant>
- <constant name="SHADOW_FILTER_PCF7" value="3" enum="ShadowFilter">
- Percentage closer filtering (7 samples) applies to the shadow map. See [member shadow_filter].
- </constant>
- <constant name="SHADOW_FILTER_PCF9" value="4" enum="ShadowFilter">
- Percentage closer filtering (9 samples) applies to the shadow map. See [member shadow_filter].
- </constant>
- <constant name="SHADOW_FILTER_PCF13" value="5" enum="ShadowFilter">
+ <constant name="SHADOW_FILTER_PCF13" value="2" enum="ShadowFilter">
Percentage closer filtering (13 samples) applies to the shadow map. See [member shadow_filter].
</constant>
</constants>
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
new file mode 100644
index 0000000000..cb21db2d00
--- /dev/null
+++ b/doc/classes/Light3D.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Light3D" inherits="VisualInstance3D" version="4.0">
+ <brief_description>
+ Provides a base class for different kinds of light nodes.
+ </brief_description>
+ <description>
+ Light3D is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ </tutorials>
+ <methods>
+ <method name="get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="Light3D.Param">
+ </argument>
+ <description>
+ Returns the value of the specified [enum Light3D.Param] parameter.
+ </description>
+ </method>
+ <method name="set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Light3D.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Sets the value of the specified [enum Light3D.Param] parameter.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <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.
+ </member>
+ <member name="light_angular_distance" type="float" setter="set_param" getter="get_param" default="0.0">
+ Angular size of the light in degrees. Only available for [DirectionalLight3D]s. For reference, the sun from earth is approximately [code]0.5[/code].
+ </member>
+ <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="1">
+ The light's bake mode. See [enum BakeMode].
+ </member>
+ <member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ The light's color.
+ </member>
+ <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
+ The light will affect objects in the selected layers.
+ </member>
+ <member name="light_energy" type="float" setter="set_param" getter="get_param" default="1.0">
+ The light's strength multiplier.
+ </member>
+ <member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
+ Secondary multiplier used with indirect light (light bounces). Used with [GIProbe].
+ </member>
+ <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">
+ If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
+ </member>
+ <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.
+ </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.
+ </member>
+ <member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
+ The intensity of the specular blob in objects affected by the light. At [code]0[/code] the light becomes a pure diffuse light.
+ </member>
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.02">
+ Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed.
+ </member>
+ <member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0">
+ Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible.
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )">
+ The color of shadows cast by this light.
+ </member>
+ <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false">
+ If [code]true[/code], the light will cast shadows.
+ </member>
+ <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="1.0">
+ Offsets the lookup into the shadow map by the objects normal. This can be used 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_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>
+ <member name="shadow_transmittance_bias" type="float" setter="set_param" getter="get_param" default="0.05">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_ENERGY" value="0" enum="Param">
+ Constant for accessing [member light_energy].
+ </constant>
+ <constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param">
+ Constant for accessing [member light_indirect_energy].
+ </constant>
+ <constant name="PARAM_SPECULAR" value="2" enum="Param">
+ Constant for accessing [member light_specular].
+ </constant>
+ <constant name="PARAM_RANGE" value="3" enum="Param">
+ Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range].
+ </constant>
+ <constant name="PARAM_SIZE" value="4" enum="Param">
+ Constant for accessing [member light_size].
+ </constant>
+ <constant name="PARAM_ATTENUATION" value="5" enum="Param">
+ Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation].
+ </constant>
+ <constant name="PARAM_SPOT_ANGLE" value="6" enum="Param">
+ Constant for accessing [member SpotLight3D.spot_angle].
+ </constant>
+ <constant name="PARAM_SPOT_ATTENUATION" value="7" enum="Param">
+ Constant for accessing [member SpotLight3D.spot_angle_attenuation].
+ </constant>
+ <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param">
+ Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance].
+ </constant>
+ <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param">
+ Constant for accessing [member DirectionalLight3D.directional_shadow_split_1].
+ </constant>
+ <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param">
+ Constant for accessing [member DirectionalLight3D.directional_shadow_split_2].
+ </constant>
+ <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param">
+ Constant for accessing [member DirectionalLight3D.directional_shadow_split_3].
+ </constant>
+ <constant name="PARAM_SHADOW_FADE_START" value="12" enum="Param">
+ Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start].
+ </constant>
+ <constant name="PARAM_SHADOW_NORMAL_BIAS" value="13" enum="Param">
+ Constant for accessing [member shadow_normal_bias].
+ </constant>
+ <constant name="PARAM_SHADOW_BIAS" value="14" enum="Param">
+ Constant for accessing [member shadow_bias].
+ </constant>
+ <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 for accessing [member shadow_blur].
+ </constant>
+ <constant name="PARAM_TRANSMITTANCE_BIAS" value="17" enum="Param">
+ Constant for accessing [member shadow_transmittance_bias].
+ </constant>
+ <constant name="PARAM_MAX" value="18" enum="Param">
+ Represents the size of the [enum Param] enum.
+ </constant>
+ <constant name="BAKE_DISABLED" value="0" enum="BakeMode">
+ Light is ignored when baking.
+ [b]Note:[/b] Hiding a light does [i]not[/i] affect baking.
+ </constant>
+ <constant name="BAKE_INDIRECT" value="1" enum="BakeMode">
+ Only indirect lighting will be baked (default).
+ </constant>
+ <constant name="BAKE_ALL" value="2" enum="BakeMode">
+ Both direct and indirect light will be baked.
+ [b]Note:[/b] You should hide the light if you don't want it to appear twice (dynamic and baked).
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index c7d52e6ef4..a02f7a0f75 100644
--- a/doc/classes/LightOccluder2D.xml
+++ b/doc/classes/LightOccluder2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.2">
+<class name="LightOccluder2D" inherits="Node2D" version="4.0">
<brief_description>
Occludes light cast by a Light2D, casting shadows.
</brief_description>
@@ -7,7 +7,7 @@
Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed.
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml
new file mode 100644
index 0000000000..3af71f3774
--- /dev/null
+++ b/doc/classes/LightmapProbe.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LightmapProbe" inherits="Node3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml
new file mode 100644
index 0000000000..e80194858a
--- /dev/null
+++ b/doc/classes/Lightmapper.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Lightmapper" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml
new file mode 100644
index 0000000000..0993b28f19
--- /dev/null
+++ b/doc/classes/LightmapperRD.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LightmapperRD" inherits="Lightmapper" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 3cb04b8b89..cfd23b28bd 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Line2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Line2D" inherits="Node2D" version="4.0">
<brief_description>
A 2D line.
</brief_description>
@@ -66,14 +66,17 @@
</method>
</methods>
<members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
+ If [code]true[/code], the line's border will be anti-aliased.
+ </member>
<member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0">
- Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants.
+ Controls the style of the line's first point. Use [enum LineCapMode] constants.
</member>
- <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 0.4, 0.5, 1, 1 )">
+ <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 1, 1, 1, 1 )">
The line's color. Will not be used if a gradient is set.
</member>
<member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0">
- Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants.
+ Controls the style of the line's last point. Use [enum LineCapMode] constants.
</member>
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set.
@@ -81,7 +84,7 @@
<member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode" default="0">
The style for the points between the start and the end.
</member>
- <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )">
+ <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )">
The points that form the lines. The line is drawn between every point set in this array.
</member>
<member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8">
@@ -90,11 +93,11 @@
<member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit" default="2.0">
The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [constant LINE_JOINT_SHARP].
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
</member>
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0">
- The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants.
+ The style to render the [code]texture[/code] on the line. Use [enum LineTextureMode] constants.
</member>
<member name="width" type="float" setter="set_width" getter="get_width" default="10.0">
The line's width.
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index de216563d3..3eeb892719 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -1,19 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LineEdit" inherits="Control" category="Core" version="3.2">
+<class name="LineEdit" inherits="Control" version="4.0">
<brief_description>
Control that provides single-line string editing.
</brief_description>
<description>
- LineEdit provides a single-line string editor, used for text fields. It features many built-in shortcuts which will always be available:
- - Ctrl + C: Copy
- - Ctrl + X: Cut
- - Ctrl + V or Ctrl + Y: Paste/"yank"
- - Ctrl + Z: Undo
- - Ctrl + Shift + Z: Redo
- - Ctrl + U: Delete text from the cursor position to the beginning of the line
- - Ctrl + K: Delete text from the cursor position to the end of the line
- - Ctrl + A: Select all text
- - Up/Down arrow: Move the cursor to the beginning/end of the line
+ LineEdit provides a single-line string editor, used for text fields.
+ It features many built-in shortcuts which will always be available ([kbd]Ctrl[/kbd] here maps to [kbd]Cmd[/kbd] on macOS):
+ - [kbd]Ctrl + C[/kbd]: Copy
+ - [kbd]Ctrl + X[/kbd]: Cut
+ - [kbd]Ctrl + V[/kbd] or [kbd]Ctrl + Y[/kbd]: Paste/"yank"
+ - [kbd]Ctrl + Z[/kbd]: Undo
+ - [kbd]Ctrl + Shift + Z[/kbd]: Redo
+ - [kbd]Ctrl + U[/kbd]: Delete text from the cursor position to the beginning of the line
+ - [kbd]Ctrl + K[/kbd]: Delete text from the cursor position to the end of the line
+ - [kbd]Ctrl + A[/kbd]: Select all text
+ - [kbd]Up Arrow[/kbd]/[kbd]Down Arrow[/kbd]: Move the cursor to the beginning/end of the line
+ On macOS, some extra keyboard shortcuts are available:
+ - [kbd]Ctrl + F[/kbd]: Same as [kbd]Right Arrow[/kbd], move the cursor one character right
+ - [kbd]Ctrl + B[/kbd]: Same as [kbd]Left Arrow[/kbd], move the cursor one character left
+ - [kbd]Ctrl + P[/kbd]: Same as [kbd]Up Arrow[/kbd], move the cursor to the previous line
+ - [kbd]Ctrl + N[/kbd]: Same as [kbd]Down Arrow[/kbd], move the cursor to the next line
+ - [kbd]Ctrl + D[/kbd]: Same as [kbd]Delete[/kbd], delete the character on the right side of cursor
+ - [kbd]Ctrl + H[/kbd]: Same as [kbd]Backspace[/kbd], delete the character on the left side of the cursor
+ - [kbd]Ctrl + A[/kbd]: Same as [kbd]Home[/kbd], move the cursor to the beginning of the line
+ - [kbd]Ctrl + E[/kbd]: Same as [kbd]End[/kbd], move the cursor to the end of the line
+ - [kbd]Cmd + Left Arrow[/kbd]: Same as [kbd]Home[/kbd], move the cursor to the beginning of the line
+ - [kbd]Cmd + Right Arrow[/kbd]: Same as [kbd]End[/kbd], move the cursor to the end of the line
</description>
<tutorials>
</tutorials>
@@ -54,7 +66,7 @@
<argument index="0" name="option" type="int">
</argument>
<description>
- Executes a given action as defined in the[code]MENU_*[/code] enum.
+ Executes a given action as defined in the [enum MenuItems] enum.
</description>
</method>
<method name="select">
@@ -68,9 +80,9 @@
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.
[codeblock]
text = "Welcome"
- select() # Will select "Welcome"
- select(4) # Will select "ome"
- select(2, 5) # Will select "lco"
+ select() # Will select "Welcome".
+ select(4) # Will select "ome".
+ select(2, 5) # Will select "lco".
[/codeblock]
</description>
</method>
@@ -84,7 +96,7 @@
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
- Text alignment as defined in the [code]ALIGN_*[/code] enum.
+ Text alignment as defined in the [enum Align] enum.
</member>
<member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false">
If [code]true[/code], the caret (visual cursor) blinks.
@@ -96,7 +108,7 @@
The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it.
</member>
<member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false">
- If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty.
+ If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty, which can be used to clear the text quickly.
</member>
<member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true">
If [code]true[/code], the context menu will appear when right-clicked.
@@ -118,7 +130,7 @@
<member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default="&quot;&quot;">
Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]).
</member>
- <member name="right_icon" type="Texture" setter="set_right_icon" getter="get_right_icon">
+ <member name="right_icon" type="Texture2D" setter="set_right_icon" getter="get_right_icon">
Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to [code]false[/code].
</member>
<member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false">
@@ -128,14 +140,22 @@
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.
</member>
<member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
+ If [code]false[/code], using shortcuts will be disabled.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
String value of the [LineEdit].
+ [b]Note:[/b] Changing text using this property won't emit the [signal text_changed] signal.
</member>
</members>
<signals>
+ <signal name="text_change_rejected">
+ <description>
+ Emitted when trying to append text that would overflow the [member max_length].
+ </description>
+ </signal>
<signal name="text_changed">
<argument index="0" name="new_text" type="String">
</argument>
@@ -191,31 +211,44 @@
</constant>
</constants>
<theme_items>
- <theme_item name="clear" type="Texture">
+ <theme_item name="clear" type="Texture2D">
+ Texture for the clear button. See [member clear_button_enabled].
</theme_item>
<theme_item name="clear_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Color used as default tint for the clear button.
</theme_item>
<theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Color used for the clear button when it's pressed.
</theme_item>
<theme_item name="cursor_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Color of the [LineEdit]'s visual cursor (caret).
</theme_item>
<theme_item name="focus" type="StyleBox">
+ Background used when [LineEdit] has GUI focus.
</theme_item>
<theme_item name="font" type="Font">
+ Font used for the text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default font color.
</theme_item>
<theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
+ Font color for selected text (inside the selection rectangle).
</theme_item>
<theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ Font color when editing is disabled.
</theme_item>
<theme_item name="minimum_spaces" type="int" default="12">
+ Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of space characters (i.e. this amount of space characters can be displayed without scrolling).
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default background for the [LineEdit].
</theme_item>
<theme_item name="read_only" type="StyleBox">
+ Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]).
</theme_item>
<theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
+ Color of the selection rectangle.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
index fbab1dbe3c..58caf1b1de 100644
--- a/doc/classes/LineShape2D.xml
+++ b/doc/classes/LineShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="LineShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Line shape for 2D collisions.
</brief_description>
@@ -11,10 +11,10 @@
<methods>
</methods>
<members>
- <member name="d" type="float" setter="set_d" getter="get_d" default="0.0">
+ <member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0">
The line's distance from the origin.
</member>
- <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, -1 )">
+ <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, 1 )">
The line's normal.
</member>
</members>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index af4c255b92..13d3355da5 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LinkButton" inherits="BaseButton" category="Core" version="3.2">
+<class name="LinkButton" inherits="BaseButton" version="4.0">
<brief_description>
Simple button used to represent a link to some resource.
</brief_description>
@@ -15,8 +15,10 @@
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="2" />
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
+ The button's text that will be displayed inside the button's area.
</member>
<member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode" default="0">
+ Determines when to show the underline. See [enum UnderlineMode] for options.
</member>
</members>
<constants>
@@ -32,16 +34,22 @@
</constants>
<theme_items>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [LinkButton]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the [LinkButton].
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] used when the [LinkButton] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [LinkButton] is being pressed.
</theme_item>
<theme_item name="underline_spacing" type="int" default="2">
+ The vertical space between the baseline of text and the underline.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml
deleted file mode 100644
index 130263a069..0000000000
--- a/doc/classes/Listener.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Listener" inherits="Spatial" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="clear_current">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_listener_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- </description>
- </method>
- <method name="is_current" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="make_current">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Listener3D.xml b/doc/classes/Listener3D.xml
new file mode 100644
index 0000000000..998ea757ff
--- /dev/null
+++ b/doc/classes/Listener3D.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Listener3D" inherits="Node3D" version="4.0">
+ <brief_description>
+ Overrides the location sounds are heard from.
+ </brief_description>
+ <description>
+ Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera3D].
+ [b]Note:[/b] There is no 2D equivalent for this node yet.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="clear_current">
+ <return type="void">
+ </return>
+ <description>
+ Disables the listener to use the current camera's listener instead.
+ </description>
+ </method>
+ <method name="get_listener_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ Returns the listener's global orthonormalized [Transform].
+ </description>
+ </method>
+ <method name="is_current" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise.
+ [b]Note:[/b] There may be more than one Listener3D marked as "current" in the scene tree, but only the one that was made current last will be used.
+ </description>
+ </method>
+ <method name="make_current">
+ <return type="void">
+ </return>
+ <description>
+ Enables the listener. This will override the current camera's listener.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 9457800825..7bb478fce2 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MainLoop" inherits="Object" category="Core" version="3.2">
+<class name="MainLoop" inherits="Object" version="4.0">
<brief_description>
Abstract base class for the game's main loop.
</brief_description>
@@ -7,6 +7,7 @@
[MainLoop] is the abstract base class for a Godot project's game loop. It is inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree.
Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation.
Here is an example script implementing a simple [MainLoop]:
+ [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
[codeblock]
extends MainLoop
@@ -26,9 +27,9 @@
func _input_event(event):
# Record keys.
if event is InputEventKey and event.pressed and !event.echo:
- keys_typed.append(OS.get_scancode_string(event.scancode))
+ keys_typed.append(OS.get_keycode_string(event.keycode))
# Quit on Escape press.
- if event.scancode == KEY_ESCAPE:
+ if event.keycode == KEY_ESCAPE:
quit = true
# Quit on any mouse click.
if event is InputEventMouseButton:
@@ -43,17 +44,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="_drop_files" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="files" type="PoolStringArray">
- </argument>
- <argument index="1" name="from_screen" type="int">
- </argument>
- <description>
- Called when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
- </description>
- </method>
<method name="_finalize" qualifiers="virtual">
<return type="void">
</return>
@@ -61,16 +51,6 @@
Called before the program exits.
</description>
</method>
- <method name="_global_menu_action" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="id" type="Variant">
- </argument>
- <argument index="1" name="meta" type="Variant">
- </argument>
- <description>
- </description>
- </method>
<method name="_idle" qualifiers="virtual">
<return type="bool">
</return>
@@ -88,24 +68,6 @@
Called once during initialization.
</description>
</method>
- <method name="_input_event" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- Called whenever an [InputEvent] is received by the main loop.
- </description>
- </method>
- <method name="_input_text" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Deprecated callback, does not do anything. Use [method _input_event] to parse text input. Will be removed in Godot 4.0.
- </description>
- </method>
<method name="_iteration" qualifiers="virtual">
<return type="bool">
</return>
@@ -139,24 +101,6 @@
Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0.
</description>
</method>
- <method name="input_event">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0.
- </description>
- </method>
- <method name="input_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0.
- </description>
- </method>
<method name="iteration">
<return type="bool">
</return>
@@ -174,63 +118,35 @@
<argument index="1" name="granted" type="bool">
</argument>
<description>
- Emitted when an user responds to permission request.
+ Emitted when a user responds to a permission request.
</description>
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002">
- Notification received from the OS when the mouse enters the game window.
- Implemented on desktop and web platforms.
- </constant>
- <constant name="NOTIFICATION_WM_MOUSE_EXIT" value="1003">
- Notification received from the OS when the mouse leaves the game window.
- Implemented on desktop and web platforms.
- </constant>
- <constant name="NOTIFICATION_WM_FOCUS_IN" value="1004">
- Notification received from the OS when the game window is focused.
- Implemented on all platforms.
- </constant>
- <constant name="NOTIFICATION_WM_FOCUS_OUT" value="1005">
- Notification received from the OS when the game window is unfocused.
- Implemented on all platforms.
- </constant>
- <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
- Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
- Implemented on desktop platforms.
- </constant>
- <constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
- Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
- Specific to the Android platform.
- </constant>
- <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
- Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
- No supported platforms currently send this notification.
- </constant>
- <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
+ <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
Notification received from the OS when the application is exceeding its allocated memory.
Specific to the iOS platform.
</constant>
- <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
+ <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="2010">
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
</constant>
- <constant name="NOTIFICATION_WM_ABOUT" value="1011">
+ <constant name="NOTIFICATION_WM_ABOUT" value="2011">
Notification received from the OS when a request for "About" information is sent.
Specific to the macOS platform.
</constant>
- <constant name="NOTIFICATION_CRASH" value="1012">
+ <constant name="NOTIFICATION_CRASH" value="2012">
Notification received from Godot's crash handler when the engine is about to crash.
Implemented on desktop platforms if the crash handler is enabled.
</constant>
- <constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
+ <constant name="NOTIFICATION_OS_IME_UPDATE" value="2013">
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
Specific to the macOS platform.
</constant>
- <constant name="NOTIFICATION_APP_RESUMED" value="1014">
+ <constant name="NOTIFICATION_APP_RESUMED" value="2014">
Notification received from the OS when the app is resumed.
Specific to the Android platform.
</constant>
- <constant name="NOTIFICATION_APP_PAUSED" value="1015">
+ <constant name="NOTIFICATION_APP_PAUSED" value="2015">
Notification received from the OS when the app is paused.
Specific to the Android platform.
</constant>
diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml
index 08e8098a75..fb5f437239 100644
--- a/doc/classes/MarginContainer.xml
+++ b/doc/classes/MarginContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MarginContainer" inherits="Container" category="Core" version="3.2">
+<class name="MarginContainer" inherits="Container" version="4.0">
<brief_description>
Simple margin container.
</brief_description>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index 083a3163ce..4250ffd700 100644
--- a/doc/classes/Marshalls.xml
+++ b/doc/classes/Marshalls.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Marshalls" inherits="Reference" category="Core" version="3.2">
+<class name="Marshalls" inherits="Object" version="4.0">
<brief_description>
Data transformation (marshalling) and encoding helpers.
</brief_description>
@@ -10,12 +10,12 @@
</tutorials>
<methods>
<method name="base64_to_raw">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="base64_str" type="String">
</argument>
<description>
- Returns a decoded [PoolByteArray] corresponding to the Base64-encoded string [code]base64_str[/code].
+ Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [code]base64_str[/code].
</description>
</method>
<method name="base64_to_utf8">
@@ -42,10 +42,10 @@
<method name="raw_to_base64">
<return type="String">
</return>
- <argument index="0" name="array" type="PoolByteArray">
+ <argument index="0" name="array" type="PackedByteArray">
</argument>
<description>
- Returns a Base64-encoded string of a given [PoolByteArray].
+ Returns a Base64-encoded string of a given [PackedByteArray].
</description>
</method>
<method name="utf8_to_base64">
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index f584c5207a..a37c8127f0 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Material" inherits="Resource" category="Core" version="3.2">
+<class name="Material" inherits="Resource" version="4.0">
<brief_description>
Abstract base [Resource] for coloring and shading geometry.
</brief_description>
<description>
- Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.
+ Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance3D] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.
</description>
<tutorials>
</tutorials>
@@ -12,8 +12,12 @@
</methods>
<members>
<member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass">
+ Sets the [Material] to be used for the next pass. This renders the object again using a different material.
+ [b]Note:[/b] only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
+ Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.
+ [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 sorted based on depth, while transparent objects are sorted from back to front (subject to priority).
</member>
</members>
<constants>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 52fb4b9ca1..316315f777 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MenuButton" inherits="Button" category="Core" version="3.2">
+<class name="MenuButton" inherits="Button" version="4.0">
<brief_description>
Special button that brings up a [PopupMenu] when clicked.
</brief_description>
<description>
- Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs.
+ Special button that brings up a [PopupMenu] when clicked.
+ New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each items new properties.
</description>
<tutorials>
</tutorials>
@@ -22,6 +23,7 @@
<argument index="0" name="disabled" type="bool">
</argument>
<description>
+ If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button.
</description>
</method>
</methods>
@@ -31,14 +33,14 @@
<member name="flat" type="bool" setter="set_flat" getter="is_flat" override="true" default="true" />
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
<member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="false">
- If [code]true[/code], when the cursor hovers above another MenuButton within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current MenuButton and open the other one.
+ If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current [MenuButton] and open the other one.
</member>
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
</members>
<signals>
- <signal name="about_to_show">
+ <signal name="about_to_popup">
<description>
- Emitted when [PopupMenu] of this MenuButton is about to show.
+ Emitted when the [PopupMenu] of this MenuButton is about to show.
</description>
</signal>
</signals>
@@ -46,26 +48,37 @@
</constants>
<theme_items>
<theme_item name="disabled" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [MenuButton]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the [MenuButton].
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 1, 1, 1, 0.3 )">
+ Text [Color] used when the [MenuButton] is disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] used when the [MenuButton] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [MenuButton] is being pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="3">
+ The horizontal space between [MenuButton]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default [StyleBox] for the [MenuButton].
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is being pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index f7b3b0d7ea..367099e455 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mesh" inherits="Resource" category="Core" version="3.2">
+<class name="Mesh" inherits="Resource" version="4.0">
<brief_description>
A [Resource] that contains vertex array-based geometry.
</brief_description>
@@ -10,10 +10,10 @@
</tutorials>
<methods>
<method name="create_convex_shape" qualifiers="const">
- <return type="Shape">
+ <return type="Shape3D">
</return>
<description>
- Calculate a [ConvexPolygonShape] from the mesh.
+ Calculate a [ConvexPolygonShape3D] from the mesh.
</description>
</method>
<method name="create_outline" qualifiers="const">
@@ -27,10 +27,10 @@
</description>
</method>
<method name="create_trimesh_shape" qualifiers="const">
- <return type="Shape">
+ <return type="Shape3D">
</return>
<description>
- Calculate a [ConcavePolygonShape] from the mesh.
+ Calculate a [ConcavePolygonShape3D] from the mesh.
</description>
</method>
<method name="generate_triangle_mesh" qualifiers="const">
@@ -40,8 +40,16 @@
Generate a [TriangleMesh] from the mesh.
</description>
</method>
+ <method name="get_aabb" qualifiers="const">
+ <return type="AABB">
+ </return>
+ <description>
+ Returns the smallest [AABB] enclosing this mesh. Not affected by [code]custom_aabb[/code].
+ [b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh].
+ </description>
+ </method>
<method name="get_faces" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.
@@ -94,7 +102,8 @@
</method>
</methods>
<members>
- <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )">
+ <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i( 0, 0 )">
+ Sets a hint to be used for lightmap resolution.
</member>
</members>
<constants>
@@ -107,65 +116,68 @@
<constant name="PRIMITIVE_LINE_STRIP" value="2" enum="PrimitiveType">
Render array as line strip.
</constant>
- <constant name="PRIMITIVE_LINE_LOOP" value="3" enum="PrimitiveType">
- Render array as line loop (like line strip, but closed).
- </constant>
- <constant name="PRIMITIVE_TRIANGLES" value="4" enum="PrimitiveType">
+ <constant name="PRIMITIVE_TRIANGLES" value="3" enum="PrimitiveType">
Render array as triangles (every three vertices a triangle is created).
</constant>
- <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5" enum="PrimitiveType">
+ <constant name="PRIMITIVE_TRIANGLE_STRIP" value="4" enum="PrimitiveType">
Render array as triangle strips.
</constant>
- <constant name="PRIMITIVE_TRIANGLE_FAN" value="6" enum="PrimitiveType">
- Render array as triangle fans.
- </constant>
<constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
+ Blend shapes are normalized.
</constant>
<constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
+ Blend shapes are relative to base weight.
</constant>
<constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
+ Mesh array contains vertices. All meshes require a vertex array so this should always be present.
</constant>
<constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat">
+ Mesh array contains normals.
</constant>
<constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat">
+ Mesh array contains tangents.
</constant>
<constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat">
+ Mesh array contains colors.
</constant>
<constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat">
+ Mesh array contains UVs.
</constant>
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
+ Mesh array contains second UV.
</constant>
<constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
+ Mesh array contains bones.
</constant>
<constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
+ Mesh array contains bone weights.
</constant>
<constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
- </constant>
- <constant name="ARRAY_COMPRESS_BASE" value="9" enum="ArrayFormat">
- </constant>
- <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat">
+ Mesh array uses indices.
</constant>
<constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
+ Flag used to mark a compressed (half float) normal array.
</constant>
<constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat">
+ Flag used to mark a compressed (half float) tangent array.
</constant>
<constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat">
+ Flag used to mark a compressed (half float) color array.
</constant>
<constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat">
+ Flag used to mark a compressed (half float) UV coordinates array.
</constant>
<constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
- </constant>
- <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat">
- </constant>
- <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat">
+ Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
</constant>
<constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
+ Flag used to mark a compressed index array.
</constant>
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
+ Flag used to mark that the array contains 2D vertices.
</constant>
- <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat">
- </constant>
- <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat">
+ <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat">
+ Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly.
</constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
Array of vertices.
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index 22c31306bf..dcc3bbf2a6 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshDataTool" inherits="Reference" category="Core" version="3.2">
+<class name="MeshDataTool" inherits="Reference" version="4.0">
<brief_description>
Helper tool to access and edit [Mesh] data.
</brief_description>
@@ -17,6 +17,8 @@
mesh.surface_remove(0)
mdt.commit_to_surface(mesh)
[/codeblock]
+ See also [ArrayMesh], [ImmediateGeometry3D] and [SurfaceTool] for procedural geometry generation.
+ [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
</tutorials>
@@ -57,7 +59,7 @@
</description>
</method>
<method name="get_edge_faces" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -160,7 +162,7 @@
</description>
</method>
<method name="get_vertex_bones" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -185,7 +187,7 @@
</description>
</method>
<method name="get_vertex_edges" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -194,7 +196,7 @@
</description>
</method>
<method name="get_vertex_faces" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -248,7 +250,7 @@
</description>
</method>
<method name="get_vertex_weights" qualifiers="const">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -303,7 +305,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="bones" type="PoolIntArray">
+ <argument index="1" name="bones" type="PackedInt32Array">
</argument>
<description>
Sets the bones of the given vertex.
@@ -380,7 +382,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="weights" type="PoolRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
Sets the bone weights of the given vertex.
diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml
deleted file mode 100644
index a4d2bb4295..0000000000
--- a/doc/classes/MeshInstance.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.2">
- <brief_description>
- Node that instances meshes into a scenario.
- </brief_description>
- <description>
- MeshInstance 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 to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="create_convex_collision">
- <return type="void">
- </return>
- <description>
- This helper creates a [StaticBody] child node with a [ConvexPolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing.
- </description>
- </method>
- <method name="create_debug_tangents">
- <return type="void">
- </return>
- <description>
- This helper creates a [MeshInstance] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing.
- </description>
- </method>
- <method name="create_trimesh_collision">
- <return type="void">
- </return>
- <description>
- This helper creates a [StaticBody] child node with a [ConcavePolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing.
- </description>
- </method>
- <method name="get_surface_material" qualifiers="const">
- <return type="Material">
- </return>
- <argument index="0" name="surface" type="int">
- </argument>
- <description>
- Returns the [Material] for a surface of the [Mesh] resource.
- </description>
- </method>
- <method name="get_surface_material_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of surface materials.
- </description>
- </method>
- <method name="set_surface_material">
- <return type="void">
- </return>
- <argument index="0" name="surface" type="int">
- </argument>
- <argument index="1" name="material" type="Material">
- </argument>
- <description>
- Sets the [Material] for a surface of the [Mesh] resource.
- </description>
- </method>
- </methods>
- <members>
- <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
- The [Mesh] resource for the instance.
- </member>
- <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath(&quot;..&quot;)">
- [NodePath] to the [Skeleton] associated with the instance.
- </member>
- <member name="skin" type="Skin" setter="set_skin" getter="get_skin">
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index 4b38b9aa96..689f8d83e1 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.2">
+<class name="MeshInstance2D" inherits="Node2D" version="4.0">
<brief_description>
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 [Sprite] use tool in Toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D".
+ 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".
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link>
</tutorials>
<methods>
</methods>
@@ -15,16 +15,18 @@
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
The [Mesh] that will be drawn by the [MeshInstance2D].
</member>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map that will be used if using the default [CanvasItemMaterial].
+ [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="texture" type="Texture" setter="set_texture" getter="get_texture">
- The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
</member>
</members>
<signals>
<signal name="texture_changed">
<description>
+ Emitted when the [member texture] is changed.
</description>
</signal>
</signals>
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
new file mode 100644
index 0000000000..c569da2df1
--- /dev/null
+++ b/doc/classes/MeshInstance3D.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MeshInstance3D" inherits="GeometryInstance3D" version="4.0">
+ <brief_description>
+ Node that instances meshes into a scenario.
+ </brief_description>
+ <description>
+ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="create_convex_collision">
+ <return type="void">
+ </return>
+ <description>
+ This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.
+ </description>
+ </method>
+ <method name="create_debug_tangents">
+ <return type="void">
+ </return>
+ <description>
+ This helper creates a [MeshInstance3D] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing.
+ </description>
+ </method>
+ <method name="create_trimesh_collision">
+ <return type="void">
+ </return>
+ <description>
+ This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.
+ </description>
+ </method>
+ <method name="get_active_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <argument index="0" name="surface" type="int">
+ </argument>
+ <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>
+ </method>
+ <method name="get_surface_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <argument index="0" name="surface" type="int">
+ </argument>
+ <description>
+ Returns the override [Material] for the specified surface of the [Mesh] resource.
+ </description>
+ </method>
+ <method name="get_surface_material_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of surface materials.
+ </description>
+ </method>
+ <method name="set_surface_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="surface" type="int">
+ </argument>
+ <argument index="1" name="material" type="Material">
+ </argument>
+ <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>
+ </method>
+ </methods>
+ <members>
+ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ The [Mesh] resource for the instance.
+ </member>
+ <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath(&quot;..&quot;)">
+ [NodePath] to the [Skeleton3D] associated with the instance.
+ </member>
+ <member name="skin" type="Skin" setter="set_skin" getter="get_skin">
+ Sets the skin to be used by this instance.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 44dc4f334f..ccf6172017 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshLibrary" inherits="Resource" category="Core" version="3.2">
+<class name="MeshLibrary" inherits="Resource" version="4.0">
<brief_description>
Library of meshes.
</brief_description>
<description>
- A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. This resource is used in [GridMap].
+ A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap].
</description>
<tutorials>
</tutorials>
@@ -22,7 +22,8 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Create a new item in the library, supplied as an ID.
+ Creates a new item in the library with the given ID.
+ You can get an unused ID from [method get_last_unused_item_id].
</description>
</method>
<method name="find_item_by_name" qualifiers="const">
@@ -31,13 +32,14 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the first item with the given name.
</description>
</method>
<method name="get_item_list" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
- Returns the list of items.
+ Returns the list of item IDs in use.
</description>
</method>
<method name="get_item_mesh" qualifiers="const">
@@ -46,7 +48,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns the mesh of the item.
+ Returns the item's mesh.
</description>
</method>
<method name="get_item_name" qualifiers="const">
@@ -55,7 +57,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns the name of the item.
+ Returns the item's name.
</description>
</method>
<method name="get_item_navmesh" qualifiers="const">
@@ -64,6 +66,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns the item's navigation mesh.
</description>
</method>
<method name="get_item_navmesh_transform" qualifiers="const">
@@ -72,16 +75,16 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns the transform applied to the item's navigation mesh.
</description>
</method>
<method name="get_item_preview" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns a generated item preview (a 3D rendering in isometric perspective).
- [b]Note:[/b] Since item previews are only generated in an editor context, this function will return an empty [Texture] in a running project.
+ When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project.
</description>
</method>
<method name="get_item_shapes" qualifiers="const">
@@ -90,6 +93,8 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns an item's collision shapes.
+ The array consists of each [Shape3D] followed by its [Transform].
</description>
</method>
<method name="get_last_unused_item_id" qualifiers="const">
@@ -128,6 +133,7 @@
</argument>
<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].
</description>
</method>
<method name="set_item_navmesh">
@@ -138,6 +144,7 @@
<argument index="1" name="navmesh" type="NavigationMesh">
</argument>
<description>
+ Sets the item's navigation mesh.
</description>
</method>
<method name="set_item_navmesh_transform">
@@ -148,6 +155,7 @@
<argument index="1" name="navmesh" type="Transform">
</argument>
<description>
+ Sets the transform to apply to the item's navigation mesh.
</description>
</method>
<method name="set_item_preview">
@@ -155,9 +163,10 @@
</return>
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
+ Sets a texture to use as the item's preview icon in the editor.
</description>
</method>
<method name="set_item_shapes">
@@ -168,6 +177,8 @@
<argument index="1" name="shapes" type="Array">
</argument>
<description>
+ Sets an item's collision shapes.
+ The array should consist of [Shape3D] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY].
</description>
</method>
</methods>
diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml
index 2c94014879..bcc9adf90f 100644
--- a/doc/classes/MeshTexture.xml
+++ b/doc/classes/MeshTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshTexture" inherits="Texture" category="Core" version="3.2">
+<class name="MeshTexture" inherits="Texture2D" version="4.0">
<brief_description>
Simple texture that uses a mesh to draw itself.
</brief_description>
@@ -11,10 +11,9 @@
<methods>
</methods>
<members>
- <member name="base_texture" type="Texture" setter="set_base_texture" getter="get_base_texture">
+ <member name="base_texture" type="Texture2D" setter="set_base_texture" getter="get_base_texture">
Sets the base texture that the Mesh will use to draw.
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2( 0, 0 )">
Sets the size of the image, needed for reference.
</member>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 8a72aa155b..0f56ab4b95 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMesh" inherits="Resource" category="Core" version="3.2">
+<class name="MultiMesh" inherits="Resource" version="4.0">
<brief_description>
Provides high-performance mesh instancing.
</brief_description>
<description>
- MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow, since each object is submitted to the GPU then drawn individually.
+ MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance3D] nodes can be slow, since each object is submitted to the GPU then drawn individually.
MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead.
As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link>
</tutorials>
<methods>
<method name="get_aabb" qualifiers="const">
@@ -56,17 +57,6 @@
Returns the [Transform2D] of a specific instance.
</description>
</method>
- <method name="set_as_bulk_array">
- <return type="void">
- </return>
- <argument index="0" name="array" type="PoolRealArray">
- </argument>
- <description>
- Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.
- All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc...
- [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats.
- </description>
- </method>
<method name="set_instance_color">
<return type="void">
</return>
@@ -76,7 +66,7 @@
</argument>
<description>
Sets the color of a specific instance.
- For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [MultiMesh] and [member SpatialMaterial.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.
</description>
</method>
<method name="set_instance_custom_data">
@@ -87,7 +77,8 @@
<argument index="1" name="custom_data" type="Color">
</argument>
<description>
- Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers.
+ 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].
</description>
</method>
<method name="set_instance_transform">
@@ -114,11 +105,11 @@
</method>
</methods>
<members>
- <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat" default="0">
- Format of colors in color array that gets passed to shader.
+ <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array( )">
+ </member>
+ <member name="color_array" type="PackedColorArray" setter="_set_color_array" getter="_get_color_array">
</member>
- <member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat" default="0">
- Format of custom data in custom data array that gets passed to shader.
+ <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].
@@ -126,9 +117,19 @@
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
Mesh to be drawn.
</member>
+ <member name="transform_2d_array" type="PackedVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array">
+ </member>
+ <member name="transform_array" type="PackedVector3Array" setter="_set_transform_array" getter="_get_transform_array">
+ </member>
<member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat" default="0">
Format of transform used to transform mesh, either 2D or 3D.
</member>
+ <member name="use_colors" type="bool" setter="set_use_colors" getter="is_using_colors" default="false">
+ If [code]true[/code], the [MultiMesh] will use color data (see [member color_array]).
+ </member>
+ <member name="use_custom_data" type="bool" setter="set_use_custom_data" getter="is_using_custom_data" default="false">
+ If [code]true[/code], the [MultiMesh] will use custom data (see [member custom_data_array]).
+ </member>
<member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count" default="-1">
Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers.
</member>
@@ -140,23 +141,5 @@
<constant name="TRANSFORM_3D" value="1" enum="TransformFormat">
Use this when using 3D transforms.
</constant>
- <constant name="COLOR_NONE" value="0" enum="ColorFormat">
- Use when you are not using per-instance [Color]s.
- </constant>
- <constant name="COLOR_8BIT" value="1" enum="ColorFormat">
- Compress [Color] data into 8 bits when passing to shader. This uses less memory and can be faster, but the [Color] loses precision.
- </constant>
- <constant name="COLOR_FLOAT" value="2" enum="ColorFormat">
- The [Color] passed into [method set_instance_color] will use 4 floats. Use this for highest precision [Color].
- </constant>
- <constant name="CUSTOM_DATA_NONE" value="0" enum="CustomDataFormat">
- Use when you are not using per-instance custom data.
- </constant>
- <constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat">
- Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision.
- </constant>
- <constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat">
- The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision.
- </constant>
</constants>
</class>
diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml
index 8509986c3c..a461c8e056 100644
--- a/doc/classes/MultiMeshInstance2D.xml
+++ b/doc/classes/MultiMeshInstance2D.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMeshInstance2D" inherits="Node2D" category="Core" version="3.2">
+<class name="MultiMeshInstance2D" inherits="Node2D" version="4.0">
<brief_description>
Node that instances a [MultiMesh] in 2D.
</brief_description>
<description>
[MultiMeshInstance2D] is a specialized node to instance a [MultiMesh] resource in 2D.
- Usage is the same as [MultiMeshInstance].
+ Usage is the same as [MultiMeshInstance3D].
</description>
<tutorials>
</tutorials>
@@ -15,16 +15,18 @@
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
The [MultiMesh] that will be drawn by the [MultiMeshInstance2D].
</member>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map that will be used if using the default [CanvasItemMaterial].
+ [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="texture" type="Texture" setter="set_texture" getter="get_texture">
- The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
</member>
</members>
<signals>
<signal name="texture_changed">
<description>
+ Emitted when the [member texture] is changed.
</description>
</signal>
</signals>
diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance3D.xml
index 16f16fdc8b..cab17c952e 100644
--- a/doc/classes/MultiMeshInstance.xml
+++ b/doc/classes/MultiMeshInstance3D.xml
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core" version="3.2">
+<class name="MultiMeshInstance3D" inherits="GeometryInstance3D" version="4.0">
<brief_description>
Node that instances a [MultiMesh].
</brief_description>
<description>
- [MultiMeshInstance] is a specialized node to instance [GeometryInstance]s based on a [MultiMesh] resource.
+ [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).
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link>
- <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link>
</tutorials>
<methods>
</methods>
<members>
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
- The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance].
+ The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance3D].
</member>
</members>
<constants>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index 5f8c7ed120..9c753818d9 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerAPI" inherits="Reference" category="Core" version="3.2">
+<class name="MultiplayerAPI" inherits="Reference" version="4.0">
<brief_description>
High-level multiplayer API.
</brief_description>
@@ -19,7 +19,7 @@
</description>
</method>
<method name="get_network_connected_peers" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer].
@@ -65,7 +65,7 @@
<method name="send_bytes">
<return type="int" enum="Error">
</return>
- <argument index="0" name="bytes" type="PoolByteArray">
+ <argument index="0" name="bytes" type="PackedByteArray">
</argument>
<argument index="1" name="id" type="int" default="0">
</argument>
@@ -88,11 +88,11 @@
</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] (or if the [member network_peer] has [member PacketPeer.allow_object_decoding] set to [code]true[/code]), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.
+ If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.
[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="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_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_network_server]) and will set root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with root node set to puppet. 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.
+ 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_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. 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_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections.
@@ -126,7 +126,7 @@
<signal name="network_peer_packet">
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="packet" type="PoolByteArray">
+ <argument index="1" name="packet" type="PackedByteArray">
</argument>
<description>
Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
@@ -151,15 +151,9 @@
<constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode">
Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
</constant>
- <constant name="RPC_MODE_SLAVE" value="3" enum="RPCMode">
- [i]Deprecated.[/i] Use [constant RPC_MODE_PUPPET] instead. Analogous to the [code]slave[/code] keyword.
- </constant>
<constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode">
Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword.
</constant>
- <constant name="RPC_MODE_SYNC" value="4" enum="RPCMode">
- [i]Deprecated.[/i] Use [constant RPC_MODE_REMOTESYNC] instead. Analogous to the [code]sync[/code] keyword.
- </constant>
<constant name="RPC_MODE_MASTERSYNC" value="5" enum="RPCMode">
Behave like [constant RPC_MODE_MASTER] but also make the call or property change locally. Analogous to the [code]mastersync[/code] keyword.
</constant>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index 8a294425e6..2de1f71867 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mutex" inherits="Reference" category="Core" version="3.2">
+<class name="Mutex" inherits="Reference" version="4.0">
<brief_description>
A synchronization mutex (mutual exclusion).
</brief_description>
diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml
deleted file mode 100644
index 58b7d1255e..0000000000
--- a/doc/classes/Navigation.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation" inherits="Spatial" category="Core" version="3.2">
- <brief_description>
- Mesh-based navigation and pathfinding node.
- </brief_description>
- <description>
- Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default, these will be automatically collected from child [NavigationMeshInstance] nodes, but they can also be added on the fly with [method navmesh_add]. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="get_closest_point">
- <return type="Vector3">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- Returns the navigation point closest to the point given. Points are in local coordinate space.
- </description>
- </method>
- <method name="get_closest_point_normal">
- <return type="Vector3">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on.
- </description>
- </method>
- <method name="get_closest_point_owner">
- <return type="Object">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted).
- </description>
- </method>
- <method name="get_closest_point_to_segment">
- <return type="Vector3">
- </return>
- <argument index="0" name="start" type="Vector3">
- </argument>
- <argument index="1" name="end" type="Vector3">
- </argument>
- <argument index="2" name="use_collision" type="bool" default="false">
- </argument>
- <description>
- Returns the navigation point closest to the given line segment. When enabling [code]use_collision[/code], only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned.
- </description>
- </method>
- <method name="get_simple_path">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="start" type="Vector3">
- </argument>
- <argument index="1" name="end" type="Vector3">
- </argument>
- <argument index="2" name="optimize" type="bool" default="true">
- </argument>
- <description>
- Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.
- </description>
- </method>
- <method name="navmesh_add">
- <return type="int">
- </return>
- <argument index="0" name="mesh" type="NavigationMesh">
- </argument>
- <argument index="1" name="xform" type="Transform">
- </argument>
- <argument index="2" name="owner" type="Object" default="null">
- </argument>
- <description>
- Adds a [NavigationMesh]. Returns an ID for use with [method navmesh_remove] or [method navmesh_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional [code]owner[/code] is used as return value for [method get_closest_point_owner].
- </description>
- </method>
- <method name="navmesh_remove">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Removes the [NavigationMesh] with the given ID.
- </description>
- </method>
- <method name="navmesh_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="xform" type="Transform">
- </argument>
- <description>
- Sets the transform applied to the [NavigationMesh] with the given ID.
- </description>
- </method>
- </methods>
- <members>
- <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )">
- Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml
index ea1b992d79..dcbfbc2350 100644
--- a/doc/classes/Navigation2D.xml
+++ b/doc/classes/Navigation2D.xml
@@ -1,79 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Navigation2D" inherits="Node2D" version="4.0">
<brief_description>
2D navigation and pathfinding node.
</brief_description>
<description>
- Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. By default, these are automatically collected from child [NavigationPolygonInstance] nodes, but they can also be added on the fly with [method navpoly_add].
+ Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationRegion2D] nodes.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="get_closest_point">
+ <method name="get_closest_point" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="to_point" type="Vector2">
</argument>
<description>
- Returns the navigation point closest to the point given. Points are in local coordinate space.
+ Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
</description>
</method>
- <method name="get_closest_point_owner">
- <return type="Object">
+ <method name="get_closest_point_owner" qualifiers="const">
+ <return type="RID">
</return>
<argument index="0" name="to_point" type="Vector2">
</argument>
<description>
- Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigationPolygonInstance]. For polygons added via [method navpoly_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted).
+ Returns the owner region RID for the point returned by [method get_closest_point].
</description>
</method>
- <method name="get_simple_path">
- <return type="PoolVector2Array">
+ <method name="get_rid" qualifiers="const">
+ <return type="RID">
</return>
- <argument index="0" name="start" type="Vector2">
- </argument>
- <argument index="1" name="end" type="Vector2">
- </argument>
- <argument index="2" name="optimize" type="bool" default="true">
- </argument>
- <description>
- Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible.
- </description>
- </method>
- <method name="navpoly_add">
- <return type="int">
- </return>
- <argument index="0" name="mesh" type="NavigationPolygon">
- </argument>
- <argument index="1" name="xform" type="Transform2D">
- </argument>
- <argument index="2" name="owner" type="Object" default="null">
- </argument>
<description>
- Adds a [NavigationPolygon]. Returns an ID for use with [method navpoly_remove] or [method navpoly_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional [code]owner[/code] is used as return value for [method get_closest_point_owner].
</description>
</method>
- <method name="navpoly_remove">
- <return type="void">
+ <method name="get_simple_path" qualifiers="const">
+ <return type="PackedVector2Array">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="start" type="Vector2">
</argument>
- <description>
- Removes the [NavigationPolygon] with the given ID.
- </description>
- </method>
- <method name="navpoly_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="end" type="Vector2">
</argument>
- <argument index="1" name="xform" type="Transform2D">
+ <argument index="2" name="optimize" type="bool" default="true">
</argument>
<description>
- Sets the transform applied to the [NavigationPolygon] with the given ID.
+ Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible.
</description>
</method>
</methods>
+ <members>
+ <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="10.0">
+ </member>
+ <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="100.0">
+ </member>
+ </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/Navigation3D.xml b/doc/classes/Navigation3D.xml
new file mode 100644
index 0000000000..807f0ad309
--- /dev/null
+++ b/doc/classes/Navigation3D.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Navigation3D" inherits="Node3D" version="4.0">
+ <brief_description>
+ Mesh-based navigation and pathfinding node.
+ </brief_description>
+ <description>
+ Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion3D] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_closest_point" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
+ </description>
+ </method>
+ <method name="get_closest_point_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the normal for the point returned by [method get_closest_point].
+ </description>
+ </method>
+ <method name="get_closest_point_owner" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the owner region RID for the point returned by [method get_closest_point].
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="start" type="Vector3">
+ </argument>
+ <argument index="1" name="end" type="Vector3">
+ </argument>
+ <argument index="2" name="use_collision" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the closest point between the navigation surface and the segment.
+ </description>
+ </method>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_simple_path" qualifiers="const">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="start" type="Vector3">
+ </argument>
+ <argument index="1" name="end" type="Vector3">
+ </argument>
+ <argument index="2" name="optimize" type="bool" default="true">
+ </argument>
+ <description>
+ Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3">
+ </member>
+ <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="5.0">
+ </member>
+ <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )">
+ Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
new file mode 100644
index 0000000000..5a9c31ef67
--- /dev/null
+++ b/doc/classes/NavigationAgent2D.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationAgent2D" inherits="Node" version="4.0">
+ <brief_description>
+ 2D Agent used in navigation for collision avoidance.
+ </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. This can be done by having the agent as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationAgent2D] is physics safe.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="distance_to_target" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate.
+ </description>
+ </method>
+ <method name="get_final_location">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way.
+ </description>
+ </method>
+ <method name="get_nav_path" qualifiers="const">
+ <return type="PackedVector2Array">
+ </return>
+ <description>
+ Returns the path from start to finish in global coordinates.
+ </description>
+ </method>
+ <method name="get_nav_path_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns which index the agent is currently on in the navigation path's [PackedVector2Array].
+ </description>
+ </method>
+ <method name="get_navigation" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ Returns the [Navigation2D] node that the agent is using for its navigation system.
+ </description>
+ </method>
+ <method name="get_next_location">
+ <return type="Vector2">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="get_target_location" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the user defined [Vector2] after setting the target location.
+ </description>
+ </method>
+ <method name="is_navigation_finished">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the navigation path's final location has been reached.
+ </description>
+ </method>
+ <method name="is_target_reachable">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the target location is reachable. The target location is set using [method set_target_location].
+ </description>
+ </method>
+ <method name="is_target_reached" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
+ </description>
+ </method>
+ <method name="set_navigation">
+ <return type="void">
+ </return>
+ <argument index="0" name="navigation" type="Node">
+ </argument>
+ <description>
+ Sets the [Navigation2D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation2D] node.
+ </description>
+ </method>
+ <method name="set_target_location">
+ <return type="void">
+ </return>
+ <argument index="0" name="location" type="Vector2">
+ </argument>
+ <description>
+ Sets the user desired final location. This will clear the current navigation path.
+ </description>
+ </method>
+ <method name="set_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="velocity" type="Vector2">
+ </argument>
+ <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="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="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="500.0">
+ The distance to search for other agents.
+ </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.
+ </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.
+ </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 algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
+ </member>
+ </members>
+ <signals>
+ <signal name="navigation_finished">
+ <description>
+ Notifies when the final location is reached.
+ </description>
+ </signal>
+ <signal name="path_changed">
+ <description>
+ Notifies when the navigation path changes.
+ </description>
+ </signal>
+ <signal name="target_reached">
+ <description>
+ Notifies when the player defined target, set with [method set_target_location], is reached.
+ </description>
+ </signal>
+ <signal name="velocity_computed">
+ <argument index="0" name="safe_velocity" type="Vector3">
+ </argument>
+ <description>
+ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
new file mode 100644
index 0000000000..f9df1d390b
--- /dev/null
+++ b/doc/classes/NavigationAgent3D.xml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationAgent3D" inherits="Node" version="4.0">
+ <brief_description>
+ 3D Agent used in navigation for collision avoidance.
+ </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. This can be done by having the agent as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationAgent3D] is physics safe.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="distance_to_target" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate.
+ </description>
+ </method>
+ <method name="get_final_location">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame.
+ </description>
+ </method>
+ <method name="get_nav_path" qualifiers="const">
+ <return type="PackedVector3Array">
+ </return>
+ <description>
+ Returns the path from start to finish in global coordinates.
+ </description>
+ </method>
+ <method name="get_nav_path_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns which index the agent is currently on in the navigation path's [PackedVector3Array].
+ </description>
+ </method>
+ <method name="get_navigation" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ Returns the [Navigation3D] node that the agent is using for its navigation system.
+ </description>
+ </method>
+ <method name="get_next_location">
+ <return type="Vector3">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="get_target_location" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the user defined [Vector3] after setting the target location.
+ </description>
+ </method>
+ <method name="is_navigation_finished">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the navigation path's final location has been reached.
+ </description>
+ </method>
+ <method name="is_target_reachable">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the target location is reachable. The target location is set using [method set_target_location].
+ </description>
+ </method>
+ <method name="is_target_reached" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
+ </description>
+ </method>
+ <method name="set_navigation">
+ <return type="void">
+ </return>
+ <argument index="0" name="navigation" type="Node">
+ </argument>
+ <description>
+ Sets the [Navigation3D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation3D] node.
+ </description>
+ </method>
+ <method name="set_target_location">
+ <return type="void">
+ </return>
+ <argument index="0" name="location" type="Vector3">
+ </argument>
+ <description>
+ Sets the user desired final location. This will clear the current navigation path.
+ </description>
+ </method>
+ <method name="set_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="velocity" type="Vector3">
+ </argument>
+ <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="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.
+ </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.
+ </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="10.0">
+ The maximum speed that an agent can move.
+ </member>
+ <member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="50.0">
+ The distance to search for other agents.
+ </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.
+ </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.
+ </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 algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
+ </member>
+ </members>
+ <signals>
+ <signal name="navigation_finished">
+ <description>
+ Notifies when the final location is reached.
+ </description>
+ </signal>
+ <signal name="path_changed">
+ <description>
+ Notifies when the navigation path changes.
+ </description>
+ </signal>
+ <signal name="target_reached">
+ <description>
+ Notifies when the player defined target, set with [method set_target_location], is reached.
+ </description>
+ </signal>
+ <signal name="velocity_computed">
+ <argument index="0" name="safe_velocity" type="Vector3">
+ </argument>
+ <description>
+ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index 6528704bb5..6deca4394f 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMesh" inherits="Resource" category="Core" version="3.2">
+<class name="NavigationMesh" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -10,7 +10,7 @@
<method name="add_polygon">
<return type="void">
</return>
- <argument index="0" name="polygon" type="PoolIntArray">
+ <argument index="0" name="polygon" type="PackedInt32Array">
</argument>
<description>
</description>
@@ -38,7 +38,7 @@
</description>
</method>
<method name="get_polygon">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -52,7 +52,7 @@
</description>
</method>
<method name="get_vertices" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
</description>
@@ -70,7 +70,7 @@
<method name="set_vertices">
<return type="void">
</return>
- <argument index="0" name="vertices" type="PoolVector3Array">
+ <argument index="0" name="vertices" type="PackedVector3Array">
</argument>
<description>
</description>
@@ -109,7 +109,7 @@
</member>
<member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0">
</member>
- <member name="geometry/source_group_name" type="String" setter="set_source_group_name" getter="get_source_group_name">
+ <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name">
</member>
<member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0">
</member>
diff --git a/doc/classes/EditorNavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml
index 3956e12509..ce1182ffbe 100644
--- a/doc/classes/EditorNavigationMeshGenerator.xml
+++ b/doc/classes/NavigationMeshGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorNavigationMeshGenerator" inherits="Object" category="Core" version="3.2">
+<class name="NavigationMeshGenerator" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml
deleted file mode 100644
index 2f9cc58aea..0000000000
--- a/doc/classes/NavigationMeshInstance.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMeshInstance" inherits="Spatial" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
- </member>
- <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml
new file mode 100644
index 0000000000..ddd96975f1
--- /dev/null
+++ b/doc/classes/NavigationObstacle2D.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationObstacle2D" inherits="Node" version="4.0">
+ <brief_description>
+ 2D Obstacle used in navigation for collision avoidance.
+ </brief_description>
+ <description>
+ 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle2D] is physics safe.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_navigation" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ Returns the [Navigation2D] node that the obstacle is using for its navigation system.
+ </description>
+ </method>
+ <method name="set_navigation">
+ <return type="void">
+ </return>
+ <argument index="0" name="navigation" type="Node">
+ </argument>
+ <description>
+ Sets the [Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation2D] node.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml
new file mode 100644
index 0000000000..e01a40ed73
--- /dev/null
+++ b/doc/classes/NavigationObstacle3D.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationObstacle3D" inherits="Node" version="4.0">
+ <brief_description>
+ 3D Obstacle used in navigation for collision avoidance.
+ </brief_description>
+ <description>
+ 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationObstacle3D] is physics safe.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_navigation" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ Returns the [Navigation3D] node that the obstacle is using for its navigation system.
+ </description>
+ </method>
+ <method name="set_navigation">
+ <return type="void">
+ </return>
+ <argument index="0" name="navigation" type="Node">
+ </argument>
+ <description>
+ Sets the [Navigation3D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation3D] node.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 555f308660..b0f77dff83 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.2">
+<class name="NavigationPolygon" inherits="Resource" version="4.0">
<brief_description>
A node that has methods to draw outlines or use indices of vertices to create navigation polygons.
</brief_description>
@@ -8,19 +8,19 @@
Using [method add_outline]:
[codeblock]
var polygon = NavigationPolygon.new()
- var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
+ var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.add_outline(outline)
polygon.make_polygons_from_outlines()
- $NavigationPolygonInstance.navpoly = polygon
+ $NavigationRegion2D.navpoly = polygon
[/codeblock]
Using [method add_polygon] and indices of the vertices array.
[codeblock]
var polygon = NavigationPolygon.new()
- var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
+ var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.set_vertices(vertices)
- var indices = PoolIntArray(0, 3, 1)
+ var indices = PackedInt32Array(0, 3, 1)
polygon.add_polygon(indices)
- $NavigationPolygonInstance.navpoly = polygon
+ $NavigationRegion2D.navpoly = polygon
[/codeblock]
</description>
<tutorials>
@@ -29,27 +29,27 @@
<method name="add_outline">
<return type="void">
</return>
- <argument index="0" name="outline" type="PoolVector2Array">
+ <argument index="0" name="outline" type="PackedVector2Array">
</argument>
<description>
- Appends a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
+ Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_outline_at_index">
<return type="void">
</return>
- <argument index="0" name="outline" type="PoolVector2Array">
+ <argument index="0" name="outline" type="PackedVector2Array">
</argument>
<argument index="1" name="index" type="int">
</argument>
<description>
- Adds a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
+ Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_polygon">
<return type="void">
</return>
- <argument index="0" name="polygon" type="PoolIntArray">
+ <argument index="0" name="polygon" type="PackedInt32Array">
</argument>
<description>
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
@@ -70,12 +70,12 @@
</description>
</method>
<method name="get_outline" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns a [PoolVector2Array] containing the vertices of an outline that was created in the editor or by script.
+ Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script.
</description>
</method>
<method name="get_outline_count" qualifiers="const">
@@ -86,12 +86,12 @@
</description>
</method>
<method name="get_polygon">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns a [PoolIntArray] containing the indices of the vertices of a created polygon.
+ Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon.
</description>
</method>
<method name="get_polygon_count" qualifiers="const">
@@ -102,10 +102,10 @@
</description>
</method>
<method name="get_vertices" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<description>
- Returns a [PoolVector2Array] containing all the vertices being used to create the polygons.
+ Returns a [PackedVector2Array] containing all the vertices being used to create the polygons.
</description>
</method>
<method name="make_polygons_from_outlines">
@@ -129,7 +129,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="outline" type="PoolVector2Array">
+ <argument index="1" name="outline" type="PackedVector2Array">
</argument>
<description>
Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update.
@@ -138,7 +138,7 @@
<method name="set_vertices">
<return type="void">
</return>
- <argument index="0" name="vertices" type="PoolVector2Array">
+ <argument index="0" name="vertices" type="PackedVector2Array">
</argument>
<description>
Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method.
diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationRegion2D.xml
index 83f3386af6..aef114e1db 100644
--- a/doc/classes/NavigationPolygonInstance.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygonInstance" inherits="Node2D" category="Core" version="3.2">
+<class name="NavigationRegion2D" inherits="Node2D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
new file mode 100644
index 0000000000..b70bfb6596
--- /dev/null
+++ b/doc/classes/NavigationRegion3D.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationRegion3D" inherits="Node3D" version="4.0">
+ <brief_description>
+ A region of the navigation map.
+ </brief_description>
+ <description>
+ A region of the navigation map. It tells the [Navigation3D] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation3D] node (even not a direct child).
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="bake_navigation_mesh">
+ <return type="void">
+ </return>
+ <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].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ Determines if the [NavigationRegion3D] is enabled or disabled.
+ </member>
+ <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
+ The [NavigationMesh] resource to use.
+ </member>
+ </members>
+ <signals>
+ <signal name="bake_finished">
+ <description>
+ Notifies when the navigation mesh bake operation is completed.
+ </description>
+ </signal>
+ <signal name="navigation_mesh_changed">
+ <description>
+ Notifies when the [NavigationMesh] has changed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
new file mode 100644
index 0000000000..1b9099336c
--- /dev/null
+++ b/doc/classes/NavigationServer2D.xml
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationServer2D" inherits="Object" version="4.0">
+ <brief_description>
+ Server interface for low-level 2D navigation access
+ </brief_description>
+ <description>
+ NavigationServer2D is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="agent_create" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Creates the agent.
+ </description>
+ </method>
+ <method name="agent_is_map_changed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <description>
+ Returns true if the map got changed the previous frame.
+ </description>
+ </method>
+ <method name="agent_set_callback" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="method" type="StringName">
+ </argument>
+ <argument index="3" name="userdata" type="Variant" default="null">
+ </argument>
+ <description>
+ Callback called at the end of the RVO process.
+ </description>
+ </method>
+ <method name="agent_set_map" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="map" type="RID">
+ </argument>
+ <description>
+ Puts the agent in the map.
+ </description>
+ </method>
+ <method name="agent_set_max_neighbors" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="count" type="int">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="max_speed" type="float">
+ </argument>
+ <description>
+ Sets the maximum speed of the agent. Must be positive.
+ </description>
+ </method>
+ <method name="agent_set_neighbor_dist" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="dist" type="float">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="position" type="Vector2">
+ </argument>
+ <description>
+ Sets the position of the agent in world space.
+ </description>
+ </method>
+ <method name="agent_set_radius" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="radius" type="float">
+ </argument>
+ <description>
+ Sets the radius of the agent.
+ </description>
+ </method>
+ <method name="agent_set_target_velocity" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="target_velocity" type="Vector2">
+ </argument>
+ <description>
+ Sets the new target velocity.
+ </description>
+ </method>
+ <method name="agent_set_time_horizon" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="time" type="float">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="velocity" type="Vector2">
+ </argument>
+ <description>
+ Sets the current velocity of the agent.
+ </description>
+ </method>
+ <method name="free" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="RID">
+ </argument>
+ <description>
+ Destroy the RID
+ </description>
+ </method>
+ <method name="map_create" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Create a new map.
+ </description>
+ </method>
+ <method name="map_get_cell_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <description>
+ Returns the map cell size.
+ </description>
+ </method>
+ <method name="map_get_closest_point" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
+ </description>
+ </method>
+ <method name="map_get_closest_point_owner" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ Returns the owner region RID for the point returned by [method map_get_closest_point].
+ </description>
+ </method>
+ <method name="map_get_edge_connection_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="origin" type="Vector2">
+ </argument>
+ <argument index="2" name="destination" type="Vector2">
+ </argument>
+ <argument index="3" name="optimize" type="bool">
+ </argument>
+ <description>
+ Returns the navigation path to reach the destination from the origin, while avoiding static obstacles.
+ </description>
+ </method>
+ <method name="map_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="nap" type="RID">
+ </argument>
+ <description>
+ Returns true if the map is active.
+ </description>
+ </method>
+ <method name="map_set_active" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="active" type="bool">
+ </argument>
+ <description>
+ Sets the map active.
+ </description>
+ </method>
+ <method name="map_set_cell_size" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="cell_size" type="float">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="margin" type="float">
+ </argument>
+ <description>
+ Set the map edge connection margin used to weld the compatible region edges.
+ </description>
+ </method>
+ <method name="region_create" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Creates a new region.
+ </description>
+ </method>
+ <method name="region_set_map" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="map" type="RID">
+ </argument>
+ <description>
+ Sets the map for the region.
+ </description>
+ </method>
+ <method name="region_set_navpoly" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="nav_poly" type="NavigationPolygon">
+ </argument>
+ <description>
+ Sets the navigation mesh for the region.
+ </description>
+ </method>
+ <method name="region_set_transform" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Sets the global transformation for the region.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
new file mode 100644
index 0000000000..1f621c3c81
--- /dev/null
+++ b/doc/classes/NavigationServer3D.xml
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationServer3D" inherits="Object" version="4.0">
+ <brief_description>
+ Server interface for low-level 3D navigation access
+ </brief_description>
+ <description>
+ NavigationServer3D is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="agent_create" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Creates the agent.
+ </description>
+ </method>
+ <method name="agent_is_map_changed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <description>
+ Returns true if the map got changed the previous frame.
+ </description>
+ </method>
+ <method name="agent_set_callback" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="method" type="StringName">
+ </argument>
+ <argument index="3" name="userdata" type="Variant" default="null">
+ </argument>
+ <description>
+ Callback called at the end of the RVO process.
+ </description>
+ </method>
+ <method name="agent_set_map" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="map" type="RID">
+ </argument>
+ <description>
+ Puts the agent in the map.
+ </description>
+ </method>
+ <method name="agent_set_max_neighbors" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="count" type="int">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="max_speed" type="float">
+ </argument>
+ <description>
+ Sets the maximum speed of the agent. Must be positive.
+ </description>
+ </method>
+ <method name="agent_set_neighbor_dist" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="dist" type="float">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="position" type="Vector3">
+ </argument>
+ <description>
+ Sets the position of the agent in world space.
+ </description>
+ </method>
+ <method name="agent_set_radius" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="radius" type="float">
+ </argument>
+ <description>
+ Sets the radius of the agent.
+ </description>
+ </method>
+ <method name="agent_set_target_velocity" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="target_velocity" type="Vector3">
+ </argument>
+ <description>
+ Sets the new target velocity.
+ </description>
+ </method>
+ <method name="agent_set_time_horizon" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="time" type="float">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="agent" type="RID">
+ </argument>
+ <argument index="1" name="velocity" type="Vector3">
+ </argument>
+ <description>
+ Sets the current velocity of the agent.
+ </description>
+ </method>
+ <method name="free" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="RID">
+ </argument>
+ <description>
+ Destroy the RID
+ </description>
+ </method>
+ <method name="map_create" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Create a new map.
+ </description>
+ </method>
+ <method name="map_get_cell_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <description>
+ Returns the map cell size.
+ </description>
+ </method>
+ <method name="map_get_closest_point" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the point closest to the provided [code]point[/code] on the navigation mesh surface.
+ </description>
+ </method>
+ <method name="map_get_closest_point_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the normal for the point returned by [method map_get_closest_point].
+ </description>
+ </method>
+ <method name="map_get_closest_point_owner" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the owner region RID for the point returned by [method map_get_closest_point].
+ </description>
+ </method>
+ <method name="map_get_closest_point_to_segment" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="start" type="Vector3">
+ </argument>
+ <argument index="2" name="end" type="Vector3">
+ </argument>
+ <argument index="3" name="use_collision" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the closest point between the navigation surface and the segment.
+ </description>
+ </method>
+ <method name="map_get_edge_connection_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <description>
+ Returns the edge connection margin of the map.
+ </description>
+ </method>
+ <method name="map_get_path" qualifiers="const">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="origin" type="Vector3">
+ </argument>
+ <argument index="2" name="destination" type="Vector3">
+ </argument>
+ <argument index="3" name="optimize" type="bool">
+ </argument>
+ <description>
+ Returns the navigation path to reach the destination from the origin.
+ </description>
+ </method>
+ <method name="map_get_up" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <description>
+ Returns the map's up direction.
+ </description>
+ </method>
+ <method name="map_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="nap" type="RID">
+ </argument>
+ <description>
+ Returns true if the map is active.
+ </description>
+ </method>
+ <method name="map_set_active" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="active" type="bool">
+ </argument>
+ <description>
+ Sets the map active.
+ </description>
+ </method>
+ <method name="map_set_cell_size" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="cell_size" type="float">
+ </argument>
+ <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">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="margin" type="float">
+ </argument>
+ <description>
+ Set the map edge connection margein used to weld the compatible region edges.
+ </description>
+ </method>
+ <method name="map_set_up" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="up" type="Vector3">
+ </argument>
+ <description>
+ Sets the map up direction.
+ </description>
+ </method>
+ <method name="process">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta_time" type="float">
+ </argument>
+ <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.
+ Note: This function is not thread safe.
+ </description>
+ </method>
+ <method name="region_bake_navmesh" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="NavigationMesh">
+ </argument>
+ <argument index="1" name="node" type="Node">
+ </argument>
+ <description>
+ Bakes the navigation mesh.
+ </description>
+ </method>
+ <method name="region_create" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Creates a new region.
+ </description>
+ </method>
+ <method name="region_set_map" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="map" type="RID">
+ </argument>
+ <description>
+ Sets the map for the region.
+ </description>
+ </method>
+ <method name="region_set_navmesh" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="nav_mesh" type="NavigationMesh">
+ </argument>
+ <description>
+ Sets the navigation mesh for the region.
+ </description>
+ </method>
+ <method name="region_set_transform" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
+ </argument>
+ <description>
+ Sets the global transformation for the region.
+ </description>
+ </method>
+ <method name="set_active" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <description>
+ Control activation of this server.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 4f212cf392..ff97ea926d 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.2">
+<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" version="4.0">
<brief_description>
A high-level network interface to simplify multiplayer interactions.
</brief_description>
diff --git a/doc/classes/Nil.xml b/doc/classes/Nil.xml
deleted file mode 100644
index a5c1ade6ed..0000000000
--- a/doc/classes/Nil.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Nil" category="Built-In Types" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="Nil">
- <argument index="0" name="from" type="PoolColorArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolVector3Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolStringArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolRealArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Basis">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="AABB">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Quat">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Plane">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Transform2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index 221a3c22c1..9c3acc9b0a 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NinePatchRect" inherits="Control" category="Core" version="3.2">
+<class name="NinePatchRect" inherits="Control" version="4.0">
<brief_description>
Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes.
</brief_description>
@@ -15,6 +15,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the size of the margin identified by the given [enum Margin] constant.
</description>
</method>
<method name="set_patch_margin">
@@ -25,6 +26,7 @@
<argument index="1" name="value" type="int">
</argument>
<description>
+ Sets the size of the margin identified by the given [enum Margin] constant to [code]value[/code] in pixels.
</description>
</method>
</methods>
@@ -54,14 +56,14 @@
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture.
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The node's texture resource.
</member>
</members>
<signals>
<signal name="texture_changed">
<description>
- Fired when the node's texture changes.
+ Emitted when the node's texture changes.
</description>
</signal>
</signals>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 1f685aab81..04c8d2bf57 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node" inherits="Object" category="Core" version="3.2">
+<class name="Node" inherits="Object" version="4.0">
<brief_description>
Base class for all [i]scene[/i] objects.
</brief_description>
@@ -33,7 +33,7 @@
</return>
<description>
Called when the node is about to leave the [SceneTree] (e.g. upon freeing, scene changing, or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree.
- Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]
+ Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited].
</description>
</method>
<method name="_get_configuration_warning" qualifiers="virtual">
@@ -53,7 +53,7 @@
<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].
- To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
+ To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first.
</description>
</method>
@@ -97,7 +97,7 @@
<description>
Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI. 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].
- To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
+ To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
For gameplay input, this and [method _unhandled_key_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
</description>
</method>
@@ -109,7 +109,7 @@
<description>
Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
- To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
+ To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
</description>
</method>
@@ -129,26 +129,27 @@
child_node.get_parent().remove_child(child_node)
add_child(child_node)
[/codeblock]
+ If you need the child node to be added below a specific node in the list of children, use [method add_sibling] instead of this method.
+ [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.
</description>
</method>
- <method name="add_child_below_node">
+ <method name="add_sibling">
<return type="void">
</return>
- <argument index="0" name="node" type="Node">
- </argument>
- <argument index="1" name="child_node" type="Node">
+ <argument index="0" name="sibling" type="Node">
</argument>
- <argument index="2" name="legible_unique_name" type="bool" default="false">
+ <argument index="1" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
- Adds a child node. The child is placed below the given node in the list of children.
+ Adds a [code]sibling[/code] node to current's node parent, at the the same level as that node, right below it.
If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type.
+ Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
</description>
</method>
<method name="add_to_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<argument index="1" name="persistent" type="bool" default="false">
</argument>
@@ -218,7 +219,7 @@
</description>
</method>
<method name="get_children" qualifiers="const">
- <return type="Array">
+ <return type="Node[]">
</return>
<description>
Returns an array of references to node's children.
@@ -235,7 +236,7 @@
<return type="int">
</return>
<description>
- Returns the node's index, i.e. its position among the siblings of its parent.
+ 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].
</description>
</method>
<method name="get_network_master" qualifiers="const">
@@ -251,7 +252,7 @@
<argument index="0" name="path" type="NodePath">
</argument>
<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, a [code]null instance[/code] is returned and attempts to access it will result in an "Attempt to call &lt;method&gt; on a null instance." error.
+ 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, a [code]null instance[/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]).
[b]Example:[/b] Assume your current node is Character and the following tree:
[codeblock]
@@ -295,14 +296,14 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Similar to [method get_node], but does not raise 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 [code]path[/code] does not point to a valid [Node].
</description>
</method>
<method name="get_parent" qualifiers="const">
<return type="Node">
</return>
<description>
- Returns the parent node of the current node, or an empty [Node] if the node lacks a parent.
+ Returns the parent node of the current node, or a [code]null instance[/code] if the node lacks a parent.
</description>
</method>
<method name="get_path" qualifiers="const">
@@ -325,14 +326,7 @@
<return type="float">
</return>
<description>
- Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.target_fps].
- </description>
- </method>
- <method name="get_position_in_parent" qualifiers="const">
- <return type="int">
- </return>
- <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].
+ Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.iterations_per_second].
</description>
</method>
<method name="get_process_delta_time" qualifiers="const">
@@ -409,7 +403,7 @@
<method name="is_in_group" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<description>
Returns [code]true[/code] if this node is in the specified group. See notes in the description, and the group methods in [SceneTree].
@@ -531,7 +525,7 @@
<method name="propagate_call">
<return type="void">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<argument index="1" name="args" type="Array" default="[ ]">
</argument>
@@ -583,7 +577,7 @@
<method name="remove_from_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<description>
Removes a node from a group. See notes in the description, and the group methods in [SceneTree].
@@ -610,7 +604,7 @@
<method name="rpc" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant].
@@ -618,9 +612,9 @@
</description>
</method>
<method name="rpc_config">
- <return type="void">
+ <return type="int">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
</argument>
@@ -633,7 +627,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
@@ -642,7 +636,7 @@
<method name="rpc_unreliable" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant].
@@ -653,7 +647,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
@@ -662,7 +656,7 @@
<method name="rset">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -671,9 +665,9 @@
</description>
</method>
<method name="rset_config">
- <return type="void">
+ <return type="int">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
</argument>
@@ -686,7 +680,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -697,7 +691,7 @@
<method name="rset_unreliable">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -710,7 +704,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -744,7 +738,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<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.target_fps] 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.
+ 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.iterations_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">
@@ -783,15 +777,6 @@
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' behaviour.
</description>
</method>
- <method name="set_process_priority">
- <return type="void">
- </return>
- <argument index="0" name="priority" type="int">
- </argument>
- <description>
- Sets the node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first.
- </description>
- </method>
<method name="set_process_unhandled_input">
<return type="void">
</return>
@@ -838,7 +823,7 @@
<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree).
</member>
- <member name="name" type="String" setter="set_name" getter="get_name">
+ <member name="name" type="StringName" setter="set_name" getter="get_name">
The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.
</member>
<member name="owner" type="Node" setter="set_owner" getter="get_owner">
@@ -847,6 +832,9 @@
<member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode" default="0">
Pause mode. How the node will behave if the [SceneTree] is paused.
</member>
+ <member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0">
+ The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first.
+ </member>
</members>
<signals>
<signal name="ready">
@@ -941,42 +929,40 @@
Notification received from the OS when the game window is unfocused.
Implemented on all platforms.
</constant>
- <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
- Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
+ <constant name="NOTIFICATION_WM_CLOSE_REQUEST" value="1006">
+ Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or [kbd]Alt + F4[/kbd]).
Implemented on desktop platforms.
</constant>
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
Specific to the Android platform.
</constant>
- <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
- Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
- No supported platforms currently send this notification.
+ <constant name="NOTIFICATION_WM_SIZE_CHANGED" value="1008">
</constant>
- <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
+ <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
Notification received from the OS when the application is exceeding its allocated memory.
Specific to the iOS platform.
</constant>
- <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
+ <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="2010">
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
</constant>
- <constant name="NOTIFICATION_WM_ABOUT" value="1011">
+ <constant name="NOTIFICATION_WM_ABOUT" value="2011">
Notification received from the OS when a request for "About" information is sent.
Specific to the macOS platform.
</constant>
- <constant name="NOTIFICATION_CRASH" value="1012">
+ <constant name="NOTIFICATION_CRASH" value="2012">
Notification received from Godot's crash handler when the engine is about to crash.
Implemented on desktop platforms if the crash handler is enabled.
</constant>
- <constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
+ <constant name="NOTIFICATION_OS_IME_UPDATE" value="2013">
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
Specific to the macOS platform.
</constant>
- <constant name="NOTIFICATION_APP_RESUMED" value="1014">
+ <constant name="NOTIFICATION_APP_RESUMED" value="2014">
Notification received from the OS when the app is resumed.
Specific to the Android platform.
</constant>
- <constant name="NOTIFICATION_APP_PAUSED" value="1015">
+ <constant name="NOTIFICATION_APP_PAUSED" value="2015">
Notification received from the OS when the app is paused.
Specific to the Android platform.
</constant>
@@ -1000,6 +986,7 @@
</constant>
<constant name="DUPLICATE_USE_INSTANCING" value="8" enum="DuplicateFlags">
Duplicate using instancing.
+ An instance stays linked to the original so when the original changes, the instance changes too.
</constant>
</constants>
</class>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 29c4680685..d29c556216 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node2D" inherits="CanvasItem" category="Core" version="3.2">
+<class name="Node2D" inherits="CanvasItem" version="4.0">
<brief_description>
- A 2D game object, parent of all 2D-related nodes. Has a position, rotation, scale and Z index.
+ A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index.
</brief_description>
<description>
- A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order.
+ A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
@@ -92,7 +92,7 @@
<argument index="0" name="local_point" type="Vector2">
</argument>
<description>
- Converts a local point's coordinates to global coordinates.
+ 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">
@@ -101,7 +101,7 @@
<argument index="0" name="global_point" type="Vector2">
</argument>
<description>
- Converts a global point's coordinates to local coordinates.
+ 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">
@@ -142,6 +142,10 @@
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
The node's scale. Unscaled value: [code](1, 1)[/code].
</member>
+ <member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0">
+ </member>
+ <member name="skew_degrees" type="float" setter="set_skew_degrees" getter="get_skew_degrees" default="0.0">
+ </member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
</member>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Node3D.xml
index 0309e73eec..05d00b9f31 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Node3D.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Spatial" inherits="Node" category="Core" version="3.2">
+<class name="Node3D" inherits="Node" version="4.0">
<brief_description>
Most basic 3D game object, parent of all 3D-related nodes.
</brief_description>
<description>
- Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use [Spatial] as a parent node to move, scale, rotate and show/hide children in a 3D project.
- Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Spatial] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Spatial]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Spatial] object itself is referred to as object-local coordinate system.
+ Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project.
+ Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system.
+ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link>
@@ -19,17 +20,17 @@
</description>
</method>
<method name="get_parent_spatial" qualifiers="const">
- <return type="Spatial">
+ <return type="Node3D">
</return>
<description>
- Returns the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
+ Returns the parent [Node3D], or an empty [Object] if no parent exists or parent is not of type [Node3D].
</description>
</method>
- <method name="get_world" qualifiers="const">
- <return type="World">
+ <method name="get_world_3d" qualifiers="const">
+ <return type="World3D">
</return>
<description>
- Returns the current [World] resource this [Spatial] node is registered to.
+ Returns the current [World3D] resource this [Node3D] node is registered to.
</description>
</method>
<method name="global_rotate">
@@ -72,7 +73,7 @@
<return type="bool">
</return>
<description>
- Returns whether node notifies about its local transformation changes. [Spatial] will not propagate this by default.
+ Returns whether node notifies about its local transformation changes. [Node3D] will not propagate this by default.
</description>
</method>
<method name="is_scale_disabled" qualifiers="const">
@@ -93,7 +94,7 @@
<return type="bool">
</return>
<description>
- Returns whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default.
+ Returns whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default.
</description>
</method>
<method name="is_visible_in_tree" qualifiers="const">
@@ -234,7 +235,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Sets whether the node notifies about its local transformation changes. [Spatial] will not propagate this by default.
+ Sets whether the node notifies about its local transformation changes. [Node3D] will not propagate this by default.
</description>
</method>
<method name="set_notify_transform">
@@ -243,7 +244,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Sets whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default.
+ Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default.
</description>
</method>
<method name="show">
@@ -277,7 +278,7 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
- Changes the node's position by given offset [Vector3].
+ 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.
</description>
</method>
@@ -287,22 +288,23 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
+ Changes the node's position by the given offset [Vector3] in local space.
</description>
</method>
<method name="update_gizmo">
<return type="void">
</return>
<description>
- Updates the [SpatialGizmo] of this node.
+ Updates the [Node3DGizmo] of this node.
</description>
</method>
</methods>
<members>
- <member name="gizmo" type="SpatialGizmo" setter="set_gizmo" getter="get_gizmo">
- The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor.
+ <member name="gizmo" type="Node3DGizmo" setter="set_gizmo" getter="get_gizmo">
+ The [Node3DGizmo] for this node. Used for example in [EditorNode3DGizmo] as custom visualization and editing handles in Editor.
</member>
<member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform">
- World space (global) [Transform] of this node.
+ World3D space (global) [Transform] of this node.
</member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation">
Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
@@ -333,17 +335,17 @@
</signals>
<constants>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
- Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform.
+ Node3D nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform.
In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform].
</constant>
<constant name="NOTIFICATION_ENTER_WORLD" value="41">
- Spatial nodes receives this notification when they are registered to new [World] resource.
+ Node3D nodes receives this notification when they are registered to new [World3D] resource.
</constant>
<constant name="NOTIFICATION_EXIT_WORLD" value="42">
- Spatial nodes receives this notification when they are unregistered from current [World] resource.
+ Node3D nodes receives this notification when they are unregistered from current [World3D] resource.
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43">
- Spatial nodes receives this notification when their visibility changes.
+ Node3D nodes receives this notification when their visibility changes.
</constant>
</constants>
</class>
diff --git a/doc/classes/Node3DGizmo.xml b/doc/classes/Node3DGizmo.xml
new file mode 100644
index 0000000000..55080614fc
--- /dev/null
+++ b/doc/classes/Node3DGizmo.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Node3DGizmo" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 0310068a90..dc7fd1be3f 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NodePath" category="Built-In Types" version="3.2">
+<class name="NodePath" version="4.0">
<brief_description>
Pre-parsed scene tree path.
</brief_description>
<description>
- A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite"[/code] which is a child of the other named nodes in the path.
+ A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite2D"[/code] which is a child of the other named nodes in the path.
You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
A [NodePath] is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties.
Some examples of NodePaths include the following:
@@ -30,20 +30,20 @@
<argument index="0" name="from" type="String">
</argument>
<description>
- Creates a NodePath from a string, e.g. [code]"Path2D/PathFollow2D/Sprite: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.
+ 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.
Examples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties):
[codeblock]
- # Points to the Sprite node
- "Path2D/PathFollow2D/Sprite"
- # Points to the Sprite node and its "texture" resource.
- # get_node() would retrieve "Sprite", while get_node_and_resource()
- # would retrieve both the Sprite node and the "texture" resource.
- "Path2D/PathFollow2D/Sprite:texture"
- # Points to the Sprite node and its "position" property.
- "Path2D/PathFollow2D/Sprite:position"
- # Points to the Sprite node and the "x" component of its "position" property.
- "Path2D/PathFollow2D/Sprite:position:x"
+ # Points to the Sprite2D node
+ "Path2D/PathFollow2D/Sprite2D"
+ # Points to the Sprite2D node and its "texture" resource.
+ # get_node() would retrieve "Sprite2D", while get_node_and_resource()
+ # would retrieve both the Sprite2D node and the "texture" resource.
+ "Path2D/PathFollow2D/Sprite2D:texture"
+ # Points to the Sprite2D node and its "position" property.
+ "Path2D/PathFollow2D/Sprite2D:position"
+ # Points to the Sprite2D node and the "x" component of its "position" property.
+ "Path2D/PathFollow2D/Sprite2D:position:x"
# Absolute path (from "root")
"/root/Level/Path2D"
[/codeblock]
@@ -69,7 +69,7 @@
<description>
Returns all subnames concatenated with a colon character ([code]:[/code]) as separator, i.e. the right side of the first colon in a node path.
[codeblock]
- var nodepath = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path")
+ var nodepath = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path")
print(nodepath.get_concatenated_subnames()) # texture:load_path
[/codeblock]
</description>
@@ -82,7 +82,7 @@
<description>
Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]).
[codeblock]
- var node_path = NodePath("Path2D/PathFollow2D/Sprite")
+ var node_path = NodePath("Path2D/PathFollow2D/Sprite2D")
print(node_path.get_name(0)) # Path2D
print(node_path.get_name(1)) # PathFollow2D
print(node_path.get_name(2)) # Sprite
@@ -94,7 +94,7 @@
</return>
<description>
Gets the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included.
- For example, [code]"Path2D/PathFollow2D/Sprite"[/code] has 3 names.
+ For example, [code]"Path2D/PathFollow2D/Sprite2D"[/code] has 3 names.
</description>
</method>
<method name="get_subname">
@@ -105,7 +105,7 @@
<description>
Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]).
[codeblock]
- var node_path = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path")
+ var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path")
print(node_path.get_subname(0)) # texture
print(node_path.get_subname(1)) # load_path
[/codeblock]
@@ -116,7 +116,7 @@
</return>
<description>
Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character ([code]:[/code]) in the node path.
- For example, [code]"Path2D/PathFollow2D/Sprite:texture:load_path"[/code] has 2 subnames.
+ For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames.
</description>
</method>
<method name="is_absolute">
diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml
new file mode 100644
index 0000000000..d275f93196
--- /dev/null
+++ b/doc/classes/ORMMaterial3D.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 6da0547352..03203e2ebb 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OS" inherits="Object" category="Core" version="3.2">
+<class name="OS" inherits="Object" version="4.0">
<brief_description>
Operating System functions.
</brief_description>
@@ -9,24 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="alert">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <argument index="1" name="title" type="String" default="&quot;Alert!&quot;">
- </argument>
- <description>
- Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed.
- </description>
- </method>
- <method name="can_draw" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the host OS allows drawing.
- </description>
- </method>
<method name="can_use_threads" qualifiers="const">
<return type="bool">
</return>
@@ -34,17 +16,12 @@
Returns [code]true[/code] if the current host platform is using multiple threads.
</description>
</method>
- <method name="center_window">
- <return type="void">
- </return>
- <description>
- Centers the window on the screen if in windowed mode.
- </description>
- </method>
<method name="close_midi_inputs">
<return type="void">
</return>
<description>
+ Shuts down system MIDI driver.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="delay_msec" qualifiers="const">
@@ -91,9 +68,9 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="arguments" type="PoolStringArray">
+ <argument index="1" name="arguments" type="PackedStringArray">
</argument>
- <argument index="2" name="blocking" type="bool">
+ <argument index="2" name="blocking" type="bool" default="true">
</argument>
<argument index="3" name="output" type="Array" default="[ ]">
</argument>
@@ -119,53 +96,32 @@
[codeblock]
OS.execute("CMD.exe", ["/C", "cd %TEMP% &amp;&amp; dir"], true, output)
[/codeblock]
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
- <method name="find_scancode_from_string" qualifiers="const">
+ <method name="find_keycode_from_string" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="string" type="String">
</argument>
<description>
- Returns the scancode of the given string (e.g. "Escape").
- </description>
- </method>
- <method name="get_audio_driver_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the total number of available audio drivers.
- </description>
- </method>
- <method name="get_audio_driver_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="driver" type="int">
- </argument>
- <description>
- Returns the audio driver name for the given index.
+ Returns the keycode of the given string (e.g. "Escape").
</description>
</method>
<method name="get_cmdline_args">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the command line arguments passed to the engine.
</description>
</method>
<method name="get_connected_midi_inputs">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns an array of MIDI device names.
The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs].
- </description>
- </method>
- <method name="get_current_video_driver" qualifiers="const">
- <return type="int" enum="OS.VideoDriver">
- </return>
- <description>
- Returns the currently used video driver, using one of the values from [enum VideoDriver].
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="get_date" qualifiers="const">
@@ -196,13 +152,6 @@
The returned Dictionary's values will be the same as [method get_datetime], with the exception of Daylight Savings Time as it cannot be determined from the epoch.
</description>
</method>
- <method name="get_dynamic_memory_usage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the total amount of dynamic memory used (only works in debug).
- </description>
- </method>
<method name="get_environment" qualifiers="const">
<return type="String">
</return>
@@ -220,34 +169,21 @@
</description>
</method>
<method name="get_granted_permissions" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
With this function you can get the list of dangerous permissions that have been granted to the Android application.
+ [b]Note:[/b] This method is implemented on Android.
</description>
</method>
- <method name="get_ime_selection" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string.
- [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position.
- </description>
- </method>
- <method name="get_ime_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the IME intermediate composition string.
- [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string.
- </description>
- </method>
- <method name="get_latin_keyboard_variant" qualifiers="const">
+ <method name="get_keycode_string" qualifiers="const">
<return type="String">
</return>
+ <argument index="0" name="code" type="int">
+ </argument>
<description>
- Returns the current latin keyboard variant as a String.
- Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code].
+ 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].
</description>
</method>
<method name="get_locale" qualifiers="const">
@@ -262,6 +198,7 @@
</return>
<description>
Returns the model name of the current device.
+ [b]Note:[/b] This method is implemented on Android and iOS. Returns [code]"GenericDevice"[/code] on unsupported platforms.
</description>
</method>
<method name="get_name" qualifiers="const">
@@ -271,32 +208,12 @@
Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"Haiku"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code].
</description>
</method>
- <method name="get_power_percent_left">
- <return type="int">
- </return>
- <description>
- Returns the amount of battery left in the device as a percentage.
- </description>
- </method>
- <method name="get_power_seconds_left">
- <return type="int">
- </return>
- <description>
- Returns an estimate of the time left in seconds before the device runs out of battery.
- </description>
- </method>
- <method name="get_power_state">
- <return type="int" enum="OS.PowerState">
- </return>
- <description>
- Returns the current state of the device regarding battery and power. See [enum PowerState] constants.
- </description>
- </method>
<method name="get_process_id" qualifiers="const">
<return type="int">
</return>
<description>
Returns the project's process ID.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="get_processor_count" qualifiers="const">
@@ -306,65 +223,6 @@
Returns the number of threads available on the host machine.
</description>
</method>
- <method name="get_real_window_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the window size including decorations like window borders.
- </description>
- </method>
- <method name="get_scancode_string" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="code" type="int">
- </argument>
- <description>
- Returns the given scancode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
- </description>
- </method>
- <method name="get_screen_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of displays attached to the host machine.
- </description>
- </method>
- <method name="get_screen_dpi" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="screen" type="int" default="-1">
- </argument>
- <description>
- Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used.
- On Android devices, the actual screen densities are grouped into six generalized densities:
- [codeblock]
- ldpi - 120 dpi
- mdpi - 160 dpi
- hdpi - 240 dpi
- xhdpi - 320 dpi
- xxhdpi - 480 dpi
- xxxhdpi - 640 dpi
- [/codeblock]
- </description>
- </method>
- <method name="get_screen_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="screen" type="int" default="-1">
- </argument>
- <description>
- Returns the position of the specified screen by index. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used.
- </description>
- </method>
- <method name="get_screen_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="screen" type="int" default="-1">
- </argument>
- <description>
- Returns the dimensions in pixels of the specified screen. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used.
- </description>
- </method>
<method name="get_splash_tick_msec" qualifiers="const">
<return type="int">
</return>
@@ -393,6 +251,7 @@
</argument>
<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.
</description>
</method>
<method name="get_system_time_msecs" qualifiers="const">
@@ -409,6 +268,24 @@
Returns the epoch time of the operating system in seconds.
</description>
</method>
+ <method name="get_tablet_driver_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total number of available tablet drivers.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
+ <method name="get_tablet_driver_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the tablet driver name for the given index.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
<method name="get_ticks_msec" qualifiers="const">
<return type="int">
</return>
@@ -476,80 +353,6 @@
If the project name is empty, [code]user://[/code] falls back to [code]res://[/code].
</description>
</method>
- <method name="get_video_driver_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of video drivers supported on the current platform.
- </description>
- </method>
- <method name="get_video_driver_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="driver" type="int" enum="OS.VideoDriver">
- </argument>
- <description>
- Returns the name of the video driver matching the given [code]driver[/code] index. This index is a value from [enum VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index.
- </description>
- </method>
- <method name="get_virtual_keyboard_height">
- <return type="int">
- </return>
- <description>
- Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
- </description>
- </method>
- <method name="get_window_safe_area" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Returns unobscured area of the window where interactive controls should be rendered.
- </description>
- </method>
- <method name="global_menu_add_item">
- <return type="void">
- </return>
- <argument index="0" name="menu" type="String">
- </argument>
- <argument index="1" name="label" type="String">
- </argument>
- <argument index="2" name="id" type="Variant">
- </argument>
- <argument index="3" name="meta" type="Variant">
- </argument>
- <description>
- Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu.
- </description>
- </method>
- <method name="global_menu_add_separator">
- <return type="void">
- </return>
- <argument index="0" name="menu" type="String">
- </argument>
- <description>
- Add a separator between items. Separators also occupy an index.
- </description>
- </method>
- <method name="global_menu_clear">
- <return type="void">
- </return>
- <argument index="0" name="menu" type="String">
- </argument>
- <description>
- Clear the global menu, in effect removing all items.
- </description>
- </method>
- <method name="global_menu_remove_item">
- <return type="void">
- </return>
- <argument index="0" name="menu" type="String">
- </argument>
- <argument index="1" name="idx" type="int">
- </argument>
- <description>
- Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one.
- </description>
- </method>
<method name="has_environment" qualifiers="const">
<return type="bool">
</return>
@@ -569,50 +372,22 @@
[b]Note:[/b] Tag names are case-sensitive.
</description>
</method>
- <method name="has_touchscreen_ui_hint" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the device has a touchscreen or emulates one.
- </description>
- </method>
- <method name="has_virtual_keyboard" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the platform has a virtual keyboard, [code]false[/code] otherwise.
- </description>
- </method>
- <method name="hide_virtual_keyboard">
- <return type="void">
- </return>
- <description>
- Hides the virtual keyboard if it is shown, does nothing otherwise.
- </description>
- </method>
<method name="is_debug_build" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the build is a debug build.
- Returns [code]true[/code] when running in the editor.
- Returns [code]false[/code] if the build is a release build.
- </description>
- </method>
- <method name="is_ok_left_and_cancel_right" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right.
+ Returns [code]true[/code] if the Godot binary used to run the project is a [i]debug[/i] export template, or when running in the editor.
+ Returns [code]false[/code] if the Godot binary used to run the project is a [i]release[/i] export template.
+ To check whether the Godot binary used to run the project is an export template (debug or release), use [code]OS.has_feature("standalone")[/code] instead.
</description>
</method>
- <method name="is_scancode_unicode" qualifiers="const">
+ <method name="is_keycode_unicode" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="code" type="int">
</argument>
<description>
- Returns [code]true[/code] if the input scancode corresponds to a Unicode character.
+ Returns [code]true[/code] if the input keycode corresponds to a Unicode character.
</description>
</method>
<method name="is_stdout_verbose" qualifiers="const">
@@ -629,13 +404,6 @@
If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable.
</description>
</method>
- <method name="is_window_always_on_top" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the window should always be on top of other windows.
- </description>
- </method>
<method name="kill">
<return type="int" enum="Error">
</return>
@@ -644,57 +412,7 @@
<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.
[b]Note:[/b] This method can also be used to kill processes that were not spawned by the game.
- </description>
- </method>
- <method name="move_window_to_foreground">
- <return type="void">
- </return>
- <description>
- Moves the window to the front.
- </description>
- </method>
- <method name="native_video_is_playing">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if native video is playing.
- </description>
- </method>
- <method name="native_video_pause">
- <return type="void">
- </return>
- <description>
- Pauses native video playback.
- </description>
- </method>
- <method name="native_video_play">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="volume" type="float">
- </argument>
- <argument index="2" name="audio_track" type="String">
- </argument>
- <argument index="3" name="subtitle_track" type="String">
- </argument>
- <description>
- Plays native video from the specified path, at the given volume and with audio and subtitle tracks.
- [b]Note:[/b] This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options.
- </description>
- </method>
- <method name="native_video_stop">
- <return type="void">
- </return>
- <description>
- Stops native video playback.
- </description>
- </method>
- <method name="native_video_unpause">
- <return type="void">
- </return>
- <description>
- Resumes native video playback.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="open_midi_inputs">
@@ -702,6 +420,7 @@
</return>
<description>
Initialises the singleton for the system MIDI driver.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="print_all_resources">
@@ -723,7 +442,7 @@
<method name="print_resources_by_type">
<return type="void">
</return>
- <argument index="0" name="types" type="PoolStringArray">
+ <argument index="0" name="types" type="PackedStringArray">
</argument>
<description>
Shows the number of resources loaded by the game of the given types.
@@ -738,13 +457,6 @@
Shows all resources currently used by the game.
</description>
</method>
- <method name="request_attention">
- <return type="void">
- </return>
- <description>
- Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
- </description>
- </method>
<method name="request_permission">
<return type="bool">
</return>
@@ -759,48 +471,7 @@
</return>
<description>
With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application.
- </description>
- </method>
- <method name="set_icon">
- <return type="void">
- </return>
- <argument index="0" name="icon" type="Image">
- </argument>
- <description>
- Sets the game's icon using an [Image] resource.
- The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed.
- </description>
- </method>
- <method name="set_ime_active">
- <return type="void">
- </return>
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- Sets whether IME input mode should be enabled.
- If active IME handles key events before the application and creates an composition string and suggestion list.
- Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions.
- Completed composition string is committed when input is finished.
- </description>
- </method>
- <method name="set_ime_position">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- Sets position of IME suggestion list popup (in window coordinates).
- </description>
- </method>
- <method name="set_native_icon">
- <return type="void">
- </return>
- <argument index="0" name="filename" type="String">
- </argument>
- <description>
- Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS).
- Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog.
- [b]Note:[/b] This method is only implemented on macOS and Windows.
+ [b]Note:[/b] This method is implemented on Android.
</description>
</method>
<method name="set_thread_name">
@@ -821,25 +492,6 @@
Enables backup saves if [code]enabled[/code] is [code]true[/code].
</description>
</method>
- <method name="set_window_always_on_top">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Sets whether the window should always be on top.
- </description>
- </method>
- <method name="set_window_title">
- <return type="void">
- </return>
- <argument index="0" name="title" type="String">
- </argument>
- <description>
- Sets the window title to the specified string.
- [b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers.
- </description>
- </method>
<method name="shell_open">
<return type="int" enum="Error">
</return>
@@ -850,30 +502,15 @@
- [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.
- </description>
- </method>
- <method name="show_virtual_keyboard">
- <return type="void">
- </return>
- <argument index="0" name="existing_text" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
+ 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>
</method>
</methods>
<members>
- <member name="clipboard" type="String" setter="set_clipboard" getter="get_clipboard" default="&quot;&quot;">
- The clipboard from the host OS. Might be unavailable on some platforms.
- </member>
- <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
- The current screen index (starting from 0).
- </member>
<member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0">
- The exit code passed to the OS when the main loop exits.
- </member>
- <member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on" default="true">
- If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile.
+ The exit code passed to the OS when the main loop exits. 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] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed.
</member>
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode" default="false">
If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
@@ -881,52 +518,16 @@
<member name="low_processor_usage_mode_sleep_usec" type="int" setter="set_low_processor_usage_mode_sleep_usec" getter="get_low_processor_usage_mode_sleep_usec" default="6900">
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
</member>
- <member name="max_window_size" type="Vector2" setter="set_max_window_size" getter="get_max_window_size" default="Vector2( 0, 0 )">
- The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
- </member>
- <member name="min_window_size" type="Vector2" setter="set_min_window_size" getter="get_min_window_size" default="Vector2( 0, 0 )">
- The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
- </member>
- <member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation" default="0">
- The current screen orientation.
- </member>
- <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled" default="true">
- If [code]true[/code], vertical synchronization (Vsync) is enabled.
- </member>
- <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false">
- If [code]true[/code], removes the window frame.
- [b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency.
- </member>
- <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen" default="false">
- If [code]true[/code], the window is fullscreen.
- </member>
- <member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized" default="false">
- If [code]true[/code], the window is maximized.
- </member>
- <member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized" default="false">
- If [code]true[/code], the window is minimized.
- </member>
- <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled" default="false">
- If [code]true[/code], the window background is transparent and window frame is removed.
- Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering.
- [b]Note:[/b] This property has no effect if [b]Project &gt; Project Settings &gt; Display &gt; Window &gt; Per-pixel transparency &gt; Allowed[/b] setting is disabled.
- </member>
- <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )">
- The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
- </member>
- <member name="window_resizable" type="bool" setter="set_window_resizable" getter="is_window_resizable" default="true">
- If [code]true[/code], the window is resizable by the user.
- </member>
- <member name="window_size" type="Vector2" setter="set_window_size" getter="get_window_size" default="Vector2( 0, 0 )">
- The size of the window (without counting window manager decorations).
+ <member name="tablet_driver" type="String" setter="set_current_tablet_driver" getter="get_current_tablet_driver" default="&quot;&quot;">
+ The current tablet drvier in use.
</member>
</members>
<constants>
- <constant name="VIDEO_DRIVER_GLES2" value="1" enum="VideoDriver">
+ <constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver">
The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web.
</constant>
- <constant name="VIDEO_DRIVER_GLES3" value="0" enum="VideoDriver">
- The GLES3 rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web.
+ <constant name="VIDEO_DRIVER_VULKAN" value="1" enum="VideoDriver">
+ The Vulkan rendering backend.
</constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
@@ -985,27 +586,6 @@
<constant name="MONTH_DECEMBER" value="12" enum="Month">
December.
</constant>
- <constant name="SCREEN_ORIENTATION_LANDSCAPE" value="0" enum="ScreenOrientation">
- Landscape screen orientation.
- </constant>
- <constant name="SCREEN_ORIENTATION_PORTRAIT" value="1" enum="ScreenOrientation">
- Portrait screen orientation.
- </constant>
- <constant name="SCREEN_ORIENTATION_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
- Reverse landscape screen orientation.
- </constant>
- <constant name="SCREEN_ORIENTATION_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation">
- Reverse portrait screen orientation.
- </constant>
- <constant name="SCREEN_ORIENTATION_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation">
- Uses landscape or reverse landscape based on the hardware sensor.
- </constant>
- <constant name="SCREEN_ORIENTATION_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation">
- Uses portrait or reverse portrait based on the hardware sensor.
- </constant>
- <constant name="SCREEN_ORIENTATION_SENSOR" value="6" enum="ScreenOrientation">
- Uses most suitable orientation based on the hardware sensor.
- </constant>
<constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir">
Desktop directory path.
</constant>
@@ -1030,20 +610,5 @@
<constant name="SYSTEM_DIR_RINGTONES" value="7" enum="SystemDir">
Ringtones directory path.
</constant>
- <constant name="POWERSTATE_UNKNOWN" value="0" enum="PowerState">
- Unknown powerstate.
- </constant>
- <constant name="POWERSTATE_ON_BATTERY" value="1" enum="PowerState">
- Unplugged, running on battery.
- </constant>
- <constant name="POWERSTATE_NO_BATTERY" value="2" enum="PowerState">
- Plugged in, no battery available.
- </constant>
- <constant name="POWERSTATE_CHARGING" value="3" enum="PowerState">
- Plugged in, battery charging.
- </constant>
- <constant name="POWERSTATE_CHARGED" value="4" enum="PowerState">
- Plugged in, battery fully charged.
- </constant>
</constants>
</class>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 4b77197e29..87bcab25db 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Object" category="Core" version="3.2">
+<class name="Object" version="4.0">
<brief_description>
Base class for all non built-in types.
</brief_description>
@@ -9,6 +9,12 @@
Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++.
Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
+ Property membership can be tested directly in GDScript using [code]in[/code]:
+ [codeblock]
+ var n = Node2D.new()
+ print("position" in n) # Prints "True".
+ print("other_property" in n) # Prints "False".
+ [/codeblock]
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
</description>
<tutorials>
@@ -17,7 +23,7 @@
<method name="_get" qualifiers="virtual">
<return type="Variant">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<description>
Virtual method which can be overridden to customize the return value of [method get].
@@ -52,7 +58,7 @@
<method name="_set" qualifiers="virtual">
<return type="bool">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -83,7 +89,7 @@
<method name="call" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
@@ -93,12 +99,12 @@
</description>
</method>
<method name="call_deferred" qualifiers="vararg">
- <return type="Variant">
+ <return type="void">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
- Calls the [code]method[/code] on the object during idle time and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
+ 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:
[codeblock]
call_deferred("set", "position", Vector2(42.0, 0.0))
[/codeblock]
@@ -107,7 +113,7 @@
<method name="callv">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<argument index="1" name="arg_array" type="Array">
</argument>
@@ -128,18 +134,17 @@
<method name="connect">
<return type="int" enum="Error">
</return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
+ <argument index="0" name="signal" type="StringName">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="1" name="callable" type="Callable">
</argument>
- <argument index="3" name="binds" type="Array" default="[ ]">
+ <argument index="2" name="binds" type="Array" default="[ ]">
</argument>
- <argument index="4" name="flags" type="int" default="0">
+ <argument index="3" name="flags" type="int" default="0">
</argument>
<description>
- Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
+ [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
+ Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost.
Examples:
@@ -148,26 +153,32 @@
connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal
[/codeblock]
+ An example of the relationship between [code]binds[/code] passed to [method connect] and parameters used when calling [method emit_signal]:
+ [codeblock]
+ connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
+ emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
+ func _on_Player_hit(hit_by, level, weapon_type, damage):
+ print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])
+ [/codeblock]
</description>
</method>
<method name="disconnect">
<return type="void">
</return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
+ <argument index="0" name="signal" type="StringName">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="1" name="callable" type="Callable">
</argument>
<description>
+ [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code].
If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists.
</description>
</method>
<method name="emit_signal" qualifiers="vararg">
- <return type="Variant">
+ <return type="void">
</return>
- <argument index="0" name="signal" type="String">
+ <argument index="0" name="signal" type="StringName">
</argument>
<description>
Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
@@ -181,7 +192,7 @@
<return type="void">
</return>
<description>
- Deletes the object from memory. Any pre-existing reference to the freed object will now return [code]null[/code].
+ Deletes the object from memory. Any pre-existing reference to the freed object will become invalid, e.g. [code]is_instance_valid(object)[/code] will return [code]false[/code].
</description>
</method>
<method name="get" qualifiers="const">
@@ -190,7 +201,7 @@
<argument index="0" name="property" type="String">
</argument>
<description>
- Returns the [Variant] value of the given [code]property[/code].
+ Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
</description>
</method>
<method name="get_class" qualifiers="const">
@@ -238,10 +249,10 @@
</description>
</method>
<method name="get_meta_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
- Returns the object's metadata as a [PoolStringArray].
+ Returns the object's metadata as a [PackedStringArray].
</description>
</method>
<method name="get_method_list" qualifiers="const">
@@ -260,7 +271,7 @@
</description>
</method>
<method name="get_script" qualifiers="const">
- <return type="Reference">
+ <return type="Variant">
</return>
<description>
Returns the object's [Script] instance, or [code]null[/code] if none is assigned.
@@ -294,19 +305,28 @@
<method name="has_method" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the object contains the given [code]method[/code].
</description>
</method>
+ <method name="has_signal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="signal" type="StringName">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the given [code]signal[/code] exists.
+ </description>
+ </method>
<method name="has_user_signal" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="signal" type="String">
+ <argument index="0" name="signal" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if the given user-defined [code]signal[/code] exists.
+ 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.
</description>
</method>
<method name="is_blocking_signals" qualifiers="const">
@@ -328,13 +348,12 @@
<method name="is_connected" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="signal" type="String">
+ <argument index="0" name="signal" type="StringName">
</argument>
- <argument index="1" name="target" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
+ <argument index="1" name="callable" type="Callable">
</argument>
<description>
+ [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code].
</description>
</method>
@@ -396,7 +415,7 @@
<method name="set_deferred">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -443,10 +462,11 @@
<method name="set_script">
<return type="void">
</return>
- <argument index="0" name="script" type="Reference">
+ <argument index="0" name="script" type="Variant">
</argument>
<description>
Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.
+ 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.
</description>
</method>
<method name="to_string">
@@ -458,9 +478,9 @@
</description>
</method>
<method name="tr" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="message" type="String">
+ <argument index="0" name="message" type="StringName">
</argument>
<description>
Translates a message using translation catalogs configured in the Project Settings.
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index f4fa6ac688..8a59ef5cb4 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.2">
+<class name="OccluderPolygon2D" inherits="Resource" version="4.0">
<brief_description>
Defines a 2D polygon for LightOccluder2D.
</brief_description>
@@ -17,7 +17,7 @@
<member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0">
The culling mode to use.
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
A [Vector2] array with the index for polygon's vertices positions.
[b]Note:[/b] The returned value is a copy of the underlying array, rather than a reference.
</member>
diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight3D.xml
index 7189826385..0bbc987156 100644
--- a/doc/classes/OmniLight.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OmniLight" inherits="Light" category="Core" version="3.2">
+<class name="OmniLight3D" inherits="Light3D" version="4.0">
<brief_description>
Omnidirectional light, such as a light bulb or a candle.
</brief_description>
<description>
- An Omnidirectional light is a type of [Light] that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters.
+ An Omnidirectional light is a type of [Light3D] that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
@@ -18,10 +18,7 @@
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
The light's radius.
</member>
- <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1">
- See [enum ShadowDetail].
- </member>
- <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode" default="1">
+ <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight3D.ShadowMode" default="1">
See [enum ShadowMode].
</member>
</members>
@@ -32,9 +29,5 @@
<constant name="SHADOW_CUBE" value="1" enum="ShadowMode">
Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality.
</constant>
- <constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail">
- </constant>
- <constant name="SHADOW_DETAIL_HORIZONTAL" value="1" enum="ShadowDetail">
- </constant>
</constants>
</class>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index b3f1359e69..39d974ec47 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OptionButton" inherits="Button" category="Core" version="3.2">
+<class name="OptionButton" inherits="Button" version="4.0">
<brief_description>
Button control that provides selectable options when pressed.
</brief_description>
@@ -12,14 +12,14 @@
<method name="add_icon_item">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
<argument index="2" name="id" type="int" default="-1">
</argument>
<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, [code]id[/code] becomes the item index. New items are appended at the end.
+ 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.
</description>
</method>
<method name="add_item">
@@ -30,7 +30,7 @@
<argument index="1" name="id" type="int" default="-1">
</argument>
<description>
- Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end.
+ 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.
</description>
</method>
<method name="add_separator">
@@ -44,18 +44,18 @@
<return type="void">
</return>
<description>
- Clear all the items in the [OptionButton].
+ Clears all the items in the [OptionButton].
</description>
</method>
<method name="get_item_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the amount of items in the OptionButton.
+ Returns the amount of items in the OptionButton, including separators.
</description>
</method>
<method name="get_item_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -87,6 +87,7 @@
<argument index="0" name="idx" type="int">
</argument>
<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">
@@ -109,12 +110,14 @@
<return type="int">
</return>
<description>
+ Returns the ID of the selected item, or [code]0[/code] if no item is selected.
</description>
</method>
<method name="get_selected_metadata" qualifiers="const">
<return type="Variant">
</return>
<description>
+ Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata].
</description>
</method>
<method name="is_item_disabled" qualifiers="const">
@@ -123,6 +126,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the item at index [code]idx[/code] is disabled.
</description>
</method>
<method name="remove_item">
@@ -131,6 +135,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Removes the item at index [code]idx[/code].
</description>
</method>
<method name="select">
@@ -139,7 +144,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Select an item by index and make it the current item.
+ Selects an item by index and makes it the current item. This will work even if the item is disabled.
</description>
</method>
<method name="set_item_disabled">
@@ -150,6 +155,8 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
+ Sets whether the item at index [code]idx[/code] 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">
@@ -157,10 +164,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
- Sets the icon of an item at index [code]idx[/code].
+ Sets the icon of the item at index [code]idx[/code].
</description>
</method>
<method name="set_item_id">
@@ -171,7 +178,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
- Sets the ID of an item at index [code]idx[/code].
+ Sets the ID of the item at index [code]idx[/code].
</description>
</method>
<method name="set_item_metadata">
@@ -182,6 +189,7 @@
<argument index="1" name="metadata" type="Variant">
</argument>
<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">
@@ -192,7 +200,7 @@
<argument index="1" name="text" type="String">
</argument>
<description>
- Sets the text of an item at index [code]idx[/code].
+ Sets the text of the item at index [code]idx[/code].
</description>
</method>
</methods>
@@ -200,19 +208,20 @@
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" />
<member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
<member name="selected" type="int" setter="_select_int" getter="get_selected" default="-1">
+ The index of the currently selected item, or [code]-1[/code] if no item is selected.
</member>
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
</members>
<signals>
<signal name="item_focused">
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
Emitted the when 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="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
Emitted when the current item has been changed by the user. The index of the item selected is passed as argument.
@@ -222,31 +231,44 @@
<constants>
</constants>
<theme_items>
- <theme_item name="arrow" type="Texture">
+ <theme_item name="arrow" type="Texture2D">
+ The arrow icon to be drawn on the right end of the button.
</theme_item>
<theme_item name="arrow_margin" type="int" default="2">
+ The horizontal space between the arrow icon and the right edge of the button.
</theme_item>
<theme_item name="disabled" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [OptionButton]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the [OptionButton].
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ Text [Color] used when the [OptionButton] is disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] used when the [OptionButton] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [OptionButton] is being pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="2">
+ The horizontal space between [OptionButton]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default [StyleBox] for the [OptionButton].
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is being pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index ff45ca925c..314869be49 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PCKPacker" inherits="Reference" category="Core" version="3.2">
+<class name="PCKPacker" inherits="Reference" version="4.0">
<brief_description>
+ Creates packages that can be loaded into a running project.
</brief_description>
<description>
- The [PCKPacker] is used to create packages in application runtime.
+ The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack].
[codeblock]
var packer = PCKPacker.new()
- packer.pck_start("test.pck", 0)
+ packer.pck_start("test.pck")
packer.add_file("res://text.txt", "text.txt")
- packer.flush(false)
+ packer.flush()
[/codeblock]
- The above [PCKPacker] creates package [b]test.pck[/b], then adds a file named [b]text.txt[/b] in the root of the package.
+ The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package.
</description>
<tutorials>
</tutorials>
@@ -29,9 +30,10 @@
<method name="flush">
<return type="int" enum="Error">
</return>
- <argument index="0" name="verbose" type="bool">
+ <argument index="0" name="verbose" type="bool" default="false">
</argument>
<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.
</description>
</method>
<method name="pck_start">
@@ -39,9 +41,10 @@
</return>
<argument index="0" name="pck_name" type="String">
</argument>
- <argument index="1" name="alignment" type="int">
+ <argument index="1" name="alignment" type="int" default="0">
</argument>
<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).
</description>
</method>
</methods>
diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/PHashTranslation.xml
index 7c771b6b04..30194e9495 100644
--- a/doc/classes/PHashTranslation.xml
+++ b/doc/classes/PHashTranslation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PHashTranslation" inherits="Translation" category="Core" version="3.2">
+<class name="PHashTranslation" inherits="Translation" version="4.0">
<brief_description>
Optimized translation.
</brief_description>
diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PackedByteArray.xml
index 867f042cd2..b08357e278 100644
--- a/doc/classes/PoolByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolByteArray" category="Built-In Types" version="3.2">
+<class name="PackedByteArray" version="4.0">
<brief_description>
- A pooled [Array] of bytes.
+ A packed [Array] of bytes.
</brief_description>
<description>
- An [Array] specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolByteArray">
- <return type="PoolByteArray">
+ <method name="PackedByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolByteArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="byte" type="int">
</argument>
<description>
@@ -27,30 +29,32 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolByteArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedByteArray">
</argument>
<description>
- Appends a [PoolByteArray] at the end of this array.
+ Appends a [PackedByteArray] at the end of this array.
</description>
</method>
<method name="compress">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants.
+ Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants.
</description>
</method>
<method name="decompress">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="buffer_size" type="int">
</argument>
<argument index="1" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants.
+ Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants.
</description>
</method>
<method name="empty">
@@ -78,6 +82,11 @@
<return type="String">
</return>
<description>
+ Returns a hexadecimal representation of this array as a [String].
+ [codeblock]
+ var array = PackedByteArray([11, 46, 255])
+ print(array.hex_encode()) # Prints: 0b2eff
+ [/codeblock]
</description>
</method>
<method name="insert">
@@ -92,11 +101,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="byte" type="int">
</argument>
<description>
@@ -104,6 +117,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -111,6 +126,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -118,6 +135,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="byte" type="int">
@@ -134,14 +153,14 @@
</description>
</method>
<method name="subarray">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="from" type="int">
</argument>
<argument index="1" name="to" type="int">
</argument>
<description>
- Returns the slice of the [PoolByteArray] between indices (inclusive) as a new [PoolByteArray]. Any negative index is considered to be from the end of the array.
+ Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array.
</description>
</method>
</methods>
diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PackedColorArray.xml
index 34cfa0ab53..06228e4dac 100644
--- a/doc/classes/PoolColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolColorArray" category="Built-In Types" version="3.2">
+<class name="PackedColorArray" version="4.0">
<brief_description>
- A pooled [Array] of [Color].
+ A packed [Array] of [Color]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [Color]. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolColorArray">
- <return type="PoolColorArray">
+ <method name="PackedColorArray">
+ <return type="PackedColorArray">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolColorArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolColorArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedColorArray">
</argument>
<description>
- Appends a [PoolColorArray] at the end of this array.
+ Appends a [PackedColorArray] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +56,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -64,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="color" type="Color">
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index fa6a00d65d..296f9d3373 100644
--- a/doc/classes/PackedDataContainer.xml
+++ b/doc/classes/PackedDataContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainer" inherits="Resource" category="Core" version="3.2">
+<class name="PackedDataContainer" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -23,7 +23,7 @@
</method>
</methods>
<members>
- <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data" default="PoolByteArray( )">
+ <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray( )">
</member>
</members>
<constants>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
index 8623ff7843..f0f59675de 100644
--- a/doc/classes/PackedDataContainerRef.xml
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainerRef" inherits="Reference" category="Core" version="3.2">
+<class name="PackedDataContainerRef" inherits="Reference" version="4.0">
<brief_description>
+ Reference version of [PackedDataContainer].
</brief_description>
<description>
</description>
diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PackedFloat32Array.xml
index e8afe46640..ee82586cdb 100644
--- a/doc/classes/PoolRealArray.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -1,25 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolRealArray" category="Built-In Types" version="3.2">
+<class name="PackedFloat32Array" version="4.0">
<brief_description>
- A pooled [Array] of reals ([float]).
+ A packed [Array] of 32-bit floating-point values.
</brief_description>
<description>
- An [Array] specifically designed to hold floating-point values ([float]). Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
+ If you need to pack 64-bit floats tightly, see [PackedFloat64Array].
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolRealArray">
- <return type="PoolRealArray">
+ <method name="PackedFloat32Array">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolRealArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -27,10 +30,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolRealArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedFloat32Array">
</argument>
<description>
- Appends a [PoolRealArray] at the end of this array.
+ Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +57,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -64,6 +73,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +82,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +91,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="value" type="float">
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
new file mode 100644
index 0000000000..ce2300c65a
--- /dev/null
+++ b/doc/classes/PackedFloat64Array.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedFloat64Array" version="4.0">
+ <brief_description>
+ A packed [Array] of 64-bit floating-point values.
+ </brief_description>
+ <description>
+ An [Array] specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
+ [b]Note:[/b] This type is passed by value and not by reference.
+ If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="PackedFloat64Array">
+ <return type="PackedFloat64Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Appends an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedFloat64Array">
+ </argument>
+ <description>
+ Appends a [PackedFloat64Array] at the end of this array.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ </description>
+ </method>
+ <method name="invert">
+ <return type="void">
+ </return>
+ <description>
+ Reverses the order of the elements in the array.
+ </description>
+ </method>
+ <method name="push_back">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Appends an element at the end of the array.
+ </description>
+ </method>
+ <method name="remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Changes the float at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Returns the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
new file mode 100644
index 0000000000..176c624956
--- /dev/null
+++ b/doc/classes/PackedInt32Array.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedInt32Array" version="4.0">
+ <brief_description>
+ A packed [Array] of 32-bit integers.
+ </brief_description>
+ <description>
+ An [Array] specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes.
+ [b]Note:[/b] This type is passed by value and not by reference.
+ [b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="PackedInt32Array">
+ <return type="PackedInt32Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <return type="void">
+ </return>
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Appends an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedInt32Array">
+ </argument>
+ <description>
+ Appends a [PackedInt32Array] at the end of this array.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ </description>
+ </method>
+ <method name="invert">
+ <return type="void">
+ </return>
+ <description>
+ Reverses the order of the elements in the array.
+ </description>
+ </method>
+ <method name="push_back">
+ <return type="void">
+ </return>
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Appends a value to the array.
+ </description>
+ </method>
+ <method name="remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Changes the integer at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Returns the array size.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PackedInt64Array.xml
index 25e1e718f7..d8a8071590 100644
--- a/doc/classes/PoolIntArray.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolIntArray" category="Built-In Types" version="3.2">
+<class name="PackedInt64Array" version="4.0">
<brief_description>
- A pooled [Array] of integers ([int]).
+ A packed [Array] of 64-bit integers.
</brief_description>
<description>
- An [Array] specifically designed to hold integer values ([int]). Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
- [b]Note:[/b] This type is limited to signed 32-bit integers, which means it can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values.
+ [b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolIntArray">
- <return type="PoolIntArray">
+ <method name="PackedInt64Array">
+ <return type="PackedInt64Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolIntArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="integer" type="int">
</argument>
<description>
@@ -28,10 +30,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolIntArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedInt64Array">
</argument>
<description>
- Appends a [PoolIntArray] at the end of this array.
+ Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -49,15 +53,19 @@
<argument index="1" name="integer" type="int">
</argument>
<description>
- Inserts a new int at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="integer" type="int">
</argument>
<description>
@@ -65,6 +73,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -72,6 +82,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -79,12 +91,14 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="integer" type="int">
</argument>
<description>
- Changes the int at the given index.
+ Changes the integer at the given index.
</description>
</method>
<method name="size">
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 0400f2704b..2d70dea012 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedScene" inherits="Resource" category="Core" version="3.2">
+<class name="PackedScene" inherits="Resource" version="4.0">
<brief_description>
An abstraction of a serialized scene.
</brief_description>
@@ -9,23 +9,25 @@
[b]Note:[/b] The node doesn't need to own itself.
[b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
[codeblock]
- # Create the objects
+ # Create the objects.
var node = Node2D.new()
var rigid = RigidBody2D.new()
var collision = CollisionShape2D.new()
- # Create the object hierarchy
+ # Create the object hierarchy.
rigid.add_child(collision)
node.add_child(rigid)
- # Change owner of rigid, but not of collision
+ # Change owner of `rigid`, but not of `collision`.
rigid.owner = node
var scene = PackedScene.new()
- # Only node and rigid are now packed
+ # Only `node` and `rigid` are now packed.
var result = scene.pack(node)
if result == OK:
- ResourceSaver.save("res://path/name.scn", scene) # Or "user://..."
+ var error = ResourceSaver.save("res://path/name.scn", scene) # Or "user://..."
+ if error != OK:
+ push_error("An error occurred while saving the scene to disk.")
[/codeblock]
</description>
<tutorials>
@@ -65,7 +67,7 @@
</method>
</methods>
<members>
- <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PoolIntArray( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PoolStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PoolIntArray( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}">
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PackedStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PackedInt32Array( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}">
A dictionary representation of the scene contents.
Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
</member>
diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PackedStringArray.xml
index f41a3c7a68..9526f5899d 100644
--- a/doc/classes/PoolStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolStringArray" category="Built-In Types" version="3.2">
+<class name="PackedStringArray" version="4.0">
<brief_description>
- A pooled [Array] of [String].
+ A packed [Array] of [String]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [String]s. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolStringArray">
- <return type="PoolStringArray">
+ <method name="PackedStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolStringArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="string" type="String">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolStringArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedStringArray">
</argument>
<description>
- Appends a [PoolStringArray] at the end of this array.
+ Appends a [PackedStringArray] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,20 +56,15 @@
</description>
</method>
<method name="invert">
- <description>
- Reverses the order of the elements in the array.
- </description>
- </method>
- <method name="join">
- <return type="String">
+ <return type="void">
</return>
- <argument index="0" name="delimiter" type="String">
- </argument>
<description>
- Returns a [String] with each element of the array joined with the given [code]delimiter[/code].
+ Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="string" type="String">
</argument>
<description>
@@ -73,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -80,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -87,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="string" type="String">
diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 321846d08b..87f202357c 100644
--- a/doc/classes/PoolVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector2Array" category="Built-In Types" version="3.2">
+<class name="PackedVector2Array" version="4.0">
<brief_description>
- A pooled [Array] of [Vector2].
+ A packed [Array] of [Vector2]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [Vector2]. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolVector2Array">
- <return type="PoolVector2Array">
+ <method name="PackedVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolVector2Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="vector2" type="Vector2">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolVector2Array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedVector2Array">
</argument>
<description>
- Appends a [PoolVector2Array] at the end of this array.
+ Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +56,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="vector2" type="Vector2">
</argument>
<description>
@@ -64,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="vector2" type="Vector2">
diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PackedVector3Array.xml
index c82bd62a11..7bfa684ff5 100644
--- a/doc/classes/PoolVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector3Array" category="Built-In Types" version="3.2">
+<class name="PackedVector3Array" version="4.0">
<brief_description>
- A pooled [Array] of [Vector3].
+ A packed [Array] of [Vector3]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [Vector3]. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolVector3Array">
- <return type="PoolVector3Array">
+ <method name="PackedVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolVector3Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolVector3Array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedVector3Array">
</argument>
<description>
- Appends a [PoolVector3Array] at the end of this array.
+ Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +56,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
@@ -64,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="vector3" type="Vector3">
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index d52bf4e3bb..e3e2f63e14 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeer" inherits="Reference" category="Core" version="3.2">
+<class name="PacketPeer" inherits="Reference" version="4.0">
<brief_description>
Abstraction and base class for packet-based protocols.
</brief_description>
@@ -17,7 +17,7 @@
</description>
</method>
<method name="get_packet">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Gets a raw packet.
@@ -36,14 +36,14 @@
<argument index="0" name="allow_objects" type="bool" default="false">
</argument>
<description>
- Gets a Variant. If [code]allow_objects[/code] (or [member allow_object_decoding]) is [code]true[/code], decoding objects is allowed.
+ Gets a Variant. If [code]allow_objects[/code] 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">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Sends a raw packet.
@@ -57,15 +57,14 @@
<argument index="1" name="full_objects" type="bool" default="false">
</argument>
<description>
- Sends a [Variant] as a packet. If [code]full_objects[/code] (or [member allow_object_decoding]) is [code]true[/code], encoding objects is allowed (and can potentially include code).
+ Sends a [Variant] as a packet. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code).
</description>
</method>
</methods>
<members>
- <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false">
- [i]Deprecated.[/i] Use [code]get_var[/code] and [code]put_var[/code] parameters instead.
- If [code]true[/code], the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var].
- [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 name="encode_buffer_max_size" type="int" setter="set_encode_buffer_max_size" getter="get_encode_buffer_max_size" default="8388608">
+ Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.
+ The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [code]encode_buffer_max_size[/code], the method will error out with [constant ERR_OUT_OF_MEMORY].
</member>
</members>
<constants>
diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml
new file mode 100644
index 0000000000..19ebb9d81e
--- /dev/null
+++ b/doc/classes/PacketPeerDTLS.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PacketPeerDTLS" inherits="PacketPeer" version="4.0">
+ <brief_description>
+ DTLS packet peer.
+ </brief_description>
+ <description>
+ This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="connect_to_peer">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="packet_peer" type="PacketPeerUDP">
+ </argument>
+ <argument index="1" name="validate_certs" type="bool" default="true">
+ </argument>
+ <argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="3" name="valid_certificate" type="X509Certificate" default="null">
+ </argument>
+ <description>
+ Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument.
+ </description>
+ </method>
+ <method name="disconnect_from_peer">
+ <return type="void">
+ </return>
+ <description>
+ Disconnects this peer, terminating the DTLS session.
+ </description>
+ </method>
+ <method name="get_status" qualifiers="const">
+ <return type="int" enum="PacketPeerDTLS.Status">
+ </return>
+ <description>
+ Returns the status of the connection. See [enum Status] for values.
+ </description>
+ </method>
+ <method name="poll">
+ <return type="void">
+ </return>
+ <description>
+ Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="STATUS_DISCONNECTED" value="0" enum="Status">
+ A status representing a [PacketPeerDTLS] that is disconnected.
+ </constant>
+ <constant name="STATUS_HANDSHAKING" value="1" enum="Status">
+ A status representing a [PacketPeerDTLS] that is currently performing the handshake with a remote peer.
+ </constant>
+ <constant name="STATUS_CONNECTED" value="2" enum="Status">
+ A status representing a [PacketPeerDTLS] that is connected to a remote peer.
+ </constant>
+ <constant name="STATUS_ERROR" value="3" enum="Status">
+ A status representing a [PacketPeerDTLS] in a generic error state.
+ </constant>
+ <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status">
+ An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml
index 0376fea592..ec1ee175f7 100644
--- a/doc/classes/PacketPeerStream.xml
+++ b/doc/classes/PacketPeerStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerStream" inherits="PacketPeer" category="Core" version="3.2">
+<class name="PacketPeerStream" inherits="PacketPeer" version="4.0">
<brief_description>
Wrapper to use a PacketPeer over a StreamPeer.
</brief_description>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index 260dbae8e2..668655b725 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerUDP" inherits="PacketPeer" category="Core" version="3.2">
+<class name="PacketPeerUDP" inherits="PacketPeer" version="4.0">
<brief_description>
UDP packet peer.
</brief_description>
@@ -16,6 +16,18 @@
Closes the UDP socket the [PacketPeerUDP] is currently listening on.
</description>
</method>
+ <method name="connect_to_host">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="port" type="int">
+ </argument>
+ <description>
+ Calling this method connects this UDP peer to the given [code]host[/code]/[code]port[/code] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer].
+ Note: Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transferring sensitive information.
+ </description>
+ </method>
<method name="get_packet_ip" qualifiers="const">
<return type="String">
</return>
@@ -30,6 +42,13 @@
Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]).
</description>
</method>
+ <method name="is_connected_to_host" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the UDP socket is open and has been connected to a remote address. See [method connect_to_host].
+ </description>
+ </method>
<method name="is_listening" qualifiers="const">
<return type="bool">
</return>
@@ -47,6 +66,7 @@
<description>
Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code].
You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available.
+ Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work.
</description>
</method>
<method name="leave_multicast_group">
@@ -76,6 +96,16 @@
If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists).
</description>
</method>
+ <method name="set_broadcast_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <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.
+ Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too.
+ </description>
+ </method>
<method name="set_dest_address">
<return type="int" enum="Error">
</return>
@@ -85,6 +115,7 @@
</argument>
<description>
Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed.
+ Note: [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]).
</description>
</method>
<method name="wait">
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
index c9c3f80e7b..7285bc9e2e 100644
--- a/doc/classes/Panel.xml
+++ b/doc/classes/Panel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Panel" inherits="Control" category="Core" version="3.2">
+<class name="Panel" inherits="Control" version="4.0">
<brief_description>
Provides an opaque background for [Control] children.
</brief_description>
@@ -10,10 +10,21 @@
</tutorials>
<methods>
</methods>
+ <members>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Panel.Mode" default="0">
+ </member>
+ </members>
<constants>
+ <constant name="MODE_BACKGROUND" value="0" enum="Mode">
+ </constant>
+ <constant name="MODE_FOREGROUND" value="1" enum="Mode">
+ </constant>
</constants>
<theme_items>
<theme_item name="panel" type="StyleBox">
+ The style of this [Panel].
+ </theme_item>
+ <theme_item name="panel_fg" type="StyleBox">
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
index 64fae6d95c..d39122c395 100644
--- a/doc/classes/PanelContainer.xml
+++ b/doc/classes/PanelContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PanelContainer" inherits="Container" category="Core" version="3.2">
+<class name="PanelContainer" inherits="Container" version="4.0">
<brief_description>
Panel container type.
</brief_description>
@@ -10,10 +10,14 @@
</tutorials>
<methods>
</methods>
+ <members>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
+ </members>
<constants>
</constants>
<theme_items>
<theme_item name="panel" type="StyleBox">
+ The style of [PanelContainer]'s background.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml
deleted file mode 100644
index 96aefc0623..0000000000
--- a/doc/classes/PanoramaSky.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PanoramaSky" inherits="Sky" category="Core" version="3.2">
- <brief_description>
- A type of [Sky] used to draw a background texture.
- </brief_description>
- <description>
- A resource referenced in an [Environment] that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama">
- [Texture] to be applied to the PanoramaSky.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/PanoramaSkyMaterial.xml b/doc/classes/PanoramaSkyMaterial.xml
new file mode 100644
index 0000000000..905a2dd506
--- /dev/null
+++ b/doc/classes/PanoramaSkyMaterial.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PanoramaSkyMaterial" inherits="Material" version="4.0">
+ <brief_description>
+ A [Material] used with [Sky] to draw a background texture.
+ </brief_description>
+ <description>
+ A resource referenced in a [Sky] that is used to draw a background. The Panorama sky material functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map.
+ Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR ([code].hdr[/code]) and OpenEXR ([code].exr[/code]) image formats for this purpose.
+ You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="panorama" type="Texture2D" setter="set_panorama" getter="get_panorama">
+ [Texture2D] to be applied to the [PanoramaSkyMaterial].
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index d4f3462016..3b730fc4d4 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParallaxBackground" inherits="CanvasLayer" category="Core" version="3.2">
+<class name="ParallaxBackground" inherits="CanvasLayer" version="4.0">
<brief_description>
A node used to create a parallax scrolling background.
</brief_description>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 75c69cc4b1..7210bee11c 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.2">
+<class name="ParallaxLayer" inherits="Node2D" version="4.0">
<brief_description>
A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description>
@@ -14,7 +14,7 @@
</methods>
<members>
<member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2( 0, 0 )">
- The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture] will not be mirrored.
+ The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored.
</member>
<member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2( 0, 0 )">
The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 64751cdf76..d04ac5bdce 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.2">
+<class name="ParticlesMaterial" inherits="Material" version="4.0">
<brief_description>
- Particle properties for [Particles] and [Particles2D] nodes.
+ Particle properties for [GPUParticles3D] and [GPUParticles2D] nodes.
</brief_description>
<description>
- ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [Particles] and [Particles2D] emitter nodes.
+ ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [GPUParticles3D] and [GPUParticles2D] emitter nodes.
Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] applied to vary values over the lifetime of the particle.
When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between [code]1.0[/code] and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of [code]0.4[/code] would scale the original property between [code]0.4-1.0[/code] of its original value.
</description>
@@ -17,6 +17,7 @@
<argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
</argument>
<description>
+ Returns [code]true[/code] if the specified flag is enabled.
</description>
</method>
<method name="get_param" qualifiers="const">
@@ -25,6 +26,7 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
+ Returns the value of the specified parameter.
</description>
</method>
<method name="get_param_randomness" qualifiers="const">
@@ -33,14 +35,16 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
+ Returns the randomness ratio associated with the specified parameter.
</description>
</method>
<method name="get_param_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
+ Returns the [Texture2D] used by the specified parameter.
</description>
</method>
<method name="set_flag">
@@ -51,6 +55,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
+ If [code]true[/code], enables the specified flag. See [enum Flags] for options.
</description>
</method>
<method name="set_param">
@@ -61,6 +66,7 @@
<argument index="1" name="value" type="float">
</argument>
<description>
+ Sets the specified [enum Parameter].
</description>
</method>
<method name="set_param_randomness">
@@ -71,6 +77,7 @@
<argument index="1" name="randomness" type="float">
</argument>
<description>
+ Sets the randomness ratio for the specified [enum Parameter].
</description>
</method>
<method name="set_param_texture">
@@ -78,18 +85,19 @@
</return>
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
+ Sets the [Texture2D] for the specified [enum Parameter].
</description>
</method>
</methods>
<members>
<member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
Initial rotation applied to each particle, in degrees.
- Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES].
+ Only applied when [member flag_disable_z] or [member 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_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="angle_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's rotation will be animated along this [CurveTexture].
</member>
<member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -97,9 +105,9 @@
</member>
<member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
- Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES].
+ Only applied when [member flag_disable_z] or [member 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_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's angular velocity will vary along this [CurveTexture].
</member>
<member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -108,7 +116,7 @@
<member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0">
Particle animation offset.
</member>
- <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <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_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -117,22 +125,22 @@
<member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0">
Particle animation speed.
</member>
- <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <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].
</member>
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation speed randomness ratio.
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
- Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member SpatialMaterial.vertex_color_use_as_albedo] to [code]true[/code].
+ Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
</member>
- <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp">
+ <member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture].
</member>
<member name="damping" type="float" setter="set_param" getter="get_param" default="0.0">
The rate at which particles lose velocity.
</member>
- <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="damping_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Damping will vary along this [CurveTexture].
</member>
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -144,20 +152,20 @@
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
The box's extents if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_BOX].
</member>
- <member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture">
+ <member name="emission_color_texture" type="Texture2D" setter="set_emission_color_texture" getter="get_emission_color_texture">
Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture].
</member>
- <member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture">
+ <member name="emission_normal_texture" type="Texture2D" setter="set_emission_normal_texture" getter="get_emission_normal_texture">
Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
</member>
<member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count">
The number of emission points if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture">
+ <member name="emission_point_texture" type="Texture2D" setter="set_emission_point_texture" getter="get_emission_point_texture">
Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
</member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0">
- Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values.
+ Particles will be emitted inside this region. Use [enum EmissionShape] constants for values.
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE].
@@ -180,7 +188,7 @@
<member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
Initial hue variation applied to each particle.
</member>
- <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="hue_variation_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's hue will vary along this [CurveTexture].
</member>
<member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -198,7 +206,7 @@
<member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Linear acceleration applied to each particle in the direction of motion.
</member>
- <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="linear_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's linear acceleration will vary along this [CurveTexture].
</member>
<member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -208,7 +216,7 @@
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 flag_disable_z] is [code]true[/code].
</member>
- <member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <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_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
@@ -217,7 +225,7 @@
<member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Radial acceleration applied to each particle. Makes particle accelerate away from origin.
</member>
- <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="radial_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's radial acceleration will vary along this [CurveTexture].
</member>
<member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -226,7 +234,7 @@
<member name="scale" type="float" setter="set_param" getter="get_param" default="1.0">
Initial scale applied to each particle.
</member>
- <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="scale_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's scale will vary along this [CurveTexture].
</member>
<member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -238,7 +246,7 @@
<member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0">
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_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ <member name="tangential_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's tangential acceleration will vary along this [CurveTexture].
</member>
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
@@ -321,5 +329,8 @@
<constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture].
</constant>
+ <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape">
+ Represents the size of the [enum EmissionShape] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
index 7b37f8e40d..57e2091268 100644
--- a/doc/classes/Path2D.xml
+++ b/doc/classes/Path2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Path2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Path2D" inherits="Node2D" version="4.0">
<brief_description>
Contains a [Curve2D] path for [PathFollow2D] nodes to follow.
</brief_description>
@@ -15,7 +15,6 @@
<member name="curve" type="Curve2D" setter="set_curve" getter="get_curve">
A [Curve2D] describing the path.
</member>
- <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" override="true" default="Color( 0.5, 0.6, 1, 0.7 )" />
</members>
<constants>
</constants>
diff --git a/doc/classes/Path.xml b/doc/classes/Path3D.xml
index 12ae8fd3d5..b97e7efd5d 100644
--- a/doc/classes/Path.xml
+++ b/doc/classes/Path3D.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Path" inherits="Spatial" category="Core" version="3.2">
+<class name="Path3D" inherits="Node3D" version="4.0">
<brief_description>
- Contains a [Curve3D] path for [PathFollow] nodes to follow.
+ Contains a [Curve3D] path for [PathFollow3D] nodes to follow.
</brief_description>
<description>
- Can have [PathFollow] child nodes moving along the [Curve3D]. See [PathFollow] for more information on the usage.
- Note that the path is considered as relative to the moved nodes (children of [PathFollow]). As such, the curve should usually start with a zero vector [code](0, 0, 0)[/code].
+ Can have [PathFollow3D] child nodes moving along the [Curve3D]. See [PathFollow3D] for more information on the usage.
+ Note that the path is considered as relative to the moved nodes (children of [PathFollow3D]). As such, the curve should usually start with a zero vector [code](0, 0, 0)[/code].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index 9c4624dfee..bbaeca12da 100644
--- a/doc/classes/PathFollow2D.xml
+++ b/doc/classes/PathFollow2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PathFollow2D" inherits="Node2D" category="Core" version="3.2">
+<class name="PathFollow2D" inherits="Node2D" version="4.0">
<brief_description>
Point sampler for a [Path2D].
</brief_description>
diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow3D.xml
index 0b4a781a7e..f405bdedfc 100644
--- a/doc/classes/PathFollow.xml
+++ b/doc/classes/PathFollow3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PathFollow" inherits="Spatial" category="Core" version="3.2">
+<class name="PathFollow3D" inherits="Node3D" version="4.0">
<brief_description>
- Point sampler for a [Path].
+ Point sampler for a [Path3D].
</brief_description>
<description>
- This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex.
+ 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.
</description>
<tutorials>
@@ -14,7 +14,7 @@
<members>
<member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true">
If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise.
- The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
+ The points along the [Curve3D] of the [Path3D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
@@ -26,7 +26,7 @@
<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>
- <member name="rotation_mode" type="int" setter="set_rotation_mode" getter="get_rotation_mode" enum="PathFollow.RotationMode" default="3">
+ <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">
@@ -38,19 +38,19 @@
</members>
<constants>
<constant name="ROTATION_NONE" value="0" enum="RotationMode">
- Forbids the PathFollow to rotate.
+ Forbids the PathFollow3D to rotate.
</constant>
<constant name="ROTATION_Y" value="1" enum="RotationMode">
- Allows the PathFollow to rotate in the Y axis only.
+ Allows the PathFollow3D to rotate in the Y axis only.
</constant>
<constant name="ROTATION_XY" value="2" enum="RotationMode">
- Allows the PathFollow to rotate in both the X, and Y axes.
+ Allows the PathFollow3D to rotate in both the X, and Y axes.
</constant>
<constant name="ROTATION_XYZ" value="3" enum="RotationMode">
- Allows the PathFollow to rotate in any axis.
+ Allows the PathFollow3D to rotate in any axis.
</constant>
<constant name="ROTATION_ORIENTED" value="4" enum="RotationMode">
- Uses the up vector information in a [Curve3D] to enforce orientation. This rotation mode requires the [Path]'s [member Curve3D.up_vector_enabled] property to be set to [code]true[/code].
+ Uses the up vector information in a [Curve3D] to enforce orientation. This rotation mode requires the [Path3D]'s [member Curve3D.up_vector_enabled] property to be set to [code]true[/code].
</constant>
</constants>
</class>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index a2b5856624..2a0c153267 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Performance" inherits="Object" category="Core" version="3.2">
+<class name="Performance" inherits="Object" version="4.0">
<brief_description>
Exposes performance-related data.
</brief_description>
@@ -37,82 +37,76 @@
<constant name="MEMORY_STATIC" value="3" enum="Monitor">
Static memory currently used, in bytes. Not available in release builds.
</constant>
- <constant name="MEMORY_DYNAMIC" value="4" enum="Monitor">
- Dynamic memory currently used, in bytes. Not available in release builds.
- </constant>
- <constant name="MEMORY_STATIC_MAX" value="5" enum="Monitor">
+ <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor">
Available static memory. Not available in release builds.
</constant>
- <constant name="MEMORY_DYNAMIC_MAX" value="6" enum="Monitor">
- Available dynamic memory. Not available in release builds.
- </constant>
- <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7" enum="Monitor">
+ <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor">
Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications.
</constant>
- <constant name="OBJECT_COUNT" value="8" enum="Monitor">
+ <constant name="OBJECT_COUNT" value="6" enum="Monitor">
Number of objects currently instanced (including nodes).
</constant>
- <constant name="OBJECT_RESOURCE_COUNT" value="9" enum="Monitor">
+ <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor">
Number of resources currently used.
</constant>
- <constant name="OBJECT_NODE_COUNT" value="10" enum="Monitor">
+ <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor">
Number of nodes currently instanced in the scene tree. This also includes the root node.
</constant>
- <constant name="OBJECT_ORPHAN_NODE_COUNT" value="11" enum="Monitor">
+ <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor">
Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree.
</constant>
- <constant name="RENDER_OBJECTS_IN_FRAME" value="12" enum="Monitor">
+ <constant name="RENDER_OBJECTS_IN_FRAME" value="10" enum="Monitor">
3D objects drawn per frame.
</constant>
- <constant name="RENDER_VERTICES_IN_FRAME" value="13" enum="Monitor">
+ <constant name="RENDER_VERTICES_IN_FRAME" value="11" enum="Monitor">
Vertices drawn per frame. 3D only.
</constant>
- <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="14" enum="Monitor">
+ <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="12" enum="Monitor">
Material changes per frame. 3D only.
</constant>
- <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="15" enum="Monitor">
+ <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="13" enum="Monitor">
Shader changes per frame. 3D only.
</constant>
- <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="16" enum="Monitor">
+ <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="14" enum="Monitor">
Render surface changes per frame. 3D only.
</constant>
- <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="17" enum="Monitor">
+ <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="15" enum="Monitor">
Draw calls per frame. 3D only.
</constant>
- <constant name="RENDER_VIDEO_MEM_USED" value="18" enum="Monitor">
+ <constant name="RENDER_VIDEO_MEM_USED" value="16" enum="Monitor">
The amount of video memory used, i.e. texture and vertex memory combined.
</constant>
- <constant name="RENDER_TEXTURE_MEM_USED" value="19" enum="Monitor">
+ <constant name="RENDER_TEXTURE_MEM_USED" value="17" enum="Monitor">
The amount of texture memory used.
</constant>
- <constant name="RENDER_VERTEX_MEM_USED" value="20" enum="Monitor">
+ <constant name="RENDER_VERTEX_MEM_USED" value="18" enum="Monitor">
The amount of vertex memory used.
</constant>
- <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="21" enum="Monitor">
- Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0.
+ <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="19" enum="Monitor">
+ Unimplemented in the GLES2 rendering backend, always returns 0.
</constant>
- <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="22" enum="Monitor">
+ <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="20" enum="Monitor">
Number of active [RigidBody2D] nodes in the game.
</constant>
- <constant name="PHYSICS_2D_COLLISION_PAIRS" value="23" enum="Monitor">
+ <constant name="PHYSICS_2D_COLLISION_PAIRS" value="21" enum="Monitor">
Number of collision pairs in the 2D physics engine.
</constant>
- <constant name="PHYSICS_2D_ISLAND_COUNT" value="24" enum="Monitor">
+ <constant name="PHYSICS_2D_ISLAND_COUNT" value="22" enum="Monitor">
Number of islands in the 2D physics engine.
</constant>
- <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="25" enum="Monitor">
- Number of active [RigidBody] and [VehicleBody] nodes in the game.
+ <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="23" enum="Monitor">
+ Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game.
</constant>
- <constant name="PHYSICS_3D_COLLISION_PAIRS" value="26" enum="Monitor">
+ <constant name="PHYSICS_3D_COLLISION_PAIRS" value="24" enum="Monitor">
Number of collision pairs in the 3D physics engine.
</constant>
- <constant name="PHYSICS_3D_ISLAND_COUNT" value="27" enum="Monitor">
+ <constant name="PHYSICS_3D_ISLAND_COUNT" value="25" enum="Monitor">
Number of islands in the 3D physics engine.
</constant>
- <constant name="AUDIO_OUTPUT_LATENCY" value="28" enum="Monitor">
+ <constant name="AUDIO_OUTPUT_LATENCY" value="26" enum="Monitor">
Output latency of the [AudioServer].
</constant>
- <constant name="MONITOR_MAX" value="29" enum="Monitor">
+ <constant name="MONITOR_MAX" value="27" enum="Monitor">
Represents the size of the [enum Monitor] enum.
</constant>
</constants>
diff --git a/doc/classes/PhysicalBone.xml b/doc/classes/PhysicalBone.xml
deleted file mode 100644
index 583c24e2c0..0000000000
--- a/doc/classes/PhysicalBone.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicalBone" inherits="PhysicsBody" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="get_bone_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_simulate_physics">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_simulating_physics">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_static_body">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- </member>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
- </member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0">
- </member>
- <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
- </member>
- <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- </member>
- <member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone.JointType" default="0">
- </member>
- <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
- </member>
- <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
- </member>
- </members>
- <constants>
- <constant name="JOINT_TYPE_NONE" value="0" enum="JointType">
- </constant>
- <constant name="JOINT_TYPE_PIN" value="1" enum="JointType">
- </constant>
- <constant name="JOINT_TYPE_CONE" value="2" enum="JointType">
- </constant>
- <constant name="JOINT_TYPE_HINGE" value="3" enum="JointType">
- </constant>
- <constant name="JOINT_TYPE_SLIDER" value="4" enum="JointType">
- </constant>
- <constant name="JOINT_TYPE_6DOF" value="5" enum="JointType">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
new file mode 100644
index 0000000000..58930aae37
--- /dev/null
+++ b/doc/classes/PhysicalBone3D.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicalBone3D" inherits="PhysicsBody3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="apply_central_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="impulse" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="apply_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector3">
+ </argument>
+ <argument index="1" name="impulse" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_axis_lock" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bone_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_simulate_physics">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_simulating_physics">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_axis_lock">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
+ </argument>
+ <argument index="1" name="lock" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
+ Damps the body's rotation if greater than [code]0[/code].
+ </member>
+ <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the X axis.
+ </member>
+ <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the Y axis.
+ </member>
+ <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the Z axis.
+ </member>
+ <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's movement in the X axis.
+ </member>
+ <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's movement in the Y axis.
+ </member>
+ <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's movement in the Z axis.
+ </member>
+ <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ Sets the body's transform.
+ </member>
+ <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
+ The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
+ </member>
+ <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
+ If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awaken by an external force.
+ </member>
+ <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0">
+ The body's friction, from [code]0[/code] (frictionless) to [code]1[/code] (max friction).
+ </member>
+ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
+ This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
+ </member>
+ <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ Sets the joint's transform.
+ </member>
+ <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation">
+ Sets the joint's rotation in radians.
+ </member>
+ <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3( 0, 0, 0 )">
+ Sets the joint's rotation in degrees.
+ </member>
+ <member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone3D.JointType" default="0">
+ Sets the joint type. See [enum JointType] for possible values.
+ </member>
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0">
+ Damps the body's movement if greater than [code]0[/code].
+ </member>
+ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
+ The body's mass.
+ </member>
+ <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
+ The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b].
+ </member>
+ </members>
+ <constants>
+ <constant name="JOINT_TYPE_NONE" value="0" enum="JointType">
+ </constant>
+ <constant name="JOINT_TYPE_PIN" value="1" enum="JointType">
+ </constant>
+ <constant name="JOINT_TYPE_CONE" value="2" enum="JointType">
+ </constant>
+ <constant name="JOINT_TYPE_HINGE" value="3" enum="JointType">
+ </constant>
+ <constant name="JOINT_TYPE_SLIDER" value="4" enum="JointType">
+ </constant>
+ <constant name="JOINT_TYPE_6DOF" value="5" enum="JointType">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
new file mode 100644
index 0000000000..2e0f9c52f2
--- /dev/null
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicalSkyMaterial" inherits="Material" version="4.0">
+ <brief_description>
+ [Sky] [Material] used for a physically based sky.
+ </brief_description>
+ <description>
+ The [PhysicalSkyMaterial] uses the Preetham analytic daylight model to draw a sky based on physical properties. This results in a substantially more realistic sky than the [ProceduralSkyMaterial], but it is slightly slower and less flexible.
+ The [PhysicalSkyMaterial] only supports one sun. The color, energy, and direction of the sun are taken from the first [DirectionalLight3D] in the scene tree.
+ As it is based on a daylight model, the sky fades to black as the sunset ends. If you want a full day/night cycle, you will have to add a night sky by converting this to a [ShaderMaterial] and adding a night sky directly into the resulting shader.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <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>
+ <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color( 1, 1, 1, 1 )">
+ Modulates the [Color] on the bottom half of the sky to represent the ground.
+ </member>
+ <member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005">
+ Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whiteish color around the sun and horizon.
+ </member>
+ <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color( 0.36, 0.56, 0.82, 1 )">
+ Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets.
+ </member>
+ <member name="mie_eccentricity" type="float" setter="set_mie_eccentricity" getter="get_mie_eccentricity" default="0.8">
+ Controls the direction of the mie scattering. A value of [code]1[/code] means that when light hits a particle it passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards.
+ </member>
+ <member name="night_sky" type="Texture2D" setter="set_night_sky" getter="get_night_sky">
+ [Texture2D] for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day.
+ </member>
+ <member name="rayleigh_coefficient" type="float" setter="set_rayleigh_coefficient" getter="get_rayleigh_coefficient" default="2.0">
+ Controls the strength of the rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky.
+ </member>
+ <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color( 0.056, 0.14, 0.3, 1 )">
+ Controls the [Color] of the rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a mars looking atmosphere with a corresponding blue sunset.
+ </member>
+ <member name="sun_disk_scale" type="float" setter="set_sun_disk_scale" getter="get_sun_disk_scale" default="1.0">
+ Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth.
+ </member>
+ <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>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DDirectBodyStateSW.xml b/doc/classes/Physics2DDirectBodyStateSW.xml
deleted file mode 100644
index 8aeea560c3..0000000000
--- a/doc/classes/Physics2DDirectBodyStateSW.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core" version="3.2">
- <brief_description>
- Software implementation of [Physics2DDirectBodyState].
- </brief_description>
- <description>
- Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml
deleted file mode 100644
index e478a33e2c..0000000000
--- a/doc/classes/Physics2DServerSW.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core" version="3.2">
- <brief_description>
- Software implementation of [Physics2DServer].
- </brief_description>
- <description>
- This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index 4fe7c329bd..6afbd1ee8e 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.2">
+<class name="PhysicsBody2D" inherits="CollisionObject2D" version="4.0">
<brief_description>
Base class for all objects affected by physics in 2D space.
</brief_description>
@@ -20,7 +20,7 @@
</description>
</method>
<method name="get_collision_exceptions">
- <return type="Array">
+ <return type="PhysicsBody2D[]">
</return>
<description>
Returns an array of nodes that were added as collision exceptions for this body.
diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody3D.xml
index ee50f5a6c3..2301a07a5c 100644
--- a/doc/classes/PhysicsBody.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.2">
+<class name="PhysicsBody3D" inherits="CollisionObject3D" version="4.0">
<brief_description>
Base class for all objects affected by physics in 3D space.
</brief_description>
<description>
- PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it.
+ PhysicsBody3D is an abstract base class for implementing a physics body. All *Body types inherit from it.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
@@ -20,7 +20,7 @@
</description>
</method>
<method name="get_collision_exceptions">
- <return type="Array">
+ <return type="PhysicsBody3D[]">
</return>
<description>
Returns an array of nodes that were added as collision exceptions for this body.
diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index af3bba9b86..46205fecd1 100644
--- a/doc/classes/Physics2DDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectBodyState" inherits="Object" category="Core" version="3.2">
+<class name="PhysicsDirectBodyState2D" inherits="Object" version="4.0">
<brief_description>
- Direct access object to a physics body in the [Physics2DServer].
+ Direct access object to a physics body in the [PhysicsServer2D].
</brief_description>
<description>
- Provides direct access to a physics body in the [Physics2DServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces].
+ Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
@@ -119,7 +119,7 @@
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Returns the collided shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ Returns the collided shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
</description>
</method>
<method name="get_contact_collider_velocity_at_position" qualifiers="const">
@@ -167,7 +167,7 @@
</description>
</method>
<method name="get_space_state">
- <return type="Physics2DDirectSpaceState">
+ <return type="PhysicsDirectSpaceState2D">
</return>
<description>
Returns the current state of the space, useful for queries.
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index e68d280cd1..1ee520fe5f 100644
--- a/doc/classes/PhysicsDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.2">
+<class name="PhysicsDirectBodyState3D" inherits="Object" version="4.0">
<brief_description>
- Direct access object to a physics body in the [PhysicsServer].
+ Direct access object to a physics body in the [PhysicsServer3D].
</brief_description>
<description>
- Provides direct access to a physics body in the [PhysicsServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody._integrate_forces].
+ Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces].
</description>
<tutorials>
</tutorials>
@@ -128,7 +128,7 @@
</return>
<description>
Returns the number of contacts this body has with other bodies.
- [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody.contact_monitor].
+ [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor].
</description>
</method>
<method name="get_contact_impulse" qualifiers="const">
@@ -168,7 +168,7 @@
</description>
</method>
<method name="get_space_state">
- <return type="PhysicsDirectSpaceState">
+ <return type="PhysicsDirectSpaceState3D">
</return>
<description>
Returns the current state of the space, useful for queries.
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index e11e8918cd..d85d7794dd 100644
--- a/doc/classes/Physics2DDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectSpaceState" inherits="Object" category="Core" version="3.2">
+<class name="PhysicsDirectSpaceState2D" inherits="Object" version="4.0">
<brief_description>
- Direct access object to a space in the [Physics2DServer].
+ Direct access object to a space in the [PhysicsServer2D].
</brief_description>
<description>
- Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space.
+ Direct access object to a space in the [PhysicsServer2D]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
@@ -13,35 +13,35 @@
<method name="cast_motion">
<return type="Array">
</return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D">
</argument>
<description>
Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty.
- [b]Note:[/b] Both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code].
+ [b]Note:[/b] Both the shape and the motion are supplied through a [PhysicsShapeQueryParameters2D] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code].
</description>
</method>
<method name="collide_shape">
<return type="Array">
</return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D">
</argument>
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] 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.
+ 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.
</description>
</method>
<method name="get_rest_info">
<return type="Dictionary">
</return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D">
</argument>
<description>
- Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] 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.
+ 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:
[code]collider_id[/code]: The colliding object's ID.
[code]linear_velocity[/code]: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is [code](0, 0)[/code].
- [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
[code]normal[/code]: The object's surface normal at the intersection point.
[code]point[/code]: The intersection point.
[code]rid[/code]: The intersecting object's [RID].
@@ -67,10 +67,10 @@
Checks whether a point is inside any shape. 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]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
</description>
</method>
<method name="intersect_point_on_canvas">
@@ -112,28 +112,28 @@
Intersects a ray in a given space. The returned object is a dictionary with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
- [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
[code]normal[/code]: The object's surface normal at the intersection point.
[code]position[/code]: The intersection point.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
If the ray did not intersect anything, then an empty dictionary is returned instead.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
</description>
</method>
<method name="intersect_shape">
<return type="Array">
</return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D">
</argument>
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space.
+ Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space.
[b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. 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]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
[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.
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 1a3324bf0e..ea094dcd90 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.2">
+<class name="PhysicsDirectSpaceState3D" inherits="Object" version="4.0">
<brief_description>
- Direct access object to a space in the [PhysicsServer].
+ Direct access object to a space in the [PhysicsServer3D].
</brief_description>
<description>
- Direct access object to a space in the [PhysicsServer]. It's used mainly to do queries against objects and areas residing in a given space.
+ Direct access object to a space in the [PhysicsServer3D]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
@@ -13,35 +13,35 @@
<method name="cast_motion">
<return type="Array">
</return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D">
</argument>
<argument index="1" name="motion" type="Vector3">
</argument>
<description>
Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code].
- If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics.
+ If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics3D.
</description>
</method>
<method name="collide_shape">
<return type="Array">
</return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D">
</argument>
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] 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.
+ 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.
</description>
</method>
<method name="get_rest_info">
<return type="Dictionary">
</return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D">
</argument>
<description>
- Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] 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:
+ 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.
- [code]linear_velocity[/code]: The colliding object's velocity [Vector3]. If the object is an [Area], the result is [code](0, 0, 0)[/code].
+ [code]linear_velocity[/code]: The colliding object's velocity [Vector3]. If the object is an [Area3D], the result is [code](0, 0, 0)[/code].
[code]normal[/code]: The object's surface normal at the intersection point.
[code]point[/code]: The intersection point.
[code]rid[/code]: The intersecting object's [RID].
@@ -73,18 +73,18 @@
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
If the ray did not intersect anything, then an empty dictionary is returned instead.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively.
</description>
</method>
<method name="intersect_shape">
<return type="Array">
</return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D">
</argument>
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
+ 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].
diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml
index 73f1416172..6410626496 100644
--- a/doc/classes/PhysicsMaterial.xml
+++ b/doc/classes/PhysicsMaterial.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsMaterial" inherits="Resource" category="Core" version="3.2">
+<class name="PhysicsMaterial" inherits="Resource" version="4.0">
<brief_description>
A material for physics properties.
</brief_description>
<description>
- Provides a means of modifying the collision properties of a [PhysicsBody].
+ Provides a means of modifying the collision properties of a [PhysicsBody3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/PhysicsServer2D.xml
index a139fa4664..9da739e57a 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DServer" inherits="Object" category="Core" version="3.2">
+<class name="PhysicsServer2D" inherits="Object" version="4.0">
<brief_description>
Server interface for low-level 2D physics access.
</brief_description>
<description>
- Physics2DServer is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
+ PhysicsServer2D is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
</description>
<tutorials>
</tutorials>
@@ -83,7 +83,7 @@
</return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter">
</argument>
<description>
Returns an area parameter value. See [enum AreaParameter] for a list of available parameters.
@@ -130,7 +130,7 @@
</description>
</method>
<method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="Physics2DServer.AreaSpaceOverrideMode">
+ <return type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode">
</return>
<argument index="0" name="area" type="RID">
</argument>
@@ -165,7 +165,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
</description>
@@ -199,11 +199,11 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
- 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
+ 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
2: [RID] of the object that entered/exited the area.
3: Instance ID of the object that entered/exited the area.
4: The shape index of the object that entered/exited the area.
@@ -225,7 +225,7 @@
</return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -288,7 +288,7 @@
</return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="Physics2DServer.AreaSpaceOverrideMode">
+ <argument index="1" name="mode" type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode">
</argument>
<description>
Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes.
@@ -461,7 +461,7 @@
</description>
</method>
<method name="body_get_continuous_collision_detection_mode" qualifiers="const">
- <return type="int" enum="Physics2DServer.CCDMode">
+ <return type="int" enum="PhysicsServer2D.CCDMode">
</return>
<argument index="0" name="body" type="RID">
</argument>
@@ -470,12 +470,12 @@
</description>
</method>
<method name="body_get_direct_state">
- <return type="Physics2DDirectBodyState">
+ <return type="PhysicsDirectBodyState2D">
</return>
<argument index="0" name="body" type="RID">
</argument>
<description>
- Returns the [Physics2DDirectBodyState] of the body.
+ Returns the [PhysicsDirectBodyState2D] of the body.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
@@ -488,7 +488,7 @@
</description>
</method>
<method name="body_get_mode" qualifiers="const">
- <return type="int" enum="Physics2DServer.BodyMode">
+ <return type="int" enum="PhysicsServer2D.BodyMode">
</return>
<argument index="0" name="body" type="RID">
</argument>
@@ -510,7 +510,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter">
</argument>
<description>
Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters.
@@ -572,7 +572,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
+ <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState">
</argument>
<description>
Returns a body state.
@@ -647,7 +647,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="Physics2DServer.CCDMode">
+ <argument index="1" name="mode" type="int" enum="PhysicsServer2D.CCDMode">
</argument>
<description>
Sets the continuous collision detection mode using one of the [enum CCDMode] constants.
@@ -661,7 +661,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant" default="null">
</argument>
@@ -685,7 +685,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="Physics2DServer.BodyMode">
+ <argument index="1" name="mode" type="int" enum="PhysicsServer2D.BodyMode">
</argument>
<description>
Sets the body mode using one of the [enum BodyMode] constants.
@@ -707,7 +707,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -798,7 +798,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
+ <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -819,10 +819,10 @@
</argument>
<argument index="4" name="margin" type="float" default="0.08">
</argument>
- <argument index="5" name="result" type="Physics2DTestMotionResult" default="null">
+ <argument index="5" name="result" type="PhysicsTestMotionResult2D" default="null">
</argument>
<description>
- Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [Physics2DTestMotionResult] can be passed to return additional information in.
+ Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in.
</description>
</method>
<method name="capsule_shape_create">
@@ -869,7 +869,7 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedStringParam">
</argument>
<description>
Returns the value of a damped spring joint parameter.
@@ -880,7 +880,7 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedStringParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -894,13 +894,13 @@
<argument index="0" name="rid" type="RID">
</argument>
<description>
- Destroys any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console.
+ 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">
</return>
- <argument index="0" name="process_info" type="int" enum="Physics2DServer.ProcessInfo">
+ <argument index="0" name="process_info" type="int" enum="PhysicsServer2D.ProcessInfo">
</argument>
<description>
Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states.
@@ -928,14 +928,14 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam">
</argument>
<description>
Returns the value of a joint parameter.
</description>
</method>
<method name="joint_get_type" qualifiers="const">
- <return type="int" enum="Physics2DServer.JointType">
+ <return type="int" enum="PhysicsServer2D.JointType">
</return>
<argument index="0" name="joint" type="RID">
</argument>
@@ -948,7 +948,7 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -1012,7 +1012,7 @@
</description>
</method>
<method name="shape_get_type" qualifiers="const">
- <return type="int" enum="Physics2DServer.ShapeType">
+ <return type="int" enum="PhysicsServer2D.ShapeType">
</return>
<argument index="0" name="shape" type="RID">
</argument>
@@ -1039,12 +1039,12 @@
</description>
</method>
<method name="space_get_direct_state">
- <return type="Physics2DDirectSpaceState">
+ <return type="PhysicsDirectSpaceState2D">
</return>
<argument index="0" name="space" type="RID">
</argument>
<description>
- Returns the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries.
+ 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">
@@ -1052,7 +1052,7 @@
</return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter">
</argument>
<description>
Returns the value of a space parameter.
@@ -1083,7 +1083,7 @@
</return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -1155,7 +1155,7 @@
Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</constant>
<constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter">
- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE.
+ This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE].
</constant>
<constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter">
Constant to set/get the linear dampening factor of an area.
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer3D.xml
index a779a34e6a..e9e1552c92 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsServer" inherits="Object" category="Core" version="3.2">
+<class name="PhysicsServer3D" inherits="Object" version="4.0">
<brief_description>
Server interface for low-level physics access.
</brief_description>
<description>
- PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
+ PhysicsServer3D is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
</description>
<tutorials>
</tutorials>
@@ -48,7 +48,7 @@
<return type="RID">
</return>
<description>
- Creates an [Area].
+ Creates an [Area3D].
</description>
</method>
<method name="area_get_object_instance_id" qualifiers="const">
@@ -65,10 +65,10 @@
</return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter">
</argument>
<description>
- Returns an area parameter value. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants.
+ 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">
@@ -112,7 +112,7 @@
</description>
</method>
<method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
+ <return type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode">
</return>
<argument index="0" name="area" type="RID">
</argument>
@@ -156,7 +156,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
</description>
@@ -190,11 +190,11 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
- 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
+ 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
2: [RID] of the object that entered/exited the area.
3: Instance ID of the object that entered/exited the area.
4: The shape index of the object that entered/exited the area.
@@ -216,12 +216,12 @@
</return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Sets the value for an area parameter. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants.
+ 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">
@@ -289,10 +289,10 @@
</return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
+ <argument index="1" name="mode" type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode">
</argument>
<description>
- Sets the space override mode for the area. The modes are described in the constants [code]AREA_SPACE_OVERRIDE_*[/code].
+ Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants.
</description>
</method>
<method name="area_set_transform">
@@ -421,12 +421,12 @@
<method name="body_create">
<return type="RID">
</return>
- <argument index="0" name="mode" type="int" enum="PhysicsServer.BodyMode" default="2">
+ <argument index="0" name="mode" type="int" enum="PhysicsServer3D.BodyMode" default="2">
</argument>
<argument index="1" name="init_sleeping" type="bool" default="false">
</argument>
<description>
- Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
+ Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
</description>
</method>
<method name="body_get_collision_layer" qualifiers="const">
@@ -449,12 +449,12 @@
</description>
</method>
<method name="body_get_direct_state">
- <return type="PhysicsDirectBodyState">
+ <return type="PhysicsDirectBodyState3D">
</return>
<argument index="0" name="body" type="RID">
</argument>
<description>
- Returns the [PhysicsDirectBodyState] of the body.
+ Returns the [PhysicsDirectBodyState3D] of the body.
</description>
</method>
<method name="body_get_kinematic_safe_margin" qualifiers="const">
@@ -475,7 +475,7 @@
</description>
</method>
<method name="body_get_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer.BodyMode">
+ <return type="int" enum="PhysicsServer3D.BodyMode">
</return>
<argument index="0" name="body" type="RID">
</argument>
@@ -497,10 +497,10 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter">
</argument>
<description>
- Returns the value of a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants.
+ 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">
@@ -548,7 +548,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
+ <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState">
</argument>
<description>
Returns a body state.
@@ -559,7 +559,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="axis" type="int" enum="PhysicsServer.BodyAxis">
+ <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
</argument>
<description>
</description>
@@ -619,7 +619,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="axis" type="int" enum="PhysicsServer.BodyAxis">
+ <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
</argument>
<argument index="2" name="lock" type="bool">
</argument>
@@ -678,7 +678,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant" default="null">
</argument>
@@ -712,10 +712,10 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode">
+ <argument index="1" name="mode" type="int" enum="PhysicsServer3D.BodyMode">
</argument>
<description>
- Sets the body mode, from one of the constants BODY_MODE*.
+ Sets the body mode, from one of the [enum BodyMode] constants.
</description>
</method>
<method name="body_set_omit_force_integration">
@@ -734,12 +734,12 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants.
+ Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants.
</description>
</method>
<method name="body_set_ray_pickable">
@@ -807,12 +807,12 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
+ <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Sets a body state (see BODY_STATE* constants).
+ Sets a body state (see [enum BodyState] constants).
</description>
</method>
<method name="cone_twist_joint_get_param" qualifiers="const">
@@ -820,10 +820,10 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam">
</argument>
<description>
- Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants).
+ Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants).
</description>
</method>
<method name="cone_twist_joint_set_param">
@@ -831,12 +831,12 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants).
+ Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants).
</description>
</method>
<method name="free_rid">
@@ -845,7 +845,7 @@
<argument index="0" name="rid" type="RID">
</argument>
<description>
- Destroys any of the objects created by PhysicsServer. If the [RID] passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console.
+ 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">
@@ -855,10 +855,10 @@
</argument>
<argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
+ <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag">
</argument>
<description>
- Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants).
+ Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants).
</description>
</method>
<method name="generic_6dof_joint_get_param">
@@ -868,10 +868,10 @@
</argument>
<argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
+ <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam">
</argument>
<description>
- Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*).
+ Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants).
</description>
</method>
<method name="generic_6dof_joint_set_flag">
@@ -881,12 +881,12 @@
</argument>
<argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
+ <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag">
</argument>
<argument index="3" name="enable" type="bool">
</argument>
<description>
- Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants).
+ Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants).
</description>
</method>
<method name="generic_6dof_joint_set_param">
@@ -896,18 +896,18 @@
</argument>
<argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
+ <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam">
</argument>
<argument index="3" name="value" type="float">
</argument>
<description>
- Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*).
+ Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants).
</description>
</method>
<method name="get_process_info">
<return type="int">
</return>
- <argument index="0" name="process_info" type="int" enum="PhysicsServer.ProcessInfo">
+ <argument index="0" name="process_info" type="int" enum="PhysicsServer3D.ProcessInfo">
</argument>
<description>
Returns an Info defined by the [enum ProcessInfo] input given.
@@ -918,10 +918,10 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
+ <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag">
</argument>
<description>
- Gets a hinge_joint flag (see HINGE_JOINT_FLAG* constants).
+ Gets a hinge_joint flag (see [enum HingeJointFlag] constants).
</description>
</method>
<method name="hinge_joint_get_param" qualifiers="const">
@@ -929,10 +929,10 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam">
</argument>
<description>
- Gets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*).
+ Gets a hinge_joint parameter (see [enum HingeJointParam]).
</description>
</method>
<method name="hinge_joint_set_flag">
@@ -940,12 +940,12 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
+ <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag">
</argument>
<argument index="2" name="enabled" type="bool">
</argument>
<description>
- Sets a hinge_joint flag (see HINGE_JOINT_FLAG* constants).
+ Sets a hinge_joint flag (see [enum HingeJointFlag] constants).
</description>
</method>
<method name="hinge_joint_set_param">
@@ -953,12 +953,12 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*).
+ Sets a hinge_joint parameter (see [enum HingeJointParam] constants).
</description>
</method>
<method name="joint_create_cone_twist">
@@ -973,7 +973,7 @@
<argument index="3" name="local_ref_B" type="Transform">
</argument>
<description>
- Creates a [ConeTwistJoint].
+ Creates a [ConeTwistJoint3D].
</description>
</method>
<method name="joint_create_generic_6dof">
@@ -988,7 +988,7 @@
<argument index="3" name="local_ref_B" type="Transform">
</argument>
<description>
- Creates a [Generic6DOFJoint].
+ Creates a [Generic6DOFJoint3D].
</description>
</method>
<method name="joint_create_hinge">
@@ -1003,7 +1003,7 @@
<argument index="3" name="hinge_B" type="Transform">
</argument>
<description>
- Creates a [HingeJoint].
+ Creates a [HingeJoint3D].
</description>
</method>
<method name="joint_create_pin">
@@ -1018,7 +1018,7 @@
<argument index="3" name="local_B" type="Vector3">
</argument>
<description>
- Creates a [PinJoint].
+ Creates a [PinJoint3D].
</description>
</method>
<method name="joint_create_slider">
@@ -1033,7 +1033,7 @@
<argument index="3" name="local_ref_B" type="Transform">
</argument>
<description>
- Creates a [SliderJoint].
+ Creates a [SliderJoint3D].
</description>
</method>
<method name="joint_get_solver_priority" qualifiers="const">
@@ -1042,16 +1042,16 @@
<argument index="0" name="joint" type="RID">
</argument>
<description>
- Gets the priority value of the Joint.
+ Gets the priority value of the Joint3D.
</description>
</method>
<method name="joint_get_type" qualifiers="const">
- <return type="int" enum="PhysicsServer.JointType">
+ <return type="int" enum="PhysicsServer3D.JointType">
</return>
<argument index="0" name="joint" type="RID">
</argument>
<description>
- Returns the type of the Joint.
+ Returns the type of the Joint3D.
</description>
</method>
<method name="joint_set_solver_priority">
@@ -1062,7 +1062,7 @@
<argument index="1" name="priority" type="int">
</argument>
<description>
- Sets the priority value of the Joint.
+ Sets the priority value of the Joint3D.
</description>
</method>
<method name="pin_joint_get_local_a" qualifiers="const">
@@ -1088,10 +1088,10 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam">
</argument>
<description>
- Gets a pin_joint parameter (see PIN_JOINT* constants).
+ Gets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
</method>
<method name="pin_joint_set_local_a">
@@ -1121,12 +1121,12 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a pin_joint parameter (see PIN_JOINT* constants).
+ Sets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
</method>
<method name="set_active">
@@ -1141,10 +1141,10 @@
<method name="shape_create">
<return type="RID">
</return>
- <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType">
+ <argument index="0" name="type" type="int" enum="PhysicsServer3D.ShapeType">
</argument>
<description>
- Creates a shape of type [code]SHAPE_*[/code]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
+ Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
</description>
</method>
<method name="shape_get_data" qualifiers="const">
@@ -1157,12 +1157,12 @@
</description>
</method>
<method name="shape_get_type" qualifiers="const">
- <return type="int" enum="PhysicsServer.ShapeType">
+ <return type="int" enum="PhysicsServer3D.ShapeType">
</return>
<argument index="0" name="shape" type="RID">
</argument>
<description>
- Returns the type of shape (see [code]SHAPE_*[/code] constants).
+ Returns the type of shape (see [enum ShapeType] constants).
</description>
</method>
<method name="shape_set_data">
@@ -1181,10 +1181,10 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam">
</argument>
<description>
- Gets a slider_joint parameter (see SLIDER_JOINT* constants).
+ Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
<method name="slider_joint_set_param">
@@ -1192,12 +1192,12 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
<description>
- Gets a slider_joint parameter (see SLIDER_JOINT* constants).
+ Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
<method name="space_create">
@@ -1208,12 +1208,12 @@
</description>
</method>
<method name="space_get_direct_state">
- <return type="PhysicsDirectSpaceState">
+ <return type="PhysicsDirectSpaceState3D">
</return>
<argument index="0" name="space" type="RID">
</argument>
<description>
- Returns the state of a space, a [PhysicsDirectSpaceState]. This object can be used to make collision/intersection queries.
+ 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">
@@ -1221,7 +1221,7 @@
</return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter">
</argument>
<description>
Returns the value of a space parameter.
@@ -1252,30 +1252,30 @@
</return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
+ <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets the value for a space parameter. A list of available parameters is on the [code]SPACE_PARAM_*[/code] constants.
+ Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants.
</description>
</method>
</methods>
<constants>
<constant name="JOINT_PIN" value="0" enum="JointType">
- The [Joint] is a [PinJoint].
+ The [Joint3D] is a [PinJoint3D].
</constant>
<constant name="JOINT_HINGE" value="1" enum="JointType">
- The [Joint] is a [HingeJoint].
+ The [Joint3D] is a [HingeJoint3D].
</constant>
<constant name="JOINT_SLIDER" value="2" enum="JointType">
- The [Joint] is a [SliderJoint].
+ The [Joint3D] is a [SliderJoint3D].
</constant>
<constant name="JOINT_CONE_TWIST" value="3" enum="JointType">
- The [Joint] is a [ConeTwistJoint].
+ The [Joint3D] is a [ConeTwistJoint3D].
</constant>
<constant name="JOINT_6DOF" value="4" enum="JointType">
- The [Joint] is a [Generic6DOFJoint].
+ The [Joint3D] is a [Generic6DOFJoint3D].
</constant>
<constant name="PIN_JOINT_BIAS" value="0" enum="PinJointParam">
The strength with which the pinned objects try to stay in positional relation to each other.
@@ -1286,7 +1286,7 @@
The higher, the stronger.
</constant>
<constant name="PIN_JOINT_IMPULSE_CLAMP" value="2" enum="PinJointParam">
- If above 0, this value is the maximum value for an impulse that this Joint puts on its ends.
+ If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends.
</constant>
<constant name="HINGE_JOINT_BIAS" value="0" enum="HingeJointParam">
The speed with which the two bodies get pulled together when they move in different directions.
@@ -1315,7 +1315,7 @@
If [code]true[/code], the Hinge has a maximum and a minimum rotation.
</constant>
<constant name="HINGE_JOINT_FLAG_ENABLE_MOTOR" value="1" enum="HingeJointFlag">
- If [code]true[/code], a motor turns the Hinge
+ If [code]true[/code], a motor turns the Hinge.
</constant>
<constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0" enum="SliderJointParam">
The maximum difference between the pivot points on their X axis before damping happens.
@@ -1388,8 +1388,8 @@
</constant>
<constant name="CONE_TWIST_JOINT_SWING_SPAN" value="0" enum="ConeTwistJointParam">
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 allong the swing axis.
- Could be defined as looseness in the [ConeTwistJoint].
+ 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.
</constant>
<constant name="CONE_TWIST_JOINT_TWIST_SPAN" value="1" enum="ConeTwistJointParam">
@@ -1401,7 +1401,7 @@
The higher, the faster.
</constant>
<constant name="CONE_TWIST_JOINT_SOFTNESS" value="3" enum="ConeTwistJointParam">
- The ease with which the Joint twists, if it's too low, it takes more force to twist the joint.
+ The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint.
</constant>
<constant name="CONE_TWIST_JOINT_RELAXATION" value="4" enum="ConeTwistJointParam">
Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
@@ -1467,31 +1467,31 @@
If [code]set[/code] there is a linear motor on this axis that targets a specific velocity.
</constant>
<constant name="SHAPE_PLANE" value="0" enum="ShapeType">
- The [Shape] is a [PlaneShape].
+ The [Shape3D] is a [WorldMarginShape3D].
</constant>
<constant name="SHAPE_RAY" value="1" enum="ShapeType">
- The [Shape] is a [RayShape].
+ The [Shape3D] is a [RayShape3D].
</constant>
<constant name="SHAPE_SPHERE" value="2" enum="ShapeType">
- The [Shape] is a [SphereShape].
+ The [Shape3D] is a [SphereShape3D].
</constant>
<constant name="SHAPE_BOX" value="3" enum="ShapeType">
- The [Shape] is a [BoxShape].
+ The [Shape3D] is a [BoxShape3D].
</constant>
<constant name="SHAPE_CAPSULE" value="4" enum="ShapeType">
- The [Shape] is a [CapsuleShape].
+ The [Shape3D] is a [CapsuleShape3D].
</constant>
<constant name="SHAPE_CYLINDER" value="5" enum="ShapeType">
- The [Shape] is a [CylinderShape].
+ The [Shape3D] is a [CylinderShape3D].
</constant>
<constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType">
- The [Shape] is a [ConvexPolygonShape].
+ The [Shape3D] is a [ConvexPolygonShape3D].
</constant>
<constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType">
- The [Shape] is a [ConcavePolygonShape].
+ The [Shape3D] is a [ConcavePolygonShape3D].
</constant>
<constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType">
- The [Shape] is a [HeightMapShape].
+ The [Shape3D] is a [HeightMapShape3D].
</constant>
<constant name="SHAPE_CUSTOM" value="9" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
@@ -1509,7 +1509,7 @@
Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</constant>
<constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter">
- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE.
+ This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE].
</constant>
<constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter">
Constant to set/get the linear dampening factor of an area.
diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 7d46dd2876..9a162dabbb 100644
--- a/doc/classes/Physics2DShapeQueryParameters.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.2">
+<class name="PhysicsShapeQueryParameters2D" inherits="Reference" version="4.0">
<brief_description>
Parameters to be sent to a 2D shape physics query.
</brief_description>
<description>
- This class contains the shape and other parameters for intersection/collision queries.
+ This class contains the shape and other parameters for 2D intersection/collision queries. See also [PhysicsShapeQueryResult2D].
</description>
<tutorials>
</tutorials>
@@ -21,14 +21,16 @@
</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.
</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], the query will take [PhysicsBody2D]s into account.
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647">
- The physics layer the query should be made on.
+ The physics layer(s) the query will take into account (as a bitmask).
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]">
- The list of objects or object [RID]s, that will be excluded from collisions.
+ The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
The collision margin for the shape.
@@ -37,10 +39,10 @@
The motion of the shape being queried for.
</member>
<member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid">
- The [RID] of the queried shape. See also [method set_shape].
+ The queried shape's [RID]. See also [method set_shape].
</member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
- the transform matrix of the queried shape.
+ The queried shape's transform matrix.
</member>
</members>
<constants>
diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index 7d7307592e..6606cfbc59 100644
--- a/doc/classes/PhysicsShapeQueryParameters.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.2">
+<class name="PhysicsShapeQueryParameters3D" inherits="Reference" version="4.0">
<brief_description>
+ Parameters to be sent to a 3D shape physics query.
</brief_description>
<description>
+ This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult3D].
</description>
<tutorials>
</tutorials>
@@ -13,23 +15,31 @@
<argument index="0" name="shape" type="Resource">
</argument>
<description>
+ Sets the [Shape3D] that will be used for collision/intersection queries.
</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.
</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], the query will take [PhysicsBody3D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647">
+ The physics layer(s) the query will take into account (as a bitmask).
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]">
+ The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ The collision margin for the shape.
</member>
<member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid">
+ The queried shape's [RID]. See also [method set_shape].
</member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ The queried shape's transform matrix.
</member>
</members>
<constants>
diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult2D.xml
index dd38b488f5..227683cc33 100644
--- a/doc/classes/Physics2DShapeQueryResult.xml
+++ b/doc/classes/PhysicsShapeQueryResult2D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.2">
+<class name="PhysicsShapeQueryResult2D" inherits="Reference" version="4.0">
<brief_description>
+ Result of a 2D shape query in [PhysicsServer2D].
</brief_description>
<description>
+ The result of a 2D shape query in [PhysicsServer2D]. See also [PhysicsShapeQueryParameters2D].
</description>
<tutorials>
</tutorials>
@@ -11,6 +13,7 @@
<return type="int">
</return>
<description>
+ Returns the number of objects that intersected with the shape.
</description>
</method>
<method name="get_result_object" qualifiers="const">
@@ -19,6 +22,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_id" qualifiers="const">
@@ -27,6 +31,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_shape" qualifiers="const">
@@ -35,6 +40,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the child index of the object's [Shape2D] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_rid" qualifiers="const">
@@ -43,6 +49,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [RID] of the object that intersected with the shape at index [code]idx[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult3D.xml
index 92a4393979..4555c4e242 100644
--- a/doc/classes/PhysicsShapeQueryResult.xml
+++ b/doc/classes/PhysicsShapeQueryResult3D.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.2">
+<class name="PhysicsShapeQueryResult3D" inherits="Reference" version="4.0">
<brief_description>
- Result of a shape query in Physics2DServer.
+ Result of a 3D shape query in [PhysicsServer3D].
</brief_description>
<description>
+ The result of a 3D shape query in [PhysicsServer3D]. See also [PhysicsShapeQueryParameters3D].
</description>
<tutorials>
</tutorials>
@@ -12,6 +13,7 @@
<return type="int">
</return>
<description>
+ Returns the number of objects that intersected with the shape.
</description>
</method>
<method name="get_result_object" qualifiers="const">
@@ -20,6 +22,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_id" qualifiers="const">
@@ -28,6 +31,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_shape" qualifiers="const">
@@ -36,6 +40,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the child index of the object's [Shape3D] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_rid" qualifiers="const">
@@ -44,6 +49,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [RID] of the object that intersected with the shape at index [code]idx[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index 752b50922d..301cff2885 100644
--- a/doc/classes/Physics2DTestMotionResult.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DTestMotionResult" inherits="Reference" category="Core" version="3.2">
+<class name="PhysicsTestMotionResult2D" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
index f65cb86b1c..42155a7f25 100644
--- a/doc/classes/PinJoint2D.xml
+++ b/doc/classes/PinJoint2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.2">
+<class name="PinJoint2D" inherits="Joint2D" version="4.0">
<brief_description>
- Pin Joint for 2D shapes.
+ Pin joint for 2D shapes.
</brief_description>
<description>
- Pin Joint for 2D rigid bodies. It pins two bodies (rigid or static) together.
+ Pin joint for 2D rigid bodies. It pins two bodies (rigid or static) together.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint3D.xml
index 647a59feef..0af1e60839 100644
--- a/doc/classes/PinJoint.xml
+++ b/doc/classes/PinJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint" inherits="Joint" category="Core" version="3.2">
+<class name="PinJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
Pin joint for 3D shapes.
</brief_description>
@@ -12,19 +12,21 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="PinJoint.Param">
+ <argument index="0" name="param" type="int" enum="PinJoint3D.Param">
</argument>
<description>
+ Returns the value of the specified parameter.
</description>
</method>
<method name="set_param">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="PinJoint.Param">
+ <argument index="0" name="param" type="int" enum="PinJoint3D.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
<description>
+ Sets the value of the specified parameter.
</description>
</method>
</methods>
@@ -36,7 +38,7 @@
The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger.
</member>
<member name="params/impulse_clamp" type="float" setter="set_param" getter="get_param" default="0.0">
- If above 0, this value is the maximum value for an impulse that this Joint produces.
+ If above 0, this value is the maximum value for an impulse that this Joint3D produces.
</member>
</members>
<constants>
@@ -47,7 +49,7 @@
The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger.
</constant>
<constant name="PARAM_IMPULSE_CLAMP" value="2" enum="Param">
- If above 0, this value is the maximum value for an impulse that this Joint produces.
+ If above 0, this value is the maximum value for an impulse that this Joint3D produces.
</constant>
</constants>
</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index bb72f2734e..292acd8b5d 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Plane" category="Built-In Types" version="3.2">
+<class name="Plane" version="4.0">
<brief_description>
Plane in hessian form.
</brief_description>
@@ -22,7 +22,7 @@
<argument index="3" name="d" type="float">
</argument>
<description>
- Creates a plane from the four parameters [code]a[/code], [code]b[/code], [code]c[/code] and [code]d[/code].
+ 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.
</description>
</method>
<method name="Plane">
@@ -35,7 +35,7 @@
<argument index="2" name="v3" type="Vector3">
</argument>
<description>
- Creates a plane from three points.
+ Creates a plane from the three points, given in clockwise order.
</description>
</method>
<method name="Plane">
@@ -77,7 +77,7 @@
</return>
<argument index="0" name="point" type="Vector3">
</argument>
- <argument index="1" name="epsilon" type="float" default="0.00001">
+ <argument index="1" name="epsilon" type="float" default="1e-05">
</argument>
<description>
Returns [code]true[/code] if [code]point[/code] is inside the plane (by a very minimum [code]epsilon[/code] threshold).
@@ -122,6 +122,7 @@
<argument index="0" name="plane" type="Plane">
</argument>
<description>
+ Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_point_over">
@@ -152,22 +153,30 @@
</methods>
<members>
<member name="d" type="float" setter="" getter="" default="0.0">
+ Distance from the origin to the plane, in the direction of [member normal].
</member>
<member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
+ The normal of the plane. "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
</member>
<member name="x" type="float" setter="" getter="" default="0.0">
+ The [member normal]'s X component.
</member>
<member name="y" type="float" setter="" getter="" default="0.0">
+ The [member normal]'s Y component.
</member>
<member name="z" type="float" setter="" getter="" default="0.0">
+ The [member normal]'s Z component.
</member>
</members>
<constants>
<constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )">
+ A plane that extends in the Y and Z axes.
</constant>
<constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )">
+ A plane that extends in the X and Z axes.
</constant>
<constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )">
+ A plane that extends in the X and Y axes.
</constant>
</constants>
</class>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index 01aee93dad..2081442e04 100644
--- a/doc/classes/PlaneMesh.xml
+++ b/doc/classes/PlaneMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="PlaneMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Class representing a planar [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/PointMesh.xml b/doc/classes/PointMesh.xml
index dc7dd065cf..266ab2a898 100644
--- a/doc/classes/PointMesh.xml
+++ b/doc/classes/PointMesh.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PointMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="PointMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Mesh with a single Point primitive.
</brief_description>
<description>
The PointMesh is made from a single point. Instead of relying on triangles, points are rendered as a single rectangle on the screen with a constant size. They are intended to be used with Particle systems, but can be used as a cheap way to render constant size billboarded sprites (for example in a point cloud).
- PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with [code]POINT_SIZE[/code], or in a [SpatialMaterial] by setting [member SpatialMaterial.flags_use_point_size] and the variable [member SpatialMaterial.params_point_size].
+ PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with [code]POINT_SIZE[/code], or in a [BaseMaterial3D] by setting [member BaseMaterial3D.use_point_size] and the variable [member BaseMaterial3D.point_size].
When using PointMeshes, properties that normally alter vertices will be ignored, including billboard mode, grow, and cull face.
</description>
<tutorials>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 7c2aa468ab..335df1ac3f 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Polygon2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Polygon2D" inherits="Node2D" version="4.0">
<brief_description>
A 2D polygon.
</brief_description>
@@ -14,15 +14,17 @@
</return>
<argument index="0" name="path" type="NodePath">
</argument>
- <argument index="1" name="weights" type="PoolRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
+ Adds a bone with the specified [code]path[/code] and [code]weights[/code].
</description>
</method>
<method name="clear_bones">
<return type="void">
</return>
<description>
+ Removes all bones from this [Polygon2D].
</description>
</method>
<method name="erase_bone">
@@ -31,12 +33,14 @@
<argument index="0" name="index" type="int">
</argument>
<description>
+ Removes the specified bone from this [Polygon2D].
</description>
</method>
<method name="get_bone_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of bones in this [Polygon2D].
</description>
</method>
<method name="get_bone_path" qualifiers="const">
@@ -45,14 +49,16 @@
<argument index="0" name="index" type="int">
</argument>
<description>
+ Returns the path to the node associated with the specified bone.
</description>
</method>
<method name="get_bone_weights" qualifiers="const">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
+ Returns the height values of the specified bone.
</description>
</method>
<method name="set_bone_path">
@@ -63,6 +69,7 @@
<argument index="1" name="path" type="NodePath">
</argument>
<description>
+ Sets the path to the node associated with the specified bone.
</description>
</method>
<method name="set_bone_weights">
@@ -70,9 +77,10 @@
</return>
<argument index="0" name="index" type="int">
</argument>
- <argument index="1" name="weights" type="PoolRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
+ Sets the weight values for the specified bone.
</description>
</method>
</methods>
@@ -93,18 +101,28 @@
<member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" default="false">
If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code].
</member>
+ <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
+ The normal map gives depth to the Polygon2D.
+ [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="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The offset applied to each vertex.
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
The polygon's list of vertices. The final point will be connected to the first.
- [b]Note:[/b] This returns a copy of the [PoolVector2Array] rather than a reference.
+ [b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference.
</member>
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]">
</member>
+ <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0">
+ </member>
<member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath(&quot;&quot;)">
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
+ </member>
+ <member name="specular_map" type="Texture2D" setter="set_specular_map" getter="get_specular_map">
+ </member>
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The polygon's fill texture. Use [code]uv[/code] to set texture coordinates.
</member>
<member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )">
@@ -119,10 +137,10 @@
<member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2( 1, 1 )">
Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa.
</member>
- <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv" default="PoolVector2Array( )">
+ <member name="uv" type="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array( )">
Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code].
</member>
- <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PoolColorArray( )">
+ <member name="vertex_colors" type="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray( )">
Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code].
</member>
</members>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index 7286857b51..49453d32ac 100644
--- a/doc/classes/PolygonPathFinder.xml
+++ b/doc/classes/PolygonPathFinder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PolygonPathFinder" inherits="Resource" category="Core" version="3.2">
+<class name="PolygonPathFinder" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -8,7 +8,7 @@
</tutorials>
<methods>
<method name="find_path">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from" type="Vector2">
</argument>
@@ -32,7 +32,7 @@
</description>
</method>
<method name="get_intersections" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from" type="Vector2">
</argument>
@@ -70,9 +70,9 @@
<method name="setup">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="connections" type="PoolIntArray">
+ <argument index="1" name="connections" type="PackedInt32Array">
</argument>
<description>
</description>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index 2357ee2469..6f77f3371d 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Popup" inherits="Control" category="Core" version="3.2">
+<class name="Popup" inherits="Window" version="4.0">
<brief_description>
Base container control for popups and dialogs.
</brief_description>
@@ -9,73 +9,15 @@
<tutorials>
</tutorials>
<methods>
- <method name="popup">
- <return type="void">
- </return>
- <argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
- </argument>
- <description>
- Popup (show the control in modal form).
- </description>
- </method>
- <method name="popup_centered">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by [code]size[/code].
- </description>
- </method>
- <method name="popup_centered_clamped">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="1" name="fallback_ratio" type="float" default="0.75">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, clamping the size to [code]size[/code], then ensuring the popup is no larger than the viewport size multiplied by [code]fallback_ratio[/code].
- </description>
- </method>
- <method name="popup_centered_minsize">
- <return type="void">
- </return>
- <argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than [code]minsize[/code].
- </description>
- </method>
- <method name="popup_centered_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float" default="0.75">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.
- </description>
- </method>
- <method name="set_as_minsize">
- <return type="void">
- </return>
- <description>
- Shrink popup to keep to the minimum size of content.
- </description>
- </method>
</methods>
<members>
- <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
- If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event.
- </member>
+ <member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
+ <member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
+ <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
<member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
+ <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
</members>
<signals>
- <signal name="about_to_show">
- <description>
- Emitted when a popup is about to be shown. This is often used in [PopupMenu] to clear the list of options then create a new one according to the current context.
- </description>
- </signal>
<signal name="popup_hide">
<description>
Emitted when a popup is hidden.
@@ -83,11 +25,5 @@
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_POST_POPUP" value="80">
- Notification sent right after the popup is shown.
- </constant>
- <constant name="NOTIFICATION_POPUP_HIDE" value="81">
- Notification sent right after the popup is hidden.
- </constant>
</constants>
</class>
diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml
deleted file mode 100644
index 939453b977..0000000000
--- a/doc/classes/PopupDialog.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupDialog" inherits="Popup" category="Core" version="3.2">
- <brief_description>
- Base class for popup dialogs.
- </brief_description>
- <description>
- PopupDialog is a base class for popup dialogs, along with [WindowDialog].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="panel" type="StyleBox">
- Sets a custom [StyleBox] for the panel of the [PopupDialog].
- </theme_item>
- </theme_items>
-</class>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index bdb6ca84ee..ce55c90c68 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupMenu" inherits="Popup" category="Core" version="3.2">
+<class name="PopupMenu" inherits="Popup" version="4.0">
<brief_description>
PopupMenu displays a list of options.
</brief_description>
@@ -42,7 +42,7 @@
<method name="add_icon_check_item">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
@@ -59,7 +59,7 @@
<method name="add_icon_check_shortcut">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
@@ -76,7 +76,7 @@
<method name="add_icon_item">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
@@ -92,7 +92,7 @@
<method name="add_icon_radio_check_item">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
@@ -107,7 +107,7 @@
<method name="add_icon_radio_check_shortcut">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
@@ -122,7 +122,7 @@
<method name="add_icon_shortcut">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
@@ -242,6 +242,12 @@
Removes all items from the [PopupMenu].
</description>
</method>
+ <method name="get_current_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_item_accelerator" qualifiers="const">
<return type="int">
</return>
@@ -259,7 +265,7 @@
</description>
</method>
<method name="get_item_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -330,13 +336,6 @@
Returns the tooltip associated with the specified index index [code]idx[/code].
</description>
</method>
- <method name="is_hide_on_window_lose_focus" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the popup will be hidden when the window loses focus or not.
- </description>
- </method>
<method name="is_item_checkable" qualifiers="const">
<return type="bool">
</return>
@@ -391,7 +390,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns whether the shortcut of the specified item [code]idx[/code] is disabled or not.
+ Returns [code]true[/code] if the specified item's shortcut is disabled.
</description>
</method>
<method name="remove_item">
@@ -404,15 +403,6 @@
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
</description>
</method>
- <method name="set_hide_on_window_lose_focus">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Hides the [PopupMenu] when the window loses focus.
- </description>
- </method>
<method name="set_item_accelerator">
<return type="void">
</return>
@@ -477,7 +467,7 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
- Sets whether the item at index [code]idx[/code] is disabled or not. When it is disabled, it can't be selected and its action can't be invoked.
+ 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.
</description>
</method>
<method name="set_item_icon">
@@ -485,10 +475,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="icon" type="Texture">
+ <argument index="1" name="icon" type="Texture2D">
</argument>
<description>
- Replaces the [Texture] icon of the specified [code]idx[/code].
+ Replaces the [Texture2D] icon of the specified [code]idx[/code].
</description>
</method>
<method name="set_item_id">
@@ -521,6 +511,7 @@
<argument index="1" name="state" type="int">
</argument>
<description>
+ Sets the state of an multistate item. See [method add_multistate_item] for details.
</description>
</method>
<method name="set_item_shortcut">
@@ -595,14 +586,14 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Cycle to the next state of an multistate item. See [method add_multistate_item] for details.
</description>
</method>
</methods>
<members>
- <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="false">
+ <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="true">
If [code]true[/code], allows to navigate [PopupMenu] with letter keys.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
<member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true">
If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected.
</member>
@@ -642,56 +633,59 @@
<constants>
</constants>
<theme_items>
- <theme_item name="checked" type="Texture">
- Sets a custom [Texture] icon for [code]checked[/code] state of checkbox items.
+ <theme_item name="checked" type="Texture2D">
+ [Texture2D] icon for the checked checkbox items.
</theme_item>
<theme_item name="font" type="Font">
- Sets a custom [Font].
+ [Font] used for the menu items.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
- Sets a custom [Color] for the [Font].
+ The default text [Color] for menu items' names.
</theme_item>
<theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
+ The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
- Sets a custom [Color] for disabled text.
+ [Color] used for disabled menu items' text.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
- Sets a custom [Color] for the hovered text.
+ [Color] used for the hovered text.
</theme_item>
<theme_item name="hover" type="StyleBox">
- Sets a custom [StyleBox] when the [PopupMenu] is hovered.
+ [StyleBox] displayed when the [PopupMenu] item is hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
- Sets the horizontal space separation between each item.
+ The horizontal space between the item's name and the shortcut text/submenu arrow.
</theme_item>
<theme_item name="labeled_separator_left" type="StyleBox">
+ [StyleBox] for the left side of labeled separator. See [method add_separator].
</theme_item>
<theme_item name="labeled_separator_right" type="StyleBox">
+ [StyleBox] for the right side of labeled separator. See [method add_separator].
</theme_item>
<theme_item name="panel" type="StyleBox">
- Sets a custom [StyleBox] for the panel of the [PopupMenu].
+ Default [StyleBox] of the [PopupMenu] items.
</theme_item>
<theme_item name="panel_disabled" type="StyleBox">
- Sets a custom [StyleBox] for the panel of the [PopupMenu], when the panel is disabled.
+ [StyleBox] used when the [PopupMenu] item is disabled.
</theme_item>
- <theme_item name="radio_checked" type="Texture">
- Sets a custom [Texture] icon for [code]checked[/code] of radio button items.
+ <theme_item name="radio_checked" type="Texture2D">
+ [Texture2D] icon for the checked radio button items.
</theme_item>
- <theme_item name="radio_unchecked" type="Texture">
- Sets a custom [Texture] icon for [code]unchecked[/code] of radio button items.
+ <theme_item name="radio_unchecked" type="Texture2D">
+ [Texture2D] icon for the unchecked radio button items.
</theme_item>
<theme_item name="separator" type="StyleBox">
- Sets a custom [StyleBox] for separator's.
+ [StyleBox] used for the separators. See [method add_separator].
</theme_item>
- <theme_item name="submenu" type="Texture">
- Sets a custom [Texture] for submenu's.
+ <theme_item name="submenu" type="Texture2D">
+ [Texture2D] icon for the submenu arrow.
</theme_item>
- <theme_item name="unchecked" type="Texture">
- Sets a custom [Texture] icon for [code]unchecked[/code] of checkbox items.
+ <theme_item name="unchecked" type="Texture2D">
+ [Texture2D] icon for the unchecked checkbox items.
</theme_item>
<theme_item name="vseparation" type="int" default="4">
- Sets the vertical space separation between each item.
+ The vertical space between each menu item.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
index bed4d97112..72045c5559 100644
--- a/doc/classes/PopupPanel.xml
+++ b/doc/classes/PopupPanel.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupPanel" inherits="Popup" category="Core" version="3.2">
+<class name="PopupPanel" inherits="Popup" version="4.0">
<brief_description>
Class for displaying popups with a panel background.
</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 [WindowDialog].
+ 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].
</description>
<tutorials>
</tutorials>
@@ -14,6 +14,7 @@
</constants>
<theme_items>
<theme_item name="panel" type="StyleBox">
+ The background panel style of this [PopupPanel].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml
index ccadee6018..9fadb73a15 100644
--- a/doc/classes/Position2D.xml
+++ b/doc/classes/Position2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Position2D" inherits="Node2D" version="4.0">
<brief_description>
Generic 2D position hint for editing.
</brief_description>
diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml
index 4d43a6729d..ca61a57483 100644
--- a/doc/classes/Position3D.xml
+++ b/doc/classes/Position3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position3D" inherits="Spatial" category="Core" version="3.2">
+<class name="Position3D" inherits="Node3D" version="4.0">
<brief_description>
Generic 3D position hint for editing.
</brief_description>
<description>
- Generic 3D position hint for editing. It's just like a plain [Spatial], but it displays as a cross in the 3D editor at all times.
+ Generic 3D position hint for editing. It's just like a plain [Node3D], but it displays as a cross in the 3D editor at all times.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index b0e69bd089..77915bc538 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PrimitiveMesh" inherits="Mesh" category="Core" version="3.2">
+<class name="PrimitiveMesh" inherits="Mesh" version="4.0">
<brief_description>
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
@@ -22,7 +22,8 @@
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices.
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
- If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial].
+ If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
+ This gives the same result as using [constant BaseMaterial3D.CULL_BACK] in [member BaseMaterial3D.cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The current [Material] of the primitive mesh.
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
index 1d4e5ddab7..b2e1fdd3f0 100644
--- a/doc/classes/PrismMesh.xml
+++ b/doc/classes/PrismMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PrismMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="PrismMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Class representing a prism-shaped [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml
deleted file mode 100644
index 9ffca20081..0000000000
--- a/doc/classes/ProceduralSky.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProceduralSky" inherits="Sky" category="Core" version="3.2">
- <brief_description>
- Type of [Sky] that is generated procedurally based on user input parameters.
- </brief_description>
- <description>
- ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky.
- The ProceduralSky is updated on the CPU after the parameters change. It is stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for real-time updates during gameplay. However, with a small enough texture size, it can still be updated relatively frequently, as it is updated on a background thread when multi-threading is available.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color( 0.156863, 0.184314, 0.211765, 1 )">
- Color of the ground at the bottom.
- </member>
- <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02">
- How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color].
- </member>
- <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0">
- Amount of energy contribution from the ground.
- </member>
- <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color( 0.423529, 0.396078, 0.372549, 1 )">
- Color of the ground at the horizon.
- </member>
- <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.09">
- How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
- </member>
- <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0">
- Amount of energy contribution from the sky.
- </member>
- <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color( 0.839216, 0.917647, 0.980392, 1 )">
- Color of the sky at the horizon.
- </member>
- <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color( 0.647059, 0.839216, 0.945098, 1 )">
- Color of the sky at the top.
- </member>
- <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0">
- Distance from center of sun where it fades out completely.
- </member>
- <member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min" default="1.0">
- Distance from sun where it goes from solid to starting to fade.
- </member>
- <member name="sun_color" type="Color" setter="set_sun_color" getter="get_sun_color" default="Color( 1, 1, 1, 1 )">
- The sun's color.
- </member>
- <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.05">
- How quickly the sun fades away between [member sun_angle_min] and [member sun_angle_max].
- </member>
- <member name="sun_energy" type="float" setter="set_sun_energy" getter="get_sun_energy" default="1.0">
- Amount of energy contribution from the sun.
- </member>
- <member name="sun_latitude" type="float" setter="set_sun_latitude" getter="get_sun_latitude" default="35.0">
- The sun's height using polar coordinates.
- </member>
- <member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude" default="0.0">
- The direction of the sun using polar coordinates.
- </member>
- <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize" default="2">
- Size of [Texture] that the ProceduralSky will generate. The size is set using [enum TextureSize].
- </member>
- </members>
- <constants>
- <constant name="TEXTURE_SIZE_256" value="0" enum="TextureSize">
- </constant>
- <constant name="TEXTURE_SIZE_512" value="1" enum="TextureSize">
- </constant>
- <constant name="TEXTURE_SIZE_1024" value="2" enum="TextureSize">
- </constant>
- <constant name="TEXTURE_SIZE_2048" value="3" enum="TextureSize">
- </constant>
- <constant name="TEXTURE_SIZE_4096" value="4" enum="TextureSize">
- </constant>
- <constant name="TEXTURE_SIZE_MAX" value="5" enum="TextureSize">
- Represents the size of the [enum TextureSize] enum.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml
new file mode 100644
index 0000000000..d3e1dbca27
--- /dev/null
+++ b/doc/classes/ProceduralSkyMaterial.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ProceduralSkyMaterial" inherits="Material" version="4.0">
+ <brief_description>
+ A [Material] used with [Sky] to generate a background based on user input parameters.
+ </brief_description>
+ <description>
+ ProceduralSkyMaterial provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky.
+ The [ProceduralSkyMaterial] uses a lightweight shader to draw the sky and is thus suited for real time updates. When you do not need a quick sky that is not realistic, this is a good option.
+ The [ProceduralSkyMaterial] supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding [DirectionalLight3D] in the scene.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color( 0.12, 0.12, 0.13, 1 )">
+ Color of the ground at the bottom. Blends with [member ground_horizon_color].
+ </member>
+ <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02">
+ How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color].
+ </member>
+ <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0">
+ Amount of energy contribution from the ground.
+ </member>
+ <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color( 0.37, 0.33, 0.31, 1 )">
+ Color of the ground at the horizon. Blends with [member ground_bottom_color].
+ </member>
+ <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.09">
+ How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
+ </member>
+ <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0">
+ Amount of energy contribution from the sky.
+ </member>
+ <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color( 0.55, 0.69, 0.81, 1 )">
+ Color of the sky at the horizon. Blends with [member sky_top_color].
+ </member>
+ <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color( 0.35, 0.46, 0.71, 1 )">
+ Color of the sky at the top. Blends with [member sky_horizon_color].
+ </member>
+ <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0">
+ Distance from center of sun where it fades out completely.
+ </member>
+ <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.05">
+ How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max].
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index d489fd8bca..c957d6f182 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProgressBar" inherits="Range" category="Core" version="3.2">
+<class name="ProgressBar" inherits="Range" version="4.0">
<brief_description>
General-purpose progress bar.
</brief_description>
@@ -21,14 +21,19 @@
</constants>
<theme_items>
<theme_item name="bg" type="StyleBox">
+ The style of the background.
</theme_item>
<theme_item name="fg" type="StyleBox">
+ The style of the progress (i.e. the part that fills the bar).
</theme_item>
<theme_item name="font" type="Font">
+ Font used to draw the fill percentage if [member percent_visible] is [code]true[/code].
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ The color of the text.
</theme_item>
<theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )">
+ The color of the text's shadow.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 772c2f5073..daf8cb1d2f 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProjectSettings" inherits="Object" category="Core" version="3.2">
+<class name="ProjectSettings" inherits="Object" version="4.0">
<brief_description>
Contains global variables accessible from everywhere.
</brief_description>
@@ -17,7 +17,10 @@
<argument index="0" name="hint" type="Dictionary">
</argument>
<description>
- Adds a custom property info to a property. The dictionary must contain: name:[String](the property's name) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String].
+ Adds a custom property info to a property. The dictionary must contain:
+ - [code]name[/code]: [String] (the property's name)
+ - [code]type[/code]: [int] (see [enum Variant.Type])
+ - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String]
[b]Example:[/b]
[codeblock]
ProjectSettings.set("category/property_name", 0)
@@ -176,9 +179,6 @@
</method>
</methods>
<members>
- <member name="android/modules" type="String" setter="" getter="" default="&quot;&quot;">
- Comma-separated list of custom Android modules (which must have been built in the Android export templates) using their Java package path, e.g. [code]org/godotengine/org/GodotPaymentV3,org/godotengine/godot/MyCustomSingleton"[/code].
- </member>
<member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color( 0.14, 0.14, 0.14, 1 )">
Background color for the boot splash.
</member>
@@ -202,6 +202,7 @@
Icon used for the project, set when project loads. Exporters will also use this icon when possible.
</member>
<member name="application/config/macos_native_icon" type="String" setter="" getter="" default="&quot;&quot;">
+ Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
</member>
<member name="application/config/name" type="String" setter="" getter="" default="&quot;&quot;">
The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files.
@@ -214,6 +215,7 @@
If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
</member>
<member name="application/config/windows_native_icon" type="String" setter="" getter="" default="&quot;&quot;">
+ Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
</member>
<member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false">
If [code]true[/code], disables printing to standard error in an exported build.
@@ -240,6 +242,7 @@
Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
</member>
<member name="audio/default_bus_layout" type="String" setter="" getter="" default="&quot;res://default_bus_layout.tres&quot;">
+ Default [AudioBusLayout] resource file to use in the project, unless overridden by the scene.
</member>
<member name="audio/driver" type="String" setter="" getter="" default="&quot;PulseAudio&quot;">
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.
@@ -257,18 +260,19 @@
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
</member>
<member name="compression/formats/gzip/compression_level" type="int" setter="" getter="" default="-1">
- Default compression level for gzip. Affects compressed scenes and resources.
+ The default compression level for gzip. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. [code]-1[/code] uses the default gzip compression level, which is identical to [code]6[/code] but could change in the future due to underlying zlib updates.
</member>
<member name="compression/formats/zlib/compression_level" type="int" setter="" getter="" default="-1">
- Default compression level for Zlib. Affects compressed scenes and resources.
+ The default compression level for Zlib. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. [code]-1[/code] uses the default gzip compression level, which is identical to [code]6[/code] but could change in the future due to underlying zlib updates.
</member>
<member name="compression/formats/zstd/compression_level" type="int" setter="" getter="" default="3">
- Default compression level for Zstandard. Affects compressed scenes and resources.
+ The default compression level for Zstandard. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level.
</member>
<member name="compression/formats/zstd/long_distance_matching" type="bool" setter="" getter="" default="false">
- Enables long-distance matching in Zstandard.
+ Enables [url=https://github.com/facebook/zstd/releases/tag/v1.3.2]long-distance matching[/url] in Zstandard.
</member>
<member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27">
+ Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing.
</member>
<member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter="" default="false">
If [code]true[/code], displays getters and setters in autocompletion results in the script editor. This setting is meant to be used when porting old projects (Godot 2), as using member variables is the preferred style from Godot 3 onwards.
@@ -277,7 +281,7 @@
If [code]true[/code], enables warnings 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 such as [code]slave[/code] are used.
+ If [code]true[/code], enables warnings when deprecated keywords are used.
</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.
@@ -318,6 +322,9 @@
<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>
+ <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>
<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>
@@ -345,7 +352,7 @@
<member name="debug/gdscript/warnings/unused_argument" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when a function parameter is unused.
</member>
- <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="true">
+ <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="false">
If [code]true[/code], enables warnings when a member variable is unused.
</member>
<member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true">
@@ -364,6 +371,9 @@
Message to be displayed before the backtrace when the engine crashes.
</member>
<member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0">
+ Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging.
+ If [member display/window/vsync/use_vsync] is enabled, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
+ This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non real-time rendering of static frames, or test the project under lag conditions.
</member>
<member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack allowed for debugging GDScript.
@@ -380,6 +390,21 @@
<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>
+ <member name="debug/shapes/collision/max_contacts_displayed" type="int" setter="" getter="" default="10000">
+ Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.5 )">
+ Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color( 1, 0.7, 0.1, 0.4 )">
+ Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color( 0.1, 1, 0.7, 0.4 )">
+ Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
<member name="display/mouse_cursor/custom_image" type="String" setter="" getter="" default="&quot;&quot;">
Custom image for the mouse cursor (limited to 256×256).
</member>
@@ -398,11 +423,8 @@
<member name="display/window/handheld/orientation" type="String" setter="" getter="" default="&quot;landscape&quot;">
Default orientation on mobile devices.
</member>
- <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false">
- If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it.
- </member>
- <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter="" default="false">
- Sets the window background to transparent when it starts.
+ <member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
</member>
<member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false">
Force the window to be always on top.
@@ -428,58 +450,99 @@
<member name="display/window/size/width" type="int" setter="" getter="" default="1024">
Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled.
</member>
+ <member name="display/window/tablet_driver" type="String" setter="" getter="" default="&quot;&quot;">
+ Specifies the tablet driver to use. If left empty, the default driver will be used.
+ </member>
<member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5).
</member>
+ <member name="display/window/vsync/vsync_via_compositor" type="bool" setter="" getter="" default="false">
+ If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.)
+ [b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.
+ </member>
<member name="editor/script_templates_search_path" type="String" setter="" getter="" default="&quot;res://script_templates&quot;">
+ Search path for project-specific script templates. Script templates will be search both in the editor-specific path and in this project-specific path.
</member>
- <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( &quot;gd&quot;, &quot;shader&quot; )">
+ <member name="editor/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( &quot;gd&quot;, &quot;shader&quot; )">
+ Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files.
</member>
<member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0">
+ Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
</member>
<member name="gui/common/swap_ok_cancel" type="bool" setter="" getter="" default="false">
If [code]true[/code], swaps OK and Cancel buttons in dialogs on Windows and UWP to follow interface conventions.
</member>
+ <member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024">
+ </member>
<member name="gui/theme/custom" type="String" setter="" getter="" default="&quot;&quot;">
- Use a custom theme resource, set a path to it here.
+ Path to a custom [Theme] resource file to use for the project ([code]theme[/code] or generic [code]tres[/code]/[code]res[/code] extension).
</member>
<member name="gui/theme/custom_font" type="String" setter="" getter="" default="&quot;&quot;">
- Use a custom default font resource, set a path to it here.
+ Path to a custom [Font] resource to use as default for all GUI elements of the project.
</member>
<member name="gui/theme/use_hidpi" type="bool" setter="" getter="" default="false">
If [code]true[/code], makes sure the theme used works with HiDPI.
</member>
<member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000">
- Timer setting for incremental search in Tree, IntemList, etc. controls (in milliseconds).
+ Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds).
</member>
<member name="gui/timers/text_edit_idle_detect_sec" type="float" setter="" getter="" default="3">
- Timer for detecting idle in the editor (in seconds).
+ Timer for detecting idle in [TextEdit] (in seconds).
</member>
- <member name="input/ui_accept" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777221,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777222,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:32,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventJoypadButton,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;button_index&quot;:0,&quot;pressure&quot;:0.0,&quot;pressed&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="gui/timers/tooltip_delay_sec" type="float" setter="" getter="" default="0.5">
+ Default delay for tooltips (in seconds).
</member>
- <member name="input/ui_cancel" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777217,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventJoypadButton,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;button_index&quot;:1,&quot;pressure&quot;:0.0,&quot;pressed&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_accept" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to confirm a focused button, menu or list item, or validate input.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_down" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777234,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventJoypadButton,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;button_index&quot;:13,&quot;pressure&quot;:0.0,&quot;pressed&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_cancel" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to discard a modal or pending input.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_end" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777230,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_down" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move down in the UI.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_focus_next" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777218,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_end" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to go to the end position of a [Control] (e.g. last item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_END] on typical desktop UI systems.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_focus_prev" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:true,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777218,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_focus_next" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to focus the next [Control] in the scene. The focus behavior can be configured via [member Control.focus_next].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_home" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777229,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_focus_prev" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to focus the previous [Control] in the scene. The focus behavior can be configured via [member Control.focus_previous].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_left" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777231,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventJoypadButton,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;button_index&quot;:14,&quot;pressure&quot;:0.0,&quot;pressed&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_home" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to go to the start position of a [Control] (e.g. first item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_HOME] on typical desktop UI systems.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_page_down" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777236,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_left" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move left in the UI.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_page_up" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777235,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_page_down" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to go down a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEDOWN] on typical desktop UI systems.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_right" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777233,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventJoypadButton,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;button_index&quot;:15,&quot;pressure&quot;:0.0,&quot;pressed&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_page_up" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to go up a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEUP] on typical desktop UI systems.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_select" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:32,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventJoypadButton,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;button_index&quot;:3,&quot;pressure&quot;:0.0,&quot;pressed&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_right" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move right in the UI.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
- <member name="input/ui_up" type="Dictionary" setter="" getter="" default="{&quot;deadzone&quot;: 0.5,&quot;events&quot;: [ Object(InputEventKey,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;alt&quot;:false,&quot;shift&quot;:false,&quot;control&quot;:false,&quot;meta&quot;:false,&quot;command&quot;:false,&quot;pressed&quot;:false,&quot;scancode&quot;:16777232,&quot;unicode&quot;:0,&quot;echo&quot;:false,&quot;script&quot;:null), Object(InputEventJoypadButton,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;device&quot;:0,&quot;button_index&quot;:12,&quot;pressure&quot;:0.0,&quot;pressed&quot;:false,&quot;script&quot;:null) ]}">
+ <member name="input/ui_select" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to select an item in a [Control] (e.g. in an [ItemList] or a [Tree]).
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
+ </member>
+ <member name="input/ui_up" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move up in the UI.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true">
If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen.
@@ -488,164 +551,244 @@
If [code]true[/code], sends touch input events when clicking or dragging the mouse.
</member>
<member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 1.
</member>
<member name="layer_names/2d_physics/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 10.
</member>
<member name="layer_names/2d_physics/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 11.
</member>
<member name="layer_names/2d_physics/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 12.
</member>
<member name="layer_names/2d_physics/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 13.
</member>
<member name="layer_names/2d_physics/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 14.
</member>
<member name="layer_names/2d_physics/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 15.
</member>
<member name="layer_names/2d_physics/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 16.
</member>
<member name="layer_names/2d_physics/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 17.
</member>
<member name="layer_names/2d_physics/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 18.
</member>
<member name="layer_names/2d_physics/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 19.
</member>
<member name="layer_names/2d_physics/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 2.
</member>
<member name="layer_names/2d_physics/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 20.
</member>
<member name="layer_names/2d_physics/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 3.
</member>
<member name="layer_names/2d_physics/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 4.
</member>
<member name="layer_names/2d_physics/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 5.
</member>
<member name="layer_names/2d_physics/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 6.
</member>
<member name="layer_names/2d_physics/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 7.
</member>
<member name="layer_names/2d_physics/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 8.
</member>
<member name="layer_names/2d_physics/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 9.
</member>
<member name="layer_names/2d_render/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 1.
</member>
<member name="layer_names/2d_render/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 10.
</member>
<member name="layer_names/2d_render/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 11.
</member>
<member name="layer_names/2d_render/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 12.
</member>
<member name="layer_names/2d_render/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 13.
</member>
<member name="layer_names/2d_render/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 14.
</member>
<member name="layer_names/2d_render/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 15.
</member>
<member name="layer_names/2d_render/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 16.
</member>
<member name="layer_names/2d_render/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 17.
</member>
<member name="layer_names/2d_render/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 18.
</member>
<member name="layer_names/2d_render/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 19.
</member>
<member name="layer_names/2d_render/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 2.
</member>
<member name="layer_names/2d_render/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 20.
</member>
<member name="layer_names/2d_render/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 3.
</member>
<member name="layer_names/2d_render/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 4.
</member>
<member name="layer_names/2d_render/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 5.
</member>
<member name="layer_names/2d_render/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 6.
</member>
<member name="layer_names/2d_render/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 7.
</member>
<member name="layer_names/2d_render/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 8.
</member>
<member name="layer_names/2d_render/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 9.
</member>
<member name="layer_names/3d_physics/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 1.
</member>
<member name="layer_names/3d_physics/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 10.
</member>
<member name="layer_names/3d_physics/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 11.
</member>
<member name="layer_names/3d_physics/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 12.
</member>
<member name="layer_names/3d_physics/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 13.
</member>
<member name="layer_names/3d_physics/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 14.
</member>
<member name="layer_names/3d_physics/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 15.
</member>
<member name="layer_names/3d_physics/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 16.
</member>
<member name="layer_names/3d_physics/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 17.
</member>
<member name="layer_names/3d_physics/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 18.
</member>
<member name="layer_names/3d_physics/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 19.
</member>
<member name="layer_names/3d_physics/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 2.
</member>
<member name="layer_names/3d_physics/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 20.
</member>
<member name="layer_names/3d_physics/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 3.
</member>
<member name="layer_names/3d_physics/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 4.
</member>
<member name="layer_names/3d_physics/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 5.
</member>
<member name="layer_names/3d_physics/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 6.
</member>
<member name="layer_names/3d_physics/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 7.
</member>
<member name="layer_names/3d_physics/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 8.
</member>
<member name="layer_names/3d_physics/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 9.
</member>
<member name="layer_names/3d_render/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 1.
</member>
<member name="layer_names/3d_render/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 10.
</member>
<member name="layer_names/3d_render/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 11.
</member>
<member name="layer_names/3d_render/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 12.
</member>
<member name="layer_names/3d_render/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 13.
</member>
<member name="layer_names/3d_render/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 14
</member>
<member name="layer_names/3d_render/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 15.
</member>
<member name="layer_names/3d_render/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 16.
</member>
<member name="layer_names/3d_render/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 17.
</member>
<member name="layer_names/3d_render/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 18.
</member>
<member name="layer_names/3d_render/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 19.
</member>
<member name="layer_names/3d_render/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 2.
</member>
<member name="layer_names/3d_render/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 20.
</member>
<member name="layer_names/3d_render/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 3.
</member>
<member name="layer_names/3d_render/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 4.
</member>
<member name="layer_names/3d_render/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 5.
</member>
<member name="layer_names/3d_render/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 6.
</member>
<member name="layer_names/3d_render/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 7.
</member>
<member name="layer_names/3d_render/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 8.
</member>
<member name="layer_names/3d_render/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D render layer 9.
</member>
<member name="locale/fallback" type="String" setter="" getter="" default="&quot;en&quot;">
The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used.
@@ -668,40 +811,38 @@
<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="network/limits/debugger_stdout/max_chars_per_second" type="int" setter="" getter="" default="2048">
- Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
+ <member name="mono/debugger_agent/port" type="int" setter="" getter="" default="23685">
</member>
- <member name="network/limits/debugger_stdout/max_errors_per_second" type="int" setter="" getter="" default="100">
- Maximum number of errors allowed to be sent as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
+ <member name="mono/debugger_agent/wait_for_debugger" type="bool" setter="" getter="" default="false">
</member>
- <member name="network/limits/debugger_stdout/max_messages_per_frame" type="int" setter="" getter="" default="10">
- Maximum amount of messages allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
+ <member name="mono/debugger_agent/wait_timeout" type="int" setter="" getter="" default="3000">
</member>
- <member name="network/limits/debugger_stdout/max_warnings_per_second" type="int" setter="" getter="" default="100">
- Maximum number of warnings allowed to be sent as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
+ <member name="mono/profiler/args" type="String" setter="" getter="" default="&quot;log:calls,alloc,sample,output=output.mlpd&quot;">
</member>
- <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16">
- Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped.
+ <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false">
</member>
- <member name="network/limits/tcp/connect_timeout_seconds" type="int" setter="" getter="" default="30">
+ <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0">
</member>
- <member name="network/limits/webrtc/max_channel_in_buffer_kb" type="int" setter="" getter="" default="64">
- </member>
- <member name="network/limits/websocket_client/max_in_buffer_kb" type="int" setter="" getter="" default="64">
- </member>
- <member name="network/limits/websocket_client/max_in_packets" type="int" setter="" getter="" default="1024">
+ <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.
</member>
- <member name="network/limits/websocket_client/max_out_buffer_kb" type="int" setter="" getter="" default="64">
+ <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/websocket_client/max_out_packets" type="int" setter="" getter="" default="1024">
+ <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.
</member>
- <member name="network/limits/websocket_server/max_in_buffer_kb" type="int" setter="" getter="" default="64">
+ <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.
</member>
- <member name="network/limits/websocket_server/max_in_packets" type="int" setter="" getter="" default="1024">
+ <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16">
+ Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped.
</member>
- <member name="network/limits/websocket_server/max_out_buffer_kb" type="int" setter="" getter="" default="64">
+ <member name="network/limits/tcp/connect_timeout_seconds" type="int" setter="" getter="" default="30">
+ Timeout (in seconds) for connection attempts using TCP.
</member>
- <member name="network/limits/websocket_server/max_out_packets" type="int" setter="" getter="" default="1024">
+ <member name="network/limits/webrtc/max_channel_in_buffer_kb" type="int" setter="" getter="" default="64">
+ Maximum size (in kiB) for the [WebRTCDataChannel] input buffer.
</member>
<member name="network/remote_fs/page_read_ahead" type="int" setter="" getter="" default="4">
Amount of read ahead used by remote filesystem. Higher values decrease the effects of latency at the cost of higher bandwidth usage.
@@ -709,7 +850,9 @@
<member name="network/remote_fs/page_size" type="int" setter="" getter="" default="65536">
Page size used by remote filesystem (in bytes).
</member>
- <member name="network/ssl/certificates" type="String" setter="" getter="" default="&quot;&quot;">
+ <member name="network/ssl/certificate_bundle_override" type="String" setter="" getter="" default="&quot;&quot;">
+ The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used.
+ If in doubt, leave this setting empty.
</member>
<member name="node/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.
@@ -717,60 +860,147 @@
<member name="node/name_num_separator" type="int" setter="" getter="" default="0">
What to use to separate node name from number. This is mostly an editor setting.
</member>
+ <member name="physics/2d/bp_hash_table_size" type="int" setter="" getter="" default="4096">
+ Size of the hash table used for the broad-phase 2D hash grid algorithm.
+ </member>
+ <member name="physics/2d/cell_size" type="int" setter="" getter="" default="128">
+ Cell size used for the broad-phase 2D hash grid algorithm.
+ </member>
+ <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0">
+ The default angular damp in 2D.
+ </member>
<member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98">
+ The default gravity strength in 2D.
+ [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
+ [codeblock]
+ # Set the default gravity strength to 98.
+ PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY, 98)
+ [/codeblock]
+ </member>
+ <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )">
+ The default gravity direction in 2D.
+ [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
+ [codeblock]
+ # Set the default gravity direction to `Vector2(0, 1)`.
+ PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1))
+ [/codeblock]
+ </member>
+ <member name="physics/2d/default_linear_damp" type="float" setter="" getter="" default="0.1">
+ The default linear damp in 2D.
+ </member>
+ <member name="physics/2d/large_object_surface_threshold_in_cells" type="int" setter="" getter="" default="512">
+ Threshold defining the surface size that constitutes a large object with regard to cells in the broad-phase 2D hash grid algorithm.
</member>
<member name="physics/2d/physics_engine" type="String" setter="" getter="" default="&quot;DEFAULT&quot;">
+ Sets which physics engine to use for 2D physics.
+ "DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented.
+ </member>
+ <member name="physics/2d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626">
+ Threshold angular velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD].
+ </member>
+ <member name="physics/2d/sleep_threshold_linear" type="float" setter="" getter="" default="2.0">
+ Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD].
</member>
<member name="physics/2d/thread_model" type="int" setter="" getter="" default="1">
Sets whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process.
+ [b]Warning:[/b] As of Godot 3.2, there are mixed reports about the use of a Multi-Threaded thread model for physics. Be sure to assess whether it does give you extra performance and no regressions when using it.
+ </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].
</member>
<member name="physics/3d/active_soft_world" type="bool" setter="" getter="" default="true">
+ Sets whether the 3D physics world will be created with support for [SoftBody3D] physics. Only applies to the Bullet physics engine.
+ </member>
+ <member name="physics/3d/default_angular_damp" type="float" setter="" getter="" default="0.1">
+ The default angular damp in 3D.
</member>
<member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8">
+ The default gravity strength in 3D.
+ [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
+ [codeblock]
+ # Set the default gravity strength to 9.8.
+ PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8)
+ [/codeblock]
+ </member>
+ <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3( 0, -1, 0 )">
+ The default gravity direction in 3D.
+ [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
+ [codeblock]
+ # Set the default gravity direction to `Vector3(0, -1, 0)`.
+ PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0))
+ [/codeblock]
+ </member>
+ <member name="physics/3d/default_linear_damp" type="float" setter="" getter="" default="0.1">
+ The default linear damp in 3D.
</member>
<member name="physics/3d/physics_engine" type="String" setter="" getter="" default="&quot;DEFAULT&quot;">
- Sets which physics engine to use.
+ Sets which physics engine to use for 3D physics.
+ "DEFAULT" is currently the [url=https://bulletphysics.org]Bullet[/url] physics engine. The "GodotPhysics3D" engine is still supported as an alternative.
+ </member>
+ <member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true">
+ Enables [member Viewport.physics_object_picking] on the root viewport.
</member>
<member name="physics/common/physics_fps" type="int" setter="" getter="" default="60">
- Frames per second used in the physics. Physics always needs a fixed amount of frames per second.
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run.
+ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead.
</member>
<member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5">
Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS.
+ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
</member>
<member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )">
- Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color].
+ Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color].
</member>
- <member name="rendering/limits/buffers/blend_shape_max_buffer_size_kb" type="int" setter="" getter="" default="4096">
- Max buffer size for blend shapes. Any blend shape bigger than this will not work.
+ <member name="rendering/environment/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
+ [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
</member>
- <member name="rendering/limits/buffers/canvas_polygon_buffer_size_kb" type="int" setter="" getter="" default="128">
- Max buffer size for drawing polygons. Any polygon bigger than this will not work.
+ <member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
</member>
- <member name="rendering/limits/buffers/canvas_polygon_index_buffer_size_kb" type="int" setter="" getter="" default="128">
- Max index buffer size for drawing polygons. Any polygon bigger than this will not work.
+ <member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
</member>
- <member name="rendering/limits/buffers/immediate_buffer_size_kb" type="int" setter="" getter="" default="2048">
- Max buffer size for drawing immediate objects (ImmediateGeometry nodes). Nodes using more than this size will not work.
+ <member name="rendering/gpu_lightmapper/performance/region_size" type="int" setter="" getter="" default="512">
</member>
- <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="65536">
- Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves.
+ <member name="rendering/gpu_lightmapper/quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512">
</member>
- <member name="rendering/limits/rendering/max_renderable_lights" type="int" setter="" getter="" default="4096">
- Max number of lights renderable in a frame. If more than this number are used, they will be ignored. On some systems (particularly web) setting this number as low as possible can increase the speed of shader compilation.
+ <member name="rendering/gpu_lightmapper/quality/high_quality_ray_count" type="int" setter="" getter="" default="256">
</member>
- <member name="rendering/limits/rendering/max_renderable_reflections" type="int" setter="" getter="" default="1024">
- Max number of reflection probes renderable in a frame. If more than this number are used, they will be ignored. On some systems (particularly web) setting this number as low as possible can increase the speed of shader compilation.
+ <member name="rendering/gpu_lightmapper/quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/low_quality_ray_count" type="int" setter="" getter="" default="16">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/medium_quality_ray_count" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024">
+ </member>
+ <member name="rendering/high_end/global_shader_variables_buffer_size" type="int" setter="" getter="" default="65536">
+ </member>
+ <member name="rendering/lightmapper/probe_capture_update_speed" type="float" setter="" getter="" default="15">
+ </member>
+ <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000">
+ Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves.
</member>
<member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600">
- Shaders have a time variable that constantly increases. At some point, it needs to be rolled back to zero to avoid precision errors on shader animations. This setting specifies when (in seconds).
</member>
<member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter="" default="false">
Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details.
- If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend (so the bug stays if you use GLES3), and only desktop platforms.
+ If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend, and only desktop platforms. It is not necessary when using the Vulkan backend.
</member>
<member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter="" default="false">
If [code]true[/code], forces snapping of polygons to pixels in 2D rendering. May help in some pixel art styles.
</member>
+ <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2">
+ Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother.
+ </member>
+ <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1">
+ Sets the depth of field shape. Can be Box, Hexagon, or Circle. Box is the fastest. Circle is the most realistic, but also the most expensive to compute.
+ </member>
+ <member name="rendering/quality/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/quality/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default="&quot;PowerVR,Mali,Adreno,Apple&quot;">
Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this.
</member>
@@ -781,50 +1011,99 @@
The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2.
</member>
<member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
+ Lower-end override for [member rendering/quality/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default="&quot;GLES3&quot;">
- The video driver to use ("GLES2" or "GLES3").
- [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument, or by the [member rendering/quality/driver/fallback_to_gles2] option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time.
+ <member name="rendering/quality/directional_shadow/soft_shadow_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.
</member>
- <member name="rendering/quality/driver/fallback_to_gles2" type="bool" setter="" getter="" default="false">
- If [code]true[/code], allows falling back to the GLES2 driver if the GLES3 driver is not supported.
- [b]Note:[/b] The two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the data pack's size.
+ <member name="rendering/quality/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/quality/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/filters/anisotropic_filter_level" type="int" setter="" getter="" default="4">
- Maximum anisotropic filter level used for textures with anisotropy enabled. Higher values will result in sharper textures when viewed from oblique angles, at the cost of performance. Only power-of-two values are valid (2, 4, 8, 16).
+ <member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default="&quot;Vulkan&quot;">
+ The video driver to use ("GLES2" or "Vulkan").
+ [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument.
+ [b]FIXME:[/b] No longer valid after DisplayServer split:
+ In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time.
</member>
- <member name="rendering/quality/filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
- If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
+ <member name="rendering/quality/gi_probes/anisotropic" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction.
+ </member>
+ <member name="rendering/quality/gi_probes/quality" type="int" setter="" getter="" default="1">
+ Sets the number of cone samples taken when rendering objects affected by [GIProbe]s.
+ </member>
+ <member name="rendering/quality/glow/upscale_mode" type="int" setter="" getter="" default="1">
+ Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth.
+ </member>
+ <member name="rendering/quality/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/quality/glow/upscale_mode] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2">
- Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports).
+ Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment].
</member>
<member name="rendering/quality/intended_usage/framebuffer_allocation.mobile" type="int" setter="" getter="" default="3">
+ Lower-end override for [member rendering/quality/intended_usage/framebuffer_allocation] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/quality/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64">
+ Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM.
</member>
- <member name="rendering/quality/reflections/high_quality_ggx" type="bool" setter="" getter="" default="true">
- If [code]true[/code], uses a high amount of samples to create blurred variants of reflection probes and panorama backgrounds (sky). Those blurred variants are used by rough materials.
+ <member name="rendering/quality/reflection_atlas/reflection_size" type="int" setter="" getter="" default="256">
+ Size of cubemap faces for [ReflectionProbe]s. A higher number requires more VRAM and may make reflection probe updating slower.
</member>
- <member name="rendering/quality/reflections/high_quality_ggx.mobile" type="bool" setter="" getter="" default="false">
+ <member name="rendering/quality/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128">
+ Lower-end override for [member rendering/quality/reflection_atlas/reflection_size] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/quality/reflections/fast_filter_high_quality" type="bool" setter="" getter="" default="false">
+ Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed.
+ </member>
+ <member name="rendering/quality/reflections/ggx_samples" type="int" setter="" getter="" default="1024">
+ Sets the number of samples to take when using importance sampling for [Sky]s and [ReflectionProbe]s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail.
+ </member>
+ <member name="rendering/quality/reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128">
+ Lower-end override for [member rendering/quality/reflections/ggx_samples] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/quality/reflections/roughness_layers" type="int" setter="" getter="" default="8">
+ Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM.
</member>
<member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter="" default="true">
- If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise on reflections, but costs more performance and memory.
+ If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/quality/reflections/roughness_layers] times more memory.
</member>
<member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
+ Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/quality/screen_filters/msaa" type="int" setter="" getter="" default="0">
+ Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware.
+ [b]Note:[/b] MSAA is not available on HTML5 export using the GLES2 backend.
+ </member>
+ <member name="rendering/quality/screen_filters/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.
+ Another way to combat specular aliasing is to enable [member rendering/quality/screen_filters/screen_space_roughness_limiter].
+ </member>
+ <member name="rendering/quality/screen_filters/screen_space_roughness_limiter" type="int" setter="" getter="" default="0">
+ Enables the screen-space roughness limiter which increases material roughness in areas with a high normal frequency (i.e. when normals change a lot from pixel to pixel). This helps to reduce the amount of specular aliasing in a scene. Specular aliasing looks like random bright pixels that occur in reflections.
+ </member>
+ <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_curve" type="float" setter="" getter="" default="1.0">
+ Curves the amount of the roughness limited effect. A higher value limits the effect to very sharply curved surfaces, while a lower threshold extends the effect to smoother surfaces.
+ </member>
+ <member name="rendering/quality/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1">
+ Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better.
</member>
<member name="rendering/quality/shading/force_blinn_over_ggx" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model.
</member>
<member name="rendering/quality/shading/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/quality/shading/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/quality/shading/force_lambert_over_burley" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley.
</member>
<member name="rendering/quality/shading/force_lambert_over_burley.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/quality/shading/force_lambert_over_burley] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/quality/shading/force_vertex_shading" type="bool" setter="" getter="" default="false">
If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices.
</member>
<member name="rendering/quality/shading/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/quality/shading/force_vertex_shading] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="1">
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
@@ -842,37 +1121,46 @@
Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
</member>
<member name="rendering/quality/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
+ Lower-end override for [member rendering/quality/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/quality/shadows/soft_shadow_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.
</member>
- <member name="rendering/quality/shadows/filter_mode" type="int" setter="" getter="" default="1">
- Shadow filter mode. Higher-quality settings result in smoother shadows that flicker less when moving. "Disabled" is the fastest option, but also has the lowest quality. "PCF5" is smoother but is also slower. "PCF13" is the smoothest option, but is also the slowest.
+ <member name="rendering/quality/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/quality/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/shadows/filter_mode.mobile" type="int" setter="" getter="" default="0">
+ <member name="rendering/quality/ssao/half_size" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details.
</member>
- <member name="rendering/quality/subsurface_scattering/follow_surface" type="bool" setter="" getter="" default="false">
- Improves quality of subsurface scattering, but cost significantly increases.
+ <member name="rendering/quality/ssao/quality" type="int" setter="" getter="" default="1">
+ Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance.
</member>
- <member name="rendering/quality/subsurface_scattering/quality" type="int" setter="" getter="" default="1">
- Quality setting for subsurface scaterring (samples taken).
+ <member name="rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01">
+ Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth.
</member>
- <member name="rendering/quality/subsurface_scattering/scale" type="int" setter="" getter="" default="1.0">
+ <member name="rendering/quality/subsurface_scattering/subsurface_scattering_quality" type="int" setter="" getter="" default="1">
+ Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer.
</member>
- <member name="rendering/quality/subsurface_scattering/weight_samples" type="bool" setter="" getter="" default="true">
- Weight subsurface scattering samples. Helps to avoid reading samples from unrelated parts of the screen.
+ <member name="rendering/quality/subsurface_scattering/subsurface_scattering_scale" type="float" setter="" getter="" default="0.05">
+ Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light.
</member>
- <member name="rendering/quality/voxel_cone_tracing/high_quality" type="bool" setter="" getter="" default="false">
- Use high-quality voxel cone tracing. This results in better-looking reflections, but is much more expensive on the GPU.
+ <member name="rendering/quality/texture_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.
+ </member>
+ <member name="rendering/quality/texture_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
</member>
<member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1">
Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter.
</member>
<member name="rendering/vram_compression/import_bptc" type="bool" setter="" getter="" default="false">
- If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the GLES3 renderer.
+ If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer.
</member>
<member name="rendering/vram_compression/import_etc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures.
</member>
<member name="rendering/vram_compression/import_etc2" type="bool" setter="" getter="" default="true">
- If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the GLES3 renderer.
+ If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer.
</member>
<member name="rendering/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS.
@@ -880,7 +1168,16 @@
<member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
</member>
- <member name="script" type="Script" setter="" getter="">
+ <member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/vulkan/staging_buffer/block_size_kb" type="int" setter="" getter="" default="256">
+ </member>
+ <member name="rendering/vulkan/staging_buffer/max_size_mb" type="int" setter="" getter="" default="128">
+ </member>
+ <member name="rendering/vulkan/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="world/2d/cell_size" type="int" setter="" getter="" default="100">
+ Cell size used for the 2D hash grid that [VisibilityNotifier2D] uses.
</member>
</members>
<constants>
diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup3D.xml
index 3c081bf91f..1714c1ec8d 100644
--- a/doc/classes/ProximityGroup.xml
+++ b/doc/classes/ProximityGroup3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProximityGroup" inherits="Spatial" category="Core" version="3.2">
+<class name="ProximityGroup3D" inherits="Node3D" version="4.0">
<brief_description>
General-purpose proximity detection node.
</brief_description>
@@ -21,7 +21,7 @@
</method>
</methods>
<members>
- <member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup.DispatchMode" default="0">
+ <member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup3D.DispatchMode" default="0">
</member>
<member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3( 1, 1, 1 )">
</member>
diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml
index 36c65f1096..4f25fbcdf9 100644
--- a/doc/classes/ProxyTexture.xml
+++ b/doc/classes/ProxyTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProxyTexture" inherits="Texture" category="Core" version="3.2">
+<class name="ProxyTexture" inherits="Texture2D" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -9,9 +9,8 @@
<methods>
</methods>
<members>
- <member name="base" type="Texture" setter="set_base" getter="get_base">
+ <member name="base" type="Texture2D" setter="set_base" getter="get_base">
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
</members>
<constants>
</constants>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index 209e91eef2..422add08d1 100644
--- a/doc/classes/QuadMesh.xml
+++ b/doc/classes/QuadMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="QuadMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="QuadMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Class representing a square mesh.
</brief_description>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index f5ee99d30c..327fa882e5 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Quat" category="Built-In Types" version="3.2">
+<class name="Quat" version="4.0">
<brief_description>
Quaternion.
</brief_description>
@@ -100,6 +100,7 @@
<argument index="0" name="quat" type="Quat">
</argument>
<description>
+ Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
@@ -131,6 +132,8 @@
</description>
</method>
<method name="set_axis_angle">
+ <return type="void">
+ </return>
<argument index="0" name="axis" type="Vector3">
</argument>
<argument index="1" name="angle" type="float">
@@ -140,6 +143,8 @@
</description>
</method>
<method name="set_euler">
+ <return type="void">
+ </return>
<argument index="0" name="euler" type="Vector3">
</argument>
<description>
@@ -194,6 +199,7 @@
</members>
<constants>
<constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )">
+ The identity rotation. Equivalent to an identity matrix. If a vector is transformed by an identity quaternion, it will not change.
</constant>
</constants>
</class>
diff --git a/doc/classes/RDAttachmentFormat.xml b/doc/classes/RDAttachmentFormat.xml
new file mode 100644
index 0000000000..4ee7b9b28e
--- /dev/null
+++ b/doc/classes/RDAttachmentFormat.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDAttachmentFormat" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="36">
+ </member>
+ <member name="samples" type="int" setter="set_samples" getter="get_samples" enum="RenderingDevice.TextureSamples" default="0">
+ </member>
+ <member name="usage_flags" type="int" setter="set_usage_flags" getter="get_usage_flags" default="0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml
new file mode 100644
index 0000000000..adc6f1f6a3
--- /dev/null
+++ b/doc/classes/RDPipelineColorBlendState.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDPipelineColorBlendState" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="attachments" type="RDPipelineColorBlendStateAttachment[]" setter="set_attachments" getter="get_attachments" default="[ ]">
+ </member>
+ <member name="blend_constant" type="Color" setter="set_blend_constant" getter="get_blend_constant" default="Color( 0, 0, 0, 1 )">
+ </member>
+ <member name="enable_logic_op" type="bool" setter="set_enable_logic_op" getter="get_enable_logic_op" default="false">
+ </member>
+ <member name="logic_op" type="int" setter="set_logic_op" getter="get_logic_op" enum="RenderingDevice.LogicOperation" default="0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml
new file mode 100644
index 0000000000..7f118b5f0b
--- /dev/null
+++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDPipelineColorBlendStateAttachment" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_as_mix">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="alpha_blend_op" type="int" setter="set_alpha_blend_op" getter="get_alpha_blend_op" enum="RenderingDevice.BlendOperation" default="0">
+ </member>
+ <member name="color_blend_op" type="int" setter="set_color_blend_op" getter="get_color_blend_op" enum="RenderingDevice.BlendOperation" default="0">
+ </member>
+ <member name="dst_alpha_blend_factor" type="int" setter="set_dst_alpha_blend_factor" getter="get_dst_alpha_blend_factor" enum="RenderingDevice.BlendFactor" default="0">
+ </member>
+ <member name="dst_color_blend_factor" type="int" setter="set_dst_color_blend_factor" getter="get_dst_color_blend_factor" enum="RenderingDevice.BlendFactor" default="0">
+ </member>
+ <member name="enable_blend" type="bool" setter="set_enable_blend" getter="get_enable_blend" default="false">
+ </member>
+ <member name="src_alpha_blend_factor" type="int" setter="set_src_alpha_blend_factor" getter="get_src_alpha_blend_factor" enum="RenderingDevice.BlendFactor" default="0">
+ </member>
+ <member name="src_color_blend_factor" type="int" setter="set_src_color_blend_factor" getter="get_src_color_blend_factor" enum="RenderingDevice.BlendFactor" default="0">
+ </member>
+ <member name="write_a" type="bool" setter="set_write_a" getter="get_write_a" default="true">
+ </member>
+ <member name="write_b" type="bool" setter="set_write_b" getter="get_write_b" default="true">
+ </member>
+ <member name="write_g" type="bool" setter="set_write_g" getter="get_write_g" default="true">
+ </member>
+ <member name="write_r" type="bool" setter="set_write_r" getter="get_write_r" default="true">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDPipelineDepthStencilState.xml b/doc/classes/RDPipelineDepthStencilState.xml
new file mode 100644
index 0000000000..562ff52819
--- /dev/null
+++ b/doc/classes/RDPipelineDepthStencilState.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDPipelineDepthStencilState" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="back_op_compare" type="int" setter="set_back_op_compare" getter="get_back_op_compare" enum="RenderingDevice.CompareOperator" default="7">
+ </member>
+ <member name="back_op_compare_mask" type="int" setter="set_back_op_compare_mask" getter="get_back_op_compare_mask" default="0">
+ </member>
+ <member name="back_op_depth_fail" type="int" setter="set_back_op_depth_fail" getter="get_back_op_depth_fail" enum="RenderingDevice.StencilOperation" default="1">
+ </member>
+ <member name="back_op_fail" type="int" setter="set_back_op_fail" getter="get_back_op_fail" enum="RenderingDevice.StencilOperation" default="1">
+ </member>
+ <member name="back_op_pass" type="int" setter="set_back_op_pass" getter="get_back_op_pass" enum="RenderingDevice.StencilOperation" default="1">
+ </member>
+ <member name="back_op_reference" type="int" setter="set_back_op_reference" getter="get_back_op_reference" default="0">
+ </member>
+ <member name="back_op_write_mask" type="int" setter="set_back_op_write_mask" getter="get_back_op_write_mask" default="0">
+ </member>
+ <member name="depth_compare_operator" type="int" setter="set_depth_compare_operator" getter="get_depth_compare_operator" enum="RenderingDevice.CompareOperator" default="7">
+ </member>
+ <member name="depth_range_max" type="float" setter="set_depth_range_max" getter="get_depth_range_max" default="0.0">
+ </member>
+ <member name="depth_range_min" type="float" setter="set_depth_range_min" getter="get_depth_range_min" default="0.0">
+ </member>
+ <member name="enable_depth_range" type="bool" setter="set_enable_depth_range" getter="get_enable_depth_range" default="false">
+ </member>
+ <member name="enable_depth_test" type="bool" setter="set_enable_depth_test" getter="get_enable_depth_test" default="false">
+ </member>
+ <member name="enable_depth_write" type="bool" setter="set_enable_depth_write" getter="get_enable_depth_write" default="false">
+ </member>
+ <member name="enable_stencil" type="bool" setter="set_enable_stencil" getter="get_enable_stencil" default="false">
+ </member>
+ <member name="front_op_compare" type="int" setter="set_front_op_compare" getter="get_front_op_compare" enum="RenderingDevice.CompareOperator" default="7">
+ </member>
+ <member name="front_op_compare_mask" type="int" setter="set_front_op_compare_mask" getter="get_front_op_compare_mask" default="0">
+ </member>
+ <member name="front_op_depth_fail" type="int" setter="set_front_op_depth_fail" getter="get_front_op_depth_fail" enum="RenderingDevice.StencilOperation" default="1">
+ </member>
+ <member name="front_op_fail" type="int" setter="set_front_op_fail" getter="get_front_op_fail" enum="RenderingDevice.StencilOperation" default="1">
+ </member>
+ <member name="front_op_pass" type="int" setter="set_front_op_pass" getter="get_front_op_pass" enum="RenderingDevice.StencilOperation" default="1">
+ </member>
+ <member name="front_op_reference" type="int" setter="set_front_op_reference" getter="get_front_op_reference" default="0">
+ </member>
+ <member name="front_op_write_mask" type="int" setter="set_front_op_write_mask" getter="get_front_op_write_mask" default="0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml
new file mode 100644
index 0000000000..4658c7d9ba
--- /dev/null
+++ b/doc/classes/RDPipelineMultisampleState.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDPipelineMultisampleState" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="enable_alpha_to_coverage" type="bool" setter="set_enable_alpha_to_coverage" getter="get_enable_alpha_to_coverage" default="false">
+ </member>
+ <member name="enable_alpha_to_one" type="bool" setter="set_enable_alpha_to_one" getter="get_enable_alpha_to_one" default="false">
+ </member>
+ <member name="enable_sample_shading" type="bool" setter="set_enable_sample_shading" getter="get_enable_sample_shading" default="false">
+ </member>
+ <member name="min_sample_shading" type="float" setter="set_min_sample_shading" getter="get_min_sample_shading" default="0.0">
+ </member>
+ <member name="sample_count" type="int" setter="set_sample_count" getter="get_sample_count" enum="RenderingDevice.TextureSamples" default="0">
+ </member>
+ <member name="sample_masks" type="int[]" setter="set_sample_masks" getter="get_sample_masks" default="[ ]">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml
new file mode 100644
index 0000000000..5064dd6deb
--- /dev/null
+++ b/doc/classes/RDPipelineRasterizationState.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDPipelineRasterizationState" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="RenderingDevice.PolygonCullMode" default="0">
+ </member>
+ <member name="depth_bias_clamp" type="float" setter="set_depth_bias_clamp" getter="get_depth_bias_clamp" default="0.0">
+ </member>
+ <member name="depth_bias_constant_factor" type="float" setter="set_depth_bias_constant_factor" getter="get_depth_bias_constant_factor" default="0.0">
+ </member>
+ <member name="depth_bias_enable" type="bool" setter="set_depth_bias_enable" getter="get_depth_bias_enable" default="false">
+ </member>
+ <member name="depth_bias_slope_factor" type="float" setter="set_depth_bias_slope_factor" getter="get_depth_bias_slope_factor" default="0.0">
+ </member>
+ <member name="discard_primitives" type="bool" setter="set_discard_primitives" getter="get_discard_primitives" default="false">
+ </member>
+ <member name="enable_depth_clamp" type="bool" setter="set_enable_depth_clamp" getter="get_enable_depth_clamp" default="false">
+ </member>
+ <member name="front_face" type="int" setter="set_front_face" getter="get_front_face" enum="RenderingDevice.PolygonFrontFace" default="0">
+ </member>
+ <member name="line_width" type="float" setter="set_line_width" getter="get_line_width" default="1.0">
+ </member>
+ <member name="patch_control_points" type="int" setter="set_patch_control_points" getter="get_patch_control_points" default="1">
+ </member>
+ <member name="wireframe" type="bool" setter="set_wireframe" getter="get_wireframe" default="false">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDSamplerState.xml b/doc/classes/RDSamplerState.xml
new file mode 100644
index 0000000000..ab31960b7c
--- /dev/null
+++ b/doc/classes/RDSamplerState.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDSamplerState" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="anisotropy_max" type="float" setter="set_anisotropy_max" getter="get_anisotropy_max" default="1.0">
+ </member>
+ <member name="border_color" type="int" setter="set_border_color" getter="get_border_color" enum="RenderingDevice.SamplerBorderColor" default="2">
+ </member>
+ <member name="compare_op" type="int" setter="set_compare_op" getter="get_compare_op" enum="RenderingDevice.CompareOperator" default="7">
+ </member>
+ <member name="enable_compare" type="bool" setter="set_enable_compare" getter="get_enable_compare" default="false">
+ </member>
+ <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="0.0">
+ </member>
+ <member name="mag_filter" type="int" setter="set_mag_filter" getter="get_mag_filter" enum="RenderingDevice.SamplerFilter" default="0">
+ </member>
+ <member name="max_lod" type="float" setter="set_max_lod" getter="get_max_lod" default="1e+20">
+ </member>
+ <member name="min_filter" type="int" setter="set_min_filter" getter="get_min_filter" enum="RenderingDevice.SamplerFilter" default="0">
+ </member>
+ <member name="min_lod" type="float" setter="set_min_lod" getter="get_min_lod" default="0.0">
+ </member>
+ <member name="mip_filter" type="int" setter="set_mip_filter" getter="get_mip_filter" enum="RenderingDevice.SamplerFilter" default="0">
+ </member>
+ <member name="repeat_u" type="int" setter="set_repeat_u" getter="get_repeat_u" enum="RenderingDevice.SamplerRepeatMode" default="2">
+ </member>
+ <member name="repeat_v" type="int" setter="set_repeat_v" getter="get_repeat_v" enum="RenderingDevice.SamplerRepeatMode" default="2">
+ </member>
+ <member name="repeat_w" type="int" setter="set_repeat_w" getter="get_repeat_w" enum="RenderingDevice.SamplerRepeatMode" default="2">
+ </member>
+ <member name="unnormalized_uvw" type="bool" setter="set_unnormalized_uvw" getter="get_unnormalized_uvw" default="false">
+ </member>
+ <member name="use_anisotropy" type="bool" setter="set_use_anisotropy" getter="get_use_anisotropy" default="false">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDShaderBytecode.xml b/doc/classes/RDShaderBytecode.xml
new file mode 100644
index 0000000000..7a3501004e
--- /dev/null
+++ b/doc/classes/RDShaderBytecode.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDShaderBytecode" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_stage_bytecode" qualifiers="const">
+ <return type="PackedByteArray">
+ </return>
+ <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_stage_compile_error" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stage_bytecode">
+ <return type="void">
+ </return>
+ <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
+ </argument>
+ <argument index="1" name="bytecode" type="PackedByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stage_compile_error">
+ <return type="void">
+ </return>
+ <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
+ </argument>
+ <argument index="1" name="compile_error" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bytecode_compute" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ </member>
+ <member name="bytecode_fragment" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ </member>
+ <member name="bytecode_tesselation_control" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ </member>
+ <member name="bytecode_tesselation_evaluation" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ </member>
+ <member name="bytecode_vertex" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ </member>
+ <member name="compile_error_compute" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="&quot;&quot;">
+ </member>
+ <member name="compile_error_fragment" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="&quot;&quot;">
+ </member>
+ <member name="compile_error_tesselation_control" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="&quot;&quot;">
+ </member>
+ <member name="compile_error_tesselation_evaluation" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="&quot;&quot;">
+ </member>
+ <member name="compile_error_vertex" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="&quot;&quot;">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml
new file mode 100644
index 0000000000..14e70d53ea
--- /dev/null
+++ b/doc/classes/RDShaderFile.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDShaderFile" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_bytecode" qualifiers="const">
+ <return type="RDShaderBytecode">
+ </return>
+ <argument index="0" name="version" type="StringName" default="@&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_version_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_bytecode">
+ <return type="void">
+ </return>
+ <argument index="0" name="bytecode" type="RDShaderBytecode">
+ </argument>
+ <argument index="1" name="version" type="StringName" default="@&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_error" type="String" setter="set_base_error" getter="get_base_error" default="&quot;&quot;">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml
new file mode 100644
index 0000000000..c1cfd34bb7
--- /dev/null
+++ b/doc/classes/RDShaderSource.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDShaderSource" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_stage_source" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stage_source">
+ <return type="void">
+ </return>
+ <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
+ </argument>
+ <argument index="1" name="source" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="language" type="int" setter="set_language" getter="get_language" enum="RenderingDevice.ShaderLanguage" default="0">
+ </member>
+ <member name="source_compute" type="String" setter="set_stage_source" getter="get_stage_source" default="&quot;&quot;">
+ </member>
+ <member name="source_fragment" type="String" setter="set_stage_source" getter="get_stage_source" default="&quot;&quot;">
+ </member>
+ <member name="source_tesselation_control" type="String" setter="set_stage_source" getter="get_stage_source" default="&quot;&quot;">
+ </member>
+ <member name="source_tesselation_evaluation" type="String" setter="set_stage_source" getter="get_stage_source" default="&quot;&quot;">
+ </member>
+ <member name="source_vertex" type="String" setter="set_stage_source" getter="get_stage_source" default="&quot;&quot;">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml
new file mode 100644
index 0000000000..664d4cadff
--- /dev/null
+++ b/doc/classes/RDTextureFormat.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDTextureFormat" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_shareable_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_shareable_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="array_layers" type="int" setter="set_array_layers" getter="get_array_layers" default="1">
+ </member>
+ <member name="depth" type="int" setter="set_depth" getter="get_depth" default="1">
+ </member>
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="8">
+ </member>
+ <member name="height" type="int" setter="set_height" getter="get_height" default="1">
+ </member>
+ <member name="mipmaps" type="int" setter="set_mipmaps" getter="get_mipmaps" default="1">
+ </member>
+ <member name="samples" type="int" setter="set_samples" getter="get_samples" enum="RenderingDevice.TextureSamples" default="0">
+ </member>
+ <member name="type" type="int" setter="set_type" getter="get_type" enum="RenderingDevice.TextureType" default="1">
+ </member>
+ <member name="usage_bits" type="int" setter="set_usage_bits" getter="get_usage_bits" default="0">
+ </member>
+ <member name="width" type="int" setter="set_width" getter="get_width" default="1">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDTextureView.xml b/doc/classes/RDTextureView.xml
new file mode 100644
index 0000000000..73b2a7ae4a
--- /dev/null
+++ b/doc/classes/RDTextureView.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDTextureView" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="format_override" type="int" setter="set_format_override" getter="get_format_override" enum="RenderingDevice.DataFormat" default="226">
+ </member>
+ <member name="swizzle_a" type="int" setter="set_swizzle_a" getter="get_swizzle_a" enum="RenderingDevice.TextureSwizzle" default="6">
+ </member>
+ <member name="swizzle_b" type="int" setter="set_swizzle_b" getter="get_swizzle_b" enum="RenderingDevice.TextureSwizzle" default="5">
+ </member>
+ <member name="swizzle_g" type="int" setter="set_swizzle_g" getter="get_swizzle_g" enum="RenderingDevice.TextureSwizzle" default="4">
+ </member>
+ <member name="swizzle_r" type="int" setter="set_swizzle_r" getter="get_swizzle_r" enum="RenderingDevice.TextureSwizzle" default="3">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
new file mode 100644
index 0000000000..e5bace32af
--- /dev/null
+++ b/doc/classes/RDUniform.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDUniform" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_ids">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ids" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="binding" type="int" setter="set_binding" getter="get_binding" default="0">
+ </member>
+ <member name="type" type="int" setter="set_type" getter="get_type" enum="RenderingDevice.UniformType" default="3">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml
new file mode 100644
index 0000000000..56fe40b51d
--- /dev/null
+++ b/doc/classes/RDVertexAttribute.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDVertexAttribute" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="226">
+ </member>
+ <member name="frequency" type="int" setter="set_frequency" getter="get_frequency" enum="RenderingDevice.VertexFrequency" default="0">
+ </member>
+ <member name="location" type="int" setter="set_location" getter="get_location" default="0">
+ </member>
+ <member name="offset" type="int" setter="set_offset" getter="get_offset" default="0">
+ </member>
+ <member name="stride" type="int" setter="set_stride" getter="get_stride" default="0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
index 5edef100c5..644c427120 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RID" category="Built-In Types" version="3.2">
+<class name="RID" version="4.0">
<brief_description>
Handle for a [Resource]'s unique ID.
</brief_description>
<description>
- The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer].
+ The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [RenderingServer].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 9054e2fa88..ec0f1a96b2 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RandomNumberGenerator" inherits="Reference" category="Core" version="3.2">
+<class name="RandomNumberGenerator" inherits="Reference" version="4.0">
<brief_description>
A class for generating pseudo-random numbers.
</brief_description>
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index 82fffd0cb8..8690f6d7e7 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Range" inherits="Control" category="Core" version="3.2">
+<class name="Range" inherits="Control" version="4.0">
<brief_description>
Abstract base class for range-based controls.
</brief_description>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index c5ba5da24e..51f3f0334d 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayCast2D" inherits="Node2D" category="Core" version="3.2">
+<class name="RayCast2D" inherits="Node2D" version="4.0">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast3D.xml
index 5e17d6e7d7..08c6d6f40c 100644
--- a/doc/classes/RayCast.xml
+++ b/doc/classes/RayCast3D.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayCast" inherits="Spatial" category="Core" version="3.2">
+<class name="RayCast3D" inherits="Node3D" version="4.0">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
<description>
A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray.
- RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code] or by setting proper filtering with collision layers and masks.
- RayCast can be configured to report collisions with [Area]s ([member collide_with_areas]) and/or [PhysicsBody]s ([member collide_with_bodies]).
+ RayCast3D can ignore some objects by adding them to the exception list via [code]add_exception[/code] or by setting proper filtering with collision layers and masks.
+ RayCast3D can be configured to report collisions with [Area3D]s ([member collide_with_areas]) and/or [PhysicsBody3D]s ([member collide_with_bodies]).
Only enabled raycasts will be able to query the space and report collisions.
- RayCast calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast.
+ RayCast3D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
@@ -130,10 +130,10 @@
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
<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 [Area]s will be reported.
+ 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 [PhysicsBody]s will be reported.
+ 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 ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected.
@@ -142,7 +142,7 @@
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], collisions will be ignored for this RayCast's immediate parent.
+ If [code]true[/code], collisions will be ignored for this RayCast3D's immediate parent.
</member>
</members>
<constants>
diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml
index 377a19e8da..432c650074 100644
--- a/doc/classes/RayShape2D.xml
+++ b/doc/classes/RayShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="RayShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Ray shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape3D.xml
index 3f5859714e..9839044c30 100644
--- a/doc/classes/RayShape.xml
+++ b/doc/classes/RayShape3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayShape" inherits="Shape" category="Core" version="3.2">
+<class name="RayShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Ray shape for 3D collisions.
</brief_description>
<description>
- Ray shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ Ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 07fa7777fe..dbf461cdf1 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Rect2" category="Built-In Types" version="3.2">
+<class name="Rect2" version="4.0">
<brief_description>
- 2D axis-aligned bounding box.
+ 2D axis-aligned bounding box using floating point coordinates.
</brief_description>
<description>
- Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ [Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -36,6 +37,15 @@
Constructs a [Rect2] by x, y, width, and height.
</description>
</method>
+ <method name="Rect2">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="from" type="Rect2i">
+ </argument>
+ <description>
+ Constructs a [Rect2] from a [Rect2i].
+ </description>
+ </method>
<method name="abs">
<return type="Rect2">
</return>
@@ -133,8 +143,11 @@
</return>
<argument index="0" name="b" type="Rect2">
</argument>
+ <argument index="1" name="include_borders" type="bool" default="false">
+ </argument>
<description>
- Returns [code]true[/code] if the [Rect2] overlaps with another.
+ 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.
</description>
</method>
<method name="is_equal_approx">
@@ -143,6 +156,7 @@
<argument index="0" name="rect" type="Rect2">
</argument>
<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.
</description>
</method>
<method name="merge">
@@ -151,7 +165,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns a larger Rect2 that contains this Rect2 and [code]b[/code].
+ Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
new file mode 100644
index 0000000000..2e8be384c1
--- /dev/null
+++ b/doc/classes/Rect2i.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Rect2i" version="4.0">
+ <brief_description>
+ 2D axis-aligned bounding box using integer coordinates.
+ </brief_description>
+ <description>
+ [Rect2i] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <description>
+ Constructs a [Rect2i] by position and size.
+ </description>
+ </method>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="width" type="int">
+ </argument>
+ <argument index="3" name="height" type="int">
+ </argument>
+ <description>
+ Constructs a [Rect2i] by x, y, width, and height.
+ </description>
+ </method>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="from" type="Rect2">
+ </argument>
+ <description>
+ Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index d55324c98f..b42cc48d43 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="RectangleShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Rectangle shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml
index 70d41b665a..860a47798c 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/Reference.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Reference" inherits="Object" category="Core" version="3.2">
+<class name="Reference" inherits="Object" version="4.0">
<brief_description>
Base class for reference-counted objects.
</brief_description>
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index 393a72cf60..4f8f71b3db 100644
--- a/doc/classes/ReferenceRect.xml
+++ b/doc/classes/ReferenceRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ReferenceRect" inherits="Control" category="Core" version="3.2">
+<class name="ReferenceRect" inherits="Control" version="4.0">
<brief_description>
Reference frame for GUI.
</brief_description>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 0a1cf962c8..84f87c3e71 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ReflectionProbe" inherits="VisualInstance" category="Core" version="3.2">
+<class name="ReflectionProbe" inherits="VisualInstance3D" version="4.0">
<brief_description>
Captures its surroundings to create reflections.
</brief_description>
<description>
- Capture its surroundings as a dual parabolid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
+ Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
+ The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [GIProbe]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link>
@@ -16,34 +17,45 @@
If [code]true[/code], enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location.
</member>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
+ Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance3D] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost.
</member>
<member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" default="false">
If [code]true[/code], computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode].
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them.
</member>
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0">
- Defines the reflection intensity.
+ Defines the reflection intensity. Intensity modulates the strength of the reflection.
</member>
<member name="interior_ambient_color" type="Color" setter="set_interior_ambient" getter="get_interior_ambient" default="Color( 0, 0, 0, 1 )">
+ Sets the ambient light color to be used when this probe is set to [member interior_enable].
</member>
<member name="interior_ambient_contrib" type="float" setter="set_interior_ambient_probe_contribution" getter="get_interior_ambient_probe_contribution" default="0.0">
+ Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [member interior_enable]. Useful so that ambient light matches the color of the room.
</member>
<member name="interior_ambient_energy" type="float" setter="set_interior_ambient_energy" getter="get_interior_ambient_energy" default="1.0">
+ Sets the energy multiplier for this reflection probe's ambient light contribution when set to [member interior_enable].
</member>
<member name="interior_enable" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false">
+ If [code]true[/code], reflections will ignore sky contribution. Ambient lighting is then controlled by the [code]interior_ambient_*[/code] properties.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
+ Sets the max distance away from the probe an object can be before it is culled.
</member>
<member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3( 0, 0, 0 )">
+ Sets the origin offset to be used when this reflection probe is in box project mode.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0">
+ Sets how frequently the probe is updated. Can be [constant UPDATE_ONCE] or [constant UPDATE_ALWAYS].
</member>
</members>
<constants>
<constant name="UPDATE_ONCE" value="0" enum="UpdateMode">
+ Update the probe once on the next frame. The corresponding radiance map will be generated over the following six frames. This is slower to update than [constant UPDATE_ALWAYS] but can result in higher quality reflections.
</constant>
<constant name="UPDATE_ALWAYS" value="1" enum="UpdateMode">
+ Update the probe every frame. This is needed when you want to capture dynamic objects. However, it results in an increased render time. Use [constant UPDATE_ONCE] whenever possible.
</constant>
</constants>
</class>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
index f5d509782f..84ec673920 100644
--- a/doc/classes/RemoteTransform2D.xml
+++ b/doc/classes/RemoteTransform2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.2">
+<class name="RemoteTransform2D" inherits="Node2D" version="4.0">
<brief_description>
RemoteTransform2D pushes its own [Transform2D] to another [CanvasItem] derived Node in the scene.
</brief_description>
diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform3D.xml
index 377f9cc34b..bd3da2aea9 100644
--- a/doc/classes/RemoteTransform.xml
+++ b/doc/classes/RemoteTransform3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.2">
+<class name="RemoteTransform3D" inherits="Node3D" version="4.0">
<brief_description>
- RemoteTransform pushes its own [Transform] to another [Spatial] derived Node in the scene.
+ RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node in the scene.
</brief_description>
<description>
- RemoteTransform pushes its own [Transform] to another [Spatial] derived Node (called the remote node) in the scene.
+ RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node (called the remote node) in the scene.
It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates.
</description>
<tutorials>
@@ -14,13 +14,13 @@
<return type="void">
</return>
<description>
- [RemoteTransform] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again.
+ [RemoteTransform3D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again.
</description>
</method>
</methods>
<members>
<member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node" default="NodePath(&quot;&quot;)">
- The [NodePath] to the remote node, relative to the RemoteTransform's position in the scene.
+ The [NodePath] to the remote node, relative to the RemoteTransform3D's position in the scene.
</member>
<member name="update_position" type="bool" setter="set_update_position" getter="get_update_position" default="true">
If [code]true[/code], the remote node's position is updated.
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
new file mode 100644
index 0000000000..8a44d213e8
--- /dev/null
+++ b/doc/classes/RenderingDevice.xml
@@ -0,0 +1,1599 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RenderingDevice" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="buffer_get_data">
+ <return type="PackedByteArray">
+ </return>
+ <argument index="0" name="buffer" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="buffer_update">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="buffer" type="RID">
+ </argument>
+ <argument index="1" name="offset" type="int">
+ </argument>
+ <argument index="2" name="size_bytes" type="int">
+ </argument>
+ <argument index="3" name="data" type="PackedByteArray">
+ </argument>
+ <argument index="4" name="sync_with_draw" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="capture_timestamp">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="sync_to_draw" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="compute_list_add_barrier">
+ <return type="void">
+ </return>
+ <argument index="0" name="compute_list" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="compute_list_begin">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="compute_list_bind_compute_pipeline">
+ <return type="void">
+ </return>
+ <argument index="0" name="compute_list" type="int">
+ </argument>
+ <argument index="1" name="compute_pipeline" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="compute_list_bind_uniform_set">
+ <return type="void">
+ </return>
+ <argument index="0" name="compute_list" type="int">
+ </argument>
+ <argument index="1" name="uniform_set" type="RID">
+ </argument>
+ <argument index="2" name="set_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="compute_list_dispatch">
+ <return type="void">
+ </return>
+ <argument index="0" name="compute_list" type="int">
+ </argument>
+ <argument index="1" name="x_groups" type="int">
+ </argument>
+ <argument index="2" name="y_groups" type="int">
+ </argument>
+ <argument index="3" name="z_groups" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="compute_list_end">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="compute_list_set_push_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="compute_list" type="int">
+ </argument>
+ <argument index="1" name="buffer" type="PackedByteArray">
+ </argument>
+ <argument index="2" name="size_bytes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="compute_pipeline_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="shader" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="compute_pipeline_is_valid">
+ <return type="bool">
+ </return>
+ <argument index="0" name="compute_pieline" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_local_device">
+ <return type="RenderingDevice">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_begin">
+ <return type="int">
+ </return>
+ <argument index="0" name="framebuffer" type="RID">
+ </argument>
+ <argument index="1" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction">
+ </argument>
+ <argument index="2" name="final_color_action" type="int" enum="RenderingDevice.FinalAction">
+ </argument>
+ <argument index="3" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction">
+ </argument>
+ <argument index="4" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction">
+ </argument>
+ <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray( )">
+ </argument>
+ <argument index="6" name="clear_depth" type="float" default="1.0">
+ </argument>
+ <argument index="7" name="clear_stencil" type="int" default="0">
+ </argument>
+ <argument index="8" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_begin_for_screen">
+ <return type="int">
+ </return>
+ <argument index="0" name="screen" type="int" default="0">
+ </argument>
+ <argument index="1" name="clear_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_begin_split">
+ <return type="PackedInt64Array">
+ </return>
+ <argument index="0" name="framebuffer" type="RID">
+ </argument>
+ <argument index="1" name="splits" type="int">
+ </argument>
+ <argument index="2" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction">
+ </argument>
+ <argument index="3" name="final_color_action" type="int" enum="RenderingDevice.FinalAction">
+ </argument>
+ <argument index="4" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction">
+ </argument>
+ <argument index="5" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction">
+ </argument>
+ <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray( )">
+ </argument>
+ <argument index="7" name="clear_depth" type="float" default="1.0">
+ </argument>
+ <argument index="8" name="clear_stencil" type="int" default="0">
+ </argument>
+ <argument index="9" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_bind_index_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <argument index="1" name="index_array" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_bind_render_pipeline">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <argument index="1" name="render_pipeline" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_bind_uniform_set">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <argument index="1" name="uniform_set" type="RID">
+ </argument>
+ <argument index="2" name="set_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_bind_vertex_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <argument index="1" name="vertex_array" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_disable_scissor">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_draw">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <argument index="1" name="use_indices" type="bool">
+ </argument>
+ <argument index="2" name="instances" type="int">
+ </argument>
+ <argument index="3" name="procedural_vertex_count" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_enable_scissor">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <argument index="1" name="rect" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_end">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_set_push_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_list" type="int">
+ </argument>
+ <argument index="1" name="buffer" type="PackedByteArray">
+ </argument>
+ <argument index="2" name="size_bytes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="framebuffer_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="textures" type="Array">
+ </argument>
+ <argument index="1" name="validate_with_format" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="framebuffer_format_create">
+ <return type="int">
+ </return>
+ <argument index="0" name="attachments" type="RDAttachmentFormat[]">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="framebuffer_format_get_texture_samples">
+ <return type="int" enum="RenderingDevice.TextureSamples">
+ </return>
+ <argument index="0" name="format" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="framebuffer_get_format">
+ <return type="int">
+ </return>
+ <argument index="0" name="framebuffer" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="free">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_captured_timestamp_cpu_time" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_captured_timestamp_gpu_time" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_captured_timestamp_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_captured_timestamps_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_captured_timestamps_frame" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_frame_delay" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="index_array_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="index_buffer" type="RID">
+ </argument>
+ <argument index="1" name="index_offset" type="int">
+ </argument>
+ <argument index="2" name="index_count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="index_buffer_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="size_indices" type="int">
+ </argument>
+ <argument index="1" name="format" type="int" enum="RenderingDevice.IndexBufferFormat">
+ </argument>
+ <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ </argument>
+ <argument index="3" name="arg3" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="limit_get">
+ <return type="int">
+ </return>
+ <argument index="0" name="limit" type="int" enum="RenderingDevice.Limit">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="render_pipeline_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="shader" type="RID">
+ </argument>
+ <argument index="1" name="framebuffer_format" type="int">
+ </argument>
+ <argument index="2" name="vertex_format" type="int">
+ </argument>
+ <argument index="3" name="primitive" type="int" enum="RenderingDevice.RenderPrimitive">
+ </argument>
+ <argument index="4" name="rasterization_state" type="RDPipelineRasterizationState">
+ </argument>
+ <argument index="5" name="multisample_state" type="RDPipelineMultisampleState">
+ </argument>
+ <argument index="6" name="stencil_state" type="RDPipelineDepthStencilState">
+ </argument>
+ <argument index="7" name="color_blend_state" type="RDPipelineColorBlendState">
+ </argument>
+ <argument index="8" name="dynamic_state_flags" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="render_pipeline_is_valid">
+ <return type="bool">
+ </return>
+ <argument index="0" name="render_pipeline" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="sampler_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="state" type="RDSamplerState">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_framebuffer_format" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="screen" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="screen_get_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="screen" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shader_compile_from_source">
+ <return type="RDShaderBytecode">
+ </return>
+ <argument index="0" name="shader_source" type="RDShaderSource">
+ </argument>
+ <argument index="1" name="allow_cache" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shader_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="shader_data" type="RDShaderBytecode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shader_get_vertex_input_attribute_mask">
+ <return type="int">
+ </return>
+ <argument index="0" name="shader" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="storage_buffer_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="size_bytes" type="int">
+ </argument>
+ <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="submit">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="sync">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="texture_buffer_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="size_bytes" type="int">
+ </argument>
+ <argument index="1" name="format" type="int" enum="RenderingDevice.DataFormat">
+ </argument>
+ <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_clear">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="base_mipmap" type="int">
+ </argument>
+ <argument index="3" name="mipmap_count" type="int">
+ </argument>
+ <argument index="4" name="base_layer" type="int">
+ </argument>
+ <argument index="5" name="layer_count" type="int">
+ </argument>
+ <argument index="6" name="sync_with_draw" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_copy">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="from_texture" type="RID">
+ </argument>
+ <argument index="1" name="to_texture" type="RID">
+ </argument>
+ <argument index="2" name="from_pos" type="Vector3">
+ </argument>
+ <argument index="3" name="to_pos" type="Vector3">
+ </argument>
+ <argument index="4" name="size" type="Vector3">
+ </argument>
+ <argument index="5" name="src_mipmap" type="int">
+ </argument>
+ <argument index="6" name="dst_mipmap" type="int">
+ </argument>
+ <argument index="7" name="src_layer" type="int">
+ </argument>
+ <argument index="8" name="dst_layer" type="int">
+ </argument>
+ <argument index="9" name="sync_with_draw" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="format" type="RDTextureFormat">
+ </argument>
+ <argument index="1" name="view" type="RDTextureView">
+ </argument>
+ <argument index="2" name="data" type="PackedByteArray[]" default="[ ]">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_create_shared">
+ <return type="RID">
+ </return>
+ <argument index="0" name="view" type="RDTextureView">
+ </argument>
+ <argument index="1" name="with_texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_create_shared_from_slice">
+ <return type="RID">
+ </return>
+ <argument index="0" name="view" type="RDTextureView">
+ </argument>
+ <argument index="1" name="with_texture" type="RID">
+ </argument>
+ <argument index="2" name="layer" type="int">
+ </argument>
+ <argument index="3" name="mipmap" type="int">
+ </argument>
+ <argument index="4" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_get_data">
+ <return type="PackedByteArray">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <argument index="1" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_is_format_supported_for_usage" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat">
+ </argument>
+ <argument index="1" name="usage_flags" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_is_shared">
+ <return type="bool">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_is_valid">
+ <return type="bool">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_resolve_multisample">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="from_texture" type="RID">
+ </argument>
+ <argument index="1" name="to_texture" type="RID">
+ </argument>
+ <argument index="2" name="sync_with_draw" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_update">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <argument index="1" name="layer" type="int">
+ </argument>
+ <argument index="2" name="data" type="PackedByteArray">
+ </argument>
+ <argument index="3" name="sync_with_draw" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="uniform_buffer_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="size_bytes" type="int">
+ </argument>
+ <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="uniform_set_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="uniforms" type="Array">
+ </argument>
+ <argument index="1" name="shader" type="RID">
+ </argument>
+ <argument index="2" name="shader_set" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="uniform_set_is_valid">
+ <return type="bool">
+ </return>
+ <argument index="0" name="uniform_set" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="vertex_buffer_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="size_bytes" type="int">
+ </argument>
+ <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="vertex_format_create">
+ <return type="int">
+ </return>
+ <argument index="0" name="vertex_descriptions" type="RDVertexAttribute[]">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="DATA_FORMAT_R4G4_UNORM_PACK8" value="0" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R4G4B4A4_UNORM_PACK16" value="1" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B4G4R4A4_UNORM_PACK16" value="2" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R5G6B5_UNORM_PACK16" value="3" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B5G6R5_UNORM_PACK16" value="4" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R5G5B5A1_UNORM_PACK16" value="5" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B5G5R5A1_UNORM_PACK16" value="6" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A1R5G5B5_UNORM_PACK16" value="7" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8_UNORM" value="8" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8_SNORM" value="9" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8_USCALED" value="10" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8_SSCALED" value="11" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8_UINT" value="12" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8_SINT" value="13" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8_SRGB" value="14" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8_UNORM" value="15" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8_SNORM" value="16" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8_USCALED" value="17" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8_SSCALED" value="18" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8_UINT" value="19" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8_SINT" value="20" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8_SRGB" value="21" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8_UNORM" value="22" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8_SNORM" value="23" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8_USCALED" value="24" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8_SSCALED" value="25" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8_UINT" value="26" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8_SINT" value="27" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8_SRGB" value="28" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8_UNORM" value="29" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8_SNORM" value="30" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8_USCALED" value="31" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8_SSCALED" value="32" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8_UINT" value="33" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8_SINT" value="34" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8_SRGB" value="35" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8A8_UNORM" value="36" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8A8_SNORM" value="37" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8A8_USCALED" value="38" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8A8_SSCALED" value="39" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8A8_UINT" value="40" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8A8_SINT" value="41" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R8G8B8A8_SRGB" value="42" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8A8_UNORM" value="43" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8A8_SNORM" value="44" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8A8_USCALED" value="45" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8A8_SSCALED" value="46" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8A8_UINT" value="47" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8A8_SINT" value="48" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8A8_SRGB" value="49" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A8B8G8R8_UNORM_PACK32" value="50" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A8B8G8R8_SNORM_PACK32" value="51" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A8B8G8R8_USCALED_PACK32" value="52" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A8B8G8R8_SSCALED_PACK32" value="53" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A8B8G8R8_UINT_PACK32" value="54" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A8B8G8R8_SINT_PACK32" value="55" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A8B8G8R8_SRGB_PACK32" value="56" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2R10G10B10_UNORM_PACK32" value="57" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2R10G10B10_SNORM_PACK32" value="58" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2R10G10B10_USCALED_PACK32" value="59" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2R10G10B10_SSCALED_PACK32" value="60" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2R10G10B10_UINT_PACK32" value="61" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2R10G10B10_SINT_PACK32" value="62" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2B10G10R10_UNORM_PACK32" value="63" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2B10G10R10_SNORM_PACK32" value="64" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2B10G10R10_USCALED_PACK32" value="65" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2B10G10R10_SSCALED_PACK32" value="66" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2B10G10R10_UINT_PACK32" value="67" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_A2B10G10R10_SINT_PACK32" value="68" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16_UNORM" value="69" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16_SNORM" value="70" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16_USCALED" value="71" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16_SSCALED" value="72" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16_UINT" value="73" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16_SINT" value="74" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16_SFLOAT" value="75" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16_UNORM" value="76" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16_SNORM" value="77" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16_USCALED" value="78" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16_SSCALED" value="79" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16_UINT" value="80" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16_SINT" value="81" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16_SFLOAT" value="82" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16_UNORM" value="83" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16_SNORM" value="84" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16_USCALED" value="85" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16_SSCALED" value="86" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16_UINT" value="87" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16_SINT" value="88" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16_SFLOAT" value="89" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16A16_UNORM" value="90" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16A16_SNORM" value="91" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16A16_USCALED" value="92" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16A16_SSCALED" value="93" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16A16_UINT" value="94" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16A16_SINT" value="95" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R16G16B16A16_SFLOAT" value="96" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32_UINT" value="97" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32_SINT" value="98" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32_SFLOAT" value="99" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32_UINT" value="100" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32_SINT" value="101" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32_SFLOAT" value="102" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32B32_UINT" value="103" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32B32_SINT" value="104" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32B32_SFLOAT" value="105" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32B32A32_UINT" value="106" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32B32A32_SINT" value="107" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R32G32B32A32_SFLOAT" value="108" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64_UINT" value="109" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64_SINT" value="110" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64_SFLOAT" value="111" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64_UINT" value="112" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64_SINT" value="113" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64_SFLOAT" value="114" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64B64_UINT" value="115" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64B64_SINT" value="116" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64B64_SFLOAT" value="117" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64B64A64_UINT" value="118" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64B64A64_SINT" value="119" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R64G64B64A64_SFLOAT" value="120" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B10G11R11_UFLOAT_PACK32" value="121" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32" value="122" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_D16_UNORM" value="123" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_X8_D24_UNORM_PACK32" value="124" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_D32_SFLOAT" value="125" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_S8_UINT" value="126" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_D16_UNORM_S8_UINT" value="127" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_D24_UNORM_S8_UINT" value="128" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_D32_SFLOAT_S8_UINT" value="129" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC1_RGB_UNORM_BLOCK" value="130" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC1_RGB_SRGB_BLOCK" value="131" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC1_RGBA_UNORM_BLOCK" value="132" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC1_RGBA_SRGB_BLOCK" value="133" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC2_UNORM_BLOCK" value="134" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC2_SRGB_BLOCK" value="135" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC3_UNORM_BLOCK" value="136" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC3_SRGB_BLOCK" value="137" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC4_UNORM_BLOCK" value="138" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC4_SNORM_BLOCK" value="139" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC5_UNORM_BLOCK" value="140" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC5_SNORM_BLOCK" value="141" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC6H_UFLOAT_BLOCK" value="142" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC6H_SFLOAT_BLOCK" value="143" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC7_UNORM_BLOCK" value="144" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_BC7_SRGB_BLOCK" value="145" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK" value="146" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK" value="147" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK" value="148" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK" value="149" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK" value="150" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK" value="151" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_EAC_R11_UNORM_BLOCK" value="152" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_EAC_R11_SNORM_BLOCK" value="153" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_EAC_R11G11_UNORM_BLOCK" value="154" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_EAC_R11G11_SNORM_BLOCK" value="155" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_4x4_UNORM_BLOCK" value="156" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_4x4_SRGB_BLOCK" value="157" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_5x4_UNORM_BLOCK" value="158" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_5x4_SRGB_BLOCK" value="159" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_5x5_UNORM_BLOCK" value="160" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_5x5_SRGB_BLOCK" value="161" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_6x5_UNORM_BLOCK" value="162" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_6x5_SRGB_BLOCK" value="163" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_6x6_UNORM_BLOCK" value="164" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_6x6_SRGB_BLOCK" value="165" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_8x5_UNORM_BLOCK" value="166" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_8x5_SRGB_BLOCK" value="167" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_8x6_UNORM_BLOCK" value="168" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_8x6_SRGB_BLOCK" value="169" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_8x8_UNORM_BLOCK" value="170" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_8x8_SRGB_BLOCK" value="171" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x5_UNORM_BLOCK" value="172" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x5_SRGB_BLOCK" value="173" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x6_UNORM_BLOCK" value="174" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x6_SRGB_BLOCK" value="175" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x8_UNORM_BLOCK" value="176" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x8_SRGB_BLOCK" value="177" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x10_UNORM_BLOCK" value="178" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_10x10_SRGB_BLOCK" value="179" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_12x10_UNORM_BLOCK" value="180" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_12x10_SRGB_BLOCK" value="181" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_12x12_UNORM_BLOCK" value="182" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_ASTC_12x12_SRGB_BLOCK" value="183" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G8B8G8R8_422_UNORM" value="184" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B8G8R8G8_422_UNORM" value="185" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM" value="186" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM" value="187" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM" value="188" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM" value="189" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM" value="190" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R10X6_UNORM_PACK16" value="191" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R10X6G10X6_UNORM_2PACK16" value="192" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16" value="193" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16" value="194" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16" value="195" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16" value="196" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16" value="197" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16" value="198" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16" value="199" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16" value="200" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R12X4_UNORM_PACK16" value="201" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R12X4G12X4_UNORM_2PACK16" value="202" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16" value="203" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16" value="204" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16" value="205" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16" value="206" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16" value="207" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16" value="208" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16" value="209" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16" value="210" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G16B16G16R16_422_UNORM" value="211" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_B16G16R16G16_422_UNORM" value="212" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM" value="213" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM" value="214" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM" value="215" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM" value="216" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM" value="217" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG" value="218" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG" value="219" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG" value="220" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG" value="221" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG" value="222" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG" value="223" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG" value="224" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG" value="225" enum="DataFormat">
+ </constant>
+ <constant name="DATA_FORMAT_MAX" value="226" enum="DataFormat">
+ </constant>
+ <constant name="TEXTURE_TYPE_1D" value="0" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_TYPE_2D" value="1" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_TYPE_3D" value="2" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_TYPE_CUBE" value="3" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_TYPE_1D_ARRAY" value="4" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_TYPE_2D_ARRAY" value="5" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_TYPE_CUBE_ARRAY" value="6" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_TYPE_MAX" value="7" enum="TextureType">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_1" value="0" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_2" value="1" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_4" value="2" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_8" value="3" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_16" value="4" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_32" value="5" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_64" value="6" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_SAMPLES_MAX" value="7" enum="TextureSamples">
+ </constant>
+ <constant name="TEXTURE_USAGE_SAMPLING_BIT" value="1" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_COLOR_ATTACHMENT_BIT" value="2" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" value="4" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_STORAGE_BIT" value="8" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_STORAGE_ATOMIC_BIT" value="16" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_CPU_READ_BIT" value="32" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_CAN_UPDATE_BIT" value="64" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_CAN_COPY_FROM_BIT" value="128" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_CAN_COPY_TO_BIT" value="256" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_USAGE_RESOLVE_ATTACHMENT_BIT" value="512" enum="TextureUsageBits">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_IDENTITY" value="0" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_ZERO" value="1" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_ONE" value="2" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_R" value="3" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_G" value="4" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_B" value="5" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_A" value="6" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SWIZZLE_MAX" value="7" enum="TextureSwizzle">
+ </constant>
+ <constant name="TEXTURE_SLICE_2D" value="0" enum="TextureSliceType">
+ </constant>
+ <constant name="TEXTURE_SLICE_CUBEMAP" value="1" enum="TextureSliceType">
+ </constant>
+ <constant name="TEXTURE_SLICE_3D" value="2" enum="TextureSliceType">
+ </constant>
+ <constant name="SAMPLER_FILTER_NEAREST" value="0" enum="SamplerFilter">
+ </constant>
+ <constant name="SAMPLER_FILTER_LINEAR" value="1" enum="SamplerFilter">
+ </constant>
+ <constant name="SAMPLER_REPEAT_MODE_REPEAT" value="0" enum="SamplerRepeatMode">
+ </constant>
+ <constant name="SAMPLER_REPEAT_MODE_MIRRORED_REPEAT" value="1" enum="SamplerRepeatMode">
+ </constant>
+ <constant name="SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE" value="2" enum="SamplerRepeatMode">
+ </constant>
+ <constant name="SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER" value="3" enum="SamplerRepeatMode">
+ </constant>
+ <constant name="SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE" value="4" enum="SamplerRepeatMode">
+ </constant>
+ <constant name="SAMPLER_REPEAT_MODE_MAX" value="5" enum="SamplerRepeatMode">
+ </constant>
+ <constant name="SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK" value="0" enum="SamplerBorderColor">
+ </constant>
+ <constant name="SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK" value="1" enum="SamplerBorderColor">
+ </constant>
+ <constant name="SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK" value="2" enum="SamplerBorderColor">
+ </constant>
+ <constant name="SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK" value="3" enum="SamplerBorderColor">
+ </constant>
+ <constant name="SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE" value="4" enum="SamplerBorderColor">
+ </constant>
+ <constant name="SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE" value="5" enum="SamplerBorderColor">
+ </constant>
+ <constant name="SAMPLER_BORDER_COLOR_MAX" value="6" enum="SamplerBorderColor">
+ </constant>
+ <constant name="VERTEX_FREQUENCY_VERTEX" value="0" enum="VertexFrequency">
+ </constant>
+ <constant name="VERTEX_FREQUENCY_INSTANCE" value="1" enum="VertexFrequency">
+ </constant>
+ <constant name="INDEX_BUFFER_FORMAT_UINT16" value="0" enum="IndexBufferFormat">
+ </constant>
+ <constant name="INDEX_BUFFER_FORMAT_UINT32" value="1" enum="IndexBufferFormat">
+ </constant>
+ <constant name="UNIFORM_TYPE_SAMPLER" value="0" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_SAMPLER_WITH_TEXTURE" value="1" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_TEXTURE" value="2" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_IMAGE" value="3" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_TEXTURE_BUFFER" value="4" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER" value="5" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_IMAGE_BUFFER" value="6" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_UNIFORM_BUFFER" value="7" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_STORAGE_BUFFER" value="8" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_INPUT_ATTACHMENT" value="9" enum="UniformType">
+ </constant>
+ <constant name="UNIFORM_TYPE_MAX" value="10" enum="UniformType">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_POINTS" value="0" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_LINES" value="1" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_LINES_WITH_ADJACENCY" value="2" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_LINESTRIPS" value="3" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY" value="4" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_TRIANGLES" value="5" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY" value="6" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_TRIANGLE_STRIPS" value="7" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY" value="8" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX" value="9" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_TESSELATION_PATCH" value="10" enum="RenderPrimitive">
+ </constant>
+ <constant name="RENDER_PRIMITIVE_MAX" value="11" enum="RenderPrimitive">
+ </constant>
+ <constant name="POLYGON_CULL_DISABLED" value="0" enum="PolygonCullMode">
+ </constant>
+ <constant name="POLYGON_CULL_FRONT" value="1" enum="PolygonCullMode">
+ </constant>
+ <constant name="POLYGON_CULL_BACK" value="2" enum="PolygonCullMode">
+ </constant>
+ <constant name="POLYGON_FRONT_FACE_CLOCKWISE" value="0" enum="PolygonFrontFace">
+ </constant>
+ <constant name="POLYGON_FRONT_FACE_COUNTER_CLOCKWISE" value="1" enum="PolygonFrontFace">
+ </constant>
+ <constant name="STENCIL_OP_KEEP" value="0" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_ZERO" value="1" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_REPLACE" value="2" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_INCREMENT_AND_CLAMP" value="3" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_DECREMENT_AND_CLAMP" value="4" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_INVERT" value="5" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_INCREMENT_AND_WRAP" value="6" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_DECREMENT_AND_WRAP" value="7" enum="StencilOperation">
+ </constant>
+ <constant name="STENCIL_OP_MAX" value="8" enum="StencilOperation">
+ </constant>
+ <constant name="COMPARE_OP_NEVER" value="0" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_LESS" value="1" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_EQUAL" value="2" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_LESS_OR_EQUAL" value="3" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_GREATER" value="4" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_NOT_EQUAL" value="5" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_GREATER_OR_EQUAL" value="6" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_ALWAYS" value="7" enum="CompareOperator">
+ </constant>
+ <constant name="COMPARE_OP_MAX" value="8" enum="CompareOperator">
+ </constant>
+ <constant name="LOGIC_OP_CLEAR" value="0" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_AND" value="1" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_AND_REVERSE" value="2" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_COPY" value="3" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_AND_INVERTED" value="4" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_NO_OP" value="5" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_XOR" value="6" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_OR" value="7" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_NOR" value="8" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_EQUIVALENT" value="9" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_INVERT" value="10" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_OR_REVERSE" value="11" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_COPY_INVERTED" value="12" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_OR_INVERTED" value="13" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_NAND" value="14" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_SET" value="15" enum="LogicOperation">
+ </constant>
+ <constant name="LOGIC_OP_MAX" value="16" enum="LogicOperation">
+ </constant>
+ <constant name="BLEND_FACTOR_ZERO" value="0" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE" value="1" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_SRC_COLOR" value="2" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_SRC_COLOR" value="3" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_DST_COLOR" value="4" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_DST_COLOR" value="5" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_SRC_ALPHA" value="6" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_SRC_ALPHA" value="7" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_DST_ALPHA" value="8" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_DST_ALPHA" value="9" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_CONSTANT_COLOR" value="10" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR" value="11" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_CONSTANT_ALPHA" value="12" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA" value="13" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_SRC_ALPHA_SATURATE" value="14" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_SRC1_COLOR" value="15" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_SRC1_COLOR" value="16" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_SRC1_ALPHA" value="17" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA" value="18" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_FACTOR_MAX" value="19" enum="BlendFactor">
+ </constant>
+ <constant name="BLEND_OP_ADD" value="0" enum="BlendOperation">
+ </constant>
+ <constant name="BLEND_OP_SUBTRACT" value="1" enum="BlendOperation">
+ </constant>
+ <constant name="BLEND_OP_REVERSE_SUBTRACT" value="2" enum="BlendOperation">
+ </constant>
+ <constant name="BLEND_OP_MINIMUM" value="3" enum="BlendOperation">
+ </constant>
+ <constant name="BLEND_OP_MAXIMUM" value="4" enum="BlendOperation">
+ </constant>
+ <constant name="BLEND_OP_MAX" value="5" enum="BlendOperation">
+ </constant>
+ <constant name="DYNAMIC_STATE_LINE_WIDTH" value="1" enum="PipelineDynamicStateFlags">
+ </constant>
+ <constant name="DYNAMIC_STATE_DEPTH_BIAS" value="2" enum="PipelineDynamicStateFlags">
+ </constant>
+ <constant name="DYNAMIC_STATE_BLEND_CONSTANTS" value="4" enum="PipelineDynamicStateFlags">
+ </constant>
+ <constant name="DYNAMIC_STATE_DEPTH_BOUNDS" value="8" enum="PipelineDynamicStateFlags">
+ </constant>
+ <constant name="DYNAMIC_STATE_STENCIL_COMPARE_MASK" value="16" enum="PipelineDynamicStateFlags">
+ </constant>
+ <constant name="DYNAMIC_STATE_STENCIL_WRITE_MASK" value="32" enum="PipelineDynamicStateFlags">
+ </constant>
+ <constant name="DYNAMIC_STATE_STENCIL_REFERENCE" value="64" enum="PipelineDynamicStateFlags">
+ </constant>
+ <constant name="INITIAL_ACTION_CLEAR" value="0" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_KEEP" value="1" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_DROP" value="2" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_CONTINUE" value="3" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_MAX" value="4" enum="InitialAction">
+ </constant>
+ <constant name="FINAL_ACTION_READ" value="0" enum="FinalAction">
+ </constant>
+ <constant name="FINAL_ACTION_DISCARD" value="1" enum="FinalAction">
+ </constant>
+ <constant name="FINAL_ACTION_CONTINUE" value="2" enum="FinalAction">
+ </constant>
+ <constant name="FINAL_ACTION_MAX" value="3" enum="FinalAction">
+ </constant>
+ <constant name="SHADER_STAGE_VERTEX" value="0" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_FRAGMENT" value="1" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_TESSELATION_CONTROL" value="2" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_TESSELATION_EVALUATION" value="3" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_COMPUTE" value="4" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_MAX" value="5" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_VERTEX_BIT" value="1" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_FRAGMENT_BIT" value="2" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_TESSELATION_CONTROL_BIT" value="4" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_TESSELATION_EVALUATION_BIT" value="8" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_STAGE_COMPUTE_BIT" value="16" enum="ShaderStage">
+ </constant>
+ <constant name="SHADER_LANGUAGE_GLSL" value="0" enum="ShaderLanguage">
+ </constant>
+ <constant name="SHADER_LANGUAGE_HLSL" value="1" enum="ShaderLanguage">
+ </constant>
+ <constant name="LIMIT_MAX_BOUND_UNIFORM_SETS" value="0" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS" value="1" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_TEXTURES_PER_UNIFORM_SET" value="2" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET" value="3" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET" value="4" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET" value="5" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET" value="6" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_DRAW_INDEXED_INDEX" value="7" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_FRAMEBUFFER_HEIGHT" value="8" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_FRAMEBUFFER_WIDTH" value="9" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_TEXTURE_ARRAY_LAYERS" value="10" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_TEXTURE_SIZE_1D" value="11" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_TEXTURE_SIZE_2D" value="12" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_TEXTURE_SIZE_3D" value="13" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_TEXTURE_SIZE_CUBE" value="14" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_TEXTURES_PER_SHADER_STAGE" value="15" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE" value="16" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE" value="17" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE" value="18" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE" value="19" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_PUSH_CONSTANT_SIZE" value="20" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_UNIFORM_BUFFER_SIZE" value="21" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET" value="22" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES" value="23" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_VERTEX_INPUT_BINDINGS" value="24" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE" value="25" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT" value="26" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE" value="27" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X" value="28" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y" value="29" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z" value="30" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS" value="31" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X" value="32" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y" value="33" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z" value="34" enum="Limit">
+ </constant>
+ <constant name="INVALID_ID" value="-1">
+ </constant>
+ <constant name="INVALID_FORMAT_ID" value="-1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/RenderingServer.xml
index 895aba2473..d8be6d4bd7 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1,13 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualServer" inherits="Object" category="Core" version="3.2">
+<class name="RenderingServer" inherits="Object" version="4.0">
<brief_description>
Server for anything visible.
</brief_description>
<description>
- Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display.
- The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
+ Server for anything visible. The rendering server is the API backend for everything visible. The whole scene system mounts on it to display.
+ The rendering server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
+ The rendering server can be used to bypass the scene system entirely.
+ Resources are created using the [code]*_create[/code] functions.
+ All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas].
+ In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any [Node3D] node with [method Node3D.get_world_3d]. Otherwise, a scenario can be created with [method scenario_create].
+ Similarly in 2D, a canvas is needed to draw all canvas items.
+ In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible.
+ In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link>
</tutorials>
<methods>
<method name="black_bars_set_images">
@@ -44,6 +52,8 @@
<return type="RID">
</return>
<description>
+ Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
</description>
</method>
<method name="camera_set_cull_mask">
@@ -54,6 +64,7 @@
<argument index="1" name="layers" type="int">
</argument>
<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">
@@ -64,6 +75,7 @@
<argument index="1" name="env" type="RID">
</argument>
<description>
+ Sets the environment used by this camera. Equivalent to [member Camera3D.environment].
</description>
</method>
<method name="camera_set_frustum">
@@ -80,6 +92,7 @@
<argument index="4" name="z_far" type="float">
</argument>
<description>
+ Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects.
</description>
</method>
<method name="camera_set_orthogonal">
@@ -94,6 +107,7 @@
<argument index="3" name="z_far" type="float">
</argument>
<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">
@@ -108,6 +122,7 @@
<argument index="3" name="z_far" type="float">
</argument>
<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">
@@ -118,6 +133,7 @@
<argument index="1" name="transform" type="Transform">
</argument>
<description>
+ Sets [Transform] of camera.
</description>
</method>
<method name="camera_set_use_vertical_aspect">
@@ -128,290 +144,15 @@
<argument index="1" name="enable" type="bool">
</argument>
<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>
</method>
<method name="canvas_create">
<return type="RID">
</return>
<description>
- Creates a canvas and returns the assigned [RID].
- </description>
- </method>
- <method name="canvas_item_add_circle">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="radius" type="float">
- </argument>
- <argument index="3" name="color" type="Color">
- </argument>
- <description>
- Adds a circle command to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_clip_ignore">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="ignore" type="bool">
- </argument>
- <description>
- If ignore is [code]true[/code], the VisualServer does not perform clipping.
- </description>
- </method>
- <method name="canvas_item_add_line">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="from" type="Vector2">
- </argument>
- <argument index="2" name="to" type="Vector2">
- </argument>
- <argument index="3" name="color" type="Color">
- </argument>
- <argument index="4" name="width" type="float" default="1.0">
- </argument>
- <argument index="5" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- Adds a line command to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_mesh">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="mesh" type="RID">
- </argument>
- <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="texture" type="RID">
- </argument>
- <argument index="5" name="normal_map" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_add_multimesh">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="mesh" type="RID">
- </argument>
- <argument index="2" name="texture" type="RID">
- </argument>
- <argument index="3" name="normal_map" type="RID">
- </argument>
- <description>
- Adds a [MultiMesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment.
- </description>
- </method>
- <method name="canvas_item_add_nine_patch">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="source" type="Rect2">
- </argument>
- <argument index="3" name="texture" type="RID">
- </argument>
- <argument index="4" name="topleft" type="Vector2">
- </argument>
- <argument index="5" name="bottomright" type="Vector2">
- </argument>
- <argument index="6" name="x_axis_mode" type="int" enum="VisualServer.NinePatchAxisMode" default="0">
- </argument>
- <argument index="7" name="y_axis_mode" type="int" enum="VisualServer.NinePatchAxisMode" default="0">
- </argument>
- <argument index="8" name="draw_center" type="bool" default="true">
- </argument>
- <argument index="9" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="10" name="normal_map" type="RID">
- </argument>
- <description>
- Adds a nine patch image to the [CanvasItem]'s draw commands.
- See [NinePatchRect] for more explanation.
- </description>
- </method>
- <method name="canvas_item_add_particles">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="particles" type="RID">
- </argument>
- <argument index="2" name="texture" type="RID">
- </argument>
- <argument index="3" name="normal_map" type="RID">
- </argument>
- <description>
- Adds a particle system to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_polygon">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="points" type="PoolVector2Array">
- </argument>
- <argument index="2" name="colors" type="PoolColorArray">
- </argument>
- <argument index="3" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
- </argument>
- <argument index="4" name="texture" type="RID">
- </argument>
- <argument index="5" name="normal_map" type="RID">
- </argument>
- <argument index="6" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- Adds a polygon to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_polyline">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="points" type="PoolVector2Array">
- </argument>
- <argument index="2" name="colors" type="PoolColorArray">
- </argument>
- <argument index="3" name="width" type="float" default="1.0">
- </argument>
- <argument index="4" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- Adds a polyline, which is a line from multiple points with a width, to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_primitive">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="points" type="PoolVector2Array">
- </argument>
- <argument index="2" name="colors" type="PoolColorArray">
- </argument>
- <argument index="3" name="uvs" type="PoolVector2Array">
- </argument>
- <argument index="4" name="texture" type="RID">
- </argument>
- <argument index="5" name="width" type="float" default="1.0">
- </argument>
- <argument index="6" name="normal_map" type="RID">
- </argument>
- <description>
- Adds a primitive to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_rect">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <description>
- Adds a rectangle to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="transform" type="Transform2D">
- </argument>
- <description>
- Adds a [Transform2D] command to the [CanvasItem]'s draw commands.
- This sets the extra_matrix uniform when executed. This affects the later commands of the canvas item.
- </description>
- </method>
- <method name="canvas_item_add_texture_rect">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="texture" type="RID">
- </argument>
- <argument index="3" name="tile" type="bool" default="false">
- </argument>
- <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="5" name="transpose" type="bool" default="false">
- </argument>
- <argument index="6" name="normal_map" type="RID">
- </argument>
- <description>
- Adds a textured rect to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_texture_rect_region">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="texture" type="RID">
- </argument>
- <argument index="3" name="src_rect" type="Rect2">
- </argument>
- <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="5" name="transpose" type="bool" default="false">
- </argument>
- <argument index="6" name="normal_map" type="RID">
- </argument>
- <argument index="7" name="clip_uv" type="bool" default="true">
- </argument>
- <description>
- Adds a texture rect with region setting to the [CanvasItem]'s draw commands.
- </description>
- </method>
- <method name="canvas_item_add_triangle_array">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="indices" type="PoolIntArray">
- </argument>
- <argument index="2" name="points" type="PoolVector2Array">
- </argument>
- <argument index="3" name="colors" type="PoolColorArray">
- </argument>
- <argument index="4" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
- </argument>
- <argument index="5" name="bones" type="PoolIntArray" default="PoolIntArray( )">
- </argument>
- <argument index="6" name="weights" type="PoolRealArray" default="PoolRealArray( )">
- </argument>
- <argument index="7" name="texture" type="RID">
- </argument>
- <argument index="8" name="count" type="int" default="-1">
- </argument>
- <argument index="9" name="normal_map" type="RID">
- </argument>
- <description>
+ Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/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="canvas_item_clear">
@@ -423,24 +164,6 @@
Clears the [CanvasItem] and removes all commands in it.
</description>
</method>
- <method name="canvas_item_create">
- <return type="RID">
- </return>
- <description>
- Creates a new [CanvasItem] and returns its [RID].
- </description>
- </method>
- <method name="canvas_item_set_clip">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="clip" type="bool">
- </argument>
- <description>
- Sets clipping for the [CanvasItem].
- </description>
- </method>
<method name="canvas_item_set_copy_to_backbuffer">
<return type="void">
</return>
@@ -454,40 +177,6 @@
Sets the [CanvasItem] to copy a rect to the backbuffer.
</description>
</method>
- <method name="canvas_item_set_custom_rect">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="use_custom_rect" type="bool">
- </argument>
- <argument index="2" name="rect" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
- </argument>
- <description>
- Defines a custom drawing rectangle for the [CanvasItem].
- </description>
- </method>
- <method name="canvas_item_set_distance_field_mode">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_set_draw_behind_parent">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- Sets [CanvasItem] to be drawn behind its parent.
- </description>
- </method>
<method name="canvas_item_set_draw_index">
<return type="void">
</return>
@@ -499,17 +188,6 @@
Sets the index for the [CanvasItem].
</description>
</method>
- <method name="canvas_item_set_light_mask">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="mask" type="int">
- </argument>
- <description>
- The light mask. See [LightOccluder2D] for more information on light masks.
- </description>
- </method>
<method name="canvas_item_set_material">
<return type="void">
</return>
@@ -521,61 +199,6 @@
Sets a new material to the [CanvasItem].
</description>
</method>
- <method name="canvas_item_set_modulate">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Sets the color that modulates the [CanvasItem] and its children.
- </description>
- </method>
- <method name="canvas_item_set_parent">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="parent" type="RID">
- </argument>
- <description>
- Sets the parent for the [CanvasItem].
- </description>
- </method>
- <method name="canvas_item_set_self_modulate">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Sets the color that modulates the [CanvasItem] without children.
- </description>
- </method>
- <method name="canvas_item_set_sort_children_by_y">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- Sets if [CanvasItem]'s children should be sorted by y-position.
- </description>
- </method>
- <method name="canvas_item_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="transform" type="Transform2D">
- </argument>
- <description>
- Sets the [CanvasItem]'s [Transform2D].
- </description>
- </method>
<method name="canvas_item_set_use_parent_material">
<return type="void">
</return>
@@ -587,17 +210,6 @@
Sets if the [CanvasItem] uses its parent's material.
</description>
</method>
- <method name="canvas_item_set_visible">
- <return type="void">
- </return>
- <argument index="0" name="item" type="RID">
- </argument>
- <argument index="1" name="visible" type="bool">
- </argument>
- <description>
- Sets if the canvas item (including its children) is visible.
- </description>
- </method>
<method name="canvas_item_set_z_as_relative_to_parent">
<return type="void">
</return>
@@ -635,7 +247,8 @@
<return type="RID">
</return>
<description>
- Creates a canvas light.
+ Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/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="canvas_light_occluder_attach_to_canvas">
@@ -653,7 +266,8 @@
<return type="RID">
</return>
<description>
- Creates a light occluder.
+ Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/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="canvas_light_occluder_set_enabled">
@@ -784,10 +398,10 @@
</return>
<argument index="0" name="light" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode">
+ <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasLightMode">
</argument>
<description>
- The mode of the light, see [code]CANVAS_LIGHT_MODE_*[/code] constants.
+ The mode of the light, see [enum CanvasLightMode] constants.
</description>
</method>
<method name="canvas_light_set_scale">
@@ -798,6 +412,7 @@
<argument index="1" name="scale" type="float">
</argument>
<description>
+ Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale].
</description>
</method>
<method name="canvas_light_set_shadow_buffer_size">
@@ -838,21 +453,10 @@
</return>
<argument index="0" name="light" type="RID">
</argument>
- <argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter">
- </argument>
- <description>
- Sets the canvas light's shadow's filter, see [code]CANVAS_LIGHT_SHADOW_FILTER_*[/code] constants.
- </description>
- </method>
- <method name="canvas_light_set_shadow_gradient_length">
- <return type="void">
- </return>
- <argument index="0" name="light" type="RID">
- </argument>
- <argument index="1" name="length" type="float">
+ <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasLightShadowFilter">
</argument>
<description>
- Sets the length of the shadow's gradient.
+ Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants.
</description>
</method>
<method name="canvas_light_set_shadow_smooth">
@@ -874,6 +478,7 @@
<argument index="1" name="texture" type="RID">
</argument>
<description>
+ Sets texture to be used by light. Equivalent to [member Light2D.texture].
</description>
</method>
<method name="canvas_light_set_texture_offset">
@@ -884,6 +489,7 @@
<argument index="1" name="offset" type="Vector2">
</argument>
<description>
+ Sets the offset of the light's texture. Equivalent to [member Light2D.offset].
</description>
</method>
<method name="canvas_light_set_transform">
@@ -907,13 +513,15 @@
<argument index="2" name="max_z" type="int">
</argument>
<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>
</method>
<method name="canvas_occluder_polygon_create">
<return type="RID">
</return>
<description>
- Creates a new light occluder polygon.
+ Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/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="canvas_occluder_polygon_set_cull_mode">
@@ -921,10 +529,10 @@
</return>
<argument index="0" name="occluder_polygon" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode">
+ <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasOccluderPolygonCullMode">
</argument>
<description>
- Sets an occluder polygons cull mode. See [code]CANVAS_OCCLUDER_POLYGON_CULL_MODE_*[/code] constants.
+ Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants.
</description>
</method>
<method name="canvas_occluder_polygon_set_shape">
@@ -932,7 +540,7 @@
</return>
<argument index="0" name="occluder_polygon" type="RID">
</argument>
- <argument index="1" name="shape" type="PoolVector2Array">
+ <argument index="1" name="shape" type="PackedVector2Array">
</argument>
<argument index="2" name="closed" type="bool">
</argument>
@@ -945,7 +553,7 @@
</return>
<argument index="0" name="occluder_polygon" type="RID">
</argument>
- <argument index="1" name="shape" type="PoolVector2Array">
+ <argument index="1" name="shape" type="PackedVector2Array">
</argument>
<description>
Sets the shape of the occluder polygon as lines.
@@ -979,22 +587,17 @@
<return type="RID">
</return>
<description>
- </description>
- </method>
- <method name="draw">
- <return type="void">
- </return>
- <argument index="0" name="swap_buffers" type="bool" default="true">
- </argument>
- <argument index="1" name="frame_step" type="float" default="0.0">
- </argument>
- <description>
+ Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="environment_create">
<return type="RID">
</return>
<description>
+ Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/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="environment_set_adjustment">
@@ -1013,6 +616,7 @@
<argument index="5" name="ramp" type="RID">
</argument>
<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">
@@ -1022,9 +626,15 @@
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="energy" type="float" default="1.0">
+ <argument index="2" name="ambient" type="int" enum="RenderingServer.EnvironmentAmbientSource" default="0">
+ </argument>
+ <argument index="3" name="energy" type="float" default="1.0">
+ </argument>
+ <argument index="4" name="sky_contibution" type="float" default="0.0">
</argument>
- <argument index="3" name="sky_contibution" type="float" default="0.0">
+ <argument index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0">
+ </argument>
+ <argument index="6" name="ao_color" type="Color" default="Color( 0, 0, 0, 1 )">
</argument>
<description>
</description>
@@ -1034,9 +644,10 @@
</return>
<argument index="0" name="env" type="RID">
</argument>
- <argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG">
+ <argument index="1" name="bg" type="int" enum="RenderingServer.EnvironmentBG">
</argument>
<description>
+ Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode].
</description>
</method>
<method name="environment_set_bg_color">
@@ -1047,6 +658,7 @@
<argument index="1" name="color" type="Color">
</argument>
<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">
@@ -1057,6 +669,7 @@
<argument index="1" name="energy" type="float">
</argument>
<description>
+ Sets the intensity of the background color.
</description>
</method>
<method name="environment_set_canvas_max_layer">
@@ -1067,42 +680,7 @@
<argument index="1" name="max_layer" type="int">
</argument>
<description>
- </description>
- </method>
- <method name="environment_set_dof_blur_far">
- <return type="void">
- </return>
- <argument index="0" name="env" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <argument index="2" name="distance" type="float">
- </argument>
- <argument index="3" name="transition" type="float">
- </argument>
- <argument index="4" name="far_amount" type="float">
- </argument>
- <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality">
- </argument>
- <description>
- </description>
- </method>
- <method name="environment_set_dof_blur_near">
- <return type="void">
- </return>
- <argument index="0" name="env" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <argument index="2" name="distance" type="float">
- </argument>
- <argument index="3" name="transition" type="float">
- </argument>
- <argument index="4" name="far_amount" type="float">
- </argument>
- <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality">
- </argument>
- <description>
+ Sets the maximum layer to use if using Canvas background mode.
</description>
</method>
<method name="environment_set_fog">
@@ -1119,6 +697,7 @@
<argument index="4" name="sun_amount" type="float">
</argument>
<description>
+ Sets the variables to be used with the scene fog. See [Environment] for more details.
</description>
</method>
<method name="environment_set_fog_depth">
@@ -1139,6 +718,7 @@
<argument index="6" name="transmit_curve" type="float">
</argument>
<description>
+ Sets the variables to be used with the fog depth effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_fog_height">
@@ -1155,6 +735,7 @@
<argument index="4" name="height_curve" type="float">
</argument>
<description>
+ Sets the variables to be used with the fog height effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_glow">
@@ -1170,17 +751,17 @@
</argument>
<argument index="4" name="strength" type="float">
</argument>
- <argument index="5" name="bloom_threshold" type="float">
+ <argument index="5" name="mix" type="float">
</argument>
- <argument index="6" name="blend_mode" type="int" enum="VisualServer.EnvironmentGlowBlendMode">
+ <argument index="6" name="bloom_threshold" type="float">
</argument>
- <argument index="7" name="hdr_bleed_threshold" type="float">
+ <argument index="7" name="blend_mode" type="int" enum="RenderingServer.EnvironmentGlowBlendMode">
</argument>
- <argument index="8" name="hdr_bleed_scale" type="float">
+ <argument index="8" name="hdr_bleed_threshold" type="float">
</argument>
- <argument index="9" name="hdr_luminance_cap" type="float">
+ <argument index="9" name="hdr_bleed_scale" type="float">
</argument>
- <argument index="10" name="bicubic_upscale" type="bool">
+ <argument index="10" name="hdr_luminance_cap" type="float">
</argument>
<description>
</description>
@@ -1193,6 +774,7 @@
<argument index="1" name="sky" type="RID">
</argument>
<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">
@@ -1203,6 +785,7 @@
<argument index="1" name="scale" type="float">
</argument>
<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">
@@ -1213,6 +796,7 @@
<argument index="1" name="orientation" type="Basis">
</argument>
<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">
@@ -1226,23 +810,15 @@
</argument>
<argument index="3" name="intensity" type="float">
</argument>
- <argument index="4" name="radius2" type="float">
- </argument>
- <argument index="5" name="intensity2" type="float">
- </argument>
- <argument index="6" name="bias" type="float">
- </argument>
- <argument index="7" name="light_affect" type="float">
- </argument>
- <argument index="8" name="ao_channel_affect" type="float">
+ <argument index="4" name="bias" type="float">
</argument>
- <argument index="9" name="color" type="Color">
+ <argument index="5" name="light_affect" type="float">
</argument>
- <argument index="10" name="quality" type="int" enum="VisualServer.EnvironmentSSAOQuality">
+ <argument index="6" name="ao_channel_affect" type="float">
</argument>
- <argument index="11" name="blur" type="int" enum="VisualServer.EnvironmentSSAOBlur">
+ <argument index="7" name="blur" type="int" enum="RenderingServer.EnvironmentSSAOBlur">
</argument>
- <argument index="12" name="bilateral_sharpness" type="float">
+ <argument index="8" name="bilateral_sharpness" type="float">
</argument>
<description>
</description>
@@ -1262,9 +838,8 @@
</argument>
<argument index="5" name="depth_tolerance" type="float">
</argument>
- <argument index="6" name="roughness" type="bool">
- </argument>
<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_tonemap">
@@ -1272,7 +847,7 @@
</return>
<argument index="0" name="env" type="RID">
</argument>
- <argument index="1" name="tone_mapper" type="int" enum="VisualServer.EnvironmentToneMapper">
+ <argument index="1" name="tone_mapper" type="int" enum="RenderingServer.EnvironmentToneMapper">
</argument>
<argument index="2" name="exposure" type="float">
</argument>
@@ -1289,6 +864,7 @@
<argument index="8" name="auto_exp_grey" type="float">
</argument>
<description>
+ Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="finish">
@@ -1306,6 +882,7 @@
<argument index="1" name="frame_step" type="float" default="0.0">
</argument>
<description>
+ Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution.
</description>
</method>
<method name="force_sync">
@@ -1321,16 +898,16 @@
<argument index="0" name="rid" type="RID">
</argument>
<description>
- Tries to free an object in the VisualServer.
+ Tries to free an object in the RenderingServer.
</description>
</method>
<method name="get_render_info">
<return type="int">
</return>
- <argument index="0" name="info" type="int" enum="VisualServer.RenderInfo">
+ <argument index="0" name="info" type="int" enum="RenderingServer.RenderInfo">
</argument>
<description>
- Returns a certain information, see [code]RENDER_INFO_*[/code] for options.
+ Returns a certain information, see [enum RenderInfo] for options.
</description>
</method>
<method name="get_test_cube">
@@ -1347,213 +924,77 @@
Returns the id of the test texture. Creates one if none exists.
</description>
</method>
- <method name="get_white_texture">
- <return type="RID">
- </return>
- <description>
- Returns the id of a white texture. Creates one if none exists.
- </description>
- </method>
- <method name="gi_probe_create">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_bias" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_bounds" qualifiers="const">
- <return type="AABB">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_cell_size" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_dynamic_data" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_dynamic_range" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_energy" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_normal_bias" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_propagation" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_get_to_cell_xform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_is_compressed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_is_interior" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_set_bias">
- <return type="void">
- </return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="bias" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_set_bounds">
- <return type="void">
+ <method name="get_video_adapter_name" qualifiers="const">
+ <return type="String">
</return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="bounds" type="AABB">
- </argument>
<description>
+ Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2").
+ [b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
- <method name="gi_probe_set_cell_size">
- <return type="void">
+ <method name="get_video_adapter_vendor" qualifiers="const">
+ <return type="String">
</return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="range" type="float">
- </argument>
<description>
+ Returns the vendor of the video adapter (e.g. "NVIDIA Corporation").
+ [b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
- <method name="gi_probe_set_compress">
- <return type="void">
+ <method name="get_white_texture">
+ <return type="RID">
</return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
<description>
+ Returns the id of a white texture. Creates one if none exists.
</description>
</method>
- <method name="gi_probe_set_dynamic_data">
+ <method name="global_variable_add">
<return type="void">
</return>
- <argument index="0" name="probe" type="RID">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="data" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="gi_probe_set_dynamic_range">
- <return type="void">
- </return>
- <argument index="0" name="probe" type="RID">
+ <argument index="1" name="type" type="int" enum="RenderingServer.GlobalVariableType">
</argument>
- <argument index="1" name="range" type="int">
+ <argument index="2" name="default_value" type="Variant">
</argument>
<description>
</description>
</method>
- <method name="gi_probe_set_energy">
- <return type="void">
+ <method name="global_variable_get" qualifiers="const">
+ <return type="Variant">
</return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="energy" type="float">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
</description>
</method>
- <method name="gi_probe_set_interior">
- <return type="void">
+ <method name="global_variable_get_list" qualifiers="const">
+ <return type="PackedStringArray">
</return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
<description>
</description>
</method>
- <method name="gi_probe_set_normal_bias">
- <return type="void">
+ <method name="global_variable_get_type" qualifiers="const">
+ <return type="int" enum="RenderingServer.GlobalVariableType">
</return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="bias" type="float">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
</description>
</method>
- <method name="gi_probe_set_propagation">
+ <method name="global_variable_remove">
<return type="void">
</return>
- <argument index="0" name="probe" type="RID">
- </argument>
- <argument index="1" name="propagation" type="float">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
</description>
</method>
- <method name="gi_probe_set_to_cell_xform">
+ <method name="global_variable_set">
<return type="void">
</return>
- <argument index="0" name="probe" type="RID">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="xform" type="Transform">
+ <argument index="1" name="value" type="Variant">
</argument>
<description>
</description>
@@ -1562,15 +1003,16 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if changes have been made to the VisualServer's data. [method draw] is usually called if this happens.
+ Returns [code]true[/code] if changes have been made to the RenderingServer's data. [method force_draw] is usually called if this happens.
</description>
</method>
<method name="has_feature" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="feature" type="int" enum="VisualServer.Features">
+ <argument index="0" name="feature" type="int" enum="RenderingServer.Features">
</argument>
<description>
+ Not yet implemented. Always returns [code]false[/code].
</description>
</method>
<method name="has_os_feature" qualifiers="const">
@@ -1579,7 +1021,7 @@
<argument index="0" name="feature" type="String">
</argument>
<description>
- Returns [code]true[/code] if the OS supports a certain feature. Features might be s3tc, etc, etc2 and pvrtc,
+ Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code] and [code]pvrtc[/code].
</description>
</method>
<method name="immediate_begin">
@@ -1587,11 +1029,12 @@
</return>
<argument index="0" name="immediate" type="RID">
</argument>
- <argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType">
+ <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType">
</argument>
<argument index="2" name="texture" type="RID">
</argument>
<description>
+ Sets up [ImmediateGeometry3D] internals to prepare for drawing. Equivalent to [method ImmediateGeometry3D.begin].
</description>
</method>
<method name="immediate_clear">
@@ -1600,6 +1043,7 @@
<argument index="0" name="immediate" type="RID">
</argument>
<description>
+ Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry3D.clear].
</description>
</method>
<method name="immediate_color">
@@ -1610,12 +1054,16 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_color].
</description>
</method>
<method name="immediate_create">
<return type="RID">
</return>
<description>
+ Creates an immediate geometry and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="immediate_end">
@@ -1624,6 +1072,7 @@
<argument index="0" name="immediate" type="RID">
</argument>
<description>
+ Ends drawing the [ImmediateGeometry3D] and displays it. Equivalent to [method ImmediateGeometry3D.end].
</description>
</method>
<method name="immediate_get_material" qualifiers="const">
@@ -1632,6 +1081,7 @@
<argument index="0" name="immediate" type="RID">
</argument>
<description>
+ Returns the material assigned to the [ImmediateGeometry3D].
</description>
</method>
<method name="immediate_normal">
@@ -1642,6 +1092,7 @@
<argument index="1" name="normal" type="Vector3">
</argument>
<description>
+ Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_normal].
</description>
</method>
<method name="immediate_set_material">
@@ -1652,6 +1103,7 @@
<argument index="1" name="material" type="RID">
</argument>
<description>
+ Sets the material to be used to draw the [ImmediateGeometry3D].
</description>
</method>
<method name="immediate_tangent">
@@ -1662,6 +1114,7 @@
<argument index="1" name="tangent" type="Plane">
</argument>
<description>
+ Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_tangent].
</description>
</method>
<method name="immediate_uv">
@@ -1672,6 +1125,7 @@
<argument index="1" name="tex_uv" type="Vector2">
</argument>
<description>
+ Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv].
</description>
</method>
<method name="immediate_uv2">
@@ -1682,6 +1136,7 @@
<argument index="1" name="tex_uv" type="Vector2">
</argument>
<description>
+ Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv2].
</description>
</method>
<method name="immediate_vertex">
@@ -1692,6 +1147,7 @@
<argument index="1" name="vertex" type="Vector3">
</argument>
<description>
+ Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry3D.add_vertex].
</description>
</method>
<method name="immediate_vertex_2d">
@@ -1702,13 +1158,14 @@
<argument index="1" name="vertex" type="Vector2">
</argument>
<description>
+ Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry3D.add_vertex].
</description>
</method>
<method name="init">
<return type="void">
</return>
<description>
- Initializes the visual server.
+ Initializes the rendering server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything.
</description>
</method>
<method name="instance_attach_object_instance_id">
@@ -1719,6 +1176,7 @@
<argument index="1" name="id" type="int">
</argument>
<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">
@@ -1729,12 +1187,16 @@
<argument index="1" name="skeleton" type="RID">
</argument>
<description>
+ Attaches a skeleton to an instance. Removes the previous skeleton from the instance.
</description>
</method>
<method name="instance_create">
<return type="RID">
</return>
<description>
+ Creates a visual instance and adds it to the RenderingServer. 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.
+ An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base].
</description>
</method>
<method name="instance_create2">
@@ -1745,6 +1207,8 @@
<argument index="1" name="scenario" type="RID">
</argument>
<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_set_as_instance_lod">
@@ -1755,6 +1219,7 @@
<argument index="1" name="as_lod_of_instance" type="RID">
</argument>
<description>
+ Not implemented in Godot 3.x.
</description>
</method>
<method name="instance_geometry_set_cast_shadows_setting">
@@ -1762,9 +1227,10 @@
</return>
<argument index="0" name="instance" type="RID">
</argument>
- <argument index="1" name="shadow_casting_setting" type="int" enum="VisualServer.ShadowCastingSetting">
+ <argument index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting">
</argument>
<description>
+ Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow].
</description>
</method>
<method name="instance_geometry_set_draw_range">
@@ -1781,6 +1247,7 @@
<argument index="4" name="max_margin" type="float">
</argument>
<description>
+ Not implemented in Godot 3.x.
</description>
</method>
<method name="instance_geometry_set_flag">
@@ -1788,11 +1255,12 @@
</return>
<argument index="0" name="instance" type="RID">
</argument>
- <argument index="1" name="flag" type="int" enum="VisualServer.InstanceFlags">
+ <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags">
</argument>
<argument index="2" name="enabled" type="bool">
</argument>
<description>
+ Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details.
</description>
</method>
<method name="instance_geometry_set_material_override">
@@ -1803,6 +1271,7 @@
<argument index="1" name="material" type="RID">
</argument>
<description>
+ Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override].
</description>
</method>
<method name="instance_set_base">
@@ -1813,6 +1282,7 @@
<argument index="1" name="base" type="RID">
</argument>
<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">
@@ -1825,6 +1295,7 @@
<argument index="2" name="weight" type="float">
</argument>
<description>
+ Sets the weight for a given blend shape associated with this instance.
</description>
</method>
<method name="instance_set_custom_aabb">
@@ -1835,6 +1306,7 @@
<argument index="1" name="aabb" type="AABB">
</argument>
<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_exterior">
@@ -1845,6 +1317,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ Function not implemented in Godot 3.x.
</description>
</method>
<method name="instance_set_extra_visibility_margin">
@@ -1855,6 +1328,7 @@
<argument index="1" name="margin" type="float">
</argument>
<description>
+ Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin].
</description>
</method>
<method name="instance_set_layer_mask">
@@ -1865,6 +1339,7 @@
<argument index="1" name="mask" type="int">
</argument>
<description>
+ Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers].
</description>
</method>
<method name="instance_set_scenario">
@@ -1875,6 +1350,7 @@
<argument index="1" name="scenario" type="RID">
</argument>
<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_material">
@@ -1887,6 +1363,7 @@
<argument index="2" name="material" type="RID">
</argument>
<description>
+ Sets the material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_material].
</description>
</method>
<method name="instance_set_transform">
@@ -1897,18 +1374,7 @@
<argument index="1" name="transform" type="Transform">
</argument>
<description>
- </description>
- </method>
- <method name="instance_set_use_lightmap">
- <return type="void">
- </return>
- <argument index="0" name="instance" type="RID">
- </argument>
- <argument index="1" name="lightmap_instance" type="RID">
- </argument>
- <argument index="2" name="lightmap" type="RID">
- </argument>
- <description>
+ Sets the world space transform of the instance. Equivalent to [member Node3D.transform].
</description>
</method>
<method name="instance_set_visible">
@@ -1919,6 +1385,7 @@
<argument index="1" name="visible" type="bool">
</argument>
<description>
+ Sets whether an instance is drawn or not. Equivalent to [member Node3D.visible].
</description>
</method>
<method name="instances_cull_aabb" qualifiers="const">
@@ -1929,6 +1396,8 @@
<argument index="1" name="scenario" type="RID">
</argument>
<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 @GDScript.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">
@@ -1939,6 +1408,8 @@
<argument index="1" name="scenario" type="RID">
</argument>
<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 @GDScript.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">
@@ -1951,7 +1422,7 @@
<argument index="2" name="scenario" type="RID">
</argument>
<description>
- Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query.
+ 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 @GDScript.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>
@@ -1963,6 +1434,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<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_depth_range_mode">
@@ -1970,9 +1442,10 @@
</return>
<argument index="0" name="light" type="RID">
</argument>
- <argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode">
+ <argument index="1" name="range_mode" type="int" enum="RenderingServer.LightDirectionalShadowDepthRangeMode">
</argument>
<description>
+ Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options.
</description>
</method>
<method name="light_directional_set_shadow_mode">
@@ -1980,19 +1453,10 @@
</return>
<argument index="0" name="light" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_omni_set_shadow_detail">
- <return type="void">
- </return>
- <argument index="0" name="light" type="RID">
- </argument>
- <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail">
+ <argument index="1" name="mode" type="int" enum="RenderingServer.LightDirectionalShadowMode">
</argument>
<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_omni_set_shadow_mode">
@@ -2000,9 +1464,10 @@
</return>
<argument index="0" name="light" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode">
+ <argument index="1" name="mode" type="int" enum="RenderingServer.LightOmniShadowMode">
</argument>
<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_set_color">
@@ -2013,6 +1478,7 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the color of the light. Equivalent to [member Light3D.light_color].
</description>
</method>
<method name="light_set_cull_mask">
@@ -2023,6 +1489,7 @@
<argument index="1" name="mask" type="int">
</argument>
<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_negative">
@@ -2033,6 +1500,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<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">
@@ -2040,11 +1508,12 @@
</return>
<argument index="0" name="light" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="VisualServer.LightParam">
+ <argument index="1" name="param" type="int" enum="RenderingServer.LightParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
<description>
+ Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light3D.set_param].
</description>
</method>
<method name="light_set_projector">
@@ -2055,6 +1524,7 @@
<argument index="1" name="texture" type="RID">
</argument>
<description>
+ Not implemented in Godot 3.x.
</description>
</method>
<method name="light_set_reverse_cull_face_mode">
@@ -2065,6 +1535,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<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">
@@ -2075,6 +1546,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ If [code]true[/code], light will cast shadows. Equivalent to [member Light3D.shadow_enabled].
</description>
</method>
<method name="light_set_shadow_color">
@@ -2085,6 +1557,7 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the color of the shadow cast by the light. Equivalent to [member Light3D.shadow_color].
</description>
</method>
<method name="light_set_use_gi">
@@ -2098,102 +1571,6 @@
Sets whether GI probes capture light information from this light.
</description>
</method>
- <method name="lightmap_capture_create">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_get_bounds" qualifiers="const">
- <return type="AABB">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_get_energy" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_get_octree" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_set_bounds">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="bounds" type="AABB">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_set_energy">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_set_octree">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="octree" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_set_octree_cell_subdiv">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="subdiv" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="lightmap_capture_set_octree_cell_transform">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="xform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
<method name="make_sphere_mesh">
<return type="RID">
</return>
@@ -2211,7 +1588,8 @@
<return type="RID">
</return>
<description>
- Returns an empty material.
+ Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/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="material_get_param" qualifiers="const">
@@ -2219,42 +1597,12 @@
</return>
<argument index="0" name="material" type="RID">
</argument>
- <argument index="1" name="parameter" type="String">
+ <argument index="1" name="parameter" type="StringName">
</argument>
<description>
Returns the value of a certain material's parameter.
</description>
</method>
- <method name="material_get_param_default" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="material" type="RID">
- </argument>
- <argument index="1" name="parameter" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_get_shader" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="shader_material" type="RID">
- </argument>
- <description>
- Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader.
- </description>
- </method>
- <method name="material_set_line_width">
- <return type="void">
- </return>
- <argument index="0" name="material" type="RID">
- </argument>
- <argument index="1" name="width" type="float">
- </argument>
- <description>
- Sets a material's line width.
- </description>
- </method>
<method name="material_set_next_pass">
<return type="void">
</return>
@@ -2271,7 +1619,7 @@
</return>
<argument index="0" name="material" type="RID">
</argument>
- <argument index="1" name="parameter" type="String">
+ <argument index="1" name="parameter" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -2306,16 +1654,19 @@
</return>
<argument index="0" name="mesh" type="RID">
</argument>
- <argument index="1" name="primtive" type="int" enum="VisualServer.PrimitiveType">
+ <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType">
</argument>
<argument index="2" name="arrays" type="Array">
</argument>
<argument index="3" name="blend_shapes" type="Array" default="[ ]">
</argument>
- <argument index="4" name="compress_format" type="int" default="97280">
+ <argument index="4" name="lods" type="Dictionary" default="{
+
+}">
+ </argument>
+ <argument index="5" name="compress_format" type="int" default="31744">
</argument>
<description>
- Adds a surface generated from the Arrays to a mesh. See [code]PRIMITIVE_TYPE_*[/code] constants for types.
</description>
</method>
<method name="mesh_clear">
@@ -2331,7 +1682,9 @@
<return type="RID">
</return>
<description>
- Creates a new mesh.
+ Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="mesh_get_blend_shape_count" qualifiers="const">
@@ -2344,7 +1697,7 @@
</description>
</method>
<method name="mesh_get_blend_shape_mode" qualifiers="const">
- <return type="int" enum="VisualServer.BlendShapeMode">
+ <return type="int" enum="RenderingServer.BlendShapeMode">
</return>
<argument index="0" name="mesh" type="RID">
</argument>
@@ -2370,34 +1723,12 @@
Returns a mesh's number of surfaces.
</description>
</method>
- <method name="mesh_remove_surface">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="index" type="int">
- </argument>
- <description>
- Removes a mesh's surface.
- </description>
- </method>
- <method name="mesh_set_blend_shape_count">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="amount" type="int">
- </argument>
- <description>
- Sets a mesh's blend shape count.
- </description>
- </method>
<method name="mesh_set_blend_shape_mode">
<return type="void">
</return>
<argument index="0" name="mesh" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="VisualServer.BlendShapeMode">
+ <argument index="1" name="mode" type="int" enum="RenderingServer.BlendShapeMode">
</argument>
<description>
Sets a mesh's blend shape mode.
@@ -2414,50 +1745,6 @@
Sets a mesh's custom aabb.
</description>
</method>
- <method name="mesh_surface_get_aabb" qualifiers="const">
- <return type="AABB">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns a mesh's surface's aabb.
- </description>
- </method>
- <method name="mesh_surface_get_array" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns a mesh's surface's vertex buffer.
- </description>
- </method>
- <method name="mesh_surface_get_array_index_len" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns a mesh's surface's amount of indices.
- </description>
- </method>
- <method name="mesh_surface_get_array_len" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns a mesh's surface's amount of vertices.
- </description>
- </method>
<method name="mesh_surface_get_arrays" qualifiers="const">
<return type="Array">
</return>
@@ -2480,17 +1767,6 @@
Returns a mesh's surface's arrays for blend shapes.
</description>
</method>
- <method name="mesh_surface_get_format" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns the format of a mesh's surface.
- </description>
- </method>
<method name="mesh_surface_get_format_offset" qualifiers="const">
<return type="int">
</return>
@@ -2503,6 +1779,7 @@
<argument index="3" name="array_index" type="int">
</argument>
<description>
+ Function is unused in Godot 3.x.
</description>
</method>
<method name="mesh_surface_get_format_stride" qualifiers="const">
@@ -2515,17 +1792,7 @@
<argument index="2" name="index_len" type="int">
</argument>
<description>
- </description>
- </method>
- <method name="mesh_surface_get_index_array" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns a mesh's surface's index buffer.
+ Function is unused in Godot 3.x.
</description>
</method>
<method name="mesh_surface_get_material" qualifiers="const">
@@ -2539,28 +1806,6 @@
Returns a mesh's surface's material.
</description>
</method>
- <method name="mesh_surface_get_primitive_type" qualifiers="const">
- <return type="int" enum="VisualServer.PrimitiveType">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns the primitive type of a mesh's surface.
- </description>
- </method>
- <method name="mesh_surface_get_skeleton_aabb" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- Returns the aabb of a mesh's surface's skeleton.
- </description>
- </method>
<method name="mesh_surface_set_material">
<return type="void">
</return>
@@ -2583,9 +1828,10 @@
</argument>
<argument index="2" name="offset" type="int">
</argument>
- <argument index="3" name="data" type="PoolByteArray">
+ <argument index="3" name="data" type="PackedByteArray">
</argument>
<description>
+ Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh.
</description>
</method>
<method name="multimesh_allocate">
@@ -2595,21 +1841,39 @@
</argument>
<argument index="1" name="instances" type="int">
</argument>
- <argument index="2" name="transform_format" type="int" enum="VisualServer.MultimeshTransformFormat">
+ <argument index="2" name="transform_format" type="int" enum="RenderingServer.MultimeshTransformFormat">
</argument>
- <argument index="3" name="color_format" type="int" enum="VisualServer.MultimeshColorFormat">
+ <argument index="3" name="color_format" type="bool" default="false">
</argument>
- <argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0">
+ <argument index="4" name="custom_data_format" type="bool" default="false">
</argument>
<description>
</description>
</method>
+ <method name="multimesh_create">
+ <return type="RID">
+ </return>
+ <description>
+ Creates a new multimesh on the RenderingServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID.
+ </description>
+ </method>
<method name="multimesh_get_aabb" qualifiers="const">
<return type="AABB">
</return>
<argument index="0" name="multimesh" type="RID">
</argument>
<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">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <description>
</description>
</method>
<method name="multimesh_get_instance_count" qualifiers="const">
@@ -2618,6 +1882,7 @@
<argument index="0" name="multimesh" type="RID">
</argument>
<description>
+ Returns the number of instances allocated for this multimesh.
</description>
</method>
<method name="multimesh_get_mesh" qualifiers="const">
@@ -2626,6 +1891,7 @@
<argument index="0" name="multimesh" type="RID">
</argument>
<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">
@@ -2634,6 +1900,7 @@
<argument index="0" name="multimesh" type="RID">
</argument>
<description>
+ Returns the number of visible instances for this multimesh.
</description>
</method>
<method name="multimesh_instance_get_color" qualifiers="const">
@@ -2644,6 +1911,7 @@
<argument index="1" name="index" type="int">
</argument>
<description>
+ Returns the color by which the specified instance will be modulated.
</description>
</method>
<method name="multimesh_instance_get_custom_data" qualifiers="const">
@@ -2654,6 +1922,7 @@
<argument index="1" name="index" type="int">
</argument>
<description>
+ Returns the custom data associated with the specified instance.
</description>
</method>
<method name="multimesh_instance_get_transform" qualifiers="const">
@@ -2664,6 +1933,7 @@
<argument index="1" name="index" type="int">
</argument>
<description>
+ Returns the [Transform] of the specified instance.
</description>
</method>
<method name="multimesh_instance_get_transform_2d" qualifiers="const">
@@ -2674,6 +1944,7 @@
<argument index="1" name="index" type="int">
</argument>
<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">
@@ -2686,6 +1957,7 @@
<argument index="2" name="color" type="Color">
</argument>
<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">
@@ -2698,6 +1970,7 @@
<argument index="2" name="custom_data" type="Color">
</argument>
<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">
@@ -2710,6 +1983,7 @@
<argument index="2" name="transform" type="Transform">
</argument>
<description>
+ Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform].
</description>
</method>
<method name="multimesh_instance_set_transform_2d">
@@ -2722,14 +1996,15 @@
<argument index="2" name="transform" type="Transform2D">
</argument>
<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_as_bulk_array">
+ <method name="multimesh_set_buffer">
<return type="void">
</return>
<argument index="0" name="multimesh" type="RID">
</argument>
- <argument index="1" name="array" type="PoolRealArray">
+ <argument index="1" name="buffer" type="PackedFloat32Array">
</argument>
<description>
</description>
@@ -2742,6 +2017,7 @@
<argument index="1" name="mesh" type="RID">
</argument>
<description>
+ Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh].
</description>
</method>
<method name="multimesh_set_visible_instances">
@@ -2752,18 +2028,25 @@
<argument index="1" name="visible" type="int">
</argument>
<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>
</method>
<method name="omni_light_create">
<return type="RID">
</return>
<description>
+ Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="particles_create">
<return type="RID">
</return>
<description>
+ Creates a particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="particles_get_current_aabb">
@@ -2772,6 +2055,7 @@
<argument index="0" name="particles" type="RID">
</argument>
<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">
@@ -2780,6 +2064,7 @@
<argument index="0" name="particles" type="RID">
</argument>
<description>
+ Returns [code]true[/code] if particles are currently set to emitting.
</description>
</method>
<method name="particles_is_inactive">
@@ -2788,6 +2073,7 @@
<argument index="0" name="particles" type="RID">
</argument>
<description>
+ Returns [code]true[/code] if particles are not emitting and particles are set to inactive.
</description>
</method>
<method name="particles_request_process">
@@ -2796,6 +2082,7 @@
<argument index="0" name="particles" type="RID">
</argument>
<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">
@@ -2804,6 +2091,7 @@
<argument index="0" name="particles" type="RID">
</argument>
<description>
+ Reset the particles on the next update. Equivalent to [method GPUParticles3D.restart].
</description>
</method>
<method name="particles_set_amount">
@@ -2814,6 +2102,7 @@
<argument index="1" name="amount" type="int">
</argument>
<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_custom_aabb">
@@ -2824,6 +2113,7 @@
<argument index="1" name="aabb" type="AABB">
</argument>
<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">
@@ -2831,9 +2121,10 @@
</return>
<argument index="0" name="particles" type="RID">
</argument>
- <argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder">
+ <argument index="1" name="order" type="int" enum="RenderingServer.ParticlesDrawOrder">
</argument>
<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">
@@ -2846,6 +2137,7 @@
<argument index="2" name="mesh" type="RID">
</argument>
<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">
@@ -2856,6 +2148,7 @@
<argument index="1" name="count" type="int">
</argument>
<description>
+ Sets the number of draw passes to use. Equivalent to [member GPUParticles3D.draw_passes].
</description>
</method>
<method name="particles_set_emission_transform">
@@ -2866,6 +2159,7 @@
<argument index="1" name="transform" type="Transform">
</argument>
<description>
+ Sets the [Transform] that will be used by the particles when they first emit.
</description>
</method>
<method name="particles_set_emitting">
@@ -2876,6 +2170,7 @@
<argument index="1" name="emitting" type="bool">
</argument>
<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">
@@ -2886,6 +2181,7 @@
<argument index="1" name="ratio" type="float">
</argument>
<description>
+ Sets the explosiveness ratio. Equivalent to [member GPUParticles3D.explosiveness].
</description>
</method>
<method name="particles_set_fixed_fps">
@@ -2896,6 +2192,7 @@
<argument index="1" name="fps" type="int">
</argument>
<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">
@@ -2906,6 +2203,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<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_lifetime">
@@ -2916,6 +2214,7 @@
<argument index="1" name="lifetime" type="float">
</argument>
<description>
+ Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime].
</description>
</method>
<method name="particles_set_one_shot">
@@ -2926,6 +2225,7 @@
<argument index="1" name="one_shot" type="bool">
</argument>
<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">
@@ -2936,6 +2236,7 @@
<argument index="1" name="time" type="float">
</argument>
<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">
@@ -2946,6 +2247,7 @@
<argument index="1" name="material" type="RID">
</argument>
<description>
+ Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member GPUParticles3D.process_material].
</description>
</method>
<method name="particles_set_randomness_ratio">
@@ -2956,6 +2258,7 @@
<argument index="1" name="ratio" type="float">
</argument>
<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">
@@ -2966,6 +2269,7 @@
<argument index="1" name="scale" type="float">
</argument>
<description>
+ Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale].
</description>
</method>
<method name="particles_set_use_local_coordinates">
@@ -2976,12 +2280,16 @@
<argument index="1" name="enable" type="bool">
</argument>
<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="reflection_probe_create">
<return type="RID">
</return>
<description>
+ Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="reflection_probe_set_as_interior">
@@ -2992,6 +2300,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
+ If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable].
</description>
</method>
<method name="reflection_probe_set_cull_mask">
@@ -3002,6 +2311,7 @@
<argument index="1" name="layers" type="int">
</argument>
<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">
@@ -3012,6 +2322,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<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">
@@ -3022,6 +2333,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<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">
@@ -3032,6 +2344,7 @@
<argument index="1" name="extents" type="Vector3">
</argument>
<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">
@@ -3042,6 +2355,7 @@
<argument index="1" name="intensity" type="float">
</argument>
<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_interior_ambient">
@@ -3052,6 +2366,7 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color].
</description>
</method>
<method name="reflection_probe_set_interior_ambient_energy">
@@ -3062,6 +2377,7 @@
<argument index="1" name="energy" type="float">
</argument>
<description>
+ Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy].
</description>
</method>
<method name="reflection_probe_set_interior_ambient_probe_contribution">
@@ -3072,6 +2388,7 @@
<argument index="1" name="contrib" type="float">
</argument>
<description>
+ Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib].
</description>
</method>
<method name="reflection_probe_set_max_distance">
@@ -3082,6 +2399,7 @@
<argument index="1" name="distance" type="float">
</argument>
<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_origin_offset">
@@ -3092,6 +2410,7 @@
<argument index="1" name="offset" type="Vector3">
</argument>
<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_update_mode">
@@ -3099,9 +2418,10 @@
</return>
<argument index="0" name="probe" type="RID">
</argument>
- <argument index="1" name="mode" type="int" enum="VisualServer.ReflectionProbeUpdateMode">
+ <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeUpdateMode">
</argument>
<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">
@@ -3109,7 +2429,7 @@
</return>
<argument index="0" name="where" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="userdata" type="Variant">
</argument>
@@ -3122,6 +2442,9 @@
<return type="RID">
</return>
<description>
+ Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ The scenario is the 3D world that all the visual instances exist in.
</description>
</method>
<method name="scenario_set_debug">
@@ -3129,9 +2452,10 @@
</return>
<argument index="0" name="scenario" type="RID">
</argument>
- <argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode">
+ <argument index="1" name="debug_mode" type="int" enum="RenderingServer.ScenarioDebugMode">
</argument>
<description>
+ Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options.
</description>
</method>
<method name="scenario_set_environment">
@@ -3142,6 +2466,7 @@
<argument index="1" name="environment" type="RID">
</argument>
<description>
+ Sets the environment that will be used with this scenario.
</description>
</method>
<method name="scenario_set_fallback_environment">
@@ -3152,18 +2477,7 @@
<argument index="1" name="environment" type="RID">
</argument>
<description>
- </description>
- </method>
- <method name="scenario_set_reflection_atlas_size">
- <return type="void">
- </return>
- <argument index="0" name="scenario" type="RID">
- </argument>
- <argument index="1" name="size" type="int">
- </argument>
- <argument index="2" name="subdiv" type="int">
- </argument>
- <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="set_boot_image">
@@ -3187,6 +2501,7 @@
<argument index="0" name="generate" type="bool">
</argument>
<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">
@@ -3195,13 +2510,15 @@
<argument index="0" name="color" type="Color">
</argument>
<description>
+ Sets the default clear color which is used when a specific clear color has not been selected.
</description>
</method>
<method name="shader_create">
<return type="RID">
</return>
<description>
- Creates an empty shader.
+ Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/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="shader_get_code" qualifiers="const">
@@ -3218,12 +2535,22 @@
</return>
<argument index="0" name="shader" type="RID">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<description>
Returns a default texture from a shader searched by name.
</description>
</method>
+ <method name="shader_get_param_default" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="material" type="RID">
+ </argument>
+ <argument index="1" name="parameter" type="StringName">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="shader_get_param_list" qualifiers="const">
<return type="Array">
</return>
@@ -3249,7 +2576,7 @@
</return>
<argument index="0" name="shader" type="RID">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<argument index="2" name="texture" type="RID">
</argument>
@@ -3267,6 +2594,7 @@
<argument index="2" name="is_2d_skeleton" type="bool" default="false">
</argument>
<description>
+ Allocates the GPU buffers for this skeleton.
</description>
</method>
<method name="skeleton_bone_get_transform" qualifiers="const">
@@ -3277,6 +2605,7 @@
<argument index="1" name="bone" type="int">
</argument>
<description>
+ Returns the [Transform] set for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_get_transform_2d" qualifiers="const">
@@ -3287,6 +2616,7 @@
<argument index="1" name="bone" type="int">
</argument>
<description>
+ Returns the [Transform2D] set for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_set_transform">
@@ -3299,6 +2629,7 @@
<argument index="2" name="transform" type="Transform">
</argument>
<description>
+ Sets the [Transform] for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_set_transform_2d">
@@ -3311,12 +2642,15 @@
<argument index="2" name="transform" type="Transform2D">
</argument>
<description>
+ Sets the [Transform2D] for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_create">
<return type="RID">
</return>
<description>
+ Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/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="skeleton_get_bone_count" qualifiers="const">
@@ -3325,268 +2659,51 @@
<argument index="0" name="skeleton" type="RID">
</argument>
<description>
+ Returns the number of bones allocated for this skeleton.
</description>
</method>
<method name="sky_create">
<return type="RID">
</return>
<description>
- Creates an empty sky.
+ Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/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="sky_set_texture">
+ <method name="sky_set_material">
<return type="void">
</return>
<argument index="0" name="sky" type="RID">
</argument>
- <argument index="1" name="cube_map" type="RID">
- </argument>
- <argument index="2" name="radiance_size" type="int">
+ <argument index="1" name="material" type="RID">
</argument>
<description>
- Sets a sky's texture.
+ Sets the material that the sky uses to render the background and reflection maps.
</description>
</method>
<method name="spot_light_create">
<return type="RID">
</return>
<description>
+ Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions.
+ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
+ To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
- <method name="sync">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="texture_allocate">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="width" type="int">
- </argument>
- <argument index="2" name="height" type="int">
- </argument>
- <argument index="3" name="depth_3d" type="int">
- </argument>
- <argument index="4" name="format" type="int" enum="Image.Format">
- </argument>
- <argument index="5" name="type" type="int" enum="VisualServer.TextureType">
- </argument>
- <argument index="6" name="flags" type="int" default="7">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_bind">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="number" type="int">
- </argument>
- <description>
- Binds the texture to a texture slot.
- </description>
- </method>
- <method name="texture_create">
- <return type="RID">
- </return>
- <description>
- Creates an empty texture.
- </description>
- </method>
- <method name="texture_create_from_image">
+ <method name="texture_2d_create">
<return type="RID">
</return>
<argument index="0" name="image" type="Image">
</argument>
- <argument index="1" name="flags" type="int" default="7">
- </argument>
<description>
- Creates a texture, allocates the space for an image, and fills in the image.
</description>
</method>
- <method name="texture_debug_usage">
- <return type="Array">
- </return>
- <description>
- Returns a list of all the textures and their information.
- </description>
- </method>
- <method name="texture_get_data" qualifiers="const">
+ <method name="texture_2d_get" qualifiers="const">
<return type="Image">
</return>
<argument index="0" name="texture" type="RID">
</argument>
- <argument index="1" name="cube_side" type="int" default="0">
- </argument>
- <description>
- Returns a copy of a texture's image unless it's a CubeMap, in which case it returns the [RID] of the image at one of the cubes sides.
- </description>
- </method>
- <method name="texture_get_depth" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_flags" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- Returns the flags of a texture.
- </description>
- </method>
- <method name="texture_get_format" qualifiers="const">
- <return type="int" enum="Image.Format">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- Returns the format of the texture's image.
- </description>
- </method>
- <method name="texture_get_height" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- Returns the texture's height.
- </description>
- </method>
- <method name="texture_get_path" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- Returns the texture's path.
- </description>
- </method>
- <method name="texture_get_texid" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- Returns the opengl id of the texture's image.
- </description>
- </method>
- <method name="texture_get_type" qualifiers="const">
- <return type="int" enum="VisualServer.TextureType">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_width" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- Returns the texture's width.
- </description>
- </method>
- <method name="texture_set_data">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="image" type="Image">
- </argument>
- <argument index="2" name="layer" type="int" default="0">
- </argument>
- <description>
- Sets the texture's image data. If it's a CubeMap, it sets the image data at a cube side.
- </description>
- </method>
- <method name="texture_set_data_partial">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="image" type="Image">
- </argument>
- <argument index="2" name="src_x" type="int">
- </argument>
- <argument index="3" name="src_y" type="int">
- </argument>
- <argument index="4" name="src_w" type="int">
- </argument>
- <argument index="5" name="src_h" type="int">
- </argument>
- <argument index="6" name="dst_x" type="int">
- </argument>
- <argument index="7" name="dst_y" type="int">
- </argument>
- <argument index="8" name="dst_mip" type="int">
- </argument>
- <argument index="9" name="layer" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_set_flags">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="flags" type="int">
- </argument>
- <description>
- Sets the texture's flags. See [enum TextureFlags] for options.
- </description>
- </method>
- <method name="texture_set_path">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="path" type="String">
- </argument>
- <description>
- Sets the texture's path.
- </description>
- </method>
- <method name="texture_set_shrink_all_x2_on_set_data">
- <return type="void">
- </return>
- <argument index="0" name="shrink" type="bool">
- </argument>
- <description>
- If [code]true[/code], sets internal processes to shrink all image data to half the size.
- </description>
- </method>
- <method name="texture_set_size_override">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="width" type="int">
- </argument>
- <argument index="2" name="height" type="int">
- </argument>
- <argument index="3" name="depth" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="textures_keep_original">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
<description>
- If [code]true[/code], the image will be stored in the texture's images array if overwritten.
</description>
</method>
<method name="viewport_attach_camera">
@@ -3621,7 +2738,7 @@
<argument index="2" name="screen" type="int" default="0">
</argument>
<description>
- Copies viewport to a region of the screen specified by [code]rect[/code]. If Viewport.[member Viewport.render_direct_to_screen] is [code]true[/code], then 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 [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.
For example, you can set the root viewport to not render at all with the following code:
[codeblock]
func _ready():
@@ -3635,16 +2752,8 @@
<return type="RID">
</return>
<description>
- Creates an empty viewport.
- </description>
- </method>
- <method name="viewport_detach">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="RID">
- </argument>
- <description>
- Detaches the viewport from the screen.
+ Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/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="viewport_get_render_info">
@@ -3652,10 +2761,10 @@
</return>
<argument index="0" name="viewport" type="RID">
</argument>
- <argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo">
+ <argument index="1" name="info" type="int" enum="RenderingServer.ViewportRenderInfo">
</argument>
<description>
- Returns a viewport's render information. For options, see the [code]VIEWPORT_RENDER_INFO*[/code] constants.
+ Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants.
</description>
</method>
<method name="viewport_get_texture" qualifiers="const">
@@ -3723,7 +2832,7 @@
</return>
<argument index="0" name="viewport" type="RID">
</argument>
- <argument index="1" name="clear_mode" type="int" enum="VisualServer.ViewportClearMode">
+ <argument index="1" name="clear_mode" type="int" enum="RenderingServer.ViewportClearMode">
</argument>
<description>
Sets the clear mode of a viewport. See [enum ViewportClearMode] for options.
@@ -3734,23 +2843,12 @@
</return>
<argument index="0" name="viewport" type="RID">
</argument>
- <argument index="1" name="draw" type="int" enum="VisualServer.ViewportDebugDraw">
+ <argument index="1" name="draw" type="int" enum="RenderingServer.ViewportDebugDraw">
</argument>
<description>
Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options.
</description>
</method>
- <method name="viewport_set_disable_3d">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="RID">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- If [code]true[/code], a viewport's 3D rendering is disabled.
- </description>
- </method>
<method name="viewport_set_disable_environment">
<return type="void">
</return>
@@ -3773,17 +2871,6 @@
Sets the viewport's global transformation matrix.
</description>
</method>
- <method name="viewport_set_hdr">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="RID">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- If [code]true[/code], the viewport renders to hdr.
- </description>
- </method>
<method name="viewport_set_hide_canvas">
<return type="void">
</return>
@@ -3803,6 +2890,7 @@
<argument index="1" name="hidden" type="bool">
</argument>
<description>
+ Currently unimplemented in Godot 3.x.
</description>
</method>
<method name="viewport_set_msaa">
@@ -3810,7 +2898,7 @@
</return>
<argument index="0" name="viewport" type="RID">
</argument>
- <argument index="1" name="msaa" type="int" enum="VisualServer.ViewportMSAA">
+ <argument index="1" name="msaa" type="int" enum="RenderingServer.ViewportMSAA">
</argument>
<description>
Sets the anti-aliasing mode. See [enum ViewportMSAA] for options.
@@ -3903,53 +2991,33 @@
</return>
<argument index="0" name="viewport" type="RID">
</argument>
- <argument index="1" name="update_mode" type="int" enum="VisualServer.ViewportUpdateMode">
+ <argument index="1" name="update_mode" type="int" enum="RenderingServer.ViewportUpdateMode">
</argument>
<description>
Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options.
</description>
</method>
- <method name="viewport_set_usage">
+ <method name="viewport_set_use_xr">
<return type="void">
</return>
<argument index="0" name="viewport" type="RID">
</argument>
- <argument index="1" name="usage" type="int" enum="VisualServer.ViewportUsage">
+ <argument index="1" name="use_xr" type="bool">
</argument>
<description>
- Sets the viewport's 2D/3D mode. See [enum ViewportUsage] constants for options.
- </description>
- </method>
- <method name="viewport_set_use_arvr">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="RID">
- </argument>
- <argument index="1" name="use_arvr" type="bool">
- </argument>
- <description>
- If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface].
- </description>
- </method>
- <method name="viewport_set_vflip">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="RID">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- If [code]true[/code], the viewport's rendering is flipped vertically.
+ If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [XRInterface].
</description>
</method>
</methods>
<signals>
<signal name="frame_post_draw">
<description>
+ Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports.
</description>
</signal>
<signal name="frame_pre_draw">
<description>
+ Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports.
</description>
</signal>
</signals>
@@ -3958,6 +3026,7 @@
Marks an error that shows that the index array is empty.
</constant>
<constant name="ARRAY_WEIGHTS_SIZE" value="4">
+ Number of weights/bones per vertex.
</constant>
<constant name="CANVAS_ITEM_Z_MIN" value="-4096">
The minimum Z-layer for canvas items.
@@ -3966,65 +3035,28 @@
The maximum Z-layer for canvas items.
</constant>
<constant name="MAX_GLOW_LEVELS" value="7">
+ Max number of glow levels that can be used with glow post-process effect.
</constant>
<constant name="MAX_CURSORS" value="8">
+ Unused enum in Godot 3.x.
</constant>
- <constant name="MATERIAL_RENDER_PRIORITY_MIN" value="-128">
- The minimum renderpriority of all materials.
- </constant>
- <constant name="MATERIAL_RENDER_PRIORITY_MAX" value="127">
- The maximum renderpriority of all materials.
- </constant>
- <constant name="CUBEMAP_LEFT" value="0" enum="CubeMapSide">
- Marks the left side of a cubemap.
- </constant>
- <constant name="CUBEMAP_RIGHT" value="1" enum="CubeMapSide">
- Marks the right side of a cubemap.
- </constant>
- <constant name="CUBEMAP_BOTTOM" value="2" enum="CubeMapSide">
- Marks the bottom side of a cubemap.
- </constant>
- <constant name="CUBEMAP_TOP" value="3" enum="CubeMapSide">
- Marks the top side of a cubemap.
- </constant>
- <constant name="CUBEMAP_FRONT" value="4" enum="CubeMapSide">
- Marks the front side of a cubemap.
+ <constant name="TEXTURE_LAYERED_2D_ARRAY" value="0" enum="TextureLayeredType">
</constant>
- <constant name="CUBEMAP_BACK" value="5" enum="CubeMapSide">
- Marks the back side of a cubemap.
+ <constant name="TEXTURE_LAYERED_CUBEMAP" value="1" enum="TextureLayeredType">
</constant>
- <constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType">
+ <constant name="TEXTURE_LAYERED_CUBEMAP_ARRAY" value="2" enum="TextureLayeredType">
</constant>
- <constant name="TEXTURE_TYPE_CUBEMAP" value="1" enum="TextureType">
+ <constant name="CUBEMAP_LAYER_LEFT" value="0" enum="CubeMapLayer">
</constant>
- <constant name="TEXTURE_TYPE_2D_ARRAY" value="2" enum="TextureType">
+ <constant name="CUBEMAP_LAYER_RIGHT" value="1" enum="CubeMapLayer">
</constant>
- <constant name="TEXTURE_TYPE_3D" value="3" enum="TextureType">
+ <constant name="CUBEMAP_LAYER_BOTTOM" value="2" enum="CubeMapLayer">
</constant>
- <constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags">
- Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio.
+ <constant name="CUBEMAP_LAYER_TOP" value="3" enum="CubeMapLayer">
</constant>
- <constant name="TEXTURE_FLAG_REPEAT" value="2" enum="TextureFlags">
- Repeats the texture (instead of clamp to edge).
+ <constant name="CUBEMAP_LAYER_FRONT" value="4" enum="CubeMapLayer">
</constant>
- <constant name="TEXTURE_FLAG_FILTER" value="4" enum="TextureFlags">
- Uses a magnifying filter, to enable smooth zooming in of the texture.
- </constant>
- <constant name="TEXTURE_FLAG_ANISOTROPIC_FILTER" value="8" enum="TextureFlags">
- Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios.
- This results in better-looking textures when viewed from oblique angles.
- </constant>
- <constant name="TEXTURE_FLAG_CONVERT_TO_LINEAR" value="16" enum="TextureFlags">
- Converts the texture to the sRGB color space.
- </constant>
- <constant name="TEXTURE_FLAG_MIRRORED_REPEAT" value="32" enum="TextureFlags">
- Repeats the texture with alternate sections mirrored.
- </constant>
- <constant name="TEXTURE_FLAG_USED_FOR_STREAMING" value="2048" enum="TextureFlags">
- Texture is a video surface.
- </constant>
- <constant name="TEXTURE_FLAGS_DEFAULT" value="7" enum="TextureFlags">
- Default flags. [constant TEXTURE_FLAG_MIPMAPS], [constant TEXTURE_FLAG_REPEAT] and [constant TEXTURE_FLAG_FILTER] are enabled.
+ <constant name="CUBEMAP_LAYER_BACK" value="5" enum="CubeMapLayer">
</constant>
<constant name="SHADER_SPATIAL" value="0" enum="ShaderMode">
Shader is a 3D shader.
@@ -4035,9 +3067,18 @@
<constant name="SHADER_PARTICLES" value="2" enum="ShaderMode">
Shader is a particle shader.
</constant>
- <constant name="SHADER_MAX" value="3" enum="ShaderMode">
+ <constant name="SHADER_SKY" value="3" enum="ShaderMode">
+ Shader is a sky shader.
+ </constant>
+ <constant name="SHADER_MAX" value="4" enum="ShaderMode">
Represents the size of the [enum ShaderMode] enum.
</constant>
+ <constant name="MATERIAL_RENDER_PRIORITY_MIN" value="-128">
+ The minimum renderpriority of all materials.
+ </constant>
+ <constant name="MATERIAL_RENDER_PRIORITY_MAX" value="127">
+ The maximum renderpriority of all materials.
+ </constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
Array is a vertex array.
</constant>
@@ -4095,9 +3136,6 @@
<constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
Flag used to mark an index array.
</constant>
- <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat">
- Flag used to mark a compressed (half float) vertex array.
- </constant>
<constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
Flag used to mark a compressed (half float) normal array.
</constant>
@@ -4113,21 +3151,16 @@
<constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
</constant>
- <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat">
- </constant>
- <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat">
- Flag used to mark a compressed (half float) weight array.
- </constant>
<constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
+ Flag used to mark a compressed index array.
+ </constant>
+ <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat">
+ Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly.
</constant>
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
Flag used to mark that the array contains 2D vertices.
</constant>
- <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat">
- Flag used to mark that the array uses 16-bit bones instead of 8-bit.
- </constant>
- <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat">
- Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly.
+ <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="1048576" enum="ArrayFormat">
</constant>
<constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType">
Primitive to draw consists of points.
@@ -4138,24 +3171,26 @@
<constant name="PRIMITIVE_LINE_STRIP" value="2" enum="PrimitiveType">
Primitive to draw consists of a line strip from start to end.
</constant>
- <constant name="PRIMITIVE_LINE_LOOP" value="3" enum="PrimitiveType">
- Primitive to draw consists of a line loop (a line strip with a line between the last and the first vertex).
- </constant>
- <constant name="PRIMITIVE_TRIANGLES" value="4" enum="PrimitiveType">
+ <constant name="PRIMITIVE_TRIANGLES" value="3" enum="PrimitiveType">
Primitive to draw consists of triangles.
</constant>
- <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5" enum="PrimitiveType">
+ <constant name="PRIMITIVE_TRIANGLE_STRIP" value="4" enum="PrimitiveType">
Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle).
</constant>
- <constant name="PRIMITIVE_TRIANGLE_FAN" value="6" enum="PrimitiveType">
- Primitive to draw consists of a triangle strip (the last 2 vertices are always combined with the first to make a triangle).
- </constant>
- <constant name="PRIMITIVE_MAX" value="7" enum="PrimitiveType">
+ <constant name="PRIMITIVE_MAX" value="5" enum="PrimitiveType">
Represents the size of the [enum PrimitiveType] enum.
</constant>
<constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
+ Blend shapes are normalized.
</constant>
<constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
+ Blend shapes are relative to base weight.
+ </constant>
+ <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat">
+ Use [Transform2D] to store MultiMesh transform.
+ </constant>
+ <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat">
+ Use [Transform] to store MultiMesh transform.
</constant>
<constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType">
Is a directional (sun) light.
@@ -4169,66 +3204,117 @@
<constant name="LIGHT_PARAM_ENERGY" value="0" enum="LightParam">
The light's energy.
</constant>
+ <constant name="LIGHT_PARAM_INDIRECT_ENERGY" value="1" enum="LightParam">
+ </constant>
<constant name="LIGHT_PARAM_SPECULAR" value="2" enum="LightParam">
The light's influence on specularity.
</constant>
<constant name="LIGHT_PARAM_RANGE" value="3" enum="LightParam">
The light's range.
</constant>
- <constant name="LIGHT_PARAM_ATTENUATION" value="4" enum="LightParam">
+ <constant name="LIGHT_PARAM_SIZE" value="4" enum="LightParam">
+ The size of the light when using spot light or omni light. The angular size of the light when using directional light.
+ </constant>
+ <constant name="LIGHT_PARAM_ATTENUATION" value="5" enum="LightParam">
The light's attenuation.
</constant>
- <constant name="LIGHT_PARAM_SPOT_ANGLE" value="5" enum="LightParam">
+ <constant name="LIGHT_PARAM_SPOT_ANGLE" value="6" enum="LightParam">
The spotlight's angle.
</constant>
- <constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="6" enum="LightParam">
+ <constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="7" enum="LightParam">
The spotlight's attenuation.
</constant>
- <constant name="LIGHT_PARAM_CONTACT_SHADOW_SIZE" value="7" enum="LightParam">
- Scales the shadow color.
- </constant>
<constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="8" enum="LightParam">
+ Max distance that shadows will be rendered.
</constant>
<constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="LightParam">
+ Proportion of shadow atlas occupied by the first split.
</constant>
<constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="LightParam">
+ Proportion of shadow atlas occupied by the second split.
</constant>
<constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam">
+ Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="12" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_FADE_START" value="12" enum="LightParam">
+ Proportion of shadow max distance where the shadow will start to fade out.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_BIAS" value="13" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="13" enum="LightParam">
+ Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_BIAS" value="14" enum="LightParam">
+ Bias the shadow lookup to fix self-shadowing artifacts.
</constant>
- <constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam">
+ <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">
+ 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_TRANSMITTANCE_BIAS" value="17" enum="LightParam">
+ </constant>
+ <constant name="LIGHT_PARAM_MAX" value="18" enum="LightParam">
Represents the size of the [enum LightParam] enum.
</constant>
<constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode">
+ Use a dual paraboloid shadow map for omni lights.
</constant>
<constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode">
- </constant>
- <constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail">
- </constant>
- <constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail">
+ Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode">
+ Use orthogonal shadow projection for directional light.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS" value="1" enum="LightDirectionalShadowMode">
+ Use 2 splits for shadow projection when using directional light.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS" value="2" enum="LightDirectionalShadowMode">
+ Use 4 splits for shadow projection when using directional light.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE" value="0" enum="LightDirectionalShadowDepthRangeMode">
+ Keeps shadows stable as camera moves but has lower effective resolution.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode">
+ Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly.
+ </constant>
+ <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode">
+ Reflection probe will update reflections once and then stop.
+ </constant>
+ <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode">
+ Reflection probe will update each frame. This mode is necessary to capture moving objects.
+ </constant>
+ <constant name="DECAL_TEXTURE_ALBEDO" value="0" enum="DecalTexture">
+ </constant>
+ <constant name="DECAL_TEXTURE_NORMAL" value="1" enum="DecalTexture">
+ </constant>
+ <constant name="DECAL_TEXTURE_ORM" value="2" enum="DecalTexture">
+ </constant>
+ <constant name="DECAL_TEXTURE_EMISSION" value="3" enum="DecalTexture">
+ </constant>
+ <constant name="DECAL_TEXTURE_MAX" value="4" enum="DecalTexture">
+ </constant>
+ <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder">
+ Draw particles in the order that they appear in the particles array.
+ </constant>
+ <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder">
+ Sort particles based on their lifetime.
+ </constant>
+ <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder">
+ Sort particles based on their distance to the camera.
</constant>
<constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode">
+ Do not update the viewport.
</constant>
<constant name="VIEWPORT_UPDATE_ONCE" value="1" enum="ViewportUpdateMode">
+ Update the viewport once then set to disabled.
</constant>
<constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode">
+ Update the viewport whenever it is visible.
+ </constant>
+ <constant name="VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE" value="3" enum="ViewportUpdateMode">
</constant>
- <constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode">
+ <constant name="VIEWPORT_UPDATE_ALWAYS" value="4" enum="ViewportUpdateMode">
+ Always update the viewport.
</constant>
<constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode">
The viewport is always cleared before drawing.
@@ -4243,46 +3329,42 @@
Multisample antialiasing is disabled.
</constant>
<constant name="VIEWPORT_MSAA_2X" value="1" enum="ViewportMSAA">
- Multisample antialiasing is set to 2×.
+ Multisample antialiasing uses 2 samples per pixel.
</constant>
<constant name="VIEWPORT_MSAA_4X" value="2" enum="ViewportMSAA">
- Multisample antialiasing is set to 4×.
+ Multisample antialiasing uses 4 samples per pixel.
</constant>
<constant name="VIEWPORT_MSAA_8X" value="3" enum="ViewportMSAA">
- Multisample antialiasing is set to 8×.
+ Multisample antialiasing uses 8 samples per pixel.
</constant>
<constant name="VIEWPORT_MSAA_16X" value="4" enum="ViewportMSAA">
- Multisample antialiasing is set to 16×.
- </constant>
- <constant name="VIEWPORT_MSAA_EXT_2X" value="5" enum="ViewportMSAA">
- Multisample antialiasing is set to 2× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go).
- </constant>
- <constant name="VIEWPORT_MSAA_EXT_4X" value="6" enum="ViewportMSAA">
- Multisample antialiasing is set to 4× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go).
+ Multisample antialiasing uses 16 samples per pixel.
</constant>
- <constant name="VIEWPORT_USAGE_2D" value="0" enum="ViewportUsage">
- The Viewport does not render 3D but samples.
+ <constant name="VIEWPORT_MSAA_MAX" value="5" enum="ViewportMSAA">
</constant>
- <constant name="VIEWPORT_USAGE_2D_NO_SAMPLING" value="1" enum="ViewportUsage">
- The Viewport does not render 3D and does not sample.
+ <constant name="VIEWPORT_SCREEN_SPACE_AA_DISABLED" value="0" enum="ViewportScreenSpaceAA">
</constant>
- <constant name="VIEWPORT_USAGE_3D" value="2" enum="ViewportUsage">
- The Viewport renders 3D with effects.
+ <constant name="VIEWPORT_SCREEN_SPACE_AA_FXAA" value="1" enum="ViewportScreenSpaceAA">
</constant>
- <constant name="VIEWPORT_USAGE_3D_NO_EFFECTS" value="3" enum="ViewportUsage">
- The Viewport renders 3D but without effects.
+ <constant name="VIEWPORT_SCREEN_SPACE_AA_MAX" value="2" enum="ViewportScreenSpaceAA">
</constant>
<constant name="VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="ViewportRenderInfo">
+ Number of objects drawn in a single frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="ViewportRenderInfo">
+ Number of vertices drawn in a single frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="ViewportRenderInfo">
+ Number of material changes during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="ViewportRenderInfo">
+ Number of shader changes during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="ViewportRenderInfo">
+ Number of surface changes during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="ViewportRenderInfo">
+ Number of draw calls during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_MAX" value="6" enum="ViewportRenderInfo">
Represents the size of the [enum ViewportRenderInfo] enum.
@@ -4291,21 +3373,208 @@
Debug draw is disabled. Default setting.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_UNSHADED" value="1" enum="ViewportDebugDraw">
- Debug draw sets objects to unshaded.
+ Objects are displayed without light information.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="2" enum="ViewportDebugDraw">
- Overwrites clear color to [code](0,0,0,0)[/code].
+ <constant name="VIEWPORT_DEBUG_DRAW_LIGHTING" value="2" enum="ViewportDebugDraw">
+ Objects are displayed with only light information.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="3" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="3" enum="ViewportDebugDraw">
+ Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others.
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="4" enum="ViewportDebugDraw">
Debug draw draws objects in wireframe.
</constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="ViewportDebugDraw">
+ Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="ViewportDebugDraw">
+ Objects are displayed with only the albedo value from [GIProbe]s.
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="ViewportDebugDraw">
+ Objects are displayed with only the lighting value from [GIProbe]s.
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="ViewportDebugDraw">
+ Objects are displayed with only the emission color from [GIProbe]s.
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="ViewportDebugDraw">
+ Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS" value="10" enum="ViewportDebugDraw">
+ Draws the shadow atlas that stores shadows from [DirectionalLight3D]s in the upper left quadrant of the [Viewport].
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE" value="11" enum="ViewportDebugDraw">
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_SSAO" value="12" enum="ViewportDebugDraw">
+ Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_ROUGHNESS_LIMITER" value="13" enum="ViewportDebugDraw">
+ Draws the roughness limiter post process over the Viewport so you can see where it has an effect. It must be enabled in [member ProjectSettings.rendering/quality/screen_filters/screen_space_roughness_limiter] to work.
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="14" enum="ViewportDebugDraw">
+ Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow.
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="15" enum="ViewportDebugDraw">
+ </constant>
+ <constant name="SKY_MODE_QUALITY" value="0" enum="SkyMode">
+ Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples].
+ </constant>
+ <constant name="SKY_MODE_REALTIME" value="1" enum="SkyMode">
+ Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times.
+ [b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member Sky.radiance_size] must be set to [constant Sky.RADIANCE_SIZE_256].
+ </constant>
+ <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG">
+ Use the clear color as background.
+ </constant>
+ <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG">
+ Use a specified color as the background.
+ </constant>
+ <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG">
+ Use a sky resource for the background.
+ </constant>
+ <constant name="ENV_BG_CANVAS" value="3" enum="EnvironmentBG">
+ Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world.
+ </constant>
+ <constant name="ENV_BG_KEEP" value="4" enum="EnvironmentBG">
+ Do not clear the background, use whatever was rendered last frame as the background.
+ </constant>
+ <constant name="ENV_BG_CAMERA_FEED" value="5" enum="EnvironmentBG">
+ Displays a camera feed in the background.
+ </constant>
+ <constant name="ENV_BG_MAX" value="6" enum="EnvironmentBG">
+ Represents the size of the [enum EnvironmentBG] enum.
+ </constant>
+ <constant name="ENV_AMBIENT_SOURCE_BG" value="0" enum="EnvironmentAmbientSource">
+ Gather ambient light from whichever source is specified as the background.
+ </constant>
+ <constant name="ENV_AMBIENT_SOURCE_DISABLED" value="1" enum="EnvironmentAmbientSource">
+ Disable ambient light.
+ </constant>
+ <constant name="ENV_AMBIENT_SOURCE_COLOR" value="2" enum="EnvironmentAmbientSource">
+ Specify a specific [Color] for ambient light.
+ </constant>
+ <constant name="ENV_AMBIENT_SOURCE_SKY" value="3" enum="EnvironmentAmbientSource">
+ Gather ambient light from the [Sky] regardless of what the background is.
+ </constant>
+ <constant name="ENV_REFLECTION_SOURCE_BG" value="0" enum="EnvironmentReflectionSource">
+ Use the background for reflections.
+ </constant>
+ <constant name="ENV_REFLECTION_SOURCE_DISABLED" value="1" enum="EnvironmentReflectionSource">
+ Disable reflections.
+ </constant>
+ <constant name="ENV_REFLECTION_SOURCE_SKY" value="2" enum="EnvironmentReflectionSource">
+ Use the [Sky] for reflections regardless of what the background is.
+ </constant>
+ <constant name="ENV_GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode">
+ Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
+ </constant>
+ <constant name="ENV_GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode">
+ Screen glow blending mode. Increases brightness, used frequently with bloom.
+ </constant>
+ <constant name="ENV_GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode">
+ Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
+ </constant>
+ <constant name="ENV_GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode">
+ Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
+ </constant>
+ <constant name="ENV_GLOW_BLEND_MODE_MIX" value="4" enum="EnvironmentGlowBlendMode">
+ 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.
+ </constant>
+ <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper">
+ Use the Reinhard tonemapper.
+ </constant>
+ <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper">
+ Use the filmic tonemapper.
+ </constant>
+ <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper">
+ Use the ACES tonemapper.
+ </constant>
+ <constant name="ENV_SSR_ROUGNESS_QUALITY_DISABLED" value="0" enum="EnvironmentSSRRoughnessQuality">
+ </constant>
+ <constant name="ENV_SSR_ROUGNESS_QUALITY_LOW" value="1" enum="EnvironmentSSRRoughnessQuality">
+ </constant>
+ <constant name="ENV_SSR_ROUGNESS_QUALITY_MEDIUM" value="2" enum="EnvironmentSSRRoughnessQuality">
+ </constant>
+ <constant name="ENV_SSR_ROUGNESS_QUALITY_HIGH" value="3" enum="EnvironmentSSRRoughnessQuality">
+ </constant>
+ <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur">
+ Disables the blur set for SSAO. Will make SSAO look noisier.
+ </constant>
+ <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur">
+ Perform a 1x1 blur on the SSAO output.
+ </constant>
+ <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur">
+ Performs a 2x2 blur on the SSAO output.
+ </constant>
+ <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur">
+ Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO.
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality">
+ Lowest quality of screen space ambient occlusion.
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality">
+ Medium quality screen space ambient occlusion.
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality">
+ High quality screen space ambient occlusion.
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_ULTRA" value="3" enum="EnvironmentSSAOQuality">
+ Highest quality screen space ambient occlusion.
+ </constant>
+ <constant name="SUB_SURFACE_SCATTERING_QUALITY_DISABLED" value="0" enum="SubSurfaceScatteringQuality">
+ </constant>
+ <constant name="SUB_SURFACE_SCATTERING_QUALITY_LOW" value="1" enum="SubSurfaceScatteringQuality">
+ </constant>
+ <constant name="SUB_SURFACE_SCATTERING_QUALITY_MEDIUM" value="2" enum="SubSurfaceScatteringQuality">
+ </constant>
+ <constant name="SUB_SURFACE_SCATTERING_QUALITY_HIGH" value="3" enum="SubSurfaceScatteringQuality">
+ </constant>
+ <constant name="DOF_BLUR_QUALITY_VERY_LOW" value="0" enum="DOFBlurQuality">
+ Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts.
+ </constant>
+ <constant name="DOF_BLUR_QUALITY_LOW" value="1" enum="DOFBlurQuality">
+ Low quality DOF blur.
+ </constant>
+ <constant name="DOF_BLUR_QUALITY_MEDIUM" value="2" enum="DOFBlurQuality">
+ Medium quality DOF blur.
+ </constant>
+ <constant name="DOF_BLUR_QUALITY_HIGH" value="3" enum="DOFBlurQuality">
+ Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower.
+ </constant>
+ <constant name="DOF_BOKEH_BOX" value="0" enum="DOFBokehShape">
+ Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern.
+ </constant>
+ <constant name="DOF_BOKEH_HEXAGON" value="1" enum="DOFBokehShape">
+ Calculates DOF blur using a hexagon shaped filter.
+ </constant>
+ <constant name="DOF_BOKEH_CIRCLE" value="2" enum="DOFBokehShape">
+ Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes).
+ </constant>
+ <constant name="SHADOW_QUALITY_HARD" value="0" enum="ShadowQuality">
+ </constant>
+ <constant name="SHADOW_QUALITY_SOFT_LOW" value="1" enum="ShadowQuality">
+ </constant>
+ <constant name="SHADOW_QUALITY_SOFT_MEDIUM" value="2" enum="ShadowQuality">
+ </constant>
+ <constant name="SHADOW_QUALITY_SOFT_HIGH" value="3" enum="ShadowQuality">
+ </constant>
+ <constant name="SHADOW_QUALITY_SOFT_ULTRA" value="4" enum="ShadowQuality">
+ </constant>
+ <constant name="SHADOW_QUALITY_MAX" value="5" enum="ShadowQuality">
+ </constant>
<constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode">
+ Do not use a debug mode.
</constant>
<constant name="SCENARIO_DEBUG_WIREFRAME" value="1" enum="ScenarioDebugMode">
+ Draw all objects as wireframe models.
</constant>
<constant name="SCENARIO_DEBUG_OVERDRAW" value="2" enum="ScenarioDebugMode">
+ Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw.
</constant>
<constant name="SCENARIO_DEBUG_SHADELESS" value="3" enum="ScenarioDebugMode">
+ Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code].
</constant>
<constant name="INSTANCE_NONE" value="0" enum="InstanceType">
The instance does not have a type.
@@ -4326,31 +3595,46 @@
The instance is a light.
</constant>
<constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType">
+ The instance is a reflection probe.
+ </constant>
+ <constant name="INSTANCE_DECAL" value="7" enum="InstanceType">
+ The instance is a decal.
</constant>
- <constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType">
+ <constant name="INSTANCE_GI_PROBE" value="8" enum="InstanceType">
+ The instance is a GI probe.
</constant>
- <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType">
+ <constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType">
+ The instance is a lightmap.
</constant>
- <constant name="INSTANCE_MAX" value="9" enum="InstanceType">
+ <constant name="INSTANCE_MAX" value="10" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.
</constant>
<constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">
A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).
</constant>
<constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags">
+ Allows the instance to be used in baked lighting.
</constant>
- <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="InstanceFlags">
+ <constant name="INSTANCE_FLAG_USE_DYNAMIC_GI" value="1" enum="InstanceFlags">
+ Allows the instance to be used with dynamic global illumination.
</constant>
- <constant name="INSTANCE_FLAG_MAX" value="2" enum="InstanceFlags">
+ <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="InstanceFlags">
+ When set, manually requests to draw geometry on next frame.
+ </constant>
+ <constant name="INSTANCE_FLAG_MAX" value="3" enum="InstanceFlags">
Represents the size of the [enum InstanceFlags] enum.
</constant>
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
+ Disable shadows from this instance.
</constant>
<constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
+ Cast shadows from this instance.
</constant>
<constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting">
+ Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows.
</constant>
<constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting">
+ Only render the shadows from the object. The object itself will not be drawn.
</constant>
<constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode">
The nine patch gets stretched where needed.
@@ -4361,6 +3645,45 @@
<constant name="NINE_PATCH_TILE_FIT" value="2" enum="NinePatchAxisMode">
The nine patch gets filled with tiles where needed and stretches them a bit if needed.
</constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_DEFAULT" value="0" enum="CanvasItemTextureFilter">
+ Uses the default filter mode for this [Viewport].
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="1" enum="CanvasItemTextureFilter">
+ The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="2" enum="CanvasItemTextureFilter">
+ The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="CanvasItemTextureFilter">
+ The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="CanvasItemTextureFilter">
+ The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="CanvasItemTextureFilter">
+ 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.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="CanvasItemTextureFilter">
+ 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.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_MAX" value="7" enum="CanvasItemTextureFilter">
+ Max value for [enum CanvasItemTextureFilter] enum.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT" value="0" enum="CanvasItemTextureRepeat">
+ Uses the default repeat mode for this [Viewport].
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_REPEAT_DISABLED" value="1" enum="CanvasItemTextureRepeat">
+ Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_REPEAT_ENABLED" value="2" enum="CanvasItemTextureRepeat">
+ Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_REPEAT_MIRROR" value="3" enum="CanvasItemTextureRepeat">
+ Flip the texture when repeating so that the edge lines up instead of abruptly changing.
+ </constant>
+ <constant name="CANVAS_ITEM_TEXTURE_REPEAT_MAX" value="4" enum="CanvasItemTextureRepeat">
+ Max value for [enum CanvasItemTextureRepeat] enum.
+ </constant>
<constant name="CANVAS_LIGHT_MODE_ADD" value="0" enum="CanvasLightMode">
Adds light color additive to the canvas.
</constant>
@@ -4374,16 +3697,16 @@
The light adds color depending on mask.
</constant>
<constant name="CANVAS_LIGHT_FILTER_NONE" value="0" enum="CanvasLightShadowFilter">
+ Do not apply a filter to canvas light shadows.
</constant>
- <constant name="CANVAS_LIGHT_FILTER_PCF3" value="1" enum="CanvasLightShadowFilter">
- </constant>
- <constant name="CANVAS_LIGHT_FILTER_PCF5" value="2" enum="CanvasLightShadowFilter">
+ <constant name="CANVAS_LIGHT_FILTER_PCF5" value="1" enum="CanvasLightShadowFilter">
+ Use PCF5 filtering to filter canvas light shadows.
</constant>
- <constant name="CANVAS_LIGHT_FILTER_PCF7" value="3" enum="CanvasLightShadowFilter">
+ <constant name="CANVAS_LIGHT_FILTER_PCF13" value="2" enum="CanvasLightShadowFilter">
+ Use PCF13 filtering to filter canvas light shadows.
</constant>
- <constant name="CANVAS_LIGHT_FILTER_PCF9" value="4" enum="CanvasLightShadowFilter">
- </constant>
- <constant name="CANVAS_LIGHT_FILTER_PCF13" value="5" enum="CanvasLightShadowFilter">
+ <constant name="CANVAS_LIGHT_FILTER_MAX" value="3" enum="CanvasLightShadowFilter">
+ Max value of the [enum CanvasLightShadowFilter] enum.
</constant>
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_DISABLED" value="0" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is disabled.
@@ -4394,116 +3717,99 @@
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE" value="2" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is counterclockwise.
</constant>
- <constant name="INFO_OBJECTS_IN_FRAME" value="0" enum="RenderInfo">
- The amount of objects in the frame.
+ <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalVariableType">
</constant>
- <constant name="INFO_VERTICES_IN_FRAME" value="1" enum="RenderInfo">
- The amount of vertices in the frame.
+ <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalVariableType">
</constant>
- <constant name="INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="RenderInfo">
- The amount of modified materials in the frame.
+ <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalVariableType">
</constant>
- <constant name="INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="RenderInfo">
- The amount of shader rebinds in the frame.
+ <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalVariableType">
</constant>
- <constant name="INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="RenderInfo">
- The amount of surface changes in the frame.
+ <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalVariableType">
</constant>
- <constant name="INFO_DRAW_CALLS_IN_FRAME" value="5" enum="RenderInfo">
- The amount of draw calls in frame.
+ <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalVariableType">
</constant>
- <constant name="INFO_USAGE_VIDEO_MEM_TOTAL" value="6" enum="RenderInfo">
- Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0.
+ <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalVariableType">
</constant>
- <constant name="INFO_VIDEO_MEM_USED" value="7" enum="RenderInfo">
- The amount of video memory used, i.e. texture and vertex memory combined.
+ <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalVariableType">
</constant>
- <constant name="INFO_TEXTURE_MEM_USED" value="8" enum="RenderInfo">
- The amount of texture memory used.
+ <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalVariableType">
</constant>
- <constant name="INFO_VERTEX_MEM_USED" value="9" enum="RenderInfo">
- The amount of vertex memory used.
+ <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalVariableType">
</constant>
- <constant name="FEATURE_SHADERS" value="0" enum="Features">
+ <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalVariableType">
</constant>
- <constant name="FEATURE_MULTITHREADED" value="1" enum="Features">
+ <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalVariableType">
</constant>
- <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat">
- </constant>
- <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat">
- </constant>
- <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat">
- </constant>
- <constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat">
+ <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalVariableType">
</constant>
- <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat">
+ <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalVariableType">
</constant>
- <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat">
+ <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalVariableType">
</constant>
- <constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat">
+ <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalVariableType">
</constant>
- <constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat">
- </constant>
- <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode">
- </constant>
- <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode">
- </constant>
- <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder">
- </constant>
- <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder">
- </constant>
- <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder">
- </constant>
- <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG">
+ <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalVariableType">
</constant>
- <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG">
+ <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalVariableType">
</constant>
- <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG">
+ <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalVariableType">
</constant>
- <constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG">
+ <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalVariableType">
</constant>
- <constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG">
+ <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalVariableType">
</constant>
- <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG">
+ <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalVariableType">
</constant>
- <constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG">
- Represents the size of the [enum EnvironmentBG] enum.
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalVariableType">
</constant>
- <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalVariableType">
</constant>
- <constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalVariableType">
</constant>
- <constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalVariableType">
</constant>
- <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalVariableType">
</constant>
- <constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalVariableType">
</constant>
- <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode">
+ <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalVariableType">
</constant>
- <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode">
+ <constant name="INFO_OBJECTS_IN_FRAME" value="0" enum="RenderInfo">
+ The amount of objects in the frame.
</constant>
- <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper">
+ <constant name="INFO_VERTICES_IN_FRAME" value="1" enum="RenderInfo">
+ The amount of vertices in the frame.
</constant>
- <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper">
+ <constant name="INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="RenderInfo">
+ The amount of modified materials in the frame.
</constant>
- <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper">
+ <constant name="INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="RenderInfo">
+ The amount of shader rebinds in the frame.
</constant>
- <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper">
+ <constant name="INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="RenderInfo">
+ The amount of surface changes in the frame.
</constant>
- <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality">
+ <constant name="INFO_DRAW_CALLS_IN_FRAME" value="5" enum="RenderInfo">
+ The amount of draw calls in frame.
</constant>
- <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality">
+ <constant name="INFO_USAGE_VIDEO_MEM_TOTAL" value="6" enum="RenderInfo">
+ Unimplemented in the GLES2 rendering backend, always returns 0.
</constant>
- <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality">
+ <constant name="INFO_VIDEO_MEM_USED" value="7" enum="RenderInfo">
+ The amount of video memory used, i.e. texture and vertex memory combined.
</constant>
- <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur">
+ <constant name="INFO_TEXTURE_MEM_USED" value="8" enum="RenderInfo">
+ The amount of texture memory used.
</constant>
- <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur">
+ <constant name="INFO_VERTEX_MEM_USED" value="9" enum="RenderInfo">
+ The amount of vertex memory used.
</constant>
- <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur">
+ <constant name="FEATURE_SHADERS" value="0" enum="Features">
+ Hardware supports shaders. This enum is currently unused in Godot 3.x.
</constant>
- <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur">
+ <constant name="FEATURE_MULTITHREADED" value="1" enum="Features">
+ Hardware supports multithreading. This enum is currently unused in Godot 3.x.
</constant>
</constants>
</class>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index a50f5c97d1..5bc34772c8 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Resource" inherits="Reference" category="Core" version="3.2">
+<class name="Resource" inherits="Reference" version="4.0">
<brief_description>
Base class for all resources.
</brief_description>
@@ -37,7 +37,7 @@
<return type="RID">
</return>
<description>
- Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.
+ Returns the RID of the resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.
</description>
</method>
<method name="setup_local_to_scene">
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index ce37691e0a..ad0c438f98 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoader" inherits="Reference" category="Core" version="3.2">
+<class name="ResourceFormatLoader" inherits="Reference" version="4.0">
<brief_description>
Loads a specific resource type from a file.
</brief_description>
<description>
Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine.
Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver].
- [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card.
+ [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card.
</description>
<tutorials>
</tutorials>
@@ -24,7 +24,7 @@
</description>
</method>
<method name="get_recognized_extensions" qualifiers="virtual">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Gets the list of extensions for files this loader is able to read.
@@ -43,7 +43,7 @@
<method name="handles_type" qualifiers="virtual">
<return type="bool">
</return>
- <argument index="0" name="typename" type="String">
+ <argument index="0" name="typename" type="StringName">
</argument>
<description>
Tells which resource class this loader can load.
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index 5ad5ab49b1..69f8b43898 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaver" inherits="Reference" category="Core" version="3.2">
+<class name="ResourceFormatSaver" inherits="Reference" version="4.0">
<brief_description>
Saves a specific resource type to a file.
</brief_description>
@@ -11,7 +11,7 @@
</tutorials>
<methods>
<method name="get_recognized_extensions" qualifiers="virtual">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="resource" type="Resource">
</argument>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index e0c0aa9a47..0475d2c94d 100644
--- a/doc/classes/ResourceImporter.xml
+++ b/doc/classes/ResourceImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporter" inherits="Reference" category="Core" version="3.2">
+<class name="ResourceImporter" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml
deleted file mode 100644
index df552d3656..0000000000
--- a/doc/classes/ResourceInteractiveLoader.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.2">
- <brief_description>
- Interactive [Resource] loader.
- </brief_description>
- <description>
- Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="get_resource">
- <return type="Resource">
- </return>
- <description>
- Returns the loaded resource if the load operation completed successfully, [code]null[/code] otherwise.
- </description>
- </method>
- <method name="get_stage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the load stage. The total amount of stages can be queried with [method get_stage_count].
- </description>
- </method>
- <method name="get_stage_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the total amount of stages (calls to [method poll]) needed to completely load this resource.
- </description>
- </method>
- <method name="poll">
- <return type="int" enum="Error">
- </return>
- <description>
- Polls the loading operation, i.e. loads a data chunk up to the next stage.
- Returns [constant OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [method poll] will have to be called again until the last stage is completed.
- Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
- Returns another [enum Error] code if the poll has failed.
- </description>
- </method>
- <method name="wait">
- <return type="int" enum="Error">
- </return>
- <description>
- Polls the loading operation successively until the resource is completely loaded or a [method poll] fails.
- Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
- Returns another [enum Error] code if a poll has failed, aborting the operation.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 31bba18171..1cf775f389 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceLoader" inherits="Object" category="Core" version="3.2">
+<class name="ResourceLoader" inherits="Object" version="4.0">
<brief_description>
Singleton used to load resource files.
</brief_description>
@@ -24,7 +24,7 @@
</description>
</method>
<method name="get_dependencies">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -33,7 +33,7 @@
</description>
</method>
<method name="get_recognized_extensions_for_type">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
@@ -41,15 +41,6 @@
Returns the list of recognized extensions for a resource type.
</description>
</method>
- <method name="has">
- <return type="bool">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- [i]Deprecated method.[/i] Use [method has_cached] or [method exists] instead.
- </description>
- </method>
<method name="has_cached">
<return type="bool">
</return>
@@ -57,7 +48,7 @@
</argument>
<description>
Returns whether a cached resource is available for the given [code]path[/code].
- Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] or [method load_interactive] methods 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.
+ 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">
@@ -77,16 +68,39 @@
Returns an empty resource if no ResourceFormatLoader could handle the file.
</description>
</method>
- <method name="load_interactive">
- <return type="ResourceInteractiveLoader">
+ <method name="load_threaded_get">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="load_threaded_get_status">
+ <return type="int" enum="ResourceLoader.ThreadLoadStatus">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="progress" type="Array" default="[ ]">
+ </argument>
+ <description>
+ Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [code]path[/code]. See [enum ThreadLoadStatus] for possible return values.
+ 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.
+ </description>
+ </method>
+ <method name="load_threaded_request">
+ <return type="int" enum="Error">
</return>
<argument index="0" name="path" type="String">
</argument>
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
+ <argument index="2" name="use_sub_threads" type="bool" default="false">
+ </argument>
<description>
- Starts loading a resource interactively. The returned [ResourceInteractiveLoader] object allows to load with high granularity, calling its [method ResourceInteractiveLoader.poll] method successively to load chunks.
- An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
+ 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).
</description>
</method>
<method name="set_abort_on_missing_resources">
@@ -100,5 +114,17 @@
</method>
</methods>
<constants>
+ <constant name="THREAD_LOAD_INVALID_RESOURCE" value="0" enum="ThreadLoadStatus">
+ The resource is invalid, or has not been loaded with [method load_threaded_request].
+ </constant>
+ <constant name="THREAD_LOAD_IN_PROGRESS" value="1" enum="ThreadLoadStatus">
+ The resource is still being loaded.
+ </constant>
+ <constant name="THREAD_LOAD_FAILED" value="2" enum="ThreadLoadStatus">
+ Some error occurred during loading and it failed.
+ </constant>
+ <constant name="THREAD_LOAD_LOADED" value="3" enum="ThreadLoadStatus">
+ The resource was loaded successfully and can be accessed via [method load_threaded_get].
+ </constant>
</constants>
</class>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 2b00c038e1..3159a4c424 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourcePreloader" inherits="Node" category="Core" version="3.2">
+<class name="ResourcePreloader" inherits="Node" version="4.0">
<brief_description>
Resource Preloader Node.
</brief_description>
@@ -13,7 +13,7 @@
<method name="add_resource">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="resource" type="Resource">
</argument>
@@ -24,14 +24,14 @@
<method name="get_resource" qualifiers="const">
<return type="Resource">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the resource associated to [code]name[/code].
</description>
</method>
<method name="get_resource_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the list of resources inside the preloader.
@@ -40,7 +40,7 @@
<method name="has_resource" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code].
@@ -49,7 +49,7 @@
<method name="remove_resource">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Removes the resource associated to [code]name[/code] from the preloader.
@@ -58,9 +58,9 @@
<method name="rename_resource">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="newname" type="String">
+ <argument index="1" name="newname" type="StringName">
</argument>
<description>
Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index f12d26d4b9..ecde5754f9 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceSaver" inherits="Object" category="Core" version="3.2">
+<class name="ResourceSaver" inherits="Object" version="4.0">
<brief_description>
Singleton for saving Godot-specific resource types.
</brief_description>
@@ -11,7 +11,7 @@
</tutorials>
<methods>
<method name="get_recognized_extensions">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="Resource">
</argument>
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 5c3ffd9cff..34431c5153 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -1,10 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RichTextEffect" inherits="Resource" category="Core" version="3.2">
+<class name="RichTextEffect" inherits="Resource" version="4.0">
<brief_description>
+ A custom effect for use with [RichTextLabel].
</brief_description>
<description>
+ A custom effect for use with [RichTextLabel].
+ [b]Note:[/b] For a [RichTextEffect] to be usable, a BBCode tag must be defined as a member variable called [code]bbcode[/code] in the script.
+ [codeblock]
+ # The RichTextEffect will be usable like this: `[example]Some text[/example]`
+ var bbcode = "example"
+ [/codeblock]
+ [b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>
+ <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
<method name="_process_custom_fx" qualifiers="virtual">
@@ -13,6 +23,7 @@
<argument index="0" name="char_fx" type="CharFXTransform">
</argument>
<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.
</description>
</method>
</methods>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 2962391b99..efc0c9d600 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RichTextLabel" inherits="Control" category="Core" version="3.2">
+<class name="RichTextLabel" inherits="Control" version="4.0">
<brief_description>
Label that displays rich text.
</brief_description>
@@ -14,7 +14,7 @@
<method name="add_image">
<return type="void">
</return>
- <argument index="0" name="image" type="Texture">
+ <argument index="0" name="image" type="Texture2D">
</argument>
<argument index="1" name="width" type="int" default="0">
</argument>
@@ -91,6 +91,7 @@
<argument index="0" name="effect" type="Variant">
</argument>
<description>
+ Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect].
</description>
</method>
<method name="newline">
@@ -112,9 +113,10 @@
<method name="parse_expressions_for_values">
<return type="Dictionary">
</return>
- <argument index="0" name="expressions" type="PoolStringArray">
+ <argument index="0" name="expressions" type="PackedStringArray">
</argument>
<description>
+ Parses BBCode parameter [code]expressions[/code] into a dictionary.
</description>
</method>
<method name="pop">
@@ -137,12 +139,14 @@
<return type="void">
</return>
<description>
+ Adds a [code][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code][b][/code] tag if not currently in a [code][i][/code] tag.
</description>
</method>
<method name="push_bold_italics">
<return type="void">
</return>
<description>
+ Adds a [code][font][/code] tag with a bold italics font to the tag stack.
</description>
</method>
<method name="push_cell">
@@ -176,13 +180,14 @@
<argument index="0" name="level" type="int">
</argument>
<description>
- Adds an [code][indent][/code] tag to the tag stack. Multiplies "level" by current tab_size to determine new margin length.
+ Adds an [code][indent][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
</description>
</method>
<method name="push_italics">
<return type="void">
</return>
<description>
+ Adds a [code][font][/code] tag with a italics font to the tag stack. This is the same as adding a [code][i][/code] tag if not currently in a [code][b][/code] tag.
</description>
</method>
<method name="push_list">
@@ -207,12 +212,14 @@
<return type="void">
</return>
<description>
+ Adds a [code][font][/code] tag with a monospace font to the tag stack.
</description>
</method>
<method name="push_normal">
<return type="void">
</return>
<description>
+ Adds a [code][font][/code] tag with a normal font to the tag stack.
</description>
</method>
<method name="push_strikethrough">
@@ -245,6 +252,7 @@
</argument>
<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].
</description>
</method>
<method name="scroll_to_line">
@@ -278,8 +286,11 @@
</member>
<member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default="&quot;&quot;">
The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
+ [b]Note:[/b] It is unadvised to use [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead.
</member>
<member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]">
+ The currently installed custom effects. This is an array of [RichTextEffect]s.
+ To add a custom effect, it's more convenient to use [method install_effect].
</member>
<member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true">
If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code].
@@ -288,11 +299,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 text's visibility, as a [float] between 0.0 and 1.0.
+ The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.
+ [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true">
- If [code]true[/code], the scrollbar is visible. Does not block scrolling completely. See [method scroll_to_line].
+ If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line].
</member>
<member name="scroll_following" type="bool" setter="set_scroll_follow" getter="is_scroll_following" default="false">
If [code]true[/code], the window scrolls down to display new content automatically.
@@ -313,21 +325,21 @@
</members>
<signals>
<signal name="meta_clicked">
- <argument index="0" name="meta" type="Nil">
+ <argument index="0" name="meta" type="Variant">
</argument>
<description>
- Triggered when the user clicks on content between [code][url][/code] 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.
+ 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="Nil">
+ <argument index="0" name="meta" type="Variant">
</argument>
<description>
Triggers when the mouse exits a meta tag.
</description>
</signal>
<signal name="meta_hover_started">
- <argument index="0" name="meta" type="Nil">
+ <argument index="0" name="meta" type="Variant">
</argument>
<description>
Triggers when the mouse enters a meta tag.
@@ -336,18 +348,25 @@
</signals>
<constants>
<constant name="ALIGN_LEFT" value="0" enum="Align">
+ Makes text left aligned.
</constant>
<constant name="ALIGN_CENTER" value="1" enum="Align">
+ Makes text centered.
</constant>
<constant name="ALIGN_RIGHT" value="2" enum="Align">
+ Makes text right aligned.
</constant>
<constant name="ALIGN_FILL" value="3" enum="Align">
+ Makes text fill width.
</constant>
<constant name="LIST_NUMBERS" value="0" enum="ListType">
+ Each list item has a number marker.
</constant>
<constant name="LIST_LETTERS" value="1" enum="ListType">
+ Each list item has a letter marker.
</constant>
<constant name="LIST_DOTS" value="2" enum="ListType">
+ Each list item has a filled circle marker.
</constant>
<constant name="ITEM_FRAME" value="0" enum="ItemType">
</constant>
@@ -390,38 +409,55 @@
</constants>
<theme_items>
<theme_item name="bold_font" type="Font">
+ The font used for bold text.
</theme_item>
<theme_item name="bold_italics_font" type="Font">
+ The font used for bold italics text.
</theme_item>
<theme_item name="default_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The default text color.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ The background The background used when the [RichTextLabel] is focused.
</theme_item>
<theme_item name="font_color_selected" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
+ The color of selected text, used when [member selection_enabled] is [code]true[/code].
</theme_item>
<theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )">
+ The color of the font's shadow.
</theme_item>
<theme_item name="italics_font" type="Font">
+ The font used for italics text.
</theme_item>
<theme_item name="line_separation" type="int" default="1">
+ The vertical space between lines.
</theme_item>
<theme_item name="mono_font" type="Font">
+ The font used for monospace text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ The normal background for the [RichTextLabel].
</theme_item>
<theme_item name="normal_font" type="Font">
+ The default text font.
</theme_item>
<theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )">
+ The color of the selection box.
</theme_item>
<theme_item name="shadow_as_outline" type="int" default="0">
+ Boolean value. If 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline.
</theme_item>
<theme_item name="shadow_offset_x" type="int" default="1">
+ The horizontal offset of the font's shadow.
</theme_item>
<theme_item name="shadow_offset_y" type="int" default="1">
+ The vertical offset of the font's shadow.
</theme_item>
<theme_item name="table_hseparation" type="int" default="3">
+ The horizontal separation of elements in a table.
</theme_item>
<theme_item name="table_vseparation" type="int" default="3">
+ The vertical separation of elements in a table.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index c960ef5aee..8379fc5b58 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.2">
+<class name="RigidBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
A body that is controlled by the 2D physics engine.
</brief_description>
@@ -16,7 +16,7 @@
<method name="_integrate_forces" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="state" type="Physics2DDirectBodyState">
+ <argument index="0" name="state" type="PhysicsDirectBodyState2D">
</argument>
<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.
@@ -81,7 +81,7 @@
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
- <return type="Array">
+ <return type="Node2D[]">
</return>
<description>
Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code].
@@ -106,10 +106,10 @@
</argument>
<argument index="2" name="margin" type="float" default="0.08">
</argument>
- <argument index="3" name="result" type="Physics2DTestMotionResult" default="null">
+ <argument index="3" name="result" type="PhysicsTestMotionResult2D" default="null">
</argument>
<description>
- Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [Physics2DTestMotionResult], which contains additional information about the collision (should there be one).
+ Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [PhysicsTestMotionResult2D], which contains additional information about the collision (should there be one).
</description>
</method>
</methods>
@@ -126,10 +126,6 @@
<member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque" default="0.0">
The body's total applied torque.
</member>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
- The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
- Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
- </member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force].
</member>
@@ -146,10 +142,6 @@
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false">
If [code]true[/code], internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function.
</member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction">
- The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction).
- Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
- </member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] and/or any additional gravity vector applied by [Area2D]s.
</member>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody3D.xml
index 624b576f4d..1db818d6af 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.2">
+<class name="RigidBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
Physics Body whose position is determined through physics simulation in 3D space.
</brief_description>
<description>
- This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
- A RigidBody has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
- [b]Note:[/b] Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
+ This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
+ A RigidBody3D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
+ [b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator].
</description>
<tutorials>
@@ -16,7 +16,7 @@
<method name="_integrate_forces" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="state" type="PhysicsDirectBodyState">
+ <argument index="0" name="state" type="PhysicsDirectBodyState3D">
</argument>
<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.
@@ -28,7 +28,7 @@
<argument index="0" name="force" type="Vector3">
</argument>
<description>
- Adds a constant directional force without affecting rotation.
+ Adds a constant directional force (i.e. acceleration) without affecting rotation.
This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code].
</description>
</method>
@@ -40,7 +40,8 @@
<argument index="1" name="position" type="Vector3">
</argument>
<description>
- Adds a constant force (i.e. acceleration).
+ Adds a constant directional force (i.e. acceleration).
+ The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<method name="add_torque">
@@ -85,7 +86,7 @@
<method name="get_axis_lock" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis">
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
</argument>
<description>
Returns [code]true[/code] if the specified linear or rotational axis is locked.
@@ -102,7 +103,7 @@
<method name="set_axis_lock">
<return type="void">
</return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis">
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
</argument>
<argument index="1" name="lock" type="bool">
</argument>
@@ -122,10 +123,10 @@
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
- Damps RigidBody's rotational forces.
+ Damps RigidBody3D's rotational forces.
</member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3( 0, 0, 0 )">
- RigidBody's rotational velocity.
+ RigidBody3D's rotational velocity.
</member>
<member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
Lock the body's rotation in the X axis.
@@ -145,15 +146,11 @@
<member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
Lock the body's movement in the Z axis.
</member>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
- The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
- Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
- </member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
- If [code]true[/code], the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used.
+ If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awaken by an external force.
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
- If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody.
+ If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D.
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
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.
@@ -165,12 +162,8 @@
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false">
If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
</member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction">
- The body's friction, from 0 (frictionless) to 1 (max friction).
- Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
- </member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
- This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
+ This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0">
The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden.
@@ -181,7 +174,7 @@
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
The body's mass.
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody.Mode" default="0">
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody3D.Mode" default="0">
The body mode. See [enum Mode] for possible values.
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
@@ -249,13 +242,13 @@
Rigid body mode. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
</constant>
<constant name="MODE_STATIC" value="1" enum="Mode">
- Static mode. The body behaves like a [StaticBody], and can only move by user code.
+ Static mode. The body behaves like a [StaticBody3D], and can only move by user code.
</constant>
<constant name="MODE_CHARACTER" value="2" enum="Mode">
Character body mode. This behaves like a rigid body, but can not rotate.
</constant>
<constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic body mode. The body behaves like a [KinematicBody], and can only move by user code.
+ Kinematic body mode. The body behaves like a [KinematicBody3D], and can only move by user code.
</constant>
</constants>
</class>
diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml
index bb939e82f3..be8d8d0078 100644
--- a/doc/classes/RootMotionView.xml
+++ b/doc/classes/RootMotionView.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RootMotionView" inherits="VisualInstance" category="Core" version="3.2">
+<class name="RootMotionView" inherits="VisualInstance3D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index 3bd958bfd4..abc429d5fe 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneState" inherits="Reference" category="Core" version="3.2">
+<class name="SceneState" inherits="Reference" version="4.0">
<brief_description>
A script interface to a scene file's data.
</brief_description>
@@ -37,7 +37,7 @@
</description>
</method>
<method name="get_connection_method" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -46,7 +46,7 @@
</description>
</method>
<method name="get_connection_signal" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -81,7 +81,7 @@
</description>
</method>
<method name="get_node_groups" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -117,7 +117,7 @@
</description>
</method>
<method name="get_node_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -157,7 +157,7 @@
</description>
</method>
<method name="get_node_property_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -179,7 +179,7 @@
</description>
</method>
<method name="get_node_type" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index bf22b865d3..00ca5c6e9f 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTree" inherits="MainLoop" category="Core" version="3.2">
+<class name="SceneTree" inherits="MainLoop" version="4.0">
<brief_description>
Manages the game loop via a hierarchy of nodes.
</brief_description>
@@ -16,9 +16,9 @@
<method name="call_group" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Calls [code]method[/code] on each member of the given group.
@@ -29,9 +29,9 @@
</return>
<argument index="0" name="flags" type="int">
</argument>
- <argument index="1" name="group" type="String">
+ <argument index="1" name="group" type="StringName">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags].
@@ -83,7 +83,7 @@
</description>
</method>
<method name="get_network_connected_peers" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer].
@@ -106,7 +106,7 @@
<method name="get_nodes_in_group">
<return type="Array">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<description>
Returns a list of all nodes assigned to the given group.
@@ -122,7 +122,7 @@
<method name="has_group" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the given group exists.
@@ -135,13 +135,6 @@
Returns [code]true[/code] if there is a [member network_peer] set.
</description>
</method>
- <method name="is_input_handled">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the most recent [InputEvent] was marked as handled with [method set_input_as_handled].
- </description>
- </method>
<method name="is_network_server" qualifiers="const">
<return type="bool">
</return>
@@ -152,7 +145,7 @@
<method name="notify_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<argument index="1" name="notification" type="int">
</argument>
@@ -165,7 +158,7 @@
</return>
<argument index="0" name="call_flags" type="int">
</argument>
- <argument index="1" name="group" type="String">
+ <argument index="1" name="group" type="StringName">
</argument>
<argument index="2" name="notification" type="int">
</argument>
@@ -185,8 +178,10 @@
<method name="quit">
<return type="void">
</return>
+ <argument index="0" name="exit_code" type="int" default="-1">
+ </argument>
<description>
- Quits the application.
+ Quits the application. A process [code]exit_code[/code] can optionally be passed as an argument. If this argument is [code]0[/code] or greater, it will override the [member OS.exit_code] defined before quitting the application.
</description>
</method>
<method name="reload_current_scene">
@@ -210,7 +205,7 @@
<method name="set_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<argument index="1" name="property" type="String">
</argument>
@@ -225,7 +220,7 @@
</return>
<argument index="0" name="call_flags" type="int">
</argument>
- <argument index="1" name="group" type="String">
+ <argument index="1" name="group" type="StringName">
</argument>
<argument index="2" name="property" type="String">
</argument>
@@ -235,13 +230,6 @@
Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags].
</description>
</method>
- <method name="set_input_as_handled">
- <return type="void">
- </return>
- <description>
- Marks the most recent [InputEvent] as handled.
- </description>
- </method>
<method name="set_quit_on_go_back">
<return type="void">
</return>
@@ -249,22 +237,7 @@
</argument>
<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 MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST].
- </description>
- </method>
- <method name="set_screen_stretch">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="SceneTree.StretchMode">
- </argument>
- <argument index="1" name="aspect" type="int" enum="SceneTree.StretchAspect">
- </argument>
- <argument index="2" name="minsize" type="Vector2">
- </argument>
- <argument index="3" name="shrink" type="float" default="1">
- </argument>
- <description>
- Configures screen stretching to the given [enum StretchMode], [enum StretchAspect], minimum size and [code]shrink[/code] ratio.
+ To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST].
</description>
</method>
</methods>
@@ -289,7 +262,7 @@
If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
</member>
<member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
- The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with the root node set to puppet. 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 [SceneTree]'s signals.
+ The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. 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 [SceneTree]'s signals.
</member>
<member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false">
If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior:
@@ -299,11 +272,8 @@
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections.
</member>
- <member name="root" type="Viewport" setter="" getter="get_root">
- The [SceneTree]'s root [Viewport].
- </member>
- <member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling" default="false">
- If [code]true[/code], font oversampling is used.
+ <member name="root" type="Window" setter="" getter="get_root">
+ The [SceneTree]'s root [Window].
</member>
</members>
<signals>
@@ -318,7 +288,7 @@
</description>
</signal>
<signal name="files_dropped">
- <argument index="0" name="files" type="PoolStringArray">
+ <argument index="0" name="files" type="PackedStringArray">
</argument>
<argument index="1" name="screen" type="int">
</argument>
@@ -326,15 +296,6 @@
Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
</description>
</signal>
- <signal name="global_menu_action">
- <argument index="0" name="id" type="Nil">
- </argument>
- <argument index="1" name="meta" type="Nil">
- </argument>
- <description>
- Emitted whenever global menu item is clicked.
- </description>
- </signal>
<signal name="idle_frame">
<description>
Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
@@ -387,11 +348,6 @@
Emitted immediately before [method Node._physics_process] is called on every node in the [SceneTree].
</description>
</signal>
- <signal name="screen_resized">
- <description>
- Emitted when the screen resolution (fullscreen) or window size (windowed) changes.
- </description>
- </signal>
<signal name="server_disconnected">
<description>
Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients.
@@ -416,29 +372,5 @@
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
Call a group only once even if the call is executed many times.
</constant>
- <constant name="STRETCH_MODE_DISABLED" value="0" enum="StretchMode">
- No stretching.
- </constant>
- <constant name="STRETCH_MODE_2D" value="1" enum="StretchMode">
- Render stretching in higher resolution (interpolated).
- </constant>
- <constant name="STRETCH_MODE_VIEWPORT" value="2" enum="StretchMode">
- Keep the specified display resolution. No interpolation. Content may appear pixelated.
- </constant>
- <constant name="STRETCH_ASPECT_IGNORE" value="0" enum="StretchAspect">
- Fill the window with the content stretched to cover excessive space. Content may appear stretched.
- </constant>
- <constant name="STRETCH_ASPECT_KEEP" value="1" enum="StretchAspect">
- Retain the same aspect ratio by padding with black bars on either axis. This prevents distortion.
- </constant>
- <constant name="STRETCH_ASPECT_KEEP_WIDTH" value="2" enum="StretchAspect">
- Expand vertically. Left/right black bars may appear if the window is too wide.
- </constant>
- <constant name="STRETCH_ASPECT_KEEP_HEIGHT" value="3" enum="StretchAspect">
- Expand horizontally. Top/bottom black bars may appear if the window is too tall.
- </constant>
- <constant name="STRETCH_ASPECT_EXPAND" value="4" enum="StretchAspect">
- Expand in both directions, retaining the same aspect ratio. This prevents distortion while avoiding black bars.
- </constant>
</constants>
</class>
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index 5678833752..a4a83fa65b 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.2">
+<class name="SceneTreeTimer" inherits="Reference" version="4.0">
<brief_description>
One-shot timer.
</brief_description>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index e8a88acdb5..0d94453e52 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Script" inherits="Resource" category="Core" version="3.2">
+<class name="Script" inherits="Resource" version="4.0">
<brief_description>
A class stored as a resource.
</brief_description>
<description>
- A class stored as a resource. A script exends the functionality of all objects that instance it.
+ A class stored as a resource. A script extends the functionality of all objects that instance it.
The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
@@ -26,7 +26,7 @@
</description>
</method>
<method name="get_instance_base_type" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the script's base type.
@@ -35,39 +35,44 @@
<method name="get_property_default_value">
<return type="Variant">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<description>
+ Returns the default value of the specified property.
</description>
</method>
<method name="get_script_constant_map">
<return type="Dictionary">
</return>
<description>
+ Returns a dictionary containing constant names and their values.
</description>
</method>
<method name="get_script_method_list">
<return type="Array">
</return>
<description>
+ Returns the list of methods in this [Script].
</description>
</method>
<method name="get_script_property_list">
<return type="Array">
</return>
<description>
+ Returns the list of properties in this [Script].
</description>
</method>
<method name="get_script_signal_list">
<return type="Array">
</return>
<description>
+ Returns the list of user signals defined in this [Script].
</description>
</method>
<method name="has_script_signal" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="signal_name" type="String">
+ <argument index="0" name="signal_name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the script, or a base class, defines a signal with the given name.
diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index 3d0fa9a0d5..aa60ecb12b 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScriptCreateDialog" inherits="ConfirmationDialog" category="Core" version="3.2">
+<class name="ScriptCreateDialog" inherits="ConfirmationDialog" version="4.0">
<brief_description>
The Editor's popup dialog for creating new [Script] files.
</brief_description>
<description>
- The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Popup.popup] methods.
+ The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Window.popup] methods.
[codeblock]
func _ready():
dialog.config("Node", "res://new_node.gd") # For in-engine types
@@ -24,6 +24,8 @@
</argument>
<argument index="2" name="built_in_enabled" type="bool" default="true">
</argument>
+ <argument index="3" name="load_enabled" type="bool" default="true">
+ </argument>
<description>
Prefills required fields to configure the ScriptCreateDialog for use.
</description>
@@ -31,10 +33,7 @@
</methods>
<members>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
- <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" override="true" default="232.0" />
- <member name="margin_right" type="float" setter="set_margin" getter="get_margin" override="true" default="361.0" />
- <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" override="true" default="Vector2( 361, 232 )" />
- <member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Attach Node Script&quot;" />
+ <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Attach Node Script&quot;" />
</members>
<signals>
<signal name="script_created">
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 28e1f75ac1..f0ad781f77 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScriptEditor" inherits="PanelContainer" category="Core" version="3.2">
+<class name="ScriptEditor" inherits="PanelContainer" version="4.0">
<brief_description>
+ Godot editor's script editor.
</brief_description>
<description>
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_script_editor].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index ea30b9d48c..b1eb9c012b 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScrollBar" inherits="Range" category="Core" version="3.2">
+<class name="ScrollBar" inherits="Range" version="4.0">
<brief_description>
Base class for scroll bars.
</brief_description>
@@ -12,6 +12,7 @@
</methods>
<members>
<member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0">
+ Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused.
</member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" />
<member name="step" type="float" setter="set_step" getter="get_step" override="true" default="0.0" />
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 5218b65886..9c5634f43a 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScrollContainer" inherits="Container" category="Core" version="3.2">
+<class name="ScrollContainer" inherits="Container" version="4.0">
<brief_description>
A helper node for displaying scrollable elements such as lists.
</brief_description>
<description>
- A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
+ A ScrollContainer node meant to contain a [Control] child.
+ ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer.
+ Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
</description>
<tutorials>
</tutorials>
@@ -13,16 +15,21 @@
<return type="HScrollBar">
</return>
<description>
+ Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer].
</description>
</method>
<method name="get_v_scrollbar">
<return type="VScrollBar">
</return>
<description>
+ Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer].
</description>
</method>
</methods>
<members>
+ <member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" default="false">
+ If [code]true[/code], the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible.
+ </member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0">
</member>
@@ -55,6 +62,7 @@
</constants>
<theme_items>
<theme_item name="bg" type="StyleBox">
+ The background [StyleBox] of the [ScrollContainer].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
index e9e9d01a42..31c0f7f1f3 100644
--- a/doc/classes/SegmentShape2D.xml
+++ b/doc/classes/SegmentShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.2">
+<class name="SegmentShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Segment shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index 74970be8b4..c9745acfcd 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Semaphore" inherits="Reference" category="Core" version="3.2">
+<class name="Semaphore" inherits="Reference" version="4.0">
<brief_description>
A synchronization semaphore.
</brief_description>
@@ -11,17 +11,24 @@
</tutorials>
<methods>
<method name="post">
+ <return type="void">
+ </return>
+ <description>
+ Lowers the [Semaphore], allowing one more thread in.
+ </description>
+ </method>
+ <method name="try_wait">
<return type="int" enum="Error">
</return>
<description>
- Lowers the [Semaphore], allowing one more thread in. Returns [constant OK] on success, [constant ERR_BUSY] otherwise.
+ Like [method wait], but won't block, so if the value is zero, fails immediately and returns [constant ERR_BUSY]. If non-zero, it returns [constant OK] to report success.
</description>
</method>
<method name="wait">
- <return type="int" enum="Error">
+ <return type="void">
</return>
<description>
- Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero. Returns [constant OK] on success, [constant ERR_BUSY] otherwise.
+ Waits for the [Semaphore], if its value is zero, blocks until non-zero.
</description>
</method>
</methods>
diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml
index 11f6f1b22f..ef79851aab 100644
--- a/doc/classes/Separator.xml
+++ b/doc/classes/Separator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Separator" inherits="Control" category="Core" version="3.2">
+<class name="Separator" inherits="Control" version="4.0">
<brief_description>
Base class for separators.
</brief_description>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index be9509fda5..109c500a63 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -1,59 +1,73 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shader" inherits="Resource" category="Core" version="3.2">
+<class name="Shader" inherits="Resource" version="4.0">
<brief_description>
A custom shader program.
</brief_description>
<description>
- This class allows you to define a custom shader program that can be used for various materials to render objects.
+ This class allows you to define a custom shader program that can be used by a [ShaderMaterial]. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/shading/your_first_shader/what_are_shaders.html</link>
</tutorials>
<methods>
<method name="get_default_texture_param" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
<description>
+ Returns the texture that is set as default for the specified parameter.
+ [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
</description>
</method>
<method name="get_mode" qualifiers="const">
<return type="int" enum="Shader.Mode">
</return>
<description>
- Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES]
+ 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">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
+ Returns [code]true[/code] if the shader has this param defined as a uniform in its code.
+ [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
</description>
</method>
<method name="set_default_texture_param">
<return type="void">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<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.
</description>
</method>
</methods>
<members>
<member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;">
+ Returns the shader's code as the user has written it, not the full generated code used internally.
</member>
</members>
<constants>
<constant name="MODE_SPATIAL" value="0" enum="Mode">
+ Mode used to draw all 3D objects.
</constant>
<constant name="MODE_CANVAS_ITEM" value="1" enum="Mode">
+ Mode used to draw all 2D objects.
</constant>
<constant name="MODE_PARTICLES" value="2" enum="Mode">
+ Mode used to calculate particle information on a per-particle basis. Not used for drawing.
+ </constant>
+ <constant name="MODE_SKY" value="3" enum="Mode">
+ Mode used for drawing skies. Only works with shaders attached to [Sky] objects.
</constant>
</constants>
</class>
diff --git a/doc/classes/ShaderGlobalsOverride.xml b/doc/classes/ShaderGlobalsOverride.xml
new file mode 100644
index 0000000000..2aa00aa5a9
--- /dev/null
+++ b/doc/classes/ShaderGlobalsOverride.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShaderGlobalsOverride" inherits="Node" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index ef355c4417..7e0e1ce831 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ShaderMaterial" inherits="Material" category="Core" version="3.2">
+<class name="ShaderMaterial" inherits="Material" version="4.0">
<brief_description>
A material that uses a custom [Shader] program.
</brief_description>
@@ -7,13 +7,13 @@
A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/shading/index.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link>
</tutorials>
<methods>
<method name="get_shader_param" qualifiers="const">
<return type="Variant">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
<description>
Returns the current value set for this material of a uniform in the shader.
@@ -25,6 +25,7 @@
<argument index="0" name="name" type="String">
</argument>
<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">
@@ -33,17 +34,18 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the default value of the material property with given [code]name[/code].
</description>
</method>
<method name="set_shader_param">
<return type="void">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
<description>
- Changes the value set for this material of a uniform in the shader.
+ 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.
</description>
</method>
</methods>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index 2c3120f04d..9e913cb44d 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shape2D" inherits="Resource" category="Core" version="3.2">
+<class name="Shape2D" inherits="Resource" version="4.0">
<brief_description>
Base class for all 2D shapes.
</brief_description>
@@ -77,6 +77,7 @@
</methods>
<members>
<member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0">
+ The shape's custom solver bias.
</member>
</members>
<constants>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape3D.xml
index ce5947bc06..1af6550dc5 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shape" inherits="Resource" category="Core" version="3.2">
+<class name="Shape3D" inherits="Resource" version="4.0">
<brief_description>
Base class for all 3D shape resources.
</brief_description>
<description>
- Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody] or [Area] objects.
+ Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody3D] or [Area3D] objects.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
@@ -13,6 +13,7 @@
</methods>
<members>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
+ The collision margin for the shape.
</member>
</members>
<constants>
diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml
index 4c5dc0e77b..9a2a761969 100644
--- a/doc/classes/ShortCut.xml
+++ b/doc/classes/ShortCut.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ShortCut" inherits="Resource" category="Core" version="3.2">
+<class name="ShortCut" inherits="Resource" version="4.0">
<brief_description>
A shortcut for binding input.
</brief_description>
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
new file mode 100644
index 0000000000..1a05c02b60
--- /dev/null
+++ b/doc/classes/Signal.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Signal" version="4.0">
+ <brief_description>
+ Class representing a signal defined in an object.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="Signal">
+ <return type="Signal">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="signal_name" type="StringName">
+ </argument>
+ <description>
+ Creates a new signal named [code]signal_name[/code] in the given object.
+ </description>
+ </method>
+ <method name="connect">
+ <return type="int">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <argument index="1" name="binds" type="Array" default="[ ]">
+ </argument>
+ <argument index="2" name="flags" type="int" default="0">
+ </argument>
+ <description>
+ Connects this signal to the specified [Callable], optionally providing binds and connection flags.
+ </description>
+ </method>
+ <method name="disconnect">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ Disconnects this signal from the specified [Callable].
+ </description>
+ </method>
+ <method name="emit" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Emits this signal to all connected objects.
+ </description>
+ </method>
+ <method name="get_connections">
+ <return type="Array">
+ </return>
+ <description>
+ Returns the list of [Callable]s connected to this signal.
+ </description>
+ </method>
+ <method name="get_name">
+ <return type="StringName">
+ </return>
+ <description>
+ Returns the name of this signal.
+ </description>
+ </method>
+ <method name="get_object">
+ <return type="Object">
+ </return>
+ <description>
+ Returns the object emitting this signal.
+ </description>
+ </method>
+ <method name="get_object_id">
+ <return type="int">
+ </return>
+ <description>
+ Returns the ID of the object emitting this signal (see [method Object.get_instance_id]).
+ </description>
+ </method>
+ <method name="is_connected">
+ <return type="bool">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the specified [Callable] is connected to this signal.
+ </description>
+ </method>
+ <method name="is_null">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 886e8244a2..e1b7d60763 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Skeleton2D" inherits="Node2D" category="Core" version="3.2">
+<class name="Skeleton2D" inherits="Node2D" version="4.0">
<brief_description>
Skeleton for 2D characters and animated objects.
</brief_description>
<description>
+ Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones.
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
</tutorials>
<methods>
<method name="get_bone">
@@ -15,19 +16,21 @@
<argument index="0" name="idx" type="int">
</argument>
<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.
</description>
</method>
<method name="get_bone_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the amount of bones in the skeleton.
+ Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D.
</description>
</method>
<method name="get_skeleton" qualifiers="const">
<return type="RID">
</return>
<description>
+ Returns the [RID] of a Skeleton2D instance.
</description>
</method>
</methods>
diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton3D.xml
index 7cd95390e6..4460b519fc 100644
--- a/doc/classes/Skeleton.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Skeleton" inherits="Spatial" category="Core" version="3.2">
+<class name="Skeleton3D" inherits="Node3D" version="4.0">
<brief_description>
Skeleton for characters and animated objects.
</brief_description>
<description>
- Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). It can also use ragdoll physics.
+ Skeleton3D provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). It can also use ragdoll physics.
The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose.
Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone.
</description>
@@ -38,6 +38,12 @@
Clear all the bones in this skeleton.
</description>
</method>
+ <method name="clear_bones_global_pose_override">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="find_bone" qualifiers="const">
<return type="int">
</return>
@@ -151,7 +157,7 @@
<method name="physical_bones_start_simulation">
<return type="void">
</return>
- <argument index="0" name="bones" type="Array" default="[ ]">
+ <argument index="0" name="bones" type="StringName[]" default="[ ]">
</argument>
<description>
</description>
@@ -258,6 +264,10 @@
</description>
</method>
</methods>
+ <members>
+ <member name="animate_physical_bones" type="bool" setter="set_animate_physical_bones" getter="get_animate_physical_bones" default="true">
+ </member>
+ </members>
<constants>
<constant name="NOTIFICATION_UPDATE_SKELETON" value="50">
</constant>
diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK3D.xml
index 2f35826cc7..de83847403 100644
--- a/doc/classes/SkeletonIK.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonIK" inherits="Node" category="Core" version="3.2">
+<class name="SkeletonIK3D" inherits="Node" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -8,7 +8,7 @@
</tutorials>
<methods>
<method name="get_parent_skeleton" qualifiers="const">
- <return type="Skeleton">
+ <return type="Skeleton3D">
</return>
<description>
</description>
@@ -45,13 +45,13 @@
</member>
<member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis" default="true">
</member>
- <member name="root_bone" type="String" setter="set_root_bone" getter="get_root_bone" default="&quot;&quot;">
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="@&quot;&quot;">
</member>
<member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
</member>
<member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
</member>
- <member name="tip_bone" type="String" setter="set_tip_bone" getter="get_tip_bone" default="&quot;&quot;">
+ <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="@&quot;&quot;">
</member>
<member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false">
</member>
diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml
index 174febc883..e22feb42f0 100644
--- a/doc/classes/Skin.xml
+++ b/doc/classes/Skin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Skin" inherits="Resource" category="Core" version="3.2">
+<class name="Skin" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -37,6 +37,14 @@
<description>
</description>
</method>
+ <method name="get_bind_name" qualifiers="const">
+ <return type="StringName">
+ </return>
+ <argument index="0" name="bind_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_bind_pose" qualifiers="const">
<return type="Transform">
</return>
@@ -63,6 +71,16 @@
<description>
</description>
</method>
+ <method name="set_bind_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="bind_index" type="int">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_bind_pose">
<return type="void">
</return>
diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml
index c12957654f..8fc163f88d 100644
--- a/doc/classes/SkinReference.xml
+++ b/doc/classes/SkinReference.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkinReference" inherits="Reference" category="Core" version="3.2">
+<class name="SkinReference" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index 398a988d9e..78c75d9c2b 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -1,19 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sky" inherits="Resource" category="Core" version="3.2">
+<class name="Sky" inherits="Resource" version="4.0">
<brief_description>
- The base class for [PanoramaSky] and [ProceduralSky].
+ Background that uses a [Material] to draw a sky.
</brief_description>
<description>
- The base class for [PanoramaSky] and [ProceduralSky].
+ The [Sky] class uses a [Material] to draw the background and update the reflection/radiance cubemaps.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize" default="2">
+ <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Sky.ProcessMode" default="0">
+ Sets the method for generating the radiance map from the sky. The radiance map is a cubemap with increasingly blurry versions of the sky corresponding to different levels of roughness. Radiance maps can be expensive to calculate. See [enum ProcessMode] for options.
+ </member>
+ <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize" default="3">
The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be.
See [enum RadianceSize] constants for values.
+ [b]Note:[/b] Some hardware will have trouble with higher radiance sizes, especially [constant RADIANCE_SIZE_512] and above. Only use such high values on high-end hardware.
+ </member>
+ <member name="sky_material" type="Material" setter="set_material" getter="get_material">
+ [Material] used to draw the background. Can be [PanoramaSkyMaterial], [ProceduralSkyMaterial], [PhysicalSkyMaterial], or even a [ShaderMaterial] if you want to use your own custom shader.
</member>
</members>
<constants>
@@ -41,5 +48,12 @@
<constant name="RADIANCE_SIZE_MAX" value="7" enum="RadianceSize">
Represents the size of the [enum RadianceSize] enum.
</constant>
+ <constant name="PROCESS_MODE_QUALITY" value="0" enum="ProcessMode">
+ Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples].
+ </constant>
+ <constant name="PROCESS_MODE_REALTIME" value="1" enum="ProcessMode">
+ Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times.
+ [b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_256].
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index 14176da44f..68776df603 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Slider" inherits="Range" category="Core" version="3.2">
+<class name="Slider" inherits="Range" version="4.0">
<brief_description>
Base class for GUI sliders.
</brief_description>
diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint3D.xml
index 3f22b5a37c..efd6353e3c 100644
--- a/doc/classes/SliderJoint.xml
+++ b/doc/classes/SliderJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SliderJoint" inherits="Joint" category="Core" version="3.2">
+<class name="SliderJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
Piston kind of slider between two bodies in 3D.
</brief_description>
@@ -12,7 +12,7 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int" enum="SliderJoint.Param">
+ <argument index="0" name="param" type="int" enum="SliderJoint3D.Param">
</argument>
<description>
</description>
@@ -20,7 +20,7 @@
<method name="set_param">
<return type="void">
</return>
- <argument index="0" name="param" type="int" enum="SliderJoint.Param">
+ <argument index="0" name="param" type="int" enum="SliderJoint3D.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody3D.xml
index a51907b1bf..24d6609900 100644
--- a/doc/classes/SoftBody.xml
+++ b/doc/classes/SoftBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SoftBody" inherits="MeshInstance" category="Core" version="3.2">
+<class name="SoftBody3D" inherits="MeshInstance3D" version="4.0">
<brief_description>
A soft mesh physics body.
</brief_description>
@@ -80,12 +80,12 @@
<member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness" default="0.5">
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
- The physics layers this SoftBody is in.
+ The physics layers this SoftBody3D is in.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The physics layers this SoftBody scans for collisions.
+ The physics layers this SoftBody3D scans for collisions.
</member>
<member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
</member>
@@ -94,20 +94,20 @@
<member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
</member>
<member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
- [NodePath] to a [CollisionObject] this SoftBody should avoid clipping.
+ [NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping.
</member>
<member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient" default="0.0">
</member>
<member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0">
</member>
<member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
- If [code]true[/code], the [SoftBody] will respond to [RayCast]s.
+ If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s.
</member>
<member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5">
Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
</member>
<member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
- The SoftBody's mass.
+ The SoftBody3D's mass.
</member>
<member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.5">
</member>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
deleted file mode 100644
index df315d7430..0000000000
--- a/doc/classes/SpatialMaterial.xml
+++ /dev/null
@@ -1,524 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialMaterial" inherits="Material" category="Core" version="3.2">
- <brief_description>
- Default 3D rendering material.
- </brief_description>
- <description>
- This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.
- </description>
- <tutorials>
- <link>https://docs.godotengine.org/en/latest/tutorials/3d/spatial_material.html</link>
- </tutorials>
- <methods>
- <method name="get_feature" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_feature">
- <return type="void">
- </return>
- <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- </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_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy">
- The strength of the anisotropy effect.
- </member>
- <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space.
- </member>
- <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], ambient occlusion is enabled.
- </member>
- <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect">
- </member>
- <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag">
- </member>
- <member name="ao_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="SpatialMaterial.TextureChannel">
- </member>
- <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat">
- </member>
- <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the material.
- </member>
- <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss">
- </member>
- <member name="clearcoat_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled">
- </member>
- <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also [member normal_enabled].
- </member>
- <member name="depth_flip_binormal" type="bool" setter="set_depth_deep_parallax_flip_binormal" getter="get_depth_deep_parallax_flip_binormal">
- </member>
- <member name="depth_flip_tangent" type="bool" setter="set_depth_deep_parallax_flip_tangent" getter="get_depth_deep_parallax_flip_tangent">
- </member>
- <member name="depth_max_layers" type="int" setter="set_depth_deep_parallax_max_layers" getter="get_depth_deep_parallax_max_layers">
- </member>
- <member name="depth_min_layers" type="int" setter="set_depth_deep_parallax_min_layers" getter="get_depth_deep_parallax_min_layers">
- </member>
- <member name="depth_scale" type="float" setter="set_depth_scale" getter="get_depth_scale">
- </member>
- <member name="depth_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="detail_albedo" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="SpatialMaterial.BlendMode">
- </member>
- <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- </member>
- <member name="detail_mask" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="detail_normal" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV">
- </member>
- <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance">
- </member>
- <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance">
- </member>
- <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="SpatialMaterial.DistanceFadeMode" default="0">
- </member>
- <member name="emission" type="Color" setter="set_emission" getter="get_emission">
- The emitted light's color. See [member emission_enabled].
- </member>
- <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], the body emits light.
- </member>
- <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy">
- The emitted light's strength. See [member emission_enabled].
- </member>
- <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag">
- </member>
- <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="SpatialMaterial.EmissionOperator">
- </member>
- <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the object receives no ambient light.
- </member>
- <member name="flags_do_not_receive_shadows" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the object receives no shadow that would otherwise be cast onto it.
- </member>
- <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the object is rendered at the same size regardless of distance.
- </member>
- <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], depth testing is disabled and the object will be drawn in render order.
- </member>
- <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], transparency is enabled on the body. See also [member params_blend_mode].
- </member>
- <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the object is unaffected by lighting.
- </member>
- <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], render point size can be changed.
- [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size].
- </member>
- <member name="flags_use_shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices.
- </member>
- <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar].
- </member>
- <member name="metallic" type="float" setter="set_metallic" getter="get_metallic" default="0.0">
- The reflectivity of the object's surface. The higher the value, the more light is reflected.
- </member>
- <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5">
- General reflectivity amount.
- [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="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel" default="0">
- </member>
- <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], normal mapping is enabled.
- </member>
- <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale">
- The strength of the normal map's effect.
- </member>
- <member name="normal_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold">
- </member>
- <member name="params_billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0">
- Controls how the object faces the camera. See [enum BillboardMode].
- </member>
- <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="SpatialMaterial.BlendMode" default="0">
- The material's blend mode.
- [b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode].
- </member>
- <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="SpatialMaterial.CullMode" default="0">
- Which side of the object is not drawn when backfaces are rendered. See [enum CullMode].
- </member>
- <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="SpatialMaterial.DepthDrawMode" default="0">
- Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member flags_transparent].
- </member>
- <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="SpatialMaterial.DiffuseMode" default="0">
- The algorithm used for diffuse light scattering. See [enum DiffuseMode].
- </member>
- <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" default="false">
- If [code]true[/code], enables the vertex grow setting. See [member params_grow_amount].
- </member>
- <member name="params_grow_amount" type="float" setter="set_grow" getter="get_grow">
- Grows object vertices in the direction of their normals.
- </member>
- <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width" default="1.0">
- </member>
- <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0">
- The point size in pixels. See [member flags_use_point_size].
- </member>
- <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="SpatialMaterial.SpecularMode" default="0">
- The method for rendering the specular blob. See [enum SpecularMode].
- </member>
- <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
- The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].
- </member>
- <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
- If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].
- </member>
- <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
- The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].
- </member>
- <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance">
- </member>
- <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false">
- If [code]true[/code], the proximity and distance fade effect is enabled.
- </member>
- <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object.
- </member>
- <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction">
- The strength of the refraction effect.
- </member>
- <member name="refraction_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="SpatialMaterial.TextureChannel">
- </member>
- <member name="rim" type="float" setter="set_rim" getter="get_rim">
- </member>
- <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], rim effect is enabled.
- </member>
- <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint">
- The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best.
- </member>
- <member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0">
- Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic].
- </member>
- <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel" default="0">
- </member>
- <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
- </member>
- <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength">
- The strength of the subsurface scattering effect.
- </member>
- <member name="subsurf_scatter_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission">
- The color used by the transmission effect. Represents the light passing through an object.
- </member>
- <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], the transmission effect is enabled.
- </member>
- <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture">
- </member>
- <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3( 0, 0, 0 )">
- </member>
- <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3( 1, 1, 1 )">
- </member>
- <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" default="1.0">
- </member>
- <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3( 0, 0, 0 )">
- </member>
- <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3( 1, 1, 1 )">
- </member>
- <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" default="1.0">
- </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.
- </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.
- </member>
- </members>
- <constants>
- <constant name="TEXTURE_ALBEDO" value="0" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_METALLIC" value="1" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_ROUGHNESS" value="2" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_EMISSION" value="3" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_NORMAL" value="4" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_RIM" value="5" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_CLEARCOAT" value="6" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_FLOWMAP" value="7" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_AMBIENT_OCCLUSION" value="8" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_DEPTH" value="9" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_TRANSMISSION" value="11" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_REFRACTION" value="12" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_DETAIL_MASK" value="13" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_DETAIL_ALBEDO" value="14" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_DETAIL_NORMAL" value="15" enum="TextureParam">
- </constant>
- <constant name="TEXTURE_MAX" value="16" enum="TextureParam">
- Represents the size of the [enum TextureParam] enum.
- </constant>
- <constant name="DETAIL_UV_1" value="0" enum="DetailUV">
- </constant>
- <constant name="DETAIL_UV_2" value="1" enum="DetailUV">
- </constant>
- <constant name="FEATURE_TRANSPARENT" value="0" enum="Feature">
- </constant>
- <constant name="FEATURE_EMISSION" value="1" enum="Feature">
- </constant>
- <constant name="FEATURE_NORMAL_MAPPING" value="2" enum="Feature">
- </constant>
- <constant name="FEATURE_RIM" value="3" enum="Feature">
- </constant>
- <constant name="FEATURE_CLEARCOAT" value="4" enum="Feature">
- </constant>
- <constant name="FEATURE_ANISOTROPY" value="5" enum="Feature">
- </constant>
- <constant name="FEATURE_AMBIENT_OCCLUSION" value="6" enum="Feature">
- </constant>
- <constant name="FEATURE_DEPTH_MAPPING" value="7" enum="Feature">
- </constant>
- <constant name="FEATURE_SUBSURACE_SCATTERING" value="8" enum="Feature">
- </constant>
- <constant name="FEATURE_TRANSMISSION" value="9" enum="Feature">
- </constant>
- <constant name="FEATURE_REFRACTION" value="10" enum="Feature">
- </constant>
- <constant name="FEATURE_DETAIL" value="11" enum="Feature">
- </constant>
- <constant name="FEATURE_MAX" value="12" enum="Feature">
- Represents the size of the [enum Feature] enum.
- </constant>
- <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
- Default blend mode.
- </constant>
- <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
- </constant>
- <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
- </constant>
- <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
- </constant>
- <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0" enum="DepthDrawMode">
- Default depth draw mode. Depth is drawn only for opaque objects.
- </constant>
- <constant name="DEPTH_DRAW_ALWAYS" value="1" enum="DepthDrawMode">
- Depth draw is calculated for both opaque and transparent objects.
- </constant>
- <constant name="DEPTH_DRAW_DISABLED" value="2" enum="DepthDrawMode">
- No depth draw.
- </constant>
- <constant name="DEPTH_DRAW_ALPHA_OPAQUE_PREPASS" value="3" enum="DepthDrawMode">
- For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn.
- </constant>
- <constant name="CULL_BACK" value="0" enum="CullMode">
- Default cull mode. The back of the object is culled when not visible.
- </constant>
- <constant name="CULL_FRONT" value="1" enum="CullMode">
- The front of the object is culled when not visible.
- </constant>
- <constant name="CULL_DISABLED" value="2" enum="CullMode">
- No culling is performed.
- </constant>
- <constant name="FLAG_UNSHADED" value="0" enum="Flags">
- </constant>
- <constant name="FLAG_USE_VERTEX_LIGHTING" value="1" enum="Flags">
- </constant>
- <constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="Flags">
- </constant>
- <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="3" enum="Flags">
- </constant>
- <constant name="FLAG_SRGB_VERTEX_COLOR" value="4" enum="Flags">
- </constant>
- <constant name="FLAG_USE_POINT_SIZE" value="5" enum="Flags">
- </constant>
- <constant name="FLAG_FIXED_SIZE" value="6" enum="Flags">
- </constant>
- <constant name="FLAG_BILLBOARD_KEEP_SCALE" value="7" enum="Flags">
- </constant>
- <constant name="FLAG_UV1_USE_TRIPLANAR" value="8" enum="Flags">
- </constant>
- <constant name="FLAG_UV2_USE_TRIPLANAR" value="9" enum="Flags">
- </constant>
- <constant name="FLAG_AO_ON_UV2" value="11" enum="Flags">
- </constant>
- <constant name="FLAG_EMISSION_ON_UV2" value="12" enum="Flags">
- </constant>
- <constant name="FLAG_USE_ALPHA_SCISSOR" value="13" enum="Flags">
- </constant>
- <constant name="FLAG_TRIPLANAR_USE_WORLD" value="10" enum="Flags">
- </constant>
- <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="14" enum="Flags">
- </constant>
- <constant name="FLAG_DONT_RECEIVE_SHADOWS" value="15" enum="Flags">
- </constant>
- <constant name="FLAG_DISABLE_AMBIENT_LIGHT" value="17" enum="Flags">
- </constant>
- <constant name="FLAG_ENSURE_CORRECT_NORMALS" value="16" enum="Flags">
- </constant>
- <constant name="FLAG_USE_SHADOW_TO_OPACITY" value="18" enum="Flags">
- </constant>
- <constant name="FLAG_MAX" value="19" enum="Flags">
- Represents the size of the [enum Flags] enum.
- </constant>
- <constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode">
- Default diffuse scattering algorithm.
- </constant>
- <constant name="DIFFUSE_LAMBERT" value="1" enum="DiffuseMode">
- Diffuse scattering ignores roughness.
- </constant>
- <constant name="DIFFUSE_LAMBERT_WRAP" value="2" enum="DiffuseMode">
- Extends Lambert to cover more than 90 degrees when roughness increases.
- </constant>
- <constant name="DIFFUSE_OREN_NAYAR" value="3" enum="DiffuseMode">
- Attempts to use roughness to emulate microsurfacing.
- </constant>
- <constant name="DIFFUSE_TOON" value="4" enum="DiffuseMode">
- Uses a hard cut for lighting, with smoothing affected by roughness.
- </constant>
- <constant name="SPECULAR_SCHLICK_GGX" value="0" enum="SpecularMode">
- Default specular blob.
- </constant>
- <constant name="SPECULAR_BLINN" value="1" enum="SpecularMode">
- Older specular algorithm, included for compatibility.
- </constant>
- <constant name="SPECULAR_PHONG" value="2" enum="SpecularMode">
- Older specular algorithm, included for compatibility.
- </constant>
- <constant name="SPECULAR_TOON" value="3" enum="SpecularMode">
- Toon blob which changes size based on roughness.
- </constant>
- <constant name="SPECULAR_DISABLED" value="4" enum="SpecularMode">
- No specular blob.
- </constant>
- <constant name="BILLBOARD_DISABLED" value="0" enum="BillboardMode">
- Billboard mode is disabled.
- </constant>
- <constant name="BILLBOARD_ENABLED" value="1" enum="BillboardMode">
- The object's Z axis will always face the camera.
- </constant>
- <constant name="BILLBOARD_FIXED_Y" value="2" enum="BillboardMode">
- The object's X axis will always face the camera.
- </constant>
- <constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode">
- Used for particle systems. Enables particle animation options.
- </constant>
- <constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel">
- </constant>
- <constant name="TEXTURE_CHANNEL_GREEN" value="1" enum="TextureChannel">
- </constant>
- <constant name="TEXTURE_CHANNEL_BLUE" value="2" enum="TextureChannel">
- </constant>
- <constant name="TEXTURE_CHANNEL_ALPHA" value="3" enum="TextureChannel">
- </constant>
- <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4" enum="TextureChannel">
- </constant>
- <constant name="EMISSION_OP_ADD" value="0" enum="EmissionOperator">
- </constant>
- <constant name="EMISSION_OP_MULTIPLY" value="1" enum="EmissionOperator">
- </constant>
- <constant name="DISTANCE_FADE_DISABLED" value="0" enum="DistanceFadeMode">
- </constant>
- <constant name="DISTANCE_FADE_PIXEL_ALPHA" value="1" enum="DistanceFadeMode">
- </constant>
- <constant name="DISTANCE_FADE_PIXEL_DITHER" value="2" enum="DistanceFadeMode">
- </constant>
- <constant name="DISTANCE_FADE_OBJECT_DITHER" value="3" enum="DistanceFadeMode">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml
index 6d81d8ff82..439fe11861 100644
--- a/doc/classes/SphereMesh.xml
+++ b/doc/classes/SphereMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SphereMesh" inherits="PrimitiveMesh" category="Core" version="3.2">
+<class name="SphereMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
Class representing a spherical [PrimitiveMesh].
</brief_description>
@@ -15,7 +15,7 @@
Full height of the sphere.
</member>
<member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" default="false">
- Determines whether a full sphere or a hemisphere is created.
+ If [code]true[/code], a hemisphere is created rather than a full sphere.
[b]Note:[/b] To get a regular hemisphere, the height and radius of the sphere must be equal.
</member>
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64">
diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape3D.xml
index 616c3b3894..1eaf890639 100644
--- a/doc/classes/SphereShape.xml
+++ b/doc/classes/SphereShape3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SphereShape" inherits="Shape" category="Core" version="3.2">
+<class name="SphereShape3D" inherits="Shape3D" version="4.0">
<brief_description>
Sphere shape for 3D collisions.
</brief_description>
<description>
- Sphere shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. This shape is useful for modeling sphere-like 3D objects.
+ Sphere shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. This shape is useful for modeling sphere-like 3D objects.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index bda0b1192d..e674ceb57e 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpinBox" inherits="Range" category="Core" version="3.2">
+<class name="SpinBox" inherits="Range" version="4.0">
<brief_description>
Numerical input text field.
</brief_description>
@@ -19,6 +19,13 @@
<tutorials>
</tutorials>
<methods>
+ <method name="apply">
+ <return type="void">
+ </return>
+ <description>
+ Applies the current value of this [SpinBox].
+ </description>
+ </method>
<method name="get_line_edit">
<return type="LineEdit">
</return>
@@ -38,14 +45,14 @@
Adds the specified [code]prefix[/code] string before the numerical value of the [SpinBox].
</member>
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
- Adds the specified [code]prefix[/code] string after the numerical value of the [SpinBox].
+ Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox].
</member>
</members>
<constants>
</constants>
<theme_items>
- <theme_item name="updown" type="Texture">
- Sets a custom [Texture] for up and down arrows of the [SpinBox].
+ <theme_item name="updown" type="Texture2D">
+ Sets a custom [Texture2D] for up and down arrows of the [SpinBox].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
index d756c17cef..b3f85ce7e1 100644
--- a/doc/classes/SplitContainer.xml
+++ b/doc/classes/SplitContainer.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SplitContainer" inherits="Container" category="Core" version="3.2">
+<class name="SplitContainer" inherits="Container" version="4.0">
<brief_description>
Container for splitting and adjusting.
</brief_description>
<description>
- Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
+ Container for splitting two [Control]s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
</description>
<tutorials>
</tutorials>
@@ -13,16 +13,19 @@
<return type="void">
</return>
<description>
+ Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values.
</description>
</method>
</methods>
<members>
<member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" default="false">
+ If [code]true[/code], the area of the first [Control] will be collapsed and the dragger will be disabled.
</member>
<member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility" default="0">
- Determines whether the dragger is visible.
+ Determines the dragger's visibility. See [enum DraggerVisibility] for details.
</member>
<member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" default="0">
+ The initial offset of the splitting between the two [Control]s, with [code]0[/code] being at the end of the first [Control].
</member>
</members>
<signals>
@@ -36,13 +39,13 @@
</signals>
<constants>
<constant name="DRAGGER_VISIBLE" value="0" enum="DraggerVisibility">
- The split dragger is visible.
+ The split dragger is visible when the cursor hovers it.
</constant>
<constant name="DRAGGER_HIDDEN" value="1" enum="DraggerVisibility">
- The split dragger is invisible.
+ The split dragger is never visible.
</constant>
<constant name="DRAGGER_HIDDEN_COLLAPSED" value="2" enum="DraggerVisibility">
- The split dragger is invisible and collapsed.
+ The split dragger is never visible and its space collapsed.
</constant>
</constants>
</class>
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight3D.xml
index 93aee55b99..f094818c21 100644
--- a/doc/classes/SpotLight.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpotLight" inherits="Light" category="Core" version="3.2">
+<class name="SpotLight3D" inherits="Light3D" version="4.0">
<brief_description>
A spotlight, such as a reflector spotlight or a lantern.
</brief_description>
<description>
- A Spotlight is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of [Light].
+ A Spotlight is a type of [Light3D] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of [Light3D].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm3D.xml
index 133ff68859..8305494c2b 100644
--- a/doc/classes/SpringArm.xml
+++ b/doc/classes/SpringArm3D.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpringArm" inherits="Spatial" category="Core" version="3.2">
+<class name="SpringArm3D" inherits="Node3D" version="4.0">
<brief_description>
A helper node, mostly used in 3rd person cameras.
</brief_description>
<description>
- The SpringArm node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin.
+ The SpringArm3D node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin.
The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment.
- The SpringArm will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis.
- If you use the SpringArm as a camera controller for your player, you might need to exclude the player's collider from the SpringArm's collision check.
+ The SpringArm3D will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis.
+ If you use the SpringArm3D as a camera controller for your player, you might need to exclude the player's collider from the SpringArm3D's collision check.
</description>
<tutorials>
</tutorials>
@@ -18,14 +18,14 @@
<argument index="0" name="RID" type="RID">
</argument>
<description>
- Adds the object with the given [RID] to the list of objects excluded from the collision check.
+ Adds the [PhysicsBody3D] object with the given [RID] to the list of [PhysicsBody3D] objects excluded from the collision check.
</description>
</method>
<method name="clear_excluded_objects">
<return type="void">
</return>
<description>
- Clears the list of objects excluded from the collision check.
+ Clears the list of [PhysicsBody3D] objects excluded from the collision check.
</description>
</method>
<method name="get_hit_length">
@@ -41,7 +41,7 @@
<argument index="0" name="RID" type="RID">
</argument>
<description>
- Removes the given [RID] from the list of objects excluded from the collision check.
+ Removes the given [RID] from the list of [PhysicsBody3D] objects excluded from the collision check.
</description>
</method>
</methods>
@@ -50,17 +50,17 @@
The layers against which the collision check shall be done.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.01">
- When the collision check is made, a candidate length for the SpringArm is given.
- The margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm.
- This margin is useful for when the SpringArm has a [Camera] as a child node: without the margin, the [Camera] would be placed on the exact point of collision, while with the margin the [Camera] would be placed close to the point of collision.
+ When the collision check is made, a candidate length for the SpringArm3D is given.
+ The margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm3D.
+ This margin is useful for when the SpringArm3D has a [Camera3D] as a child node: without the margin, the [Camera3D] would be placed on the exact point of collision, while with the margin the [Camera3D] would be placed close to the point of collision.
</member>
- <member name="shape" type="Shape" setter="set_shape" getter="get_shape">
- The [Shape] to use for the SpringArm.
- When the shape is set, the SpringArm will cast the [Shape] on its z axis instead of performing a ray cast.
+ <member name="shape" type="Shape3D" setter="set_shape" getter="get_shape">
+ The [Shape3D] to use for the SpringArm3D.
+ When the shape is set, the SpringArm3D will cast the [Shape3D] on its z axis instead of performing a ray cast.
</member>
<member name="spring_length" type="float" setter="set_length" getter="get_length" default="1.0">
- The maximum extent of the SpringArm. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm's child nodes.
- To know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState] documentation.
+ The maximum extent of the SpringArm3D. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm3D's child nodes.
+ To know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState3D] documentation.
</member>
</members>
<constants>
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite2D.xml
index b77db1ce9a..92f561d7b5 100644
--- a/doc/classes/Sprite.xml
+++ b/doc/classes/Sprite2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite" inherits="Node2D" category="Core" version="3.2">
+<class name="Sprite2D" inherits="Node2D" version="4.0">
<brief_description>
General-purpose sprite node.
</brief_description>
@@ -13,7 +13,7 @@
<return type="Rect2">
</return>
<description>
- Returns a [Rect2] representing the Sprite's boundary in local coordinates. Can be used to detect if the Sprite was clicked. Example:
+ Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. Example:
[codeblock]
func _input(event):
if event is InputEventMouseButton and event.pressed and event.button_index == BUTTON_LEFT:
@@ -52,8 +52,9 @@
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1">
The number of columns in the sprite sheet.
</member>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
- The normal map gives depth to the Sprite.
+ <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
+ The normal map gives depth to the Sprite2D.
+ [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="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The texture's drawing offset.
@@ -67,8 +68,17 @@
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
- [Texture] object to draw.
+ <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0">
+ Strength of the specular light effect of this [Sprite2D].
+ </member>
+ <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
+ The color of the specular light effect.
+ </member>
+ <member name="specular_map" type="Texture2D" setter="set_specular_map" getter="get_specular_map">
+ The specular map is used for more control on the shininess effect.
+ </member>
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ [Texture2D] object to draw.
</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/Sprite3D.xml b/doc/classes/Sprite3D.xml
index e458d4301e..f59d5130c9 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.2">
+<class name="Sprite3D" inherits="SpriteBase3D" version="4.0">
<brief_description>
2D sprite node in a 3D world.
</brief_description>
<description>
A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.
+ [b]Note:[/b] There are [url=https://github.com/godotengine/godot/issues/20855]known performance issues[/url] when using [Sprite3D]. Consider using a [MeshInstance3D] with a [QuadMesh] as the mesh instead. You can still have billboarding by enabling billboard properties in the QuadMesh's [StandardMaterial3D].
</description>
<tutorials>
</tutorials>
@@ -26,8 +27,8 @@
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
- [Texture] object to draw.
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ [Texture2D] object to draw.
</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 15d5d7beb4..479dc5f94c 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.2">
+<class name="SpriteBase3D" inherits="GeometryInstance3D" version="4.0">
<brief_description>
2D sprite node in 3D environment.
</brief_description>
@@ -21,12 +21,14 @@
<argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags">
</argument>
<description>
+ Returns the value of the specified flag.
</description>
</method>
<method name="get_item_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
+ Returns the rectangle representing this sprite.
</description>
</method>
<method name="set_draw_flag">
@@ -37,6 +39,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ If [code]true[/code], the specified flag will be enabled.
</description>
</method>
</methods>
@@ -46,7 +49,7 @@
<member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis" default="2">
The direction in which the front of the texture faces.
</member>
- <member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0">
+ <member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true">
If [code]true[/code], texture will be centered.
@@ -73,7 +76,7 @@
The size of one pixel's width on the sprite to scale it in 3D.
</member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
- If [code]true[/code], the [Light] in the [Environment] has effects on the sprite.
+ If [code]true[/code], the [Light3D] in the [Environment] has effects on the sprite.
</member>
<member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the sprite invisible.
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index f28192519e..6e1e1688f4 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpriteFrames" inherits="Resource" category="Core" version="3.2">
+<class name="SpriteFrames" inherits="Resource" version="4.0">
<brief_description>
- Sprite frame library for AnimatedSprite.
+ Sprite frame library for AnimatedSprite2D.
</brief_description>
<description>
- Sprite frame library for [AnimatedSprite]. Contains frames and animation data for playback.
+ Sprite frame library for [AnimatedSprite2D]. Contains frames and animation data for playback.
</description>
<tutorials>
</tutorials>
@@ -12,7 +12,7 @@
<method name="add_animation">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Adds a new animation to the library.
@@ -21,9 +21,9 @@
<method name="add_frame">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
- <argument index="1" name="frame" type="Texture">
+ <argument index="1" name="frame" type="Texture2D">
</argument>
<argument index="2" name="at_position" type="int" default="-1">
</argument>
@@ -34,7 +34,7 @@
<method name="clear">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Removes all frames from the given animation.
@@ -50,14 +50,14 @@
<method name="get_animation_loop" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
If [code]true[/code], the given animation will loop.
</description>
</method>
<method name="get_animation_names" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns an array containing the names associated to each animation. Values are placed in alphabetical order.
@@ -66,16 +66,16 @@
<method name="get_animation_speed" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
The animation's speed in frames per second.
</description>
</method>
<method name="get_frame" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="idx" type="int">
</argument>
@@ -86,7 +86,7 @@
<method name="get_frame_count" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Returns the number of frames in the animation.
@@ -95,7 +95,7 @@
<method name="has_animation" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
If [code]true[/code], the named animation exists.
@@ -104,7 +104,7 @@
<method name="remove_animation">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Removes the given animation.
@@ -113,7 +113,7 @@
<method name="remove_frame">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="idx" type="int">
</argument>
@@ -124,9 +124,9 @@
<method name="rename_animation">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
- <argument index="1" name="newname" type="String">
+ <argument index="1" name="newname" type="StringName">
</argument>
<description>
Changes the animation's name to [code]newname[/code].
@@ -135,7 +135,7 @@
<method name="set_animation_loop">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="loop" type="bool">
</argument>
@@ -146,7 +146,7 @@
<method name="set_animation_speed">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="speed" type="float">
</argument>
@@ -157,11 +157,11 @@
<method name="set_frame">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="idx" type="int">
</argument>
- <argument index="2" name="txt" type="Texture">
+ <argument index="2" name="txt" type="Texture2D">
</argument>
<description>
Sets the texture of the given frame.
@@ -170,6 +170,7 @@
</methods>
<members>
<member name="frames" type="Array" setter="_set_frames" getter="_get_frames">
+ Compatibility property, always equals to an empty array.
</member>
</members>
<constants>
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
new file mode 100644
index 0000000000..4ed9146e0f
--- /dev/null
+++ b/doc/classes/StandardMaterial3D.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StandardMaterial3D" inherits="BaseMaterial3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index 34276ec535..2a5c1ea6f4 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.2">
+<class name="StaticBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
Static body for 2D physics.
</brief_description>
@@ -12,20 +12,12 @@
<methods>
</methods>
<members>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
- The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
- Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
- </member>
<member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0">
The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2( 0, 0 )">
The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving.
</member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction">
- The body's friction. Values range from [code]0[/code] (no friction) to [code]1[/code] (full friction).
- Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
- </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.
diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody3D.xml
index f8840ddc14..c896efc314 100644
--- a/doc/classes/StaticBody.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -1,32 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.2">
+<class name="StaticBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
Static body for 3D physics.
</brief_description>
<description>
- Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody], they don't consume any CPU resources as long as they don't move.
- A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active, the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
- Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move.
+ Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
- The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
- Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
- </member>
<member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )">
The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
</member>
<member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )">
The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement.
</member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction">
- The body's friction, from 0 (frictionless) to 1 (full friction).
- Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
- </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.
diff --git a/doc/classes/StreamCubemap.xml b/doc/classes/StreamCubemap.xml
new file mode 100644
index 0000000000..16648266eb
--- /dev/null
+++ b/doc/classes/StreamCubemap.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamCubemap" inherits="StreamTextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamCubemapArray.xml b/doc/classes/StreamCubemapArray.xml
new file mode 100644
index 0000000000..b84973fd14
--- /dev/null
+++ b/doc/classes/StreamCubemapArray.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamCubemapArray" inherits="StreamTextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 2a1919071a..a73d3c8212 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeer" inherits="Reference" category="Core" version="3.2">
+<class name="StreamPeer" inherits="Reference" version="4.0">
<brief_description>
Abstraction and base class for stream-based protocols.
</brief_description>
@@ -171,7 +171,7 @@
<method name="put_data">
<return type="int" enum="Error">
</return>
- <argument index="0" name="data" type="PoolByteArray">
+ <argument index="0" name="data" type="PackedByteArray">
</argument>
<description>
Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code.
@@ -198,7 +198,7 @@
<method name="put_partial_data">
<return type="Array">
</return>
- <argument index="0" name="data" type="PoolByteArray">
+ <argument index="0" name="data" type="PackedByteArray">
</argument>
<description>
Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent.
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index 30a220863d..41cef9fb55 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core" version="3.2">
+<class name="StreamPeerBuffer" inherits="StreamPeer" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -49,7 +49,7 @@
</method>
</methods>
<members>
- <member name="data_array" type="PoolByteArray" setter="set_data_array" getter="get_data_array" default="PoolByteArray( )">
+ <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray( )">
</member>
</members>
<constants>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index b34d8d1b25..69e8f67a5e 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.2">
+<class name="StreamPeerSSL" inherits="StreamPeer" version="4.0">
<brief_description>
SSL stream peer.
</brief_description>
@@ -38,6 +38,7 @@
</argument>
<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.
</description>
</method>
<method name="disconnect_from_stream">
@@ -71,11 +72,13 @@
A status representing a [StreamPeerSSL] that is disconnected.
</constant>
<constant name="STATUS_HANDSHAKING" value="1" enum="Status">
+ A status representing a [StreamPeerSSL] during handshaking.
</constant>
<constant name="STATUS_CONNECTED" value="2" enum="Status">
A status representing a [StreamPeerSSL] that is connected to a host.
</constant>
<constant name="STATUS_ERROR" value="3" enum="Status">
+ A status representing a [StreamPeerSSL] in error state.
</constant>
<constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status">
An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index bee026c851..dbd53f8ba0 100644
--- a/doc/classes/StreamPeerTCP.xml
+++ b/doc/classes/StreamPeerTCP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.2">
+<class name="StreamPeerTCP" inherits="StreamPeer" version="4.0">
<brief_description>
TCP stream peer.
</brief_description>
diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture2D.xml
index 9cc3511b68..214298475c 100644
--- a/doc/classes/StreamTexture.xml
+++ b/doc/classes/StreamTexture2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTexture" inherits="Texture" category="Core" version="3.2">
+<class name="StreamTexture2D" inherits="Texture2D" version="4.0">
<brief_description>
A [code].stex[/code] texture.
</brief_description>
@@ -15,11 +15,11 @@
<argument index="0" name="path" type="String">
</argument>
<description>
+ Loads the texture from the given path.
</description>
</method>
</methods>
<members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
The StreamTexture's file path to a [code].stex[/code] file.
</member>
diff --git a/doc/classes/StreamTexture2DArray.xml b/doc/classes/StreamTexture2DArray.xml
new file mode 100644
index 0000000000..ec545b24d0
--- /dev/null
+++ b/doc/classes/StreamTexture2DArray.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamTexture2DArray" inherits="StreamTextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamTextureLayered.xml b/doc/classes/StreamTextureLayered.xml
new file mode 100644
index 0000000000..10a7aae976
--- /dev/null
+++ b/doc/classes/StreamTextureLayered.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamTextureLayered" inherits="TextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="load">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 11a9f6dc0d..0dd6923129 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="String" category="Built-In Types" version="3.2">
+<class name="String" version="4.0">
<brief_description>
Built-in string class.
</brief_description>
@@ -49,6 +49,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Vector2i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Vector2i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Rect2">
</argument>
<description>
@@ -58,6 +67,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Rect2i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Rect2i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Vector3">
</argument>
<description>
@@ -67,6 +85,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Vector3i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Vector3i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
@@ -130,6 +157,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="StringName">
+ </argument>
+ <description>
+ Constructs a new String from the given [StringName].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="NodePath">
</argument>
<description>
@@ -148,6 +184,24 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Callable">
+ </argument>
+ <description>
+ Constructs a new String from the given [Callable].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Signal">
+ </argument>
+ <description>
+ Constructs a new String from the given [Signal].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Dictionary">
</argument>
<description>
@@ -166,64 +220,82 @@
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolByteArray">
+ <argument index="0" name="from" type="PackedByteArray">
</argument>
<description>
- Constructs a new String from the given [PoolByteArray].
+ Constructs a new String from the given [PackedByteArray].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolIntArray">
+ <argument index="0" name="from" type="PackedInt32Array">
</argument>
<description>
- Constructs a new String from the given [PoolIntArray].
+ Constructs a new String from the given [PackedInt32Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolRealArray">
+ <argument index="0" name="from" type="PackedInt64Array">
</argument>
<description>
- Constructs a new String from the given [PoolRealArray].
+ Constructs a new String from the given [PackedInt64Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolStringArray">
+ <argument index="0" name="from" type="PackedFloat32Array">
</argument>
<description>
- Constructs a new String from the given [PoolStringArray].
+ Constructs a new String from the given [PackedFloat32Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolVector2Array">
+ <argument index="0" name="from" type="PackedFloat64Array">
</argument>
<description>
- Constructs a new String from the given [PoolVector2Array].
+ Constructs a new String from the given [PackedFloat64Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolVector3Array">
+ <argument index="0" name="from" type="PackedStringArray">
</argument>
<description>
- Constructs a new String from the given [PoolVector3Array].
+ Constructs a new String from the given [PackedStringArray].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolColorArray">
+ <argument index="0" name="from" type="PackedVector2Array">
</argument>
<description>
- Constructs a new String from the given [PoolColorArray].
+ Constructs a new String from the given [PackedVector2Array].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PackedVector3Array">
+ </argument>
+ <description>
+ Constructs a new String from the given [PackedVector3Array].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PackedColorArray">
+ </argument>
+ <description>
+ Constructs a new String from the given [PackedColorArray].
</description>
</method>
<method name="begins_with">
@@ -236,7 +308,7 @@
</description>
</method>
<method name="bigrams">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the bigrams (pairs of consecutive letters) of this string.
@@ -322,6 +394,8 @@
</description>
</method>
<method name="erase">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="int">
</argument>
<argument index="1" name="chars" type="int">
@@ -366,7 +440,7 @@
</return>
<argument index="0" name="values" type="Variant">
</argument>
- <argument index="1" name="placeholder" type="String" default="{_}">
+ <argument index="1" name="placeholder" type="String" default="&quot;{_}&quot;">
</argument>
<description>
Formats the string by replacing all occurrences of [code]placeholder[/code] with [code]values[/code].
@@ -512,7 +586,7 @@
<method name="is_valid_hex_number">
<return type="bool">
</return>
- <argument index="0" name="with_prefix" type="bool" default="False">
+ <argument index="0" name="with_prefix" type="bool" default="false">
</argument>
<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].
@@ -546,6 +620,19 @@
Returns [code]true[/code] if this string contains a valid IP address.
</description>
</method>
+ <method name="join">
+ <return type="String">
+ </return>
+ <argument index="0" name="parts" type="PackedStringArray">
+ </argument>
+ <description>
+ Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
+ Example:
+ [codeblock]
+ print(", ".join(["One", "Two", "Three", "Four"]))
+ [/codeblock]
+ </description>
+ </method>
<method name="json_escape">
<return type="String">
</return>
@@ -597,7 +684,7 @@
</description>
</method>
<method name="md5_buffer">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the MD5 hash of the string as an array of bytes.
@@ -732,11 +819,11 @@
</description>
</method>
<method name="rsplit">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="delimiter" type="String">
</argument>
- <argument index="1" name="allow_empty" type="bool" default="True">
+ <argument index="1" name="allow_empty" type="bool" default="true">
</argument>
<argument index="2" name="maxsplit" type="int" default="0">
</argument>
@@ -752,7 +839,6 @@
print(some_array[0]) # Prints "Four"
print(some_array[1]) # Prints "Three,Two,One"
[/codeblock]
-
</description>
</method>
<method name="rstrip">
@@ -765,7 +851,7 @@
</description>
</method>
<method name="sha1_buffer">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the SHA-1 hash of the string as an array of bytes.
@@ -779,7 +865,7 @@
</description>
</method>
<method name="sha256_buffer">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the SHA-256 hash of the string as an array of bytes.
@@ -802,11 +888,11 @@
</description>
</method>
<method name="split">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="delimiter" type="String">
</argument>
- <argument index="1" name="allow_empty" type="bool" default="True">
+ <argument index="1" name="allow_empty" type="bool" default="true">
</argument>
<argument index="2" name="maxsplit" type="int" default="0">
</argument>
@@ -824,11 +910,11 @@
</description>
</method>
<method name="split_floats">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="delimiter" type="String">
</argument>
- <argument index="1" name="allow_empty" type="bool" default="True">
+ <argument index="1" name="allow_empty" type="bool" default="true">
</argument>
<description>
Splits the string in floats by using a delimiter string and returns an array of the substrings.
@@ -838,9 +924,9 @@
<method name="strip_edges">
<return type="String">
</return>
- <argument index="0" name="left" type="bool" default="True">
+ <argument index="0" name="left" type="bool" default="true">
</argument>
- <argument index="1" name="right" type="bool" default="True">
+ <argument index="1" name="right" type="bool" default="true">
</argument>
<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.
@@ -865,10 +951,10 @@
</description>
</method>
<method name="to_ascii">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
- Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters.
+ Converts the String (which is a character array) to [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters.
</description>
</method>
<method name="to_float">
@@ -900,10 +986,10 @@
</description>
</method>
<method name="to_utf8">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
- Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii].
+ Converts the String (which is an array of characters) to [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii].
</description>
</method>
<method name="trim_prefix">
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
new file mode 100644
index 0000000000..5d8ac6fdcc
--- /dev/null
+++ b/doc/classes/StringName.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StringName" version="4.0">
+ <brief_description>
+ An optimized string type for unique names.
+ </brief_description>
+ <description>
+ [StringName]s are immutable strings designed for general-purpose represention of unique names. [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="StringName">
+ <return type="StringName">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ Creates a new [StringName] from the given [String].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 1d873ef0b1..0e848a1bf6 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBox" inherits="Resource" category="Core" version="3.2">
+<class name="StyleBox" inherits="Resource" version="4.0">
<brief_description>
Base class for drawing stylized boxes for the UI.
</brief_description>
@@ -17,18 +17,22 @@
<argument index="1" name="rect" type="Rect2">
</argument>
<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.
</description>
</method>
<method name="get_center_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ Returns the size of this [StyleBox] without the margins.
</description>
</method>
<method name="get_current_item_drawn" qualifiers="const">
<return type="CanvasItem">
</return>
<description>
+ Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment.
</description>
</method>
<method name="get_default_margin" qualifiers="const">
@@ -37,6 +41,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the default value of the specified [enum Margin].
</description>
</method>
<method name="get_margin" qualifiers="const">
@@ -45,7 +50,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
- Returns the content margin offset for the specified margin.
+ Returns the content margin offset for the specified [enum Margin].
Positive values reduce size inwards, unlike [Control]'s margin values.
</description>
</method>
@@ -71,6 +76,7 @@
<argument index="1" name="offset" type="float">
</argument>
<description>
+ Sets the default value of the specified [enum Margin] to given [code]offset[/code] in pixels.
</description>
</method>
<method name="test_mask" qualifiers="const">
diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml
index 9dc8569b75..8781cdcde3 100644
--- a/doc/classes/StyleBoxEmpty.xml
+++ b/doc/classes/StyleBoxEmpty.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxEmpty" inherits="StyleBox" category="Core" version="3.2">
+<class name="StyleBoxEmpty" inherits="StyleBox" version="4.0">
<brief_description>
Empty stylebox (does not display anything).
</brief_description>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 05ee79eef2..d6e737b076 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.2">
+<class name="StyleBoxFlat" inherits="StyleBox" version="4.0">
<brief_description>
- Customizable Stylebox with a given set of parameters. (no texture required)
+ Customizable [StyleBox] with a given set of parameters (no texture required).
</brief_description>
<description>
- This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
+ This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
- Color
- Border width (individual width for each border)
- Rounded corners (individual radius for each corner)
- - Shadow
+ - Shadow (with blur and offset)
Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example:
[codeblock]
height = 30
@@ -30,12 +30,14 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the given [code]margin[/code]'s border width. See [enum Margin] for possible values.
</description>
</method>
<method name="get_border_width_min" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the smallest border width out of all four borders.
</description>
</method>
<method name="get_corner_radius" qualifiers="const">
@@ -44,6 +46,7 @@
<argument index="0" name="corner" type="int" enum="Corner">
</argument>
<description>
+ Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values.
</description>
</method>
<method name="get_expand_margin" qualifiers="const">
@@ -52,6 +55,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values.
</description>
</method>
<method name="set_border_width">
@@ -62,6 +66,7 @@
<argument index="1" name="width" type="int">
</argument>
<description>
+ Sets the border width to [code]width[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_border_width_all">
@@ -70,6 +75,7 @@
<argument index="0" name="width" type="int">
</argument>
<description>
+ Sets the border width to [code]width[/code] pixels for all margins.
</description>
</method>
<method name="set_corner_radius">
@@ -80,6 +86,7 @@
<argument index="1" name="radius" type="int">
</argument>
<description>
+ Sets the corner radius to [code]radius[/code] pixels for the given [code]corner[/code]. See [enum Corner] for possible values.
</description>
</method>
<method name="set_corner_radius_all">
@@ -88,6 +95,7 @@
<argument index="0" name="radius" type="int">
</argument>
<description>
+ Sets the corner radius to [code]radius[/code] pixels for all corners.
</description>
</method>
<method name="set_corner_radius_individual">
@@ -102,6 +110,7 @@
<argument index="3" name="radius_bottom_left" type="int">
</argument>
<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.
</description>
</method>
<method name="set_expand_margin">
@@ -112,6 +121,7 @@
<argument index="1" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_expand_margin_all">
@@ -120,6 +130,7 @@
<argument index="0" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for all margins.
</description>
</method>
<method name="set_expand_margin_individual">
@@ -134,6 +145,7 @@
<argument index="3" name="size_bottom" type="float">
</argument>
<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.
</description>
</method>
</methods>
@@ -167,7 +179,8 @@
</member>
<member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" default="8">
This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account.
- For corner radii smaller than 10, 4-5 should be enough. For corner radii smaller than 30, 8-12 should be enough.
+ For corner radii smaller than 10, [code]4[/code] or [code]5[/code] should be enough. For corner radii smaller than 30, values between [code]8[/code] and [code]12[/code] should be enough.
+ A corner detail of [code]1[/code] will result in chamfered corners instead of rounded corners, which is useful for some artistic effects.
</member>
<member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0">
The bottom-left corner's radius. If [code]0[/code], the corner is not rounded.
diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml
index c0745c5f39..4a2dbf60e4 100644
--- a/doc/classes/StyleBoxLine.xml
+++ b/doc/classes/StyleBoxLine.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.2">
+<class name="StyleBoxLine" inherits="StyleBox" version="4.0">
<brief_description>
+ [StyleBox] that displays a single line.
</brief_description>
<description>
+ [StyleBox] that displays a single line of a given color and thickness. It can be used to draw things like separators.
</description>
<tutorials>
</tutorials>
@@ -10,14 +12,19 @@
</methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
+ The line's color.
</member>
<member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0">
+ The number of pixels the line will extend before the [StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [StyleBoxLine]'s bounds.
</member>
<member name="grow_end" type="float" setter="set_grow_end" getter="get_grow_end" default="1.0">
+ The number of pixels the line will extend past the [StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [StyleBoxLine]'s bounds.
</member>
<member name="thickness" type="int" setter="set_thickness" getter="get_thickness" default="1">
+ The line's thickness in pixels.
</member>
<member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false">
+ If [code]true[/code], the line will be vertical. If [code]false[/code], the line will be horizontal.
</member>
</members>
<constants>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index d5efc80846..f8aa14cb2b 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.2">
+<class name="StyleBoxTexture" inherits="StyleBox" version="4.0">
<brief_description>
Texture-based nine-patch [StyleBox].
</brief_description>
@@ -15,6 +15,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values.
</description>
</method>
<method name="get_margin_size" qualifiers="const">
@@ -23,6 +24,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the size of the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_expand_margin_all">
@@ -31,6 +33,7 @@
<argument index="0" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for all margins.
</description>
</method>
<method name="set_expand_margin_individual">
@@ -45,6 +48,7 @@
<argument index="3" name="size_bottom" type="float">
</argument>
<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.
</description>
</method>
<method name="set_expand_margin_size">
@@ -55,6 +59,7 @@
<argument index="1" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_margin_size">
@@ -65,15 +70,19 @@
<argument index="1" name="size" type="float">
</argument>
<description>
+ Sets the margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
</methods>
<members>
<member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0">
+ Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values.
</member>
<member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0">
+ Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values.
</member>
<member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true">
+ If [code]true[/code], the nine-patch texture's center tile will be drawn.
</member>
<member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0">
Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.
@@ -110,29 +119,34 @@
<member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
Modulates the color of the texture when this style box is drawn.
</member>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map to use when drawing this style box.
+ [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="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
- Species a sub region of the texture to use.
+ Species a sub-region of the texture to use.
This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region.
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The texture to use when drawing this style box.
</member>
</members>
<signals>
<signal name="texture_changed">
<description>
+ Emitted when the stylebox's texture is changed.
</description>
</signal>
</signals>
<constants>
<constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode">
+ Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly.
</constant>
<constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode">
+ Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system.
</constant>
<constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2" enum="AxisStretchMode">
+ Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike [constant AXIS_STRETCH_MODE_TILE], the texture may be slightly stretched to make the nine-patch texture tile seamlessly.
</constant>
</constants>
</class>
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
new file mode 100644
index 0000000000..6014762e3d
--- /dev/null
+++ b/doc/classes/SubViewport.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SubViewport" inherits="Viewport" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="SubViewport.ClearMode" default="0">
+ The clear mode when the sub-viewport is used as a render target.
+ </member>
+ <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="SubViewport.UpdateMode" default="2">
+ The update mode when the sub-viewport is used as a render target.
+ </member>
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 0, 0 )">
+ The width and height of the sub-viewport.
+ </member>
+ <member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i( 0, 0 )">
+ The 2D size override of the sub-viewport. If either the width or height is [code]0[/code], the override is disabled.
+ </member>
+ <member name="size_2d_override_stretch" type="bool" setter="set_size_2d_override_stretch" getter="is_size_2d_override_stretch_enabled" default="false">
+ If [code]true[/code], the 2D size override affects stretch as well.
+ </member>
+ <member name="xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false">
+ If [code]true[/code], the sub-viewport will be used in AR/VR process.
+ </member>
+ </members>
+ <constants>
+ <constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode">
+ Always clear the render target before drawing.
+ </constant>
+ <constant name="CLEAR_MODE_NEVER" value="1" enum="ClearMode">
+ Never clear the render target.
+ </constant>
+ <constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2" enum="ClearMode">
+ Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER].
+ </constant>
+ <constant name="UPDATE_DISABLED" value="0" enum="UpdateMode">
+ Do not update the render target.
+ </constant>
+ <constant name="UPDATE_ONCE" value="1" enum="UpdateMode">
+ Update the render target once, then switch to [constant UPDATE_DISABLED].
+ </constant>
+ <constant name="UPDATE_WHEN_VISIBLE" value="2" enum="UpdateMode">
+ Update the render target only when it is visible. This is the default value.
+ </constant>
+ <constant name="UPDATE_WHEN_PARENT_VISIBLE" value="3" enum="UpdateMode">
+ Update the render target only when the its parent is visible.
+ </constant>
+ <constant name="UPDATE_ALWAYS" value="4" enum="UpdateMode">
+ Always update the render target.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SubViewportContainer.xml b/doc/classes/SubViewportContainer.xml
new file mode 100644
index 0000000000..e6a0bd4866
--- /dev/null
+++ b/doc/classes/SubViewportContainer.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SubViewportContainer" inherits="Container" version="4.0">
+ <brief_description>
+ Control for holding [SubViewport]s.
+ </brief_description>
+ <description>
+ A [Container] node that holds a [SubViewport], automatically setting its size.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false">
+ If [code]true[/code], the sub-viewport will be scaled to the control's size.
+ </member>
+ <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1">
+ Divides the sub-viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.
+ For example, a 1280×720 sub-viewport with [member stretch_shrink] set to [code]2[/code] will be rendered at 640×360 while occupying the same size in the container.
+ [b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 7cfd8c6919..eeb6b6cd9d 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SurfaceTool" inherits="Reference" category="Core" version="3.2">
+<class name="SurfaceTool" inherits="Reference" version="4.0">
<brief_description>
Helper tool to create geometry.
</brief_description>
@@ -15,6 +15,8 @@
The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method add_uv] or [method add_color], then the last values would be used.
Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh.
Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices.
+ See also [ArrayMesh], [ImmediateGeometry3D] and [MeshDataTool] for procedural geometry generation.
+ [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
</tutorials>
@@ -22,7 +24,7 @@
<method name="add_bones">
<return type="void">
</return>
- <argument index="0" name="bones" type="PoolIntArray">
+ <argument index="0" name="bones" type="PackedInt32Array">
</argument>
<description>
Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers.
@@ -76,15 +78,15 @@
<method name="add_triangle_fan">
<return type="void">
</return>
- <argument index="0" name="vertices" type="PoolVector3Array">
+ <argument index="0" name="vertices" type="PackedVector3Array">
</argument>
- <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
</argument>
- <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray( )">
+ <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray( )">
</argument>
- <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array( )">
</argument>
- <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array( )">
+ <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array( )">
</argument>
<argument index="5" name="tangents" type="Array" default="[ ]">
</argument>
@@ -123,7 +125,7 @@
<method name="add_weights">
<return type="void">
</return>
- <argument index="0" name="weights" type="PoolRealArray">
+ <argument index="0" name="weights" type="PackedFloat32Array">
</argument>
<description>
Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values.
@@ -163,17 +165,18 @@
</return>
<argument index="0" name="existing" type="ArrayMesh" default="null">
</argument>
- <argument index="1" name="flags" type="int" default="97280">
+ <argument index="1" name="flags" type="int" default="31744">
</argument>
<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].
- Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]Mesh.ARRAY_COMPRESS_*[/code] constants for other flags.
+ Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags.
</description>
</method>
<method name="commit_to_arrays">
<return type="Array">
</return>
<description>
+ Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API.
</description>
</method>
<method name="create_from">
@@ -197,6 +200,7 @@
<argument index="2" name="blend_shape" type="String">
</argument>
<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>
</method>
<method name="deindex">
diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCP_Server.xml
index cac3a0b082..72e9ca923d 100644
--- a/doc/classes/TCP_Server.xml
+++ b/doc/classes/TCP_Server.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TCP_Server" inherits="Reference" category="Core" version="3.2">
+<class name="TCP_Server" inherits="Reference" version="4.0">
<brief_description>
A TCP server.
</brief_description>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 1b9f38fc54..22e92ae5d9 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TabContainer" inherits="Container" category="Core" version="3.2">
+<class name="TabContainer" inherits="Container" version="4.0">
<brief_description>
Tabbed container.
</brief_description>
@@ -36,10 +36,10 @@
<method name="get_tab_control" qualifiers="const">
<return type="Control">
</return>
- <argument index="0" name="idx" type="int">
+ <argument index="0" name="tab_idx" type="int">
</argument>
<description>
- Returns the currently visible tab's [Control] node.
+ Returns the [Control] node from the tab at index [code]tab_idx[/code].
</description>
</method>
<method name="get_tab_count" qualifiers="const">
@@ -59,12 +59,12 @@
</description>
</method>
<method name="get_tab_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
- Returns the [Texture] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture].
+ Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
<method name="get_tab_title" qualifiers="const">
@@ -109,7 +109,7 @@
</return>
<argument index="0" name="tab_idx" type="int">
</argument>
- <argument index="1" name="icon" type="Texture">
+ <argument index="1" name="icon" type="Texture2D">
</argument>
<description>
Sets an icon for the tab at index [code]tab_idx[/code].
@@ -144,12 +144,13 @@
If [code]true[/code], tabs can be rearranged with mouse drag.
</member>
<member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign" default="1">
- The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details.
+ The alignment of all tabs in the tab container. See the [enum TabAlign] constants for details.
</member>
<member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true">
If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden.
</member>
<member name="use_hidden_tabs_for_min_size" type="bool" setter="set_use_hidden_tabs_for_min_size" getter="get_use_hidden_tabs_for_min_size" default="false">
+ If [code]true[/code], children [Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.
</member>
</members>
<signals>
@@ -185,43 +186,53 @@
</constant>
</constants>
<theme_items>
- <theme_item name="decrement" type="Texture">
+ <theme_item name="decrement" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
</theme_item>
- <theme_item name="decrement_highlight" type="Texture">
+ <theme_item name="decrement_highlight" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
</theme_item>
<theme_item name="font" type="Font">
+ The font used to draw tab names.
</theme_item>
<theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ Font color of inactive tabs.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ Font color of disabled tabs.
</theme_item>
<theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Font color of the currently selected tab.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ Horizontal separation between tabs.
</theme_item>
- <theme_item name="increment" type="Texture">
- </theme_item>
- <theme_item name="increment_highlight" type="Texture">
+ <theme_item name="increment" type="Texture2D">
+ Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
</theme_item>
- <theme_item name="label_valign_bg" type="int" default="2">
+ <theme_item name="increment_highlight" type="Texture2D">
+ Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
</theme_item>
- <theme_item name="label_valign_fg" type="int" default="0">
+ <theme_item name="menu" type="Texture2D">
+ The icon for the menu button (see [method set_popup]).
</theme_item>
- <theme_item name="menu" type="Texture">
- </theme_item>
- <theme_item name="menu_highlight" type="Texture">
+ <theme_item name="menu_highlight" type="Texture2D">
+ The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor.
</theme_item>
<theme_item name="panel" type="StyleBox">
+ The style for the background fill.
</theme_item>
<theme_item name="side_margin" type="int" default="8">
+ The space at the left and right edges of the tab bar.
</theme_item>
<theme_item name="tab_bg" type="StyleBox">
+ The style of inactive tabs.
</theme_item>
<theme_item name="tab_disabled" type="StyleBox">
+ The style of disabled tabs.
</theme_item>
<theme_item name="tab_fg" type="StyleBox">
- </theme_item>
- <theme_item name="top_margin" type="int" default="24">
+ The style of the currently selected tab.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 6bd7b8c2c3..3fc1db9dc6 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tabs" inherits="Control" category="Core" version="3.2">
+<class name="Tabs" inherits="Control" version="4.0">
<brief_description>
Tabs control.
</brief_description>
@@ -14,7 +14,7 @@
</return>
<argument index="0" name="title" type="String" default="&quot;&quot;">
</argument>
- <argument index="1" name="icon" type="Texture" default="null">
+ <argument index="1" name="icon" type="Texture2D" default="null">
</argument>
<description>
Adds a new tab.
@@ -33,6 +33,7 @@
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible.
</description>
</method>
<method name="get_select_with_rmb" qualifiers="const">
@@ -59,18 +60,19 @@
</description>
</method>
<method name="get_tab_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
- Returns the [Texture] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture].
+ Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
<method name="get_tab_offset" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of hidden tabs offsetted to the left.
</description>
</method>
<method name="get_tab_rect" qualifiers="const">
@@ -144,7 +146,7 @@
</return>
<argument index="0" name="tab_idx" type="int">
</argument>
- <argument index="1" name="icon" type="Texture">
+ <argument index="1" name="icon" type="Texture2D">
</argument>
<description>
Sets an [code]icon[/code] for the tab at index [code]tab_idx[/code].
@@ -179,11 +181,13 @@
If [code]true[/code], tabs can be rearranged with mouse drag.
</member>
<member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true">
+ if [code]true[/code], the mouse's scroll wheel cab be used to navigate the scroll view.
</member>
<member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign" default="1">
- The alignment of all tabs. See enum [code]TabAlign[/code] constants for details.
+ The alignment of all tabs. See [enum TabAlign] for details.
</member>
<member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy" default="0">
+ Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details.
</member>
</members>
<signals>
@@ -191,36 +195,42 @@
<argument index="0" name="idx_to" type="int">
</argument>
<description>
+ Emitted when the active tab is rearranged via mouse drag. See [member drag_to_rearrange_enabled].
</description>
</signal>
<signal name="right_button_pressed">
<argument index="0" name="tab" type="int">
</argument>
<description>
+ Emitted when a tab is right-clicked.
</description>
</signal>
<signal name="tab_changed">
<argument index="0" name="tab" type="int">
</argument>
<description>
+ Emitted when switching to another tab.
</description>
</signal>
<signal name="tab_clicked">
<argument index="0" name="tab" type="int">
</argument>
<description>
+ Emitted when a tab is clicked, even if it is the current tab.
</description>
</signal>
<signal name="tab_close">
<argument index="0" name="tab" type="int">
</argument>
<description>
+ Emitted when a tab is closed.
</description>
</signal>
<signal name="tab_hover">
<argument index="0" name="tab" type="int">
</argument>
<description>
+ Emitted when a tab is hovered by the mouse.
</description>
</signal>
</signals>
@@ -238,10 +248,13 @@
Represents the size of the [enum TabAlign] enum.
</constant>
<constant name="CLOSE_BUTTON_SHOW_NEVER" value="0" enum="CloseButtonDisplayPolicy">
+ Never show the close buttons.
</constant>
<constant name="CLOSE_BUTTON_SHOW_ACTIVE_ONLY" value="1" enum="CloseButtonDisplayPolicy">
+ Only show the close button on the currently active tab.
</constant>
<constant name="CLOSE_BUTTON_SHOW_ALWAYS" value="2" enum="CloseButtonDisplayPolicy">
+ Show the close button on all tabs.
</constant>
<constant name="CLOSE_BUTTON_MAX" value="3" enum="CloseButtonDisplayPolicy">
Represents the size of the [enum CloseButtonDisplayPolicy] enum.
@@ -249,42 +262,51 @@
</constants>
<theme_items>
<theme_item name="button" type="StyleBox">
+ Background of the close button when it's being hovered with the cursor.
</theme_item>
<theme_item name="button_pressed" type="StyleBox">
+ Background of the close button when it's being pressed.
</theme_item>
- <theme_item name="close" type="Texture">
+ <theme_item name="close" type="Texture2D">
+ The icon for the close button (see [member tab_close_display_policy]).
</theme_item>
- <theme_item name="decrement" type="Texture">
+ <theme_item name="decrement" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
</theme_item>
- <theme_item name="decrement_highlight" type="Texture">
+ <theme_item name="decrement_highlight" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
</theme_item>
<theme_item name="font" type="Font">
+ The font used to draw tab names.
</theme_item>
<theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ Font color of inactive tabs.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ Font color of disabled tabs.
</theme_item>
<theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Font color of the currently selected tab.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ The horizontal separation between the tabs.
</theme_item>
- <theme_item name="increment" type="Texture">
+ <theme_item name="increment" type="Texture2D">
+ Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
</theme_item>
- <theme_item name="increment_highlight" type="Texture">
- </theme_item>
- <theme_item name="label_valign_bg" type="int" default="2">
- </theme_item>
- <theme_item name="label_valign_fg" type="int" default="0">
+ <theme_item name="increment_highlight" type="Texture2D">
+ Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
</theme_item>
<theme_item name="panel" type="StyleBox">
</theme_item>
<theme_item name="tab_bg" type="StyleBox">
+ The style of an inactive tab.
</theme_item>
<theme_item name="tab_disabled" type="StyleBox">
+ The style of a disabled tab
</theme_item>
<theme_item name="tab_fg" type="StyleBox">
- </theme_item>
- <theme_item name="top_margin" type="int" default="24">
+ The style of the currently selected tab.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 75fceac500..0c6615c53b 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextEdit" inherits="Control" category="Core" version="3.2">
+<class name="TextEdit" inherits="Control" version="4.0">
<brief_description>
Multiline text editing control.
</brief_description>
@@ -299,7 +299,7 @@
</description>
</method>
<method name="search" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="Dictionary">
</return>
<argument index="0" name="key" type="String">
</argument>
@@ -311,13 +311,13 @@
</argument>
<description>
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
- Returns an empty [code]PoolIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g:
+ Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g:
[codeblock]
var result = search(key, flags, line, column)
- if result.size() &gt; 0:
- # result found
- var res_line = result[TextEdit.SEARCH_RESULT_LINE]
- var res_column = result[TextEdit.SEARCH_RESULT_COLUMN]
+ if !result.empty():
+ # Result found.
+ var line_number = result.line
+ var column_number = result.column
[/codeblock]
</description>
</method>
@@ -343,6 +343,17 @@
Select all the text.
</description>
</method>
+ <method name="set_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="new_text" type="String">
+ </argument>
+ <description>
+ Sets the text for a specific line.
+ </description>
+ </method>
<method name="set_line_as_hidden">
<return type="void">
</return>
@@ -433,10 +444,17 @@
</member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" />
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
+ If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text.
</member>
<member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false">
If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
</member>
+ <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
+ The current horizontal scroll value.
+ </member>
+ <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0">
+ The current vertical scroll value.
+ </member>
<member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
</member>
<member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
@@ -496,6 +514,12 @@
<description>
</description>
</signal>
+ <signal name="symbol_validate">
+ <argument index="0" name="symbol" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
<signal name="text_changed">
<description>
Emitted when the text changes.
@@ -512,12 +536,6 @@
<constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags">
Search from end to beginning.
</constant>
- <constant name="SEARCH_RESULT_COLUMN" value="0" enum="SearchResult">
- Used to access the result column from [method search].
- </constant>
- <constant name="SEARCH_RESULT_LINE" value="1" enum="SearchResult">
- Used to access the result line from [method search].
- </constant>
<constant name="MENU_CUT" value="0" enum="MenuItems">
Cuts (copies and clears) the selected text.
</constant>
@@ -586,9 +604,9 @@
</theme_item>
<theme_item name="focus" type="StyleBox">
</theme_item>
- <theme_item name="fold" type="Texture">
+ <theme_item name="fold" type="Texture2D">
</theme_item>
- <theme_item name="folded" type="Texture">
+ <theme_item name="folded" type="Texture2D">
</theme_item>
<theme_item name="font" type="Font">
Sets the default [Font].
@@ -599,6 +617,7 @@
<theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
</theme_item>
<theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
+ Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
<theme_item name="function_color" type="Color" default="Color( 0.4, 0.64, 0.81, 1 )">
</theme_item>
@@ -626,12 +645,12 @@
<theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
Sets the highlight [Color] of text selections.
</theme_item>
- <theme_item name="space" type="Texture">
+ <theme_item name="space" type="Texture2D">
</theme_item>
<theme_item name="symbol_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
</theme_item>
- <theme_item name="tab" type="Texture">
- Sets a custom [Texture] for tab text characters.
+ <theme_item name="tab" type="Texture2D">
+ Sets a custom [Texture2D] for tab text characters.
</theme_item>
<theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )">
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
diff --git a/doc/classes/TextFile.xml b/doc/classes/TextFile.xml
index 163900a482..1c2c2ff25c 100644
--- a/doc/classes/TextFile.xml
+++ b/doc/classes/TextFile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextFile" inherits="Resource" category="Core" version="3.2">
+<class name="TextFile" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index 238d6929ba..e19d611ea9 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -1,133 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture" inherits="Resource" category="Core" version="3.2">
+<class name="Texture" inherits="Resource" version="4.0">
<brief_description>
- Texture for 2D and 3D.
</brief_description>
<description>
- A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
- Textures are often created by loading them from a file. See [method @GDScript.load].
</description>
<tutorials>
</tutorials>
<methods>
- <method name="draw" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="position" type="Vector2">
- </argument>
- <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="3" name="transpose" type="bool" default="false">
- </argument>
- <argument index="4" name="normal_map" type="Texture" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="draw_rect" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="tile" type="bool">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="draw_rect_region" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="src_rect" type="Rect2">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
- </argument>
- <argument index="6" name="clip_uv" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_data" qualifiers="const">
- <return type="Image">
- </return>
- <description>
- </description>
- </method>
- <method name="get_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the texture height.
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the texture size.
- </description>
- </method>
- <method name="get_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the texture width.
- </description>
- </method>
- <method name="has_alpha" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
</methods>
- <members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
- The texture's flags.
- </member>
- </members>
<constants>
- <constant name="FLAGS_DEFAULT" value="7" enum="Flags">
- Default flags. [constant FLAG_MIPMAPS], [constant FLAG_REPEAT] and [constant FLAG_FILTER] are enabled.
- </constant>
- <constant name="FLAG_MIPMAPS" value="1" enum="Flags">
- Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio.
- </constant>
- <constant name="FLAG_REPEAT" value="2" enum="Flags">
- Repeats the texture (instead of clamp to edge).
- </constant>
- <constant name="FLAG_FILTER" value="4" enum="Flags">
- Uses a magnifying filter, to enable smooth zooming in of the texture.
- </constant>
- <constant name="FLAG_ANISOTROPIC_FILTER" value="8" enum="Flags">
- Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios.
- This results in better-looking textures when viewed from oblique angles.
- </constant>
- <constant name="FLAG_CONVERT_TO_LINEAR" value="16" enum="Flags">
- Converts the texture to the sRGB color space.
- </constant>
- <constant name="FLAG_MIRRORED_REPEAT" value="32" enum="Flags">
- Repeats the texture with alternate sections mirrored.
- </constant>
- <constant name="FLAG_VIDEO_SURFACE" value="2048" enum="Flags">
- Texture is a video surface.
- </constant>
</constants>
</class>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
new file mode 100644
index 0000000000..ffe806cef7
--- /dev/null
+++ b/doc/classes/Texture2D.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Texture2D" inherits="Texture" version="4.0">
+ <brief_description>
+ Texture for 2D and 3D.
+ </brief_description>
+ <description>
+ A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite2D] or GUI [Control].
+ Textures are often created by loading them from a file. See [method @GDScript.load].
+ [Texture2D] is a base for other resources. It cannot be used directly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="position" type="Vector2">
+ </argument>
+ <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="3" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="4" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="5" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="6" name="specular_color_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="7" name="texture_filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" default="0">
+ </argument>
+ <argument index="8" name="texture_repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" default="0">
+ </argument>
+ <description>
+ Draws the texture using a [CanvasItem] with the [RenderingServer] API at the specified [code]position[/code].
+ </description>
+ </method>
+ <method name="draw_rect" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <argument index="2" name="tile" type="bool">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="5" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="6" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="7" name="specular_color_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="8" name="texture_filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" default="0">
+ </argument>
+ <argument index="9" name="texture_repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" default="0">
+ </argument>
+ <description>
+ Draws the texture using a [CanvasItem] with the [RenderingServer] API.
+ </description>
+ </method>
+ <method name="draw_rect_region" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <argument index="2" name="src_rect" type="Rect2">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="5" name="normal_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="6" name="specular_map" type="Texture2D" default="null">
+ </argument>
+ <argument index="7" name="specular_color_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="8" name="texture_filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" default="0">
+ </argument>
+ <argument index="9" name="texture_repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" default="0">
+ </argument>
+ <argument index="10" name="clip_uv" type="bool" default="true">
+ </argument>
+ <description>
+ Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API.
+ </description>
+ </method>
+ <method name="get_data" qualifiers="const">
+ <return type="Image">
+ </return>
+ <description>
+ Returns an [Image] with the data from this [Texture2D]. [Image]s can be accessed and manipulated directly.
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the texture height.
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the texture size.
+ </description>
+ </method>
+ <method name="get_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the texture width.
+ </description>
+ </method>
+ <method name="has_alpha" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if this [Texture2D] has an alpha channel.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml
new file mode 100644
index 0000000000..bb9283803d
--- /dev/null
+++ b/doc/classes/Texture2DArray.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Texture2DArray" inherits="ImageTextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml
deleted file mode 100644
index c11a48137f..0000000000
--- a/doc/classes/Texture3D.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture3D" inherits="TextureLayered" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" override="true" default="{&quot;depth&quot;: 0,&quot;flags&quot;: 4,&quot;format&quot;: 37,&quot;height&quot;: 0,&quot;layers&quot;: [ ],&quot;width&quot;: 0}" />
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 899ab8b875..0e2872755e 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureButton" inherits="BaseButton" category="Core" version="3.2">
+<class name="TextureButton" inherits="BaseButton" version="4.0">
<brief_description>
Texture-based button. Supports Pressed, Hover, Disabled and Focused states.
</brief_description>
@@ -16,24 +16,24 @@
If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node.
</member>
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="0">
- Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more.
+ Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [enum StretchMode] constants. See the constants to learn more.
</member>
<member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask">
Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes.
</member>
- <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture">
+ <member name="texture_disabled" type="Texture2D" setter="set_disabled_texture" getter="get_disabled_texture">
Texture to display when the node is disabled. See [member BaseButton.disabled].
</member>
- <member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture">
+ <member name="texture_focused" type="Texture2D" setter="set_focused_texture" getter="get_focused_texture">
Texture to display when the node has mouse or keyboard focus.
</member>
- <member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture">
+ <member name="texture_hover" type="Texture2D" setter="set_hover_texture" getter="get_hover_texture">
Texture to display when the mouse hovers the node.
</member>
- <member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture">
+ <member name="texture_normal" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture">
Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state.
</member>
- <member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture">
+ <member name="texture_pressed" type="Texture2D" setter="set_pressed_texture" getter="get_pressed_texture">
Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [member BaseButton.shortcut] key.
</member>
</members>
diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml
index 232df8f59b..d81c3c7c5a 100644
--- a/doc/classes/TextureLayered.xml
+++ b/doc/classes/TextureLayered.xml
@@ -1,44 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureLayered" inherits="Resource" category="Core" version="3.2">
+<class name="TextureLayered" inherits="Texture" version="4.0">
<brief_description>
+ Base class for 3D texture types.
</brief_description>
<description>
+ Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. Data is set on a per-layer basis. For [Texture2DArray]s, the layer specifies the array layer.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="create">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="depth" type="int">
- </argument>
- <argument index="3" name="format" type="int" enum="Image.Format">
- </argument>
- <argument index="4" name="flags" type="int" default="4">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_depth" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format">
</return>
<description>
+ Returns the current format being used by this texture. See [enum Image.Format] for details.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the height of the texture. Height is typically represented by the Y-axis.
</description>
</method>
<method name="get_layer_data" qualifiers="const">
@@ -47,55 +29,41 @@
<argument index="0" name="layer" type="int">
</argument>
<description>
+ Returns an [Image] resource with the data from specified [code]layer[/code].
</description>
</method>
- <method name="get_width" qualifiers="const">
+ <method name="get_layered_type" qualifiers="const">
+ <return type="int" enum="TextureLayered.LayeredType">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_layers" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
- <method name="set_data_partial">
- <return type="void">
+ <method name="get_width" qualifiers="const">
+ <return type="int">
</return>
- <argument index="0" name="image" type="Image">
- </argument>
- <argument index="1" name="x_offset" type="int">
- </argument>
- <argument index="2" name="y_offset" type="int">
- </argument>
- <argument index="3" name="layer" type="int">
- </argument>
- <argument index="4" name="mipmap" type="int" default="0">
- </argument>
<description>
+ Returns the width of the texture. Width is typically represented by the X-axis.
</description>
</method>
- <method name="set_layer_data">
- <return type="void">
+ <method name="has_mipmaps" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="image" type="Image">
- </argument>
- <argument index="1" name="layer" type="int">
- </argument>
<description>
</description>
</method>
</methods>
- <members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;depth&quot;: 0,&quot;flags&quot;: 4,&quot;format&quot;: 37,&quot;height&quot;: 0,&quot;layers&quot;: [ ],&quot;width&quot;: 0}">
- </member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
- </member>
- </members>
<constants>
- <constant name="FLAG_MIPMAPS" value="1" enum="Flags">
- </constant>
- <constant name="FLAG_REPEAT" value="2" enum="Flags">
+ <constant name="LAYERED_TYPE_2D_ARRAY" value="0" enum="LayeredType">
</constant>
- <constant name="FLAG_FILTER" value="4" enum="Flags">
+ <constant name="LAYERED_TYPE_CUBEMAP" value="1" enum="LayeredType">
</constant>
- <constant name="FLAGS_DEFAULT" value="4" enum="Flags">
+ <constant name="LAYERED_TYPE_CUBEMAP_ARRAY" value="2" enum="LayeredType">
</constant>
</constants>
</class>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml
index 479ab865ba..4937121ebf 100644
--- a/doc/classes/TextureProgress.xml
+++ b/doc/classes/TextureProgress.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureProgress" inherits="Range" category="Core" version="3.2">
+<class name="TextureProgress" inherits="Range" version="4.0">
<brief_description>
Texture-based progress bar. Useful for loading screens and life or stamina bars.
</brief_description>
@@ -58,15 +58,15 @@
<member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0">
The height of the 9-patch's top row.
</member>
- <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture">
- [Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress].
+ <member name="texture_over" type="Texture2D" setter="set_over_texture" getter="get_over_texture">
+ [Texture2D] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress].
</member>
- <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture">
- [Texture] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code].
+ <member name="texture_progress" type="Texture2D" setter="set_progress_texture" getter="get_progress_texture">
+ [Texture2D] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code].
The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value].
</member>
- <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture">
- [Texture] that draws under the progress bar. The bar's background.
+ <member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture">
+ [Texture2D] that draws under the progress bar. The bar's background.
</member>
<member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color( 1, 1, 1, 1 )">
Multiplies the color of the bar's [code]texture_over[/code] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node.
@@ -86,7 +86,7 @@
The [member texture_progress] fills from right to left.
</constant>
<constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode">
- The [member texture_progress] fills from top to bototm.
+ The [member texture_progress] fills from top to bottom.
</constant>
<constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode">
The [member texture_progress] fills from bottom to top.
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 997a686e82..709d87b858 100644
--- a/doc/classes/TextureRect.xml
+++ b/doc/classes/TextureRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureRect" inherits="Control" category="Core" version="3.2">
+<class name="TextureRect" inherits="Control" version="4.0">
<brief_description>
Control for drawing textures.
</brief_description>
@@ -24,8 +24,8 @@
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode" default="0">
Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode].
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
- The node's [Texture] resource.
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The node's [Texture2D] resource.
</member>
</members>
<constants>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index dd12c5af23..70a4eda867 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Theme" inherits="Resource" category="Core" version="3.2">
+<class name="Theme" inherits="Resource" version="4.0">
<brief_description>
Theme for controls.
</brief_description>
@@ -21,63 +21,63 @@
<method name="clear_color">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Clears the [Color] at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the [Color] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_constant">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Clears the constant at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the constant at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_font">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Clears the [Font] at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the [Font] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_icon">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Clears the icon at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the icon at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_stylebox">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Clears [StyleBox] at [code]name[/code] if the Theme has [code]type[/code].
+ Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="copy_default_theme">
<return type="void">
</return>
<description>
- Sets the Theme's values to a copy of the default theme values.
+ Sets the theme's values to a copy of the default theme values.
</description>
</method>
<method name="copy_theme">
@@ -86,253 +86,253 @@
<argument index="0" name="other" type="Theme">
</argument>
<description>
- Sets the Theme's values to a copy of a given theme.
+ Sets the theme's values to a copy of a given theme.
</description>
</method>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Returns the [Color] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the [Color] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_color_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the Theme has [code]type[/code].
+ Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code].
</description>
</method>
<method name="get_constant" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Returns the constant at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the constant at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_constant_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the Theme has [code]type[/code].
+ Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code].
</description>
</method>
<method name="get_font" qualifiers="const">
<return type="Font">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Returns the [Font] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the [Font] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_font_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the Theme has [code]type[/code].
+ Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code].
</description>
</method>
<method name="get_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Returns the icon [Texture] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_icon_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the Theme has [code]type[/code].
+ Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox" qualifiers="const">
<return type="StyleBox">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Returns the icon [StyleBox] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the Theme has [code]type[/code].
+ Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox_types" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
- Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the Theme has [code]type[/code].
+ Returns all the [StyleBox] types as a [PackedStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code].
</description>
</method>
<method name="get_type_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if the Theme has [code]type[/code].
+ Returns all the types in [code]type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code].
</description>
</method>
<method name="has_color" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_constant" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_font" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_icon" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_stylebox" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_color">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="color" type="Color">
</argument>
<description>
- Sets the Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_constant">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="constant" type="int">
</argument>
<description>
- Sets the Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_font">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="font" type="Font">
</argument>
<description>
- Sets the Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_icon">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
- <argument index="2" name="texture" type="Texture">
+ <argument index="2" name="texture" type="Texture2D">
</argument>
<description>
- Sets the Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_stylebox">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="texture" type="StyleBox">
</argument>
<description>
- Sets Theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index 25e40d4c1f..4d6e89fa6f 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Thread" inherits="Reference" category="Core" version="3.2">
+<class name="Thread" inherits="Reference" version="4.0">
<brief_description>
A unit of execution in a process.
</brief_description>
@@ -29,14 +29,14 @@
</return>
<argument index="0" name="instance" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="userdata" type="Variant" default="null">
</argument>
<argument index="3" name="priority" type="int" enum="Thread.Priority" default="1">
</argument>
<description>
- Starts a new [Thread] that runs [code]method[/code] on object [code]instance[/code] with [code]userdata[/code] passed as an argument. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
+ Starts a new [Thread] that runs [code]method[/code] on object [code]instance[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]method[/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.
Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.
</description>
</method>
@@ -50,10 +50,13 @@
</methods>
<constants>
<constant name="PRIORITY_LOW" value="0" enum="Priority">
+ A thread running with lower priority than normally.
</constant>
<constant name="PRIORITY_NORMAL" value="1" enum="Priority">
+ A thread with a standard priority.
</constant>
<constant name="PRIORITY_HIGH" value="2" enum="Priority">
+ A thread running with higher priority than normally.
</constant>
</constants>
</class>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 7376f624cb..9df2b656f4 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileMap" inherits="Node2D" category="Core" version="3.2">
+<class name="TileMap" inherits="Node2D" version="4.0">
<brief_description>
Node for 2D tile-based maps.
</brief_description>
@@ -43,7 +43,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
- Returns the coordinate of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling.
+ Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling.
</description>
</method>
<method name="get_cellv" qualifiers="const">
@@ -74,19 +74,19 @@
</description>
</method>
<method name="get_used_cells" qualifiers="const">
- <return type="Array">
+ <return type="Vector2i[]">
</return>
<description>
Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]).
</description>
</method>
- <method name="get_used_cells_by_id" qualifiers="const">
- <return type="Array">
+ <method name="get_used_cells_by_index" qualifiers="const">
+ <return type="Vector2i[]">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Returns an array of all cells with the given tile [code]id[/code].
+ Returns an array of all cells with the given tile [code]index[/code].
</description>
</method>
<method name="get_used_rect">
@@ -161,7 +161,7 @@
<description>
Sets the tile index for the cell given by a Vector2.
An index of [code]-1[/code] clears the cell.
- Optionally, the tile can also be flipped, transposed, or given autotile coordinates.
+ Optionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile.
[b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
If you need these to be immediately updated, you can call [method update_dirty_quadrants].
Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:
@@ -273,7 +273,7 @@
<member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin" default="0">
Position for tile origin. See [enum TileOrigin] for possible values.
</member>
- <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" default="false">
+ <member name="cell_y_sort" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">
If [code]true[/code], the TileMap's children will be drawn in order of their Y coordinate.
</member>
<member name="centered_textures" type="bool" setter="set_centered_textures" getter="is_centered_textures_enabled" default="false">
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 8ad62f0fcb..c647f83598 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileSet" inherits="Resource" category="Core" version="3.2">
+<class name="TileSet" inherits="Resource" version="4.0">
<brief_description>
Tile library for tilemaps.
</brief_description>
@@ -381,7 +381,7 @@
</description>
</method>
<method name="tile_get_normal_map" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -480,7 +480,7 @@
</description>
</method>
<method name="tile_get_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -586,10 +586,11 @@
</return>
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="normal_map" type="Texture">
+ <argument index="1" name="normal_map" type="Texture2D">
</argument>
<description>
Sets the tile's normal map texture.
+ [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.
</description>
</method>
<method name="tile_set_occluder_offset">
@@ -694,7 +695,7 @@
</return>
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Sets the tile's texture.
@@ -749,6 +750,8 @@
</constant>
<constant name="BIND_LEFT" value="8" enum="AutotileBindings">
</constant>
+ <constant name="BIND_CENTER" value="16" enum="AutotileBindings">
+ </constant>
<constant name="BIND_RIGHT" value="32" enum="AutotileBindings">
</constant>
<constant name="BIND_BOTTOMLEFT" value="64" enum="AutotileBindings">
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index 4f455fb377..c1e5987a06 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Timer" inherits="Node" category="Core" version="3.2">
+<class name="Timer" inherits="Node" version="4.0">
<brief_description>
A countdown timer.
</brief_description>
@@ -37,6 +37,7 @@
<members>
<member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" default="false">
If [code]true[/code], the timer will automatically start when entering the scene tree.
+ [b]Note:[/b] This property is automatically set to [code]false[/code] after the timer enters the scene tree and starts.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" default="false">
If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart.
@@ -49,7 +50,7 @@
</member>
<member name="time_left" type="float" setter="" getter="get_time_left">
The timer's remaining time in seconds. Returns 0 if the timer is inactive.
- [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [member wait_time].
+ [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [method start].
</member>
<member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" default="1.0">
Wait time in seconds.
diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml
index d5edbe3972..f78627b163 100644
--- a/doc/classes/ToolButton.xml
+++ b/doc/classes/ToolButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ToolButton" inherits="Button" category="Core" version="3.2">
+<class name="ToolButton" inherits="Button" version="4.0">
<brief_description>
Flat button helper class.
</brief_description>
@@ -21,26 +21,37 @@
</constants>
<theme_items>
<theme_item name="disabled" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [ToolButton]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the [ToolButton].
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )">
+ Text [Color] used when the [ToolButton] is disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] used when the [ToolButton] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [ToolButton] is being pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="3">
+ The horizontal space between [ToolButton]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default [StyleBox] for the [ToolButton].
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is being pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index 3d18534a68..c7f886b3f2 100644
--- a/doc/classes/TouchScreenButton.xml
+++ b/doc/classes/TouchScreenButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.2">
+<class name="TouchScreenButton" inherits="Node2D" version="4.0">
<brief_description>
Button for touch screen devices.
</brief_description>
@@ -24,13 +24,13 @@
<member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask">
The button's bitmask.
</member>
- <member name="normal" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="normal" type="Texture2D" setter="set_texture" getter="get_texture">
The button's texture for the normal state.
</member>
<member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false">
If [code]true[/code], pass-by presses are enabled.
</member>
- <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed">
+ <member name="pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed">
The button's texture for the pressed state.
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 034a1b2f5b..4175f01eb4 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform" category="Built-In Types" version="3.2">
+<class name="Transform" version="4.0">
<brief_description>
3D transformation (3×4 matrix).
</brief_description>
@@ -95,6 +95,7 @@
<argument index="0" name="transform" type="Transform">
</argument>
<description>
+ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="looking_at">
@@ -125,7 +126,7 @@
<argument index="1" name="phi" type="float">
</argument>
<description>
- Rotates the transform around given axis by phi. The axis must be a normalized vector.
+ Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector.
</description>
</method>
<method name="scaled">
@@ -134,16 +135,17 @@
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
- Scales the transform by the specified 3D scaling factors.
+ Scales basis and origin of the transform by the given scale factor, using matrix multiplication.
</description>
</method>
<method name="translated">
<return type="Transform">
</return>
- <argument index="0" name="ofs" type="Vector3">
+ <argument index="0" name="offset" type="Vector3">
</argument>
<description>
- Translates the transform by the specified offset.
+ 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.
</description>
</method>
<method name="xform">
@@ -152,7 +154,7 @@
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform.
+ Transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform.
</description>
</method>
<method name="xform_inv">
@@ -161,7 +163,7 @@
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Inverse-transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform.
+ Inverse-transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform.
</description>
</method>
</methods>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 89ccffc2e9..af93d4c654 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform2D" category="Built-In Types" version="3.2">
+<class name="Transform2D" version="4.0">
<brief_description>
2D transformation (3×2 matrix).
</brief_description>
@@ -112,6 +112,7 @@
<argument index="0" name="transform" type="Transform2D">
</argument>
<description>
+ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="orthonormalized">
@@ -127,7 +128,7 @@
<argument index="0" name="phi" type="float">
</argument>
<description>
- Rotates the transform by the given angle (in radians).
+ Rotates the transform by the given angle (in radians), using matrix multiplication.
</description>
</method>
<method name="scaled">
@@ -136,7 +137,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Scales the transform by the given factor.
+ Scales the transform by the given scale factor, using matrix multiplication.
</description>
</method>
<method name="translated">
@@ -145,7 +146,8 @@
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Translates the transform by the given offset.
+ 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.
</description>
</method>
<method name="xform">
@@ -154,7 +156,7 @@
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform.
+ Transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform.
</description>
</method>
<method name="xform_inv">
@@ -163,7 +165,7 @@
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Inverse-transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform.
+ Inverse-transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform.
</description>
</method>
</methods>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index e2599b9695..11245195bf 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Translation" inherits="Resource" category="Core" version="3.2">
+<class name="Translation" inherits="Resource" version="4.0">
<brief_description>
Language Translation.
</brief_description>
@@ -14,9 +14,9 @@
<method name="add_message">
<return type="void">
</return>
- <argument index="0" name="src_message" type="String">
+ <argument index="0" name="src_message" type="StringName">
</argument>
- <argument index="1" name="xlated_message" type="String">
+ <argument index="1" name="xlated_message" type="StringName">
</argument>
<description>
Adds a message if nonexistent, followed by its translation.
@@ -25,16 +25,16 @@
<method name="erase_message">
<return type="void">
</return>
- <argument index="0" name="src_message" type="String">
+ <argument index="0" name="src_message" type="StringName">
</argument>
<description>
Erases a message.
</description>
</method>
<method name="get_message" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="src_message" type="String">
+ <argument index="0" name="src_message" type="StringName">
</argument>
<description>
Returns a message's translation.
@@ -48,7 +48,7 @@
</description>
</method>
<method name="get_message_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns all the messages (keys).
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index f43d3bb24e..aaf7a4d160 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TranslationServer" inherits="Object" category="Core" version="3.2">
+<class name="TranslationServer" inherits="Object" version="4.0">
<brief_description>
Server that manages all translations.
</brief_description>
@@ -69,9 +69,9 @@
</description>
</method>
<method name="translate" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="message" type="String">
+ <argument index="0" name="message" type="StringName">
</argument>
<description>
Returns the current locale's translation for the given message (key).
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index e0c8d0b0e8..0b2fb80480 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tree" inherits="Control" category="Core" version="3.2">
+<class name="Tree" inherits="Control" version="4.0">
<brief_description>
Control to show a tree of items.
</brief_description>
@@ -16,7 +16,7 @@
var subchild1 = tree.create_item(child1)
subchild1.set_text(0, "Subchild1")
[/codeblock]
- To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root].
+ To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
</description>
<tutorials>
</tutorials>
@@ -43,14 +43,18 @@
<argument index="1" name="idx" type="int" default="-1">
</argument>
<description>
- Create an item in the tree and add it as the last child of [code]parent[/code]. If [code]parent[/code] is [code]null[/code], it will be added as the root's last child, or it'll be the the root itself if the tree is empty.
+ Creates an item in the tree and adds it as a child of [code]parent[/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.
</description>
</method>
<method name="ensure_cursor_is_visible">
<return type="void">
</return>
<description>
- Makes the currently selected item visible. This will scroll the tree to make sure the selected item is visible.
+ Makes the currently focused cell visible.
+ This will scroll the tree if necessary. In [constant SELECT_ROW] mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically.
+ [b]Note:[/b] Despite the name of this method, the focus cursor itself is only visible in [constant SELECT_MULTI] mode.
</description>
</method>
<method name="get_column_at_position" qualifiers="const">
@@ -59,7 +63,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Returns the column index under the given point.
+ Returns the column index at [code]position[/code], or -1 if no item is there.
</description>
</method>
<method name="get_column_title" qualifiers="const">
@@ -93,8 +97,9 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- If [member drop_mode_flags] includes [constant DROP_MODE_INBETWEEN], returns -1 if [code]position[/code] is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if [member drop_mode_flags] includes [constant DROP_MODE_ON_ITEM].
- Otherwise, returns 0. If there are no tree items at [code]position[/code], returns -100.
+ Returns the drop section at [code]position[/code], 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>
</method>
<method name="get_edited" qualifiers="const">
@@ -119,7 +124,7 @@
<argument index="1" name="column" type="int" default="-1">
</argument>
<description>
- Returns the rectangle area for the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
+ Returns the rectangle area for the specified item. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
</description>
</method>
<method name="get_item_at_position" qualifiers="const">
@@ -137,7 +142,8 @@
<argument index="0" name="from" type="Object">
</argument>
<description>
- Returns the next selected item after the given one.
+ Returns the next selected item 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.
</description>
</method>
<method name="get_pressed_button" qualifiers="const">
@@ -151,7 +157,7 @@
<return type="TreeItem">
</return>
<description>
- Returns the tree's root item.
+ Returns the tree's root item, or [code]null[/code] if the tree is empty.
</description>
</method>
<method name="get_scroll" qualifiers="const">
@@ -165,14 +171,18 @@
<return type="TreeItem">
</return>
<description>
- Returns the currently selected item.
+ Returns the currently focused item, or [code]null[/code] if no item is focused.
+ In [constant SELECT_ROW] and [constant SELECT_SINGLE] modes, the focused item is same as the selected item. In [constant SELECT_MULTI] mode, the focused item is the item under the focus cursor, not necessarily selected.
+ To get the currently selected item(s), use [method get_next_selected].
</description>
</method>
<method name="get_selected_column" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the current selection's column.
+ Returns the currently focused column, or -1 if no column is focused.
+ In [constant SELECT_SINGLE] mode, the focused column is the selected column. In [constant SELECT_ROW] mode, the focused column is always 0 if any item is selected. In [constant SELECT_MULTI] mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected.
+ To tell whether a column of an item is selected, use [method TreeItem.is_selected].
</description>
</method>
<method name="set_column_expand">
@@ -229,7 +239,8 @@
The number of columns.
</member>
<member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0">
- The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended.
+ The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended.
+ This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
<member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false">
@@ -240,7 +251,7 @@
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0">
- Allows single or multiple selection. See the [code]SELECT_*[/code] constants.
+ Allows single or multiple selection. See the [enum SelectMode] constants.
</member>
</members>
<signals>
@@ -278,6 +289,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
+ Emitted when the right mouse button is pressed in the empty space of the tree.
</description>
</signal>
<signal name="empty_tree_rmb_selected">
@@ -301,6 +313,7 @@
</signal>
<signal name="item_custom_button_pressed">
<description>
+ Emitted when a custom button is pressed (i.e. in a [constant TreeItem.CELL_MODE_CUSTOM] mode cell).
</description>
</signal>
<signal name="item_double_clicked">
@@ -343,101 +356,144 @@
</signal>
<signal name="nothing_selected">
<description>
+ Emitted when a left mouse button click does not select any item.
</description>
</signal>
</signals>
<constants>
<constant name="SELECT_SINGLE" value="0" enum="SelectMode">
- Allows selection of a single item at a time.
+ Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item.
+ The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item.
</constant>
<constant name="SELECT_ROW" value="1" enum="SelectMode">
+ Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item.
+ The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item.
</constant>
<constant name="SELECT_MULTI" value="2" enum="SelectMode">
- Allows selection of multiple items at the same time.
+ Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item.
+ The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected.
</constant>
<constant name="DROP_MODE_DISABLED" value="0" enum="DropModeFlags">
+ Disables all drop sections, but still allows to detect the "on item" drop section by [method get_drop_section_at_position].
+ [b]Note:[/b] This is the default flag, it has no effect when combined with other flags.
</constant>
<constant name="DROP_MODE_ON_ITEM" value="1" enum="DropModeFlags">
+ Enables the "on item" drop section. This drop section covers the entire item.
+ When combined with [constant DROP_MODE_INBETWEEN], this drop section halves the height and stays centered vertically.
</constant>
<constant name="DROP_MODE_INBETWEEN" value="2" enum="DropModeFlags">
+ Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half.
+ When combined with [constant DROP_MODE_ON_ITEM], these drop sections halves the height and stays on top / bottom accordingly.
</constant>
</constants>
<theme_items>
- <theme_item name="arrow" type="Texture">
+ <theme_item name="arrow" type="Texture2D">
+ The arrow icon used when a foldable item is not collapsed.
</theme_item>
- <theme_item name="arrow_collapsed" type="Texture">
+ <theme_item name="arrow_collapsed" type="Texture2D">
+ The arrow icon used when a foldable item is collapsed.
</theme_item>
<theme_item name="bg" type="StyleBox">
+ Default [StyleBox] for the [Tree], i.e. used when the control is not being focused.
</theme_item>
<theme_item name="bg_focus" type="StyleBox">
+ [StyleBox] used when the [Tree] is being focused.
</theme_item>
<theme_item name="button_margin" type="int" default="4">
+ The horizontal space between each button in a cell.
</theme_item>
<theme_item name="button_pressed" type="StyleBox">
+ [StyleBox] used when a button in the tree is pressed.
</theme_item>
- <theme_item name="checked" type="Texture">
+ <theme_item name="checked" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked.
</theme_item>
<theme_item name="cursor" type="StyleBox">
- </theme_item>
- <theme_item name="cursor_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ [StyleBox] used for the cursor, when the [Tree] is being focused.
</theme_item>
<theme_item name="cursor_unfocused" type="StyleBox">
+ [StyleBox] used for the cursor, when the [Tree] is not being focused.
</theme_item>
<theme_item name="custom_button" type="StyleBox">
+ Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
</theme_item>
<theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
<theme_item name="custom_button_hover" type="StyleBox">
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
<theme_item name="custom_button_pressed" type="StyleBox">
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed.
</theme_item>
<theme_item name="draw_guides" type="int" default="1">
+ Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item.
</theme_item>
<theme_item name="draw_relationship_lines" type="int" default="0">
+ Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy.
</theme_item>
<theme_item name="drop_position_color" type="Color" default="Color( 1, 0.3, 0.2, 1 )">
+ [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the item's text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ Default text [Color] of the item.
</theme_item>
<theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the item is selected.
</theme_item>
<theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
+ [Color] of the guideline.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
</theme_item>
<theme_item name="item_margin" type="int" default="12">
+ The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>
<theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )">
+ [Color] of the relationship lines.
</theme_item>
<theme_item name="scroll_border" type="int" default="4">
+ The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging.
</theme_item>
<theme_item name="scroll_speed" type="int" default="12">
+ The speed of border scrolling.
</theme_item>
- <theme_item name="select_arrow" type="Texture">
+ <theme_item name="select_arrow" type="Texture2D">
+ The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
</theme_item>
<theme_item name="selected" type="StyleBox">
+ [StyleBox] for the selected items, used when the [Tree] is not being focused.
</theme_item>
<theme_item name="selected_focus" type="StyleBox">
- </theme_item>
- <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )">
+ [StyleBox] for the selected items, used when the [Tree] is being focused.
</theme_item>
<theme_item name="title_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the title button.
</theme_item>
<theme_item name="title_button_font" type="Font">
+ [Font] of the title button's text.
</theme_item>
<theme_item name="title_button_hover" type="StyleBox">
+ [StyleBox] used when the title button is being hovered.
</theme_item>
<theme_item name="title_button_normal" type="StyleBox">
+ Default [StyleBox] for the title button.
</theme_item>
<theme_item name="title_button_pressed" type="StyleBox">
+ [StyleBox] used when the title button is being pressed.
</theme_item>
- <theme_item name="unchecked" type="Texture">
+ <theme_item name="unchecked" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked.
</theme_item>
- <theme_item name="updown" type="Texture">
+ <theme_item name="updown" type="Texture2D">
+ The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
</theme_item>
<theme_item name="vseparation" type="int" default="4">
+ The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index c77388e5f4..126d6b4180 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TreeItem" inherits="Object" category="Core" version="3.2">
+<class name="TreeItem" inherits="Object" version="4.0">
<brief_description>
Control for a single item inside a [Tree].
</brief_description>
<description>
Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons.
+ You can remove a [TreeItem] by using [method Object.free].
</description>
<tutorials>
</tutorials>
@@ -14,7 +15,7 @@
</return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="button" type="Texture">
+ <argument index="1" name="button" type="Texture2D">
</argument>
<argument index="2" name="button_idx" type="int" default="-1">
</argument>
@@ -23,13 +24,13 @@
<argument index="4" name="tooltip" type="String" default="&quot;&quot;">
</argument>
<description>
- Adds a button with [Texture] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
+ Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
</description>
</method>
<method name="call_recursive" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
@@ -74,14 +75,14 @@
</description>
</method>
<method name="get_button" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="button_idx" type="int">
</argument>
<description>
- Returns the [Texture] of the button at index [code]button_idx[/code] in column [code]column[/code].
+ Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code].
</description>
</method>
<method name="get_button_count" qualifiers="const">
@@ -148,12 +149,12 @@
</description>
</method>
<method name="get_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="column" type="int">
</argument>
<description>
- Returns the given column's icon [Texture]. Error if no icon is set.
+ Returns the given column's icon [Texture2D]. Error if no icon is set.
</description>
</method>
<method name="get_icon_max_width" qualifiers="const">
@@ -180,7 +181,7 @@
<argument index="0" name="column" type="int">
</argument>
<description>
- Returns the icon [Texture] region as [Rect2].
+ Returns the icon [Texture2D] region as [Rect2].
</description>
</method>
<method name="get_metadata" qualifiers="const">
@@ -248,6 +249,14 @@
<description>
</description>
</method>
+ <method name="get_suffix" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
@@ -350,7 +359,7 @@
<argument index="0" name="child" type="Object">
</argument>
<description>
- Removes the given child TreeItem.
+ 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">
@@ -369,10 +378,10 @@
</argument>
<argument index="1" name="button_idx" type="int">
</argument>
- <argument index="2" name="button" type="Texture">
+ <argument index="2" name="button" type="Texture2D">
</argument>
<description>
- Sets the given column's button [Texture] at index [code]button_idx[/code] to [code]button[/code].
+ Sets the given column's button [Texture2D] at index [code]button_idx[/code] to [code]button[/code].
</description>
</method>
<method name="set_button_disabled">
@@ -396,7 +405,7 @@
<argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode">
</argument>
<description>
- Sets the given column's cell mode to [code]mode[/code]. See [code]CELL_MODE_*[/code] constants.
+ Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants.
</description>
</method>
<method name="set_checked">
@@ -451,7 +460,7 @@
</argument>
<argument index="1" name="object" type="Object">
</argument>
- <argument index="2" name="callback" type="String">
+ <argument index="2" name="callback" type="StringName">
</argument>
<description>
Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code].
@@ -485,10 +494,10 @@
</return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
- Sets the given column's icon [Texture].
+ Sets the given column's icon [Texture2D].
</description>
</method>
<method name="set_icon_max_width">
@@ -571,6 +580,16 @@
If [code]true[/code], the given column is selectable.
</description>
</method>
+ <method name="set_suffix">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_text">
<return type="void">
</return>
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
index 2125aa5e17..39bee0c2b3 100644
--- a/doc/classes/TriangleMesh.xml
+++ b/doc/classes/TriangleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TriangleMesh" inherits="Reference" category="Core" version="3.2">
+<class name="TriangleMesh" inherits="Reference" version="4.0">
<brief_description>
Internal mesh type.
</brief_description>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 0f7a93e8d5..1938a3facb 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tween" inherits="Node" category="Core" version="3.2">
+<class name="Tween" inherits="Node" version="4.0">
<brief_description>
Smoothly animates a node's properties over time.
</brief_description>
<description>
Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
- Here is a brief usage example that causes a 2D node to move smoothly between two positions:
+ [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node.
+ Here is a brief usage example that makes a 2D node move smoothly between two positions:
[codeblock]
var tween = get_node("Tween")
tween.interpolate_property($Node2D, "position",
@@ -14,29 +15,30 @@
tween.start()
[/codeblock]
Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component.
- Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [code]http://easings.net/[/code] for some examples). The second accepts an [enum EaseType] constant, and controls the where [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.
+ Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls the where [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]
</description>
<tutorials>
</tutorials>
<methods>
<method name="follow_method">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="initial_val" type="Variant">
</argument>
<argument index="3" name="target" type="Object">
</argument>
- <argument index="4" name="target_method" type="String">
+ <argument index="4" name="target_method" type="StringName">
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
</argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
</argument>
<argument index="8" name="delay" type="float" default="0">
</argument>
@@ -46,7 +48,7 @@
</description>
</method>
<method name="follow_property">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -60,9 +62,9 @@
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
</argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
</argument>
<argument index="8" name="delay" type="float" default="0">
</argument>
@@ -79,7 +81,7 @@
</description>
</method>
<method name="interpolate_callback">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -102,7 +104,7 @@
</description>
</method>
<method name="interpolate_deferred_callback">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -125,11 +127,11 @@
</description>
</method>
<method name="interpolate_method">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="initial_val" type="Variant">
</argument>
@@ -137,9 +139,9 @@
</argument>
<argument index="4" name="duration" type="float">
</argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
+ <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
</argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
+ <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2">
</argument>
<argument index="7" name="delay" type="float" default="0">
</argument>
@@ -149,7 +151,7 @@
</description>
</method>
<method name="interpolate_property">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -161,9 +163,9 @@
</argument>
<argument index="4" name="duration" type="float">
</argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
+ <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
</argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
+ <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2">
</argument>
<argument index="7" name="delay" type="float" default="0">
</argument>
@@ -181,61 +183,61 @@
</description>
</method>
<method name="remove">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified.
</description>
</method>
<method name="remove_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Stops animation and removes all tweens.
</description>
</method>
<method name="reset">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified.
</description>
</method>
<method name="reset_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Resets all tweens to their initial values (the ones given, not those before the tween).
</description>
</method>
<method name="resume">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless [code]key[/code] is specified.
</description>
</method>
<method name="resume_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Continues animating all stopped tweens.
</description>
</method>
<method name="seek">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="time" type="float">
</argument>
@@ -253,48 +255,48 @@
</description>
</method>
<method name="start">
- <return type="bool">
+ <return type="void">
</return>
<description>
Starts the tween. You can define animations both before and after this.
</description>
</method>
<method name="stop">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified.
</description>
</method>
<method name="stop_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Stops animating all tweens.
</description>
</method>
<method name="targeting_method">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="initial" type="Object">
</argument>
- <argument index="3" name="initial_method" type="String">
+ <argument index="3" name="initial_method" type="StringName">
</argument>
<argument index="4" name="final_val" type="Variant">
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
</argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
</argument>
<argument index="8" name="delay" type="float" default="0">
</argument>
@@ -304,7 +306,7 @@
</description>
</method>
<method name="targeting_property">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -318,9 +320,9 @@
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
</argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
</argument>
<argument index="8" name="delay" type="float" default="0">
</argument>
@@ -433,10 +435,10 @@
The interpolation starts quickly and slows down towards the end.
</constant>
<constant name="EASE_IN_OUT" value="2" enum="EaseType">
- A combination of EASE_IN and EASE_OUT. The interpolation is slowest at both ends.
+ A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends.
</constant>
<constant name="EASE_OUT_IN" value="3" enum="EaseType">
- A combination of EASE_IN and EASE_OUT. The interpolation is fastest at both ends.
+ A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends.
</constant>
</constants>
</class>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
new file mode 100644
index 0000000000..f3c865c392
--- /dev/null
+++ b/doc/classes/UDPServer.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="UDPServer" inherits="Reference" version="4.0">
+ <brief_description>
+ Helper class to implement a UDP server.
+ </brief_description>
+ <description>
+ A simple server that opens a UDP socket and returns connected [PacketPeerUDP] upon receiving new packets. See also [method PacketPeerUDP.connect_to_host].
+ Below a small example of how it can be used:
+ [codeblock]
+ # server.gd
+ extends Node
+
+ var server := UDPServer.new()
+ var peers = []
+
+ func _ready():
+ server.listen(4242)
+
+ func _process(delta):
+ if server.is_connection_available():
+ var peer : PacketPeerUDP = server.take_connection()
+ var pkt = peer.get_packet()
+ print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()])
+ print("Received data: %s" % [pkt.get_string_from_utf8()])
+ # Reply so it knows we received the message.
+ peer.put_packet(pkt)
+ # Keep a reference so we can keep contacting the remote peer.
+ peers.append(peer)
+
+ for i in range(0, peers.size()):
+ pass # Do something with the connected peers.
+
+ [/codeblock]
+ [codeblock]
+ # client.gd
+ extends Node
+
+ var udp := PacketPeerUDP.new()
+ var connected = false
+
+ func _ready():
+ udp.connect_to_host("127.0.0.1", 4242)
+
+ func _process(delta):
+ if !connected:
+ # Try to contact server
+ udp.put_packet("The answer is... 42!".to_utf8())
+ if udp.get_available_packet_count() &gt; 0:
+ print("Connected: %s" % udp.get_packet().get_string_from_utf8())
+ connected = true
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="is_connection_available" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if a packet with a new address/port combination is received on the socket.
+ </description>
+ </method>
+ <method name="is_listening" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the socket is open and listening on a port.
+ </description>
+ </method>
+ <method name="listen">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
+ </argument>
+ <description>
+ Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.listen].
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stops the server, closing the UDP socket if open. Will not disconnect any connected [PacketPeerUDP].
+ </description>
+ </method>
+ <method name="take_connection">
+ <return type="PacketPeerUDP">
+ </return>
+ <description>
+ Returns a [PacketPeerUDP] connected to the address/port combination of the first packet in queue. Will return [code]null[/code] if no packet is in queue. See also [method PacketPeerUDP.connect_to_host].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 7834719af6..2cc3e974e2 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UndoRedo" inherits="Object" category="Core" version="3.2">
+<class name="UndoRedo" inherits="Object" version="4.0">
<brief_description>
Helper to manage undo/redo operations in the editor or custom tools.
</brief_description>
@@ -32,11 +32,11 @@
</tutorials>
<methods>
<method name="add_do_method" qualifiers="vararg">
- <return type="Variant">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Register a method that will be called when the action is committed.
@@ -47,7 +47,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -65,11 +65,11 @@
</description>
</method>
<method name="add_undo_method" qualifiers="vararg">
- <return type="Variant">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Register a method that will be called when the action is undone.
@@ -80,7 +80,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -155,7 +155,7 @@
Returns [code]true[/code] if an "undo" action is available.
</description>
</method>
- <method name="is_commiting_action" qualifiers="const">
+ <method name="is_committing_action" qualifiers="const">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
index 4709772615..6b32a08f93 100644
--- a/doc/classes/VBoxContainer.xml
+++ b/doc/classes/VBoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VBoxContainer" inherits="BoxContainer" category="Core" version="3.2">
+<class name="VBoxContainer" inherits="BoxContainer" version="4.0">
<brief_description>
Vertical box container.
</brief_description>
@@ -14,6 +14,7 @@
</constants>
<theme_items>
<theme_item name="separation" type="int" default="4">
+ The vertical space between the [VBoxContainer]'s elements.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
index 6240178b82..727e32961c 100644
--- a/doc/classes/VScrollBar.xml
+++ b/doc/classes/VScrollBar.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.2">
+<class name="VScrollBar" inherits="ScrollBar" version="4.0">
<brief_description>
- Vertical version of [ScrollBar], which goes from top (min) to bottom (max).
+ Vertical scroll bar.
</brief_description>
<description>
+ Vertical version of [ScrollBar], which goes from top (min) to bottom (max).
</description>
<tutorials>
</tutorials>
@@ -16,23 +17,32 @@
<constants>
</constants>
<theme_items>
- <theme_item name="decrement" type="Texture">
+ <theme_item name="decrement" type="Texture2D">
+ Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
- <theme_item name="decrement_highlight" type="Texture">
+ <theme_item name="decrement_highlight" type="Texture2D">
+ Displayed when the mouse cursor hovers over the decrement button.
</theme_item>
<theme_item name="grabber" type="StyleBox">
+ Used as texture for the grabber, the draggable element representing current scroll.
</theme_item>
<theme_item name="grabber_highlight" type="StyleBox">
+ Used when the mouse hovers over the grabber.
</theme_item>
<theme_item name="grabber_pressed" type="StyleBox">
+ Used when the grabber is being dragged.
</theme_item>
- <theme_item name="increment" type="Texture">
+ <theme_item name="increment" type="Texture2D">
+ Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
- <theme_item name="increment_highlight" type="Texture">
+ <theme_item name="increment_highlight" type="Texture2D">
+ Displayed when the mouse cursor hovers over the increment button.
</theme_item>
<theme_item name="scroll" type="StyleBox">
+ Used as background of this [ScrollBar].
</theme_item>
<theme_item name="scroll_focus" type="StyleBox">
+ Used as background when the [ScrollBar] has the GUI focus.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml
index e618c2b84b..52f31b1da7 100644
--- a/doc/classes/VSeparator.xml
+++ b/doc/classes/VSeparator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSeparator" inherits="Separator" category="Core" version="3.2">
+<class name="VSeparator" inherits="Separator" version="4.0">
<brief_description>
Vertical version of [Separator].
</brief_description>
@@ -14,8 +14,10 @@
</constants>
<theme_items>
<theme_item name="separation" type="int" default="4">
+ The width of the area covered by the separator. Effectively works like a minimum width.
</theme_item>
<theme_item name="separator" type="StyleBox">
+ The style for the separator line. Works best with [StyleBoxLine] (remember to enable [member StyleBoxLine.vertical]).
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index fc62e5c892..9394d6b430 100644
--- a/doc/classes/VSlider.xml
+++ b/doc/classes/VSlider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSlider" inherits="Slider" category="Core" version="3.2">
+<class name="VSlider" inherits="Slider" version="4.0">
<brief_description>
Vertical slider.
</brief_description>
@@ -17,23 +17,25 @@
<constants>
</constants>
<theme_items>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="grabber" type="Texture">
+ <theme_item name="grabber" type="Texture2D">
+ The texture for the grabber (the draggable element).
</theme_item>
<theme_item name="grabber_area" type="StyleBox">
+ The background of the area below the grabber.
</theme_item>
- <theme_item name="grabber_disabled" type="Texture">
- </theme_item>
- <theme_item name="grabber_disabled" type="StyleBox">
+ <theme_item name="grabber_area_highlight" type="StyleBox">
</theme_item>
- <theme_item name="grabber_highlight" type="Texture">
+ <theme_item name="grabber_disabled" type="Texture2D">
+ The texture for the grabber when it's disabled.
</theme_item>
- <theme_item name="grabber_highlight" type="StyleBox">
+ <theme_item name="grabber_highlight" type="Texture2D">
+ The texture for the grabber when it's focused.
</theme_item>
<theme_item name="slider" type="StyleBox">
+ The background for the whole slider. Determines the width of the [code]grabber_area[/code].
</theme_item>
- <theme_item name="tick" type="Texture">
+ <theme_item name="tick" type="Texture2D">
+ The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index da2a54dca0..18b515e7ce 100644
--- a/doc/classes/VSplitContainer.xml
+++ b/doc/classes/VSplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSplitContainer" inherits="SplitContainer" category="Core" version="3.2">
+<class name="VSplitContainer" inherits="SplitContainer" version="4.0">
<brief_description>
Vertical split container.
</brief_description>
@@ -14,12 +14,15 @@
</constants>
<theme_items>
<theme_item name="autohide" type="int" default="1">
+ Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
<theme_item name="bg" type="StyleBox">
</theme_item>
- <theme_item name="grabber" type="Texture">
+ <theme_item name="grabber" type="Texture2D">
+ The icon used for the grabber drawn in the middle area.
</theme_item>
<theme_item name="separation" type="int" default="12">
+ The space between sides of the container.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 9d55f5846f..042c8d8e67 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Variant" category="Core" version="3.2">
+<class name="Variant" version="4.0">
<brief_description>
The most important data type in Godot.
</brief_description>
@@ -17,7 +17,7 @@
- VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time.
- C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept.
- The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects.
- The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable. These correspond to [code]TYPE_*[/code] constants in the [@GlobalScope] docs.
+ The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
[codeblock]
var foo = 2
match typeof(foo):
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 8ae5caf68c..64ebc1fa09 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector2" category="Built-In Types" version="3.2">
+<class name="Vector2" version="4.0">
<brief_description>
- Vector used for 2D math.
+ Vector used for 2D math using floating point coordinates.
</brief_description>
<description>
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -13,12 +14,21 @@
<method name="Vector2">
<return type="Vector2">
</return>
+ <argument index="0" name="from" type="Vector2i">
+ </argument>
+ <description>
+ Constructs a new [Vector2] from [Vector2i].
+ </description>
+ </method>
+ <method name="Vector2">
+ <return type="Vector2">
+ </return>
<argument index="0" name="x" type="float">
</argument>
<argument index="1" name="y" type="float">
</argument>
<description>
- Constructs a new Vector2 from the given [code]x[/code] and [code]y[/code].
+ Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code].
</description>
</method>
<method name="abs">
@@ -159,6 +169,7 @@
<argument index="0" name="v" type="Vector2">
</argument>
<description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
@@ -182,7 +193,7 @@
Returns the vector's length squared. Prefer this method over [method length] if you need to sort vectors or need the squared length for some formula.
</description>
</method>
- <method name="linear_interpolate">
+ <method name="lerp">
<return type="Vector2">
</return>
<argument index="0" name="b" type="Vector2">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
new file mode 100644
index 0000000000..a516eb01dd
--- /dev/null
+++ b/doc/classes/Vector2i.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector2i" version="4.0">
+ <brief_description>
+ Vector used for 2D math using integer coordinates.
+ </brief_description>
+ <description>
+ 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Vector2i">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code].
+ </description>
+ </method>
+ <method name="Vector2i">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <description>
+ Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis.
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis.
+ </constant>
+ <constant name="ZERO" value="Vector2i( 0, 0 )">
+ Zero vector.
+ </constant>
+ <constant name="ONE" value="Vector2i( 1, 1 )">
+ One vector.
+ </constant>
+ <constant name="LEFT" value="Vector2i( -1, 0 )">
+ Left unit vector.
+ </constant>
+ <constant name="RIGHT" value="Vector2i( 1, 0 )">
+ Right unit vector.
+ </constant>
+ <constant name="UP" value="Vector2i( 0, -1 )">
+ Up unit vector.
+ </constant>
+ <constant name="DOWN" value="Vector2i( 0, 1 )">
+ Down unit vector.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 29c24709e2..29222bb4d1 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector3" category="Built-In Types" version="3.2">
+<class name="Vector3" version="4.0">
<brief_description>
- Vector used for 3D math.
+ Vector used for 3D math using floating point coordinates.
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other pair of numeric values.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -13,6 +14,15 @@
<method name="Vector3">
<return type="Vector3">
</return>
+ <argument index="0" name="from" type="Vector3i">
+ </argument>
+ <description>
+ Constructs a new [Vector3] from [Vector3i].
+ </description>
+ </method>
+ <method name="Vector3">
+ <return type="Vector3">
+ </return>
<argument index="0" name="x" type="float">
</argument>
<argument index="1" name="y" type="float">
@@ -20,7 +30,7 @@
<argument index="2" name="z" type="float">
</argument>
<description>
- Returns a Vector3 with the given components.
+ Returns a [Vector3] with the given components.
</description>
</method>
<method name="abs">
@@ -135,6 +145,7 @@
<argument index="0" name="v" type="Vector3">
</argument>
<description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
@@ -158,7 +169,7 @@
Returns the vector's length squared. Prefer this function over [method length] if you need to sort vectors or need the squared length for some formula.
</description>
</method>
- <method name="linear_interpolate">
+ <method name="lerp">
<return type="Vector3">
</return>
<argument index="0" name="b" type="Vector3">
@@ -298,7 +309,7 @@
<argument index="0" name="by" type="Vector3">
</argument>
<description>
- Returns a copy of the vector snapped to the lowest neared multiple.
+ Returns the vector snapped to a grid with the given size.
</description>
</method>
<method name="to_diagonal_matrix">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
new file mode 100644
index 0000000000..4f5a658b89
--- /dev/null
+++ b/doc/classes/Vector3i.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector3i" version="4.0">
+ <brief_description>
+ Vector used for 3D math using integer coordinates.
+ </brief_description>
+ <description>
+ 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Vector3i">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="z" type="int">
+ </argument>
+ <description>
+ Returns a [Vector3i] with the given components.
+ </description>
+ </method>
+ <method name="Vector3i">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <description>
+ Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis.
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis.
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis.
+ </constant>
+ <constant name="ZERO" value="Vector3i( 0, 0, 0 )">
+ Zero vector.
+ </constant>
+ <constant name="ONE" value="Vector3i( 1, 1, 1 )">
+ One vector.
+ </constant>
+ <constant name="LEFT" value="Vector3i( -1, 0, 0 )">
+ Left unit vector.
+ </constant>
+ <constant name="RIGHT" value="Vector3i( 1, 0, 0 )">
+ Right unit vector.
+ </constant>
+ <constant name="UP" value="Vector3i( 0, 1, 0 )">
+ Up unit vector.
+ </constant>
+ <constant name="DOWN" value="Vector3i( 0, -1, 0 )">
+ Down unit vector.
+ </constant>
+ <constant name="FORWARD" value="Vector3i( 0, 0, -1 )">
+ Forward unit vector.
+ </constant>
+ <constant name="BACK" value="Vector3i( 0, 0, 1 )">
+ Back unit vector.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody3D.xml
index 1803d4e197..b8b85ff605 100644
--- a/doc/classes/VehicleBody.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.2">
+<class name="VehicleBody3D" inherits="RigidBody3D" version="4.0">
<brief_description>
Physics body that simulates the behavior of a car.
</brief_description>
<description>
- This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape] for the main body of your vehicle and add [VehicleWheel] nodes for the wheels. You should also add a [MeshInstance] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly.
- [b]Note:[/b] The origin point of your VehicleBody will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape] and [MeshInstance] upwards.
+ This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape3D] for the main body of your vehicle and add [VehicleWheel3D] nodes for the wheels. You should also add a [MeshInstance3D] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly.
+ [b]Note:[/b] The origin point of your VehicleBody3D will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape3D] and [MeshInstance3D] upwards.
</description>
<tutorials>
</tutorials>
@@ -13,16 +13,16 @@
</methods>
<members>
<member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0">
- Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
+ Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ 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 RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the vehicle reversing.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" override="true" 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 VehicleWheel.use_as_steering] set to [code]true[/code] will automatically be rotated.
+ 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.
</member>
<member name="weight" type="float" setter="set_weight" getter="get_weight" override="true" default="392.0" />
</members>
diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel3D.xml
index ff6004bcba..c71d797eff 100644
--- a/doc/classes/VehicleWheel.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.2">
+<class name="VehicleWheel3D" inherits="Node3D" version="4.0">
<brief_description>
Physics object that simulates the behavior of a wheel.
</brief_description>
<description>
- This node needs to be used as a child node of [VehicleBody] and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface.
+ This node needs to be used as a child node of [VehicleBody3D] and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface.
</description>
<tutorials>
</tutorials>
@@ -33,7 +33,7 @@
</methods>
<members>
<member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0">
- Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
+ Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" default="0.83">
The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car.
@@ -42,7 +42,7 @@
The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the wheel reversing.
</member>
@@ -50,7 +50,7 @@
The steering angle for the wheel. 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 RigidBody.mass] of the [VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number.
+ The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number.
</member>
<member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness" default="5.88">
This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car.
@@ -59,10 +59,10 @@
This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car.
</member>
<member name="use_as_steering" type="bool" setter="set_use_as_steering" getter="is_used_as_steering" default="false">
- If [code]true[/code], this wheel will be turned when the car steers. This value is used in conjunction with [member VehicleBody.steering] and ignored if you are using the per-wheel [member steering] value instead.
+ If [code]true[/code], this wheel will be turned when the car steers. This value is used in conjunction with [member VehicleBody3D.steering] and ignored if you are using the per-wheel [member steering] value instead.
</member>
<member name="use_as_traction" type="bool" setter="set_use_as_traction" getter="is_used_as_traction" default="false">
- If [code]true[/code], this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [member VehicleBody.engine_force] and ignored if you are using the per-wheel [member engine_force] value instead.
+ If [code]true[/code], this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [member VehicleBody3D.engine_force] and ignored if you are using the per-wheel [member engine_force] value instead.
</member>
<member name="wheel_friction_slip" type="float" setter="set_friction_slip" getter="get_friction_slip" default="10.5">
This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear.
@@ -75,7 +75,7 @@
This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest.
</member>
<member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence" default="0.1">
- This value affects the roll of your vehicle. If set to 0.0 for all wheels, your vehicle will be prone to rolling over, while a value of 1.0 will resist body roll.
+ This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll.
</member>
</members>
<constants>
diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/VelocityTracker3D.xml
index 0dcd174a67..98f7533c76 100644
--- a/doc/classes/SpatialVelocityTracker.xml
+++ b/doc/classes/VelocityTracker3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialVelocityTracker" inherits="Reference" category="Core" version="3.2">
+<class name="VelocityTracker3D" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 804489f7f1..91c8ad0a77 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoPlayer" inherits="Control" category="Core" version="3.2">
+<class name="VideoPlayer" inherits="Control" version="4.0">
<brief_description>
Control for playing video streams.
</brief_description>
<description>
- Control node for playing video streams. Supported formats are [url=https://www.webmproject.org/]WebM[/url] and [url=https://www.theora.org/]Ogg Theora[/url].
+ Control node for playing video streams using [VideoStream] resources.
+ Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative].
</description>
<tutorials>
</tutorials>
@@ -13,14 +14,14 @@
<return type="String">
</return>
<description>
- Returns the video stream's name.
+ Returns the video stream's name, or [code]"&lt;No Stream&gt;"[/code] if no video stream is assigned.
</description>
</method>
<method name="get_video_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<description>
- Returns the current frame as a [Texture].
+ Returns the current frame as a [Texture2D].
</description>
</method>
<method name="is_playing" qualifiers="const">
@@ -28,20 +29,22 @@
</return>
<description>
Returns [code]true[/code] if the video is playing.
+ [b]Note:[/b] The video is still considered playing if paused during playback.
</description>
</method>
<method name="play">
<return type="void">
</return>
<description>
- Starts the video playback.
+ Starts the video playback from the beginning. If the video is paused, this will not unpause the video.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<description>
- Stops the video playback.
+ Stops the video playback and sets the stream position to 0.
+ [b]Note:[/b] Although the stream position will be set to 0, the first frame of the video stream won't become the current frame.
</description>
</method>
</methods>
@@ -55,11 +58,11 @@
<member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec" default="500">
Amount of time in milliseconds to store in buffer while playing.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Audio bus to use for sound playback.
</member>
<member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true">
- If [code]true[/code], the video scales to the control size.
+ 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">
If [code]true[/code], the video is paused.
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
index 7772c61e85..7f522bfdf0 100644
--- a/doc/classes/VideoStream.xml
+++ b/doc/classes/VideoStream.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStream" inherits="Resource" category="Core" version="3.2">
+<class name="VideoStream" inherits="Resource" version="4.0">
<brief_description>
Base resource for video streams.
</brief_description>
<description>
+ Base resource type for all video streams. Classes that derive from [VideoStream] can all be used as resource types to play back videos in [VideoPlayer].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 9bc46881f9..3b52c80c9a 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Viewport" inherits="Node" category="Core" version="3.2">
+<class name="Viewport" inherits="Node" version="4.0">
<brief_description>
Creates a sub-view into the screen.
</brief_description>
<description>
- A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
+ A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too.
Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
- If a viewport is a child of a [ViewportContainer], it will automatically take up its size, otherwise it must be set manually.
+ If a viewport is a child of a [SubViewportContainer], it will automatically take up its size, otherwise it must be set manually.
Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
Also, viewports can be assigned to different screens in case the devices have multiple screens.
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
@@ -16,22 +16,22 @@
<link>https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link>
</tutorials>
<methods>
- <method name="find_world" qualifiers="const">
- <return type="World">
+ <method name="find_world_2d" qualifiers="const">
+ <return type="World2D">
</return>
<description>
- Returns the 3D world of the viewport, or if none the world of the parent viewport.
+ Returns the 2D world of the viewport.
</description>
</method>
- <method name="find_world_2d" qualifiers="const">
- <return type="World2D">
+ <method name="find_world_3d" qualifiers="const">
+ <return type="World3D">
</return>
<description>
- Returns the 2D world of the viewport.
+ Returns the 3D world of the viewport, or if none the world of the parent viewport.
</description>
</method>
<method name="get_camera" qualifiers="const">
- <return type="Camera">
+ <return type="Camera3D">
</return>
<description>
Returns the active 3D camera.
@@ -44,13 +44,6 @@
Returns the total transform of the viewport.
</description>
</method>
- <method name="get_modal_stack_top" qualifiers="const">
- <return type="Control">
- </return>
- <description>
- Returns the topmost modal in the stack.
- </description>
- </method>
<method name="get_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
@@ -73,13 +66,7 @@
<argument index="0" name="quadrant" type="int">
</argument>
<description>
- </description>
- </method>
- <method name="get_size_override" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the size override set with [method set_size_override].
+ Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
</description>
</method>
<method name="get_texture" qualifiers="const">
@@ -87,7 +74,7 @@
</return>
<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 Texture.get_data] to flip it back, for example:
+ [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_data] to flip it back, for example:
[codeblock]
var img = get_viewport().get_texture().get_data()
img.flip_y()
@@ -98,7 +85,7 @@
<return type="RID">
</return>
<description>
- Returns the viewport's RID from the [VisualServer].
+ Returns the viewport's RID from the [RenderingServer].
</description>
</method>
<method name="get_visible_rect" qualifiers="const">
@@ -115,45 +102,40 @@
Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
</description>
</method>
- <method name="gui_has_modal_stack" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if there are visible modals on-screen.
- </description>
- </method>
<method name="gui_is_dragging" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the viewport is currently performing a drag operation.
</description>
</method>
<method name="input">
<return type="void">
</return>
- <argument index="0" name="local_event" type="InputEvent">
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <argument index="1" name="in_local_coords" type="bool" default="false">
</argument>
<description>
</description>
</method>
- <method name="is_input_handled" qualifiers="const">
- <return type="bool">
+ <method name="input_text">
+ <return type="void">
</return>
+ <argument index="0" name="text" type="String">
+ </argument>
<description>
</description>
</method>
- <method name="is_size_override_enabled" qualifiers="const">
+ <method name="is_embedding_subwindows" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the size override is enabled. See [method set_size_override].
</description>
</method>
- <method name="set_attach_to_screen_rect">
- <return type="void">
+ <method name="is_input_handled" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
<description>
</description>
</method>
@@ -161,6 +143,7 @@
<return type="void">
</return>
<description>
+ Stops the input from propagating further down the [SceneTree].
</description>
</method>
<method name="set_shadow_atlas_quadrant_subdiv">
@@ -171,25 +154,15 @@
<argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</argument>
<description>
- </description>
- </method>
- <method name="set_size_override">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <argument index="1" name="size" type="Vector2" default="Vector2( -1, -1 )">
- </argument>
- <argument index="2" name="margin" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Sets the size override of the viewport. If the [code]enable[/code] parameter is [code]true[/code] the override is used, otherwise it uses the default size. If the size parameter is [code](-1, -1)[/code], it won't update the size.
+ 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="unhandled_input">
<return type="void">
</return>
- <argument index="0" name="local_event" type="InputEvent">
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <argument index="1" name="in_local_coords" type="bool" default="false">
</argument>
<description>
</description>
@@ -212,134 +185,141 @@
</method>
</methods>
<members>
- <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr" default="false">
- If [code]true[/code], the viewport will be used in AR/VR process.
- </member>
<member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" default="false">
If [code]true[/code], the viewport will process 2D audio streams.
</member>
<member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener" default="false">
If [code]true[/code], the viewport will process 3D audio streams.
</member>
+ <member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1">
+ Sets the default filter mode used by [CanvasItem]s in this Viewport. See [enum DefaultCanvasItemTextureFilter] for options.
+ </member>
+ <member name="canvas_item_default_texture_repeat" type="int" setter="set_default_canvas_item_texture_repeat" getter="get_default_canvas_item_texture_repeat" enum="Viewport.DefaultCanvasItemTextureRepeat" default="0">
+ Sets the default repeat mode used by [CanvasItem]s in this Viewport. See [enum DefaultCanvasItemTextureRepeat] for options.
+ </member>
<member name="canvas_transform" type="Transform2D" setter="set_canvas_transform" getter="get_canvas_transform">
The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport.
</member>
<member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" enum="Viewport.DebugDraw" default="0">
The overlay mode for test rendered geometry in debug purposes.
</member>
- <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false">
- If [code]true[/code], the viewport will disable 3D rendering. For actual disabling use [code]usage[/code].
- </member>
<member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform">
The global canvas transform of the viewport. The canvas transform is relative to this.
</member>
<member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" default="false">
If [code]true[/code], the viewport will not receive input event.
</member>
+ <member name="gui_embed_subwindows" type="bool" setter="set_embed_subwindows_hint" getter="get_embed_subwindows_hint" default="false">
+ </member>
<member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled" default="true">
If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly.
</member>
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
</member>
- <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" default="true">
- If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm.
- </member>
- <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear" default="false">
- If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output.
- </member>
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
- The multisample anti-aliasing mode.
+ The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems.
</member>
- <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" default="false">
- If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property.
+ <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].
</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="render_direct_to_screen" type="bool" setter="set_use_render_direct_to_screen" getter="is_using_render_direct_to_screen" default="false">
- If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method VisualServer.viewport_set_render_direct_to_screen].
- </member>
- <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode" default="0">
- The clear mode when viewport used as a render target.
- </member>
- <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="Viewport.UpdateMode" default="2">
- The update mode when viewport used as a render target.
- </member>
- <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip" default="false">
- If [code]true[/code], the result of rendering will be flipped vertically.
+ <member name="screen_space_aa" type="int" setter="set_screen_space_aa" getter="get_screen_space_aa" enum="Viewport.ScreenSpaceAA" default="0">
+ Sets the screen-space antialiasing method used. 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.
</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 first quadrant on shadow atlas.
+ 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 second quadrant on shadow atlas.
+ 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 third quadrant on shadow atlas.
+ 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 fourth quadrant on shadow atlas.
+ 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="0">
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. Since user-created viewports default to a value of 0, this value must be set above 0 manually.
</member>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )">
- The width and height of viewport.
- </member>
- <member name="size_override_stretch" type="bool" setter="set_size_override_stretch" getter="is_size_override_stretch_enabled" default="false">
- If [code]true[/code], the size override affects stretch as well.
- </member>
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
If [code]true[/code], the viewport should render its background as transparent.
</member>
- <member name="usage" type="int" setter="set_usage" getter="get_usage" enum="Viewport.Usage" default="2">
- The rendering mode of viewport.
- </member>
- <member name="world" type="World" setter="set_world" getter="get_world">
- The custom [World] which can be used as 3D environment source.
- </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>
+ <member name="world_3d" type="World3D" setter="set_world_3d" getter="get_world_3d">
+ The custom [World3D] which can be used as 3D environment source.
+ </member>
</members>
<signals>
+ <signal name="gui_focus_changed">
+ <argument index="0" name="node" type="Control">
+ </argument>
+ <description>
+ Emitted when a Control node grabs keyboard focus.
+ </description>
+ </signal>
<signal name="size_changed">
<description>
- Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
+ Emitted when the size of the viewport is changed, whether by resizing of window, or some other means.
</description>
</signal>
</signals>
<constants>
- <constant name="UPDATE_DISABLED" value="0" enum="UpdateMode">
- Do not update the render target.
- </constant>
- <constant name="UPDATE_ONCE" value="1" enum="UpdateMode">
- Update the render target once, then switch to [constant UPDATE_DISABLED].
- </constant>
- <constant name="UPDATE_WHEN_VISIBLE" value="2" enum="UpdateMode">
- Update the render target only when it is visible. This is the default value.
- </constant>
- <constant name="UPDATE_ALWAYS" value="3" enum="UpdateMode">
- Always update the render target.
- </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
+ This quadrant will not be used.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv">
+ This quadrant will only be used by one shadow map.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv">
+ 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">
+ 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">
+ 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>
<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>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
</constant>
+ <constant name="MSAA_DISABLED" value="0" enum="MSAA">
+ Multisample antialiasing mode disabled. This is the default value, and also the fastest setting.
+ </constant>
+ <constant name="MSAA_2X" value="1" enum="MSAA">
+ Use 2x Multisample Antialiasing.
+ </constant>
+ <constant name="MSAA_4X" value="2" enum="MSAA">
+ Use 4x Multisample Antialiasing.
+ </constant>
+ <constant name="MSAA_8X" value="3" enum="MSAA">
+ Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware.
+ </constant>
+ <constant name="MSAA_16X" value="4" enum="MSAA">
+ Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware.
+ </constant>
+ <constant name="MSAA_MAX" value="5" enum="MSAA">
+ Represents the size of the [enum MSAA] enum.
+ </constant>
+ <constant name="SCREEN_SPACE_AA_DISABLED" value="0" enum="ScreenSpaceAA">
+ Do not perform any antialiasing in the full screen post-process.
+ </constant>
+ <constant name="SCREEN_SPACE_AA_FXAA" value="1" enum="ScreenSpaceAA">
+ Use fast approximate antialiasing. FXAA is a popular screen-space antialising method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
+ </constant>
+ <constant name="SCREEN_SPACE_AA_MAX" value="2" enum="ScreenSpaceAA">
+ Represents the size of the [enum ScreenSpaceAA] enum.
+ </constant>
<constant name="RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="RenderInfo">
Amount of objects in frame.
</constant>
@@ -367,39 +347,71 @@
<constant name="DEBUG_DRAW_UNSHADED" value="1" enum="DebugDraw">
Objects are displayed without light information.
</constant>
- <constant name="DEBUG_DRAW_OVERDRAW" value="2" enum="DebugDraw">
- Objected are displayed semi-transparent with additive blending so you can see where they intersect.
+ <constant name="DEBUG_DRAW_LIGHTING" value="2" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_OVERDRAW" value="3" enum="DebugDraw">
+ Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others.
</constant>
- <constant name="DEBUG_DRAW_WIREFRAME" value="3" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_WIREFRAME" value="4" enum="DebugDraw">
Objects are displayed in wireframe style.
</constant>
- <constant name="MSAA_DISABLED" value="0" enum="MSAA">
- Multisample anti-aliasing mode disabled. This is the default value.
+ <constant name="DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="DebugDraw">
</constant>
- <constant name="MSAA_2X" value="1" enum="MSAA">
+ <constant name="DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="DebugDraw">
+ Objects are displayed with only the albedo value from [GIProbe]s.
</constant>
- <constant name="MSAA_4X" value="2" enum="MSAA">
+ <constant name="DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="DebugDraw">
+ Objects are displayed with only the lighting value from [GIProbe]s.
</constant>
- <constant name="MSAA_8X" value="3" enum="MSAA">
+ <constant name="DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="DebugDraw">
+ Objects are displayed with only the emission color from [GIProbe]s.
</constant>
- <constant name="MSAA_16X" value="4" enum="MSAA">
+ <constant name="DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="DebugDraw">
+ Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
+ </constant>
+ <constant name="DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS" value="10" enum="DebugDraw">
+ Draws the shadow atlas that stores shadows from [DirectionalLight3D]s in the upper left quadrant of the [Viewport].
+ </constant>
+ <constant name="DEBUG_DRAW_SCENE_LUMINANCE" value="11" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_SSAO" value="12" enum="DebugDraw">
+ Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
+ </constant>
+ <constant name="DEBUG_DRAW_ROUGHNESS_LIMITER" value="13" enum="DebugDraw">
+ Draws the roughness limiter post process over the Viewport so you can see where it has an effect. It must be enabled in [member ProjectSettings.rendering/quality/screen_filters/screen_space_roughness_limiter] to work.
+ </constant>
+ <constant name="DEBUG_DRAW_PSSM_SPLITS" value="14" enum="DebugDraw">
+ Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow.
+ </constant>
+ <constant name="DEBUG_DRAW_DECAL_ATLAS" value="15" enum="DebugDraw">
+ Draws the decal atlas used by [Decal]s and light projector textures in the upper left quadrant of the [Viewport].
+ </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>
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="1" enum="DefaultCanvasItemTextureFilter">
+ The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps.
</constant>
- <constant name="USAGE_2D" value="0" enum="Usage">
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="2" enum="DefaultCanvasItemTextureFilter">
+ The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps.
</constant>
- <constant name="USAGE_2D_NO_SAMPLING" value="1" enum="Usage">
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="DefaultCanvasItemTextureFilter">
+ The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps.
</constant>
- <constant name="USAGE_3D" value="2" enum="Usage">
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX" value="4" enum="DefaultCanvasItemTextureFilter">
+ Max value for [enum DefaultCanvasItemTextureFilter] enum.
</constant>
- <constant name="USAGE_3D_NO_EFFECTS" value="3" enum="Usage">
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED" value="0" enum="DefaultCanvasItemTextureRepeat">
+ Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture.
</constant>
- <constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode">
- Always clear the render target before drawing.
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED" value="1" enum="DefaultCanvasItemTextureRepeat">
+ Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
</constant>
- <constant name="CLEAR_MODE_NEVER" value="1" enum="ClearMode">
- Never clear the render target.
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR" value="2" enum="DefaultCanvasItemTextureRepeat">
+ Flip the texture when repeating so that the edge lines up instead of abruptly changing.
</constant>
- <constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2" enum="ClearMode">
- Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER].
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX" value="3" enum="DefaultCanvasItemTextureRepeat">
+ Max value for [enum DefaultCanvasItemTextureRepeat] enum.
</constant>
</constants>
</class>
diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml
deleted file mode 100644
index e4c6091909..0000000000
--- a/doc/classes/ViewportContainer.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ViewportContainer" inherits="Container" category="Core" version="3.2">
- <brief_description>
- Control for holding [Viewport]s.
- </brief_description>
- <description>
- A [Container] node that holds a [Viewport], automatically setting its size.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false">
- If [code]true[/code], the viewport will be scaled to the control's size.
- </member>
- <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1">
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index f4994699a3..14b460a43b 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ViewportTexture" inherits="Texture" category="Core" version="3.2">
+<class name="ViewportTexture" inherits="Texture2D" version="4.0">
<brief_description>
Texture which displays the content of a [Viewport].
</brief_description>
<description>
- Displays the content of a [Viewport] node as a dynamic [Texture]. This can be used to mix controls, 2D, and 3D elements in the same scene.
+ Displays the content of a [Viewport] node as a dynamic [Texture2D]. This can be used to mix controls, 2D, and 3D elements in the same scene.
To create a ViewportTexture in code, use the [method Viewport.get_texture] method on the target viewport.
</description>
<tutorials>
@@ -12,7 +12,6 @@
<methods>
</methods>
<members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
<member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene" default="NodePath(&quot;&quot;)">
The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture.
diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml
index 96f6a42cdf..a5abf16a8d 100644
--- a/doc/classes/VisibilityEnabler2D.xml
+++ b/doc/classes/VisibilityEnabler2D.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.2">
+<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" version="4.0">
<brief_description>
- Enables certain nodes only when visible.
+ Enables certain nodes only when approximately visible.
</brief_description>
<description>
The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself.
+ [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
+ [b]Note:[/b] VisibilityEnabler2D will not affect nodes added after scene initialization.
</description>
<tutorials>
</tutorials>
@@ -15,6 +17,7 @@
<argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
</argument>
<description>
+ Returns whether the enabler identified by given [enum Enabler] constant is active.
</description>
</method>
<method name="set_enabler">
@@ -25,6 +28,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ Sets active state of the enabler identified by given [enum Enabler] constant.
</description>
</method>
</methods>
@@ -33,13 +37,13 @@
If [code]true[/code], [RigidBody2D] nodes will be paused.
</member>
<member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [AnimatedSprite] nodes will be paused.
+ If [code]true[/code], [AnimatedSprite2D] nodes will be paused.
</member>
<member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
If [code]true[/code], [AnimationPlayer] nodes will be paused.
</member>
<member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [Particles2D] nodes will be paused.
+ If [code]true[/code], [GPUParticles2D] nodes will be paused.
</member>
<member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="false">
If [code]true[/code], the parent's [method Node._physics_process] will be stopped.
@@ -56,7 +60,7 @@
This enabler will freeze [RigidBody2D] nodes.
</constant>
<constant name="ENABLER_PAUSE_PARTICLES" value="2" enum="Enabler">
- This enabler will stop [Particles2D] nodes.
+ This enabler will stop [GPUParticles2D] nodes.
</constant>
<constant name="ENABLER_PARENT_PROCESS" value="3" enum="Enabler">
This enabler will stop the parent's _process function.
@@ -65,6 +69,7 @@
This enabler will stop the parent's _physics_process function.
</constant>
<constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5" enum="Enabler">
+ This enabler will stop [AnimatedSprite2D] nodes animations.
</constant>
<constant name="ENABLER_MAX" value="6" enum="Enabler">
Represents the size of the [enum Enabler] enum.
diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler3D.xml
index e3c7d05fce..342a37e7a4 100644
--- a/doc/classes/VisibilityEnabler.xml
+++ b/doc/classes/VisibilityEnabler3D.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.2">
+<class name="VisibilityEnabler3D" inherits="VisibilityNotifier3D" version="4.0">
<brief_description>
- Enables certain nodes only when visible.
+ Enables certain nodes only when approximately visible.
</brief_description>
<description>
- The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
+ The VisibilityEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler3D itself.
+ [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node.
+ [b]Note:[/b] VisibilityEnabler3D will not affect nodes added after scene initialization.
</description>
<tutorials>
</tutorials>
@@ -12,25 +14,27 @@
<method name="is_enabler_enabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler3D.Enabler">
</argument>
<description>
+ Returns whether the enabler identified by given [enum Enabler] constant is active.
</description>
</method>
<method name="set_enabler">
<return type="void">
</return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler3D.Enabler">
</argument>
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ Sets active state of the enabler identified by given [enum Enabler] constant.
</description>
</method>
</methods>
<members>
<member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [RigidBody] nodes will be paused.
+ If [code]true[/code], [RigidBody3D] nodes will be paused.
</member>
<member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
If [code]true[/code], [AnimationPlayer] nodes will be paused.
@@ -41,7 +45,7 @@
This enabler will pause [AnimationPlayer] nodes.
</constant>
<constant name="ENABLER_FREEZE_BODIES" value="1" enum="Enabler">
- This enabler will freeze [RigidBody] nodes.
+ This enabler will freeze [RigidBody3D] nodes.
</constant>
<constant name="ENABLER_MAX" value="2" enum="Enabler">
Represents the size of the [enum Enabler] enum.
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
index 7e1d933c44..391163ef94 100644
--- a/doc/classes/VisibilityNotifier2D.xml
+++ b/doc/classes/VisibilityNotifier2D.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.2">
+<class name="VisibilityNotifier2D" inherits="Node2D" version="4.0">
<brief_description>
- Detects when the node is visible on screen.
+ Detects approximately when the node is visible on screen.
</brief_description>
<description>
The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
+ [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier3D.xml
index 4cbfa7ba76..eb7bb91f26 100644
--- a/doc/classes/VisibilityNotifier.xml
+++ b/doc/classes/VisibilityNotifier3D.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.2">
+<class name="VisibilityNotifier3D" inherits="Node3D" version="4.0">
<brief_description>
- Detects when the node is visible on screen.
+ Detects approximately when the node is visible on screen.
</brief_description>
<description>
- The VisibilityNotifier detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera]'s view.
+ The VisibilityNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view.
+ [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node.
</description>
<tutorials>
</tutorials>
@@ -20,32 +21,32 @@
</methods>
<members>
<member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB( -1, -1, -1, 2, 2, 2 )">
- The VisibilityNotifier's bounding box.
+ The VisibilityNotifier3D's bounding box.
</member>
</members>
<signals>
<signal name="camera_entered">
- <argument index="0" name="camera" type="Camera">
+ <argument index="0" name="camera" type="Camera3D">
</argument>
<description>
- Emitted when the VisibilityNotifier enters a [Camera]'s view.
+ Emitted when the VisibilityNotifier3D enters a [Camera3D]'s view.
</description>
</signal>
<signal name="camera_exited">
- <argument index="0" name="camera" type="Camera">
+ <argument index="0" name="camera" type="Camera3D">
</argument>
<description>
- Emitted when the VisibilityNotifier exits a [Camera]'s view.
+ Emitted when the VisibilityNotifier3D exits a [Camera3D]'s view.
</description>
</signal>
<signal name="screen_entered">
<description>
- Emitted when the VisibilityNotifier enters the screen.
+ Emitted when the VisibilityNotifier3D enters the screen.
</description>
</signal>
<signal name="screen_exited">
<description>
- Emitted when the VisibilityNotifier exits the screen.
+ Emitted when the VisibilityNotifier3D exits the screen.
</description>
</signal>
</signals>
diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance3D.xml
index 7576bf7ad8..6451b3f330 100644
--- a/doc/classes/VisualInstance.xml
+++ b/doc/classes/VisualInstance3D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualInstance" inherits="Spatial" category="Core" version="3.2">
+<class name="VisualInstance3D" inherits="Node3D" version="4.0">
<brief_description>
+ Parent of all visual 3D nodes.
</brief_description>
<description>
+ The [VisualInstance3D] is used to connect a resource to a visual representation. All visual 3D nodes inherit from the [VisualInstance3D]. In general, you should not access the [VisualInstance3D] properties directly as they are accessed and managed by the nodes that inherit from [VisualInstance3D]. [VisualInstance3D] is the node representation of the [RenderingServer] instance.
</description>
<tutorials>
</tutorials>
@@ -11,19 +13,21 @@
<return type="AABB">
</return>
<description>
- Returns the [AABB] (also known as the bounding box) for this VisualInstance.
+ Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D].
</description>
</method>
<method name="get_base" qualifiers="const">
<return type="RID">
</return>
<description>
+ Returns the RID of the resource associated with this [VisualInstance3D]. For example, if the Node is a [MeshInstance3D], this will return the RID of the associated [Mesh].
</description>
</method>
<method name="get_instance" qualifiers="const">
<return type="RID">
</return>
<description>
+ Returns the RID of this instance. This RID is the same as the RID returned by [method RenderingServer.instance_create]. This RID is needed if you want to call [RenderingServer] functions directly on this [VisualInstance3D].
</description>
</method>
<method name="get_layer_mask_bit" qualifiers="const">
@@ -32,14 +36,15 @@
<argument index="0" name="layer" type="int">
</argument>
<description>
+ Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise.
</description>
</method>
<method name="get_transformed_aabb" qualifiers="const">
<return type="AABB">
</return>
<description>
- Returns the transformed [AABB] (also known as the bounding box) for this VisualInstance.
- Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Spatial]s [Transform]
+ Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D].
+ Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform].
</description>
</method>
<method name="set_base">
@@ -48,8 +53,7 @@
<argument index="0" name="base" type="RID">
</argument>
<description>
- Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood.
- It is recommended to only use [method set_base] if you know what you're doing.
+ 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_bit">
@@ -60,13 +64,14 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
+ Enables a particular layer in [member layers].
</description>
</method>
</methods>
<members>
<member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" default="1">
- The render layer(s) this VisualInstance is drawn on.
- This object will only be visible for [Camera]s whose cull mask includes the render object this VisualInstance is set to.
+ 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.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index 15216948e4..40b0f52469 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShader" inherits="Shader" category="Core" version="3.2">
+<class name="VisualShader" inherits="Shader" version="4.0">
<brief_description>
A custom shader program with a visual editor.
</brief_description>
@@ -22,6 +22,7 @@
<argument index="3" name="id" type="int">
</argument>
<description>
+ Adds the specified node to the shader.
</description>
</method>
<method name="can_connect_nodes" qualifiers="const">
@@ -38,6 +39,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the specified nodes and ports can be connected together.
</description>
</method>
<method name="connect_nodes">
@@ -54,6 +56,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<description>
+ Connects the specified nodes and ports.
</description>
</method>
<method name="connect_nodes_forced">
@@ -70,6 +73,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<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">
@@ -86,6 +90,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<description>
+ Connects the specified nodes and ports.
</description>
</method>
<method name="get_node" qualifiers="const">
@@ -96,6 +101,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Returns the shader node instance with specified [code]type[/code] and [code]id[/code].
</description>
</method>
<method name="get_node_connections" qualifiers="const">
@@ -104,14 +110,16 @@
<argument index="0" name="type" type="int" enum="VisualShader.Type">
</argument>
<description>
+ Returns the list of connected nodes with the specified type.
</description>
</method>
<method name="get_node_list" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="type" type="int" enum="VisualShader.Type">
</argument>
<description>
+ Returns the list of all nodes in the shader with the specified type.
</description>
</method>
<method name="get_node_position" qualifiers="const">
@@ -122,6 +130,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Returns the position of the specified node within the shader graph.
</description>
</method>
<method name="get_valid_node_id" qualifiers="const">
@@ -146,6 +155,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the specified node and port connection exist.
</description>
</method>
<method name="remove_node">
@@ -156,6 +166,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Removes the specified node from the shader.
</description>
</method>
<method name="set_mode">
@@ -164,6 +175,7 @@
<argument index="0" name="mode" type="int" enum="Shader.Mode">
</argument>
<description>
+ Sets the mode of this shader.
</description>
</method>
<method name="set_node_position">
@@ -176,20 +188,27 @@
<argument index="2" name="position" type="Vector2">
</argument>
<description>
+ Sets the position of the specified node.
</description>
</method>
</methods>
<members>
<member name="code" type="String" setter="set_code" getter="get_code" override="true" default="&quot;shader_type spatial;void vertex() {// Output:0}void fragment() {// Output:0}void light() {// Output:0}&quot;" />
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
+ The offset vector of the whole graph.
+ </member>
+ <member name="version" type="String" setter="set_version" getter="get_version" default="&quot;&quot;">
</member>
</members>
<constants>
<constant name="TYPE_VERTEX" value="0" enum="Type">
+ A vertex shader, operating on vertices.
</constant>
<constant name="TYPE_FRAGMENT" value="1" enum="Type">
+ A fragment shader, operating on fragments (pixels).
</constant>
<constant name="TYPE_LIGHT" value="2" enum="Type">
+ A shader for light calculations.
</constant>
<constant name="TYPE_MAX" value="3" enum="Type">
Represents the size of the [enum Type] enum.
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index 9b0c6b2604..28d13a7d32 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -1,18 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNode" inherits="Resource" category="Core" version="3.2">
+<class name="VisualShaderNode" inherits="Resource" version="4.0">
<brief_description>
+ Base class for nodes in a visual shader graph.
</brief_description>
<description>
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link>
</tutorials>
<methods>
+ <method name="get_default_input_values" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an [Array] containing default values for all of the input ports of the node in the form [code][index0, value0, index1, value1, ...][/code].
+ </description>
+ </method>
<method name="get_input_port_default_value" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="port" type="int">
</argument>
<description>
+ Returns the default value of the input [code]port[/code].
+ </description>
+ </method>
+ <method name="set_default_input_values">
+ <return type="void">
+ </return>
+ <argument index="0" name="values" type="Array">
+ </argument>
+ <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">
@@ -23,18 +42,19 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Sets the default value for the selected input [code]port[/code].
</description>
</method>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" default="[ 0, Vector3( 0, 0, 0 ) ]">
- </member>
<member name="output_port_for_preview" type="int" setter="set_output_port_for_preview" getter="get_output_port_for_preview" default="-1">
+ Sets the output port index which will be showed for preview. If set to [code]-1[/code] no port will be open for preview.
</member>
</members>
<signals>
<signal name="editor_refresh_request">
<description>
+ Emitted when the node requests an editor refresh. Currently called only in setter of [member VisualShaderNodeTexture.source], [VisualShaderNodeTexture], and [VisualShaderNodeCubemap] (and their derivatives).
</description>
</signal>
</signals>
@@ -42,19 +62,22 @@
<constant name="PORT_TYPE_SCALAR" value="0" enum="PortType">
Floating-point scalar. Translated to [code]float[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_VECTOR" value="1" enum="PortType">
+ <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType">
+ Integer scalar. Translated to [code]int[/code] type in shader code.
+ </constant>
+ <constant name="PORT_TYPE_VECTOR" value="2" enum="PortType">
3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_BOOLEAN" value="2" enum="PortType">
+ <constant name="PORT_TYPE_BOOLEAN" value="3" enum="PortType">
Boolean type. Translated to [code]bool[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_TRANSFORM" value="3" enum="PortType">
+ <constant name="PORT_TYPE_TRANSFORM" value="4" enum="PortType">
Transform type. Translated to [code]mat4[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_SAMPLER" value="4" enum="PortType">
+ <constant name="PORT_TYPE_SAMPLER" value="5" enum="PortType">
Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
</constant>
- <constant name="PORT_TYPE_MAX" value="5" enum="PortType">
+ <constant name="PORT_TYPE_MAX" value="6" enum="PortType">
Represents the size of the [enum PortType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml
index 2490dbbcc0..cccb64e874 100644
--- a/doc/classes/VisualShaderNodeBooleanConstant.xml
+++ b/doc/classes/VisualShaderNodeBooleanConstant.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A boolean constant to be used within the visual shader graph.
</brief_description>
<description>
+ Has only one output port and no inputs.
+ Translated to [code]bool[/code] in the shader language.
</description>
<tutorials>
</tutorials>
@@ -10,8 +13,8 @@
</methods>
<members>
<member name="constant" type="bool" setter="set_constant" getter="get_constant" default="false">
+ A boolean constant which represents a state of this node.
</member>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
</members>
<constants>
</constants>
diff --git a/doc/classes/VisualShaderNodeBooleanUniform.xml b/doc/classes/VisualShaderNodeBooleanUniform.xml
index 518c7ba3b8..8313a8256e 100644
--- a/doc/classes/VisualShaderNodeBooleanUniform.xml
+++ b/doc/classes/VisualShaderNodeBooleanUniform.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeBooleanUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2">
+<class name="VisualShaderNodeBooleanUniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
+ A boolean uniform to be used within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]uniform bool[/code] in the shader language.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml
index f58d1d8e76..9b122ca8e1 100644
--- a/doc/classes/VisualShaderNodeColorConstant.xml
+++ b/doc/classes/VisualShaderNodeColorConstant.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A [Color] constant to be used within the visual shader graph.
</brief_description>
<description>
+ Has two output ports representing RGB and alpha channels of [Color].
+ Translated to [code]vec3 rgb[/code] and [code]float alpha[/code] in the shader language.
</description>
<tutorials>
</tutorials>
@@ -10,8 +13,8 @@
</methods>
<members>
<member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color( 1, 1, 1, 1 )">
+ A [Color] constant which represents a state of this node.
</member>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
</members>
<constants>
</constants>
diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml
index b37a669ee9..b9abf85802 100644
--- a/doc/classes/VisualShaderNodeColorFunc.xml
+++ b/doc/classes/VisualShaderNodeColorFunc.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorFunc" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeColorFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A [Color] function to be used within the visual shader graph.
</brief_description>
<description>
+ Accept a [Color] to the input port and transform it according to [member function].
</description>
<tutorials>
</tutorials>
@@ -10,12 +12,29 @@
</methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeColorFunc.Function" default="0">
+ A function to be applied to the input color. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_GRAYSCALE" value="0" enum="Function">
+ Converts the color to grayscale using the following formula:
+ [codeblock]
+ vec3 c = input;
+ float max1 = max(c.r, c.g);
+ float max2 = max(max1, c.b);
+ float max3 = max(max1, max2);
+ return vec3(max3, max3, max3);
+ [/codeblock]
</constant>
<constant name="FUNC_SEPIA" value="1" enum="Function">
+ Applies sepia tone effect using the following formula:
+ [codeblock]
+ vec3 c = input;
+ float r = (c.r * 0.393) + (c.g * 0.769) + (c.b * 0.189);
+ float g = (c.r * 0.349) + (c.g * 0.686) + (c.b * 0.168);
+ float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131);
+ return vec3(r, g, b);
+ [/codeblock]
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml
index 9997e9c83c..629e84d47b 100644
--- a/doc/classes/VisualShaderNodeColorOp.xml
+++ b/doc/classes/VisualShaderNodeColorOp.xml
@@ -1,36 +1,98 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorOp" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeColorOp" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A [Color] operator to be used within the visual shader graph.
</brief_description>
<description>
+ Applies [member operator] to two color inputs.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" />
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeColorOp.Operator" default="0">
+ An operator to be applied to the inputs. See [enum Operator] for options.
</member>
</members>
<constants>
<constant name="OP_SCREEN" value="0" enum="Operator">
+ Produce a screen effect with the following formula:
+ [codeblock]
+ result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b);
+ [/codeblock]
</constant>
<constant name="OP_DIFFERENCE" value="1" enum="Operator">
+ Produce a difference effect with the following formula:
+ [codeblock]
+ result = abs(a - b);
+ [/codeblock]
</constant>
<constant name="OP_DARKEN" value="2" enum="Operator">
+ Produce a darken effect with the following formula:
+ [codeblock]
+ result = min(a, b);
+ [/codeblock]
</constant>
<constant name="OP_LIGHTEN" value="3" enum="Operator">
+ Produce a lighten effect with the following formula:
+ [codeblock]
+ result = max(a, b);
+ [/codeblock]
</constant>
<constant name="OP_OVERLAY" value="4" enum="Operator">
+ Produce an overlay effect with the following formula:
+ [codeblock]
+ for (int i = 0; i &lt; 3; i++) {
+ float base = a[i];
+ float blend = b[i];
+ if (base &lt; 0.5) {
+ result[i] = 2.0 * base * blend;
+ } else {
+ result[i] = 1.0 - 2.0 * (1.0 - blend) * (1.0 - base);
+ }
+ }
+ [/codeblock]
</constant>
<constant name="OP_DODGE" value="5" enum="Operator">
+ Produce a dodge effect with the following formula:
+ [codeblock]
+ result = a / (vec3(1.0) - b);
+ [/codeblock]
</constant>
<constant name="OP_BURN" value="6" enum="Operator">
+ Produce a burn effect with the following formula:
+ [codeblock]
+ result = vec3(1.0) - (vec3(1.0) - a) / b;
+ [/codeblock]
</constant>
<constant name="OP_SOFT_LIGHT" value="7" enum="Operator">
+ Produce a soft light effect with the following formula:
+ [codeblock]
+ for (int i = 0; i &lt; 3; i++) {
+ float base = a[i];
+ float blend = b[i];
+ if (base &lt; 0.5) {
+ result[i] = base * (blend + 0.5);
+ } else {
+ result[i] = 1.0 - (1.0 - base) * (1.0 - (blend - 0.5));
+ }
+ }
+ [/codeblock]
</constant>
<constant name="OP_HARD_LIGHT" value="8" enum="Operator">
+ Produce a hard light effect with the following formula:
+ [codeblock]
+ for (int i = 0; i &lt; 3; i++) {
+ float base = a[i];
+ float blend = b[i];
+ if (base &lt; 0.5) {
+ result[i] = base * (2.0 * blend);
+ } else {
+ result[i] = 1.0 - (1.0 - base) * (1.0 - 2.0 * (blend - 0.5));
+ }
+ }
+ [/codeblock]
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml
index ec61729782..6972ccefd9 100644
--- a/doc/classes/VisualShaderNodeColorUniform.xml
+++ b/doc/classes/VisualShaderNodeColorUniform.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2">
+<class name="VisualShaderNodeColorUniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
+ A [Color] uniform to be used within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]uniform vec4[/code] in the shader language.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml
index b1106998e9..9c2331edea 100644
--- a/doc/classes/VisualShaderNodeCompare.xml
+++ b/doc/classes/VisualShaderNodeCompare.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A comparison function for common types within the visual shader graph.
</brief_description>
<description>
+ Compares [code]a[/code] and [code]b[/code] of [member type] by [member function]. Returns a boolean scalar. Translates to [code]if[/code] instruction in shader code.
</description>
<tutorials>
</tutorials>
@@ -10,37 +12,54 @@
</methods>
<members>
<member name="condition" type="int" setter="set_condition" getter="get_condition" enum="VisualShaderNodeCompare.Condition" default="0">
+ Extra condition which is applied if [member type] is set to [constant CTYPE_VECTOR].
</member>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 1e-05 ]" />
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeCompare.Function" default="0">
+ A comparison function. See [enum Function] for options.
</member>
- <member name="type" type="int" setter="set_comparsion_type" getter="get_comparsion_type" enum="VisualShaderNodeCompare.ComparsionType" default="0">
+ <member name="type" type="int" setter="set_comparison_type" getter="get_comparison_type" enum="VisualShaderNodeCompare.ComparisonType" default="0">
+ The type to be used in the comparison. See [enum ComparisonType] for options.
</member>
</members>
<constants>
- <constant name="CTYPE_SCALAR" value="0" enum="ComparsionType">
+ <constant name="CTYPE_SCALAR" value="0" enum="ComparisonType">
+ A floating-point scalar.
</constant>
- <constant name="CTYPE_VECTOR" value="1" enum="ComparsionType">
+ <constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType">
+ An integer scalar.
</constant>
- <constant name="CTYPE_BOOLEAN" value="2" enum="ComparsionType">
+ <constant name="CTYPE_VECTOR" value="2" enum="ComparisonType">
+ A 3D vector type.
</constant>
- <constant name="CTYPE_TRANSFORM" value="3" enum="ComparsionType">
+ <constant name="CTYPE_BOOLEAN" value="3" enum="ComparisonType">
+ A boolean type.
+ </constant>
+ <constant name="CTYPE_TRANSFORM" value="4" enum="ComparisonType">
+ A transform ([code]mat4[/code]) type.
</constant>
<constant name="FUNC_EQUAL" value="0" enum="Function">
+ Comparison for equality ([code]a == b[/code]).
</constant>
<constant name="FUNC_NOT_EQUAL" value="1" enum="Function">
+ Comparison for inequality ([code]a != b[/code]).
</constant>
<constant name="FUNC_GREATER_THAN" value="2" enum="Function">
+ Comparison for greater than ([code]a &gt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="FUNC_GREATER_THAN_EQUAL" value="3" enum="Function">
+ Comparison for greater than or equal ([code]a &gt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="FUNC_LESS_THAN" value="4" enum="Function">
+ Comparison for less than ([code]a &lt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function">
+ Comparison for less than or equal ([code]a &lt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="COND_ALL" value="0" enum="Condition">
+ The result will be true if all of component in vector satisfy the comparison condition.
</constant>
<constant name="COND_ANY" value="1" enum="Condition">
+ The result will be true if any of component in vector satisfy the comparison condition.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeCubeMap.xml b/doc/classes/VisualShaderNodeCubeMap.xml
deleted file mode 100644
index 29ebe95086..0000000000
--- a/doc/classes/VisualShaderNodeCubeMap.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCubeMap" inherits="VisualShaderNode" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map">
- </member>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
- <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeCubeMap.Source" default="0">
- </member>
- <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType" default="0">
- </member>
- </members>
- <constants>
- <constant name="SOURCE_TEXTURE" value="0" enum="Source">
- </constant>
- <constant name="SOURCE_PORT" value="1" enum="Source">
- </constant>
- <constant name="TYPE_DATA" value="0" enum="TextureType">
- </constant>
- <constant name="TYPE_COLOR" value="1" enum="TextureType">
- </constant>
- <constant name="TYPE_NORMALMAP" value="2" enum="TextureType">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeCubeMapUniform.xml b/doc/classes/VisualShaderNodeCubeMapUniform.xml
deleted file mode 100644
index c6b3db5a9d..0000000000
--- a/doc/classes/VisualShaderNodeCubeMapUniform.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCubeMapUniform" inherits="VisualShaderNodeTextureUniform" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeCubemap.xml b/doc/classes/VisualShaderNodeCubemap.xml
new file mode 100644
index 0000000000..b6813bdae8
--- /dev/null
+++ b/doc/classes/VisualShaderNodeCubemap.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeCubemap" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A [Cubemap] sampling node to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]texture(cubemap, vec3)[/code] in the shader language. Returns a color vector and alpha channel as scalar.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="cube_map" type="Cubemap" setter="set_cube_map" getter="get_cube_map">
+ The [Cubemap] texture to sample when using [constant SOURCE_TEXTURE] as [member source].
+ </member>
+ <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeCubemap.Source" default="0">
+ Defines which source should be used for the sampling. See [enum Source] for options.
+ </member>
+ <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubemap.TextureType" default="0">
+ Defines the type of data provided by the source texture. See [enum TextureType] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="SOURCE_TEXTURE" value="0" enum="Source">
+ Use the [Cubemap] set via [member cube_map]. If this is set to [member source], the [code]samplerCube[/code] port is ignored.
+ </constant>
+ <constant name="SOURCE_PORT" value="1" enum="Source">
+ Use the [Cubemap] sampler reference passed via the [code]samplerCube[/code] port. If this is set to [member source], the [member cube_map] texture is ignored.
+ </constant>
+ <constant name="TYPE_DATA" value="0" enum="TextureType">
+ 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.
+ </constant>
+ <constant name="TYPE_NORMALMAP" 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.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeCubemapUniform.xml b/doc/classes/VisualShaderNodeCubemapUniform.xml
new file mode 100644
index 0000000000..d4bcdc9006
--- /dev/null
+++ b/doc/classes/VisualShaderNodeCubemapUniform.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeCubemapUniform" inherits="VisualShaderNodeTextureUniform" version="4.0">
+ <brief_description>
+ A [Cubemap] uniform node to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform samplerCube[/code] in the shader language. The output value can be used as port for [VisualShaderNodeCubemap].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index 5219dcb77b..5bd8ec38ed 100644
--- a/doc/classes/VisualShaderNodeCustom.xml
+++ b/doc/classes/VisualShaderNodeCustom.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCustom" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeCustom" inherits="VisualShaderNode" version="4.0">
<brief_description>
Virtual class to define custom [VisualShaderNode]s for use in the Visual Shader Editor.
</brief_description>
@@ -13,15 +13,15 @@
[/codeblock]
</description>
<tutorials>
- <link>http://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link>
</tutorials>
<methods>
<method name="_get_category" qualifiers="virtual">
<return type="String">
</return>
<description>
- Override this method to define the category of the associated custom node in the Visual Shader Editor's members dialog.
- Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Custom" category.
+ Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may looks like [code]"MyGame/MyFunctions/Noise"[/code].
+ Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category.
</description>
</method>
<method name="_get_code" qualifiers="virtual">
@@ -72,7 +72,7 @@
</description>
</method>
<method name="_get_input_port_name" qualifiers="virtual">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="port" type="int">
</argument>
@@ -108,7 +108,7 @@
</description>
</method>
<method name="_get_output_port_name" qualifiers="virtual">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="port" type="int">
</argument>
@@ -135,18 +135,15 @@
Defining this method is [b]optional[/b]. If not overridden, no return icon is shown.
</description>
</method>
- <method name="_get_subcategory" qualifiers="virtual">
- <return type="String">
+ <method name="_is_highend" qualifiers="virtual">
+ <return type="bool">
</return>
<description>
- Override this method to define the subcategory of the associated custom node in the Visual Shader Editor's members dialog.
- Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the root of the main category (see [method _get_category]).
+ Override this method to enable high-end mark in the Visual Shader Editor's members dialog.
+ Defining this method is [b]optional[/b]. If not overridden, it's false.
</description>
</method>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml
index 4ea7e5ed6e..72be31872d 100644
--- a/doc/classes/VisualShaderNodeDeterminant.xml
+++ b/doc/classes/VisualShaderNodeDeterminant.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates the determinant of a [Transform] within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]deteminant(x)[/code] in the shader language.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeDotProduct.xml b/doc/classes/VisualShaderNodeDotProduct.xml
index 4c2bae39a1..51166ab58f 100644
--- a/doc/classes/VisualShaderNodeDotProduct.xml
+++ b/doc/classes/VisualShaderNodeDotProduct.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeDotProduct" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeDotProduct" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates a dot product of two vectors within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]dot(a, b)[/code] in the shader language.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml
index 9727b8698b..f571edaab3 100644
--- a/doc/classes/VisualShaderNodeExpression.xml
+++ b/doc/classes/VisualShaderNodeExpression.xml
@@ -1,22 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeExpression" inherits="VisualShaderNodeGroupBase" category="Core" version="3.2">
+<class name="VisualShaderNodeExpression" inherits="VisualShaderNodeGroupBase" version="4.0">
<brief_description>
+ 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.
+ 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 to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="build">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
</methods>
<members>
- <member name="editable" type="bool" setter="set_editable" getter="is_editable" override="true" default="true" />
<member name="expression" type="String" setter="set_expression" getter="get_expression" default="&quot;&quot;">
+ An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), and thus cannot be used to declare functions, varyings, uniforms, or global constants.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualShaderNodeFaceForward.xml b/doc/classes/VisualShaderNodeFaceForward.xml
index 9c755cc6de..5ef08ea8c2 100644
--- a/doc/classes/VisualShaderNodeFaceForward.xml
+++ b/doc/classes/VisualShaderNodeFaceForward.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFaceForward" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeFaceForward" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Returns the vector that points in the same direction as a reference vector within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]faceforward(N, I, Nref)[/code] in the shader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise [code]-N[/code] is returned.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml
index c4ac65aa48..3ba9ff07d3 100644
--- a/doc/classes/VisualShaderNodeScalarConstant.xml
+++ b/doc/classes/VisualShaderNodeFloatConstant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A scalar floating-point constant to be used within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]float[/code] in the shader language.
</description>
<tutorials>
</tutorials>
@@ -10,8 +12,8 @@
</methods>
<members>
<member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0">
+ A floating-point constant which represents a state of this node.
</member>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
</members>
<constants>
</constants>
diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml
new file mode 100644
index 0000000000..bb7486e8cf
--- /dev/null
+++ b/doc/classes/VisualShaderNodeFloatFunc.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar floating-point function to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Accept a floating-point scalar ([code]x[/code]) to the input port and transform it according to [member function].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13">
+ A function to be applied to the scalar. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_SIN" value="0" enum="Function">
+ Returns the sine of the parameter. Translates to [code]sin(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_COS" value="1" enum="Function">
+ Returns the cosine of the parameter. Translates to [code]cos(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TAN" value="2" enum="Function">
+ Returns the tangent of the parameter. Translates to [code]tan(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ASIN" value="3" enum="Function">
+ Returns the arc-sine of the parameter. Translates to [code]asin(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ACOS" value="4" enum="Function">
+ Returns the arc-cosine of the parameter. Translates to [code]acos(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ATAN" value="5" enum="Function">
+ Returns the arc-tangent of the parameter. Translates to [code]atan(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SINH" value="6" enum="Function">
+ Returns the hyperbolic sine of the parameter. Translates to [code]sinh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_COSH" value="7" enum="Function">
+ Returns the hyperbolic cosine of the parameter. Translates to [code]cosh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TANH" value="8" enum="Function">
+ Returns the hyperbolic tangent of the parameter. Translates to [code]tanh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_LOG" value="9" enum="Function">
+ Returns the natural logarithm of the parameter. Translates to [code]log(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_EXP" value="10" enum="Function">
+ Returns the natural exponentiation of the parameter. Translates to [code]exp(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SQRT" value="11" enum="Function">
+ Returns the square root of the parameter. Translates to [code]sqrt(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ABS" value="12" enum="Function">
+ Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SIGN" value="13" enum="Function">
+ Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_FLOOR" value="14" enum="Function">
+ Finds the nearest integer less than or equal to the parameter. Translates to [code]floor(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ROUND" value="15" enum="Function">
+ Finds the nearest integer to the parameter. Translates to [code]round(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_CEIL" value="16" enum="Function">
+ Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_FRAC" value="17" enum="Function">
+ Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SATURATE" value="18" enum="Function">
+ Clamps the value between [code]0.0[/code] and [code]1.0[/code] using [code]min(max(x, 0.0), 1.0)[/code].
+ </constant>
+ <constant name="FUNC_NEGATE" value="19" enum="Function">
+ Negates the [code]x[/code] using [code]-(x)[/code].
+ </constant>
+ <constant name="FUNC_ACOSH" value="20" enum="Function">
+ Returns the arc-hyperbolic-cosine of the parameter. Translates to [code]acosh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ASINH" value="21" enum="Function">
+ Returns the arc-hyperbolic-sine of the parameter. Translates to [code]asinh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ATANH" value="22" enum="Function">
+ Returns the arc-hyperbolic-tangent of the parameter. Translates to [code]atanh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_DEGREES" value="23" enum="Function">
+ Convert a quantity in radians to degrees. Translates to [code]degrees(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_EXP2" value="24" enum="Function">
+ Returns 2 raised by the power of the parameter. Translates to [code]exp2(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function">
+ Returns the inverse of the square root of the parameter. Translates to [code]inversesqrt(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_LOG2" value="26" enum="Function">
+ Returns the base 2 logarithm of the parameter. Translates to [code]log2(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_RADIANS" value="27" enum="Function">
+ Convert a quantity in degrees to radians. Translates to [code]radians(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_RECIPROCAL" value="28" enum="Function">
+ Finds reciprocal value of dividing 1 by [code]x[/code] (i.e. [code]1 / x[/code]).
+ </constant>
+ <constant name="FUNC_ROUNDEVEN" value="29" enum="Function">
+ Finds the nearest even integer to the parameter. Translates to [code]roundEven(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TRUNC" value="30" enum="Function">
+ Returns a value equal to the nearest integer to [code]x[/code] whose absolute value is not larger than the absolute value of [code]x[/code]. Translates to [code]trunc(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ONEMINUS" value="31" enum="Function">
+ Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]).
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml
new file mode 100644
index 0000000000..2c9ebabb89
--- /dev/null
+++ b/doc/classes/VisualShaderNodeFloatOp.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A floating-point scalar operator to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0">
+ An operator to be applied to the inputs. See [enum Operator] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_ADD" value="0" enum="Operator">
+ Sums two numbers using [code]a + b[/code].
+ </constant>
+ <constant name="OP_SUB" value="1" enum="Operator">
+ Subtracts two numbers using [code]a - b[/code].
+ </constant>
+ <constant name="OP_MUL" value="2" enum="Operator">
+ Multiplies two numbers using [code]a * b[/code].
+ </constant>
+ <constant name="OP_DIV" value="3" enum="Operator">
+ Divides two numbers using [code]a / b[/code].
+ </constant>
+ <constant name="OP_MOD" value="4" enum="Operator">
+ Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_POW" value="5" enum="Operator">
+ Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MAX" value="6" enum="Operator">
+ Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MIN" value="7" enum="Operator">
+ Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_ATAN2" value="8" enum="Operator">
+ Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_STEP" value="9" enum="Operator">
+ Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml
new file mode 100644
index 0000000000..33ece8ac1b
--- /dev/null
+++ b/doc/classes/VisualShaderNodeFloatUniform.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0">
+ <brief_description>
+ A scalar float uniform to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform float[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatUniform.Hint" default="0">
+ A hint applied to the uniform, which controls the values it can take when set through the inspector.
+ </member>
+ <member name="max" type="float" setter="set_max" getter="get_max" default="1.0">
+ Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="min" type="float" setter="set_min" getter="get_min" default="0.0">
+ Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="step" type="float" setter="set_step" getter="get_step" default="0.1">
+ Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP].
+ </member>
+ </members>
+ <constants>
+ <constant name="HINT_NONE" value="0" enum="Hint">
+ No hint used.
+ </constant>
+ <constant name="HINT_RANGE" value="1" enum="Hint">
+ A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code.
+ </constant>
+ <constant name="HINT_RANGE_STEP" value="2" enum="Hint">
+ A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeFresnel.xml b/doc/classes/VisualShaderNodeFresnel.xml
index f79ae04abf..c396b4574c 100644
--- a/doc/classes/VisualShaderNodeFresnel.xml
+++ b/doc/classes/VisualShaderNodeFresnel.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFresnel" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeFresnel" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A Fresnel effect to be used within the visual shader graph.
</brief_description>
<description>
+ Returns falloff based on the dot product of surface normal and view direction of camera (pass associated inputs to it).
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, false, 3, 1.0 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeGlobalExpression.xml b/doc/classes/VisualShaderNodeGlobalExpression.xml
index f008c639cf..8023ba1890 100644
--- a/doc/classes/VisualShaderNodeGlobalExpression.xml
+++ b/doc/classes/VisualShaderNodeGlobalExpression.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeGlobalExpression" inherits="VisualShaderNodeExpression" category="Core" version="3.2">
+<class name="VisualShaderNodeGlobalExpression" inherits="VisualShaderNodeExpression" version="4.0">
<brief_description>
+ A custom global visual shader graph expression written in Godot Shading Language.
</brief_description>
<description>
+ Custom Godot Shader Language expression, which is placed on top of the generated shader. You can place various function definitions inside to call later in [VisualShaderNodeExpression]s (which are injected in the main shader functions). You can also declare varyings, uniforms and global constants.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="editable" type="bool" setter="set_editable" getter="is_editable" override="true" default="false" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml
index 511a56b7a6..13018d52f3 100644
--- a/doc/classes/VisualShaderNodeGroupBase.xml
+++ b/doc/classes/VisualShaderNodeGroupBase.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeGroupBase" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeGroupBase" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Base class for a family of nodes with variable amount of input and output ports within the visual shader graph.
</brief_description>
<description>
+ Currently, has no direct usage, use the derived classes instead.
</description>
<tutorials>
</tutorials>
@@ -17,6 +19,7 @@
<argument index="2" name="name" type="String">
</argument>
<description>
+ Adds an input port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code].
</description>
</method>
<method name="add_output_port">
@@ -29,68 +32,63 @@
<argument index="2" name="name" type="String">
</argument>
<description>
+ Adds an output port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code].
</description>
</method>
<method name="clear_input_ports">
<return type="void">
</return>
<description>
+ Removes all previously specified input ports.
</description>
</method>
<method name="clear_output_ports">
<return type="void">
</return>
<description>
- </description>
- </method>
- <method name="get_control">
- <return type="Control">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
+ Removes all previously specified output ports.
</description>
</method>
<method name="get_free_input_port_id" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns a free input port ID which can be used in [method add_input_port].
</description>
</method>
<method name="get_free_output_port_id" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns a free output port ID which can be used in [method add_output_port].
</description>
</method>
<method name="get_input_port_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of input ports in use. Alternative for [method get_free_input_port_id].
</description>
</method>
<method name="get_inputs" qualifiers="const">
<return type="String">
</return>
<description>
+ Returns a [String] description of the input ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]).
</description>
</method>
<method name="get_output_port_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of output ports in use. Alternative for [method get_free_output_port_id].
</description>
</method>
<method name="get_outputs" qualifiers="const">
<return type="String">
</return>
<description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
+ Returns a [String] description of the output ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]).
</description>
</method>
<method name="has_input_port" qualifiers="const">
@@ -99,6 +97,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the specified input port exists.
</description>
</method>
<method name="has_output_port" qualifiers="const">
@@ -107,6 +106,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the specified output port exists.
</description>
</method>
<method name="is_valid_port_name" qualifiers="const">
@@ -115,6 +115,7 @@
<argument index="0" name="name" type="String">
</argument>
<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">
@@ -123,6 +124,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Removes the specified input port.
</description>
</method>
<method name="remove_output_port">
@@ -131,16 +133,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- </description>
- </method>
- <method name="set_control">
- <return type="void">
- </return>
- <argument index="0" name="control" type="Control">
- </argument>
- <argument index="1" name="index" type="int">
- </argument>
- <description>
+ Removes the specified output port.
</description>
</method>
<method name="set_input_port_name">
@@ -151,6 +144,7 @@
<argument index="1" name="name" type="String">
</argument>
<description>
+ Renames the specified input port.
</description>
</method>
<method name="set_input_port_type">
@@ -161,6 +155,7 @@
<argument index="1" name="type" type="int">
</argument>
<description>
+ Sets the specified input port's type (see [enum VisualShaderNode.PortType]).
</description>
</method>
<method name="set_inputs">
@@ -169,6 +164,7 @@
<argument index="0" name="inputs" type="String">
</argument>
<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">
@@ -179,6 +175,7 @@
<argument index="1" name="name" type="String">
</argument>
<description>
+ Renames the specified output port.
</description>
</method>
<method name="set_output_port_type">
@@ -189,6 +186,7 @@
<argument index="1" name="type" type="int">
</argument>
<description>
+ Sets the specified output port's type (see [enum VisualShaderNode.PortType]).
</description>
</method>
<method name="set_outputs">
@@ -197,20 +195,13 @@
<argument index="0" name="outputs" type="String">
</argument>
<description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <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>
</method>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
- <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="false">
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )">
+ The size of the node in the visual shader graph.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml
index 6900cdf81b..ad0b21a370 100644
--- a/doc/classes/VisualShaderNodeIf.xml
+++ b/doc/classes/VisualShaderNodeIf.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIf" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Compares two floating-point numbers in order to return a required vector within the visual shader graph.
</brief_description>
<description>
+ First two ports are scalar floatin-point numbers to compare, third is tolerance comparison amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a &gt; b[/code] and [code]a &lt; b[/code] respectively.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 1e-05, 3, Vector3( 0, 0, 0 ), 4, Vector3( 0, 0, 0 ), 5, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index bfcd4c734c..9261d0088d 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -1,27 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeInput" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Represents the input shader parameter within the visual shader graph.
</brief_description>
<description>
+ Gives access to input variables (built-ins) available for the shader. See the shading reference for the list of available built-ins for each shader type (check [code]Tutorials[/code] section for link).
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/stable/tutorials/shading/shading_reference/index.html</link>
</tutorials>
<methods>
<method name="get_input_real_name" qualifiers="const">
<return type="String">
</return>
<description>
+ Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
</description>
</method>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
<member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default="&quot;[None]&quot;">
+ One of the several input constants in lower-case style like: "vertex"([code]VERTEX[/code]) or "point_size"([code]POINT_SIZE[/code]).
</member>
</members>
<signals>
<signal name="input_type_changed">
<description>
+ Emitted when input is changed via [member input_name].
</description>
</signal>
</signals>
diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml
new file mode 100644
index 0000000000..1c407b21ca
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntConstant.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar integer constant to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]int[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0">
+ An integer constant which represents a state of this node.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
new file mode 100644
index 0000000000..5c68c0ec71
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar integer function to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="3">
+ A function to be applied to the scalar. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_ABS" value="0" enum="Function">
+ Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_CLAMP" value="1" enum="Function">
+ Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_NEGATE" value="2" enum="Function">
+ Negates the [code]x[/code] using [code]-(x)[/code].
+ </constant>
+ <constant name="FUNC_SIGN" value="3" enum="Function">
+ Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml
new file mode 100644
index 0000000000..fc9a0a9a0a
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntOp.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ An integer scalar operator to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Applies [member operator] to two integer inputs: [code]a[/code] and [code]b[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0">
+ An operator to be applied to the inputs. See [enum Operator] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_ADD" value="0" enum="Operator">
+ Sums two numbers using [code]a + b[/code].
+ </constant>
+ <constant name="OP_SUB" value="1" enum="Operator">
+ Subtracts two numbers using [code]a - b[/code].
+ </constant>
+ <constant name="OP_MUL" value="2" enum="Operator">
+ Multiplies two numbers using [code]a * b[/code].
+ </constant>
+ <constant name="OP_DIV" value="3" enum="Operator">
+ Divides two numbers using [code]a / b[/code].
+ </constant>
+ <constant name="OP_MOD" value="4" enum="Operator">
+ Calculates the remainder of two numbers using [code]a % b[/code].
+ </constant>
+ <constant name="OP_MAX" value="5" enum="Operator">
+ Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MIN" value="6" enum="Operator">
+ Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml
new file mode 100644
index 0000000000..8c7c288177
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntUniform.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0">
+ <brief_description>
+ A scalar integer uniform to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform int[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntUniform.Hint" default="0">
+ A hint applied to the uniform, which controls the values it can take when set through the inspector.
+ </member>
+ <member name="max" type="int" setter="set_max" getter="get_max" default="100">
+ Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="min" type="int" setter="set_min" getter="get_min" default="0">
+ Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="step" type="int" setter="set_step" getter="get_step" default="1">
+ Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP].
+ </member>
+ </members>
+ <constants>
+ <constant name="HINT_NONE" value="0" enum="Hint">
+ No hint used.
+ </constant>
+ <constant name="HINT_RANGE" value="1" enum="Hint">
+ A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code.
+ </constant>
+ <constant name="HINT_RANGE_STEP" value="2" enum="Hint">
+ A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml
index c221e60b75..b767a9638e 100644
--- a/doc/classes/VisualShaderNodeIs.xml
+++ b/doc/classes/VisualShaderNodeIs.xml
@@ -1,22 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIs" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeIs" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A boolean comparison operator to be used within the visual shader graph.
</brief_description>
<description>
+ Returns the boolean result of the comparison between [code]INF[/code] or [code]NaN[/code] and a scalar parameter.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0 ]" />
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIs.Function" default="0">
+ The comparison function. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_IS_INF" value="0" enum="Function">
+ Comparison with [code]INF[/code] (Infinity).
</constant>
<constant name="FUNC_IS_NAN" value="1" enum="Function">
+ Comparison with [code]NaN[/code] (Not a Number; denotes invalid numeric results, e.g. division by zero).
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeOuterProduct.xml b/doc/classes/VisualShaderNodeOuterProduct.xml
index 6111084b44..ba6822bfce 100644
--- a/doc/classes/VisualShaderNodeOuterProduct.xml
+++ b/doc/classes/VisualShaderNodeOuterProduct.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeOuterProduct" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeOuterProduct" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates an outer product of two vectors within the visual shader graph.
</brief_description>
<description>
+ [code]OuterProduct[/code] treats the first parameter [code]c[/code] as a column vector (matrix with one column) and the second parameter [code]r[/code] as a row vector (matrix with one row) and does a linear algebraic matrix multiply [code]c * r[/code], yielding a matrix whose number of rows is the number of components in [code]c[/code] and whose number of columns is the number of components in [code]r[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml
index ff109a949e..2b4aed9ae4 100644
--- a/doc/classes/VisualShaderNodeOutput.xml
+++ b/doc/classes/VisualShaderNodeOutput.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeOutput" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeOutput" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Represents the output shader parameters within the visual shader graph.
</brief_description>
<description>
+ This visual shader node is present in all shader graphs in form of "Output" block with mutliple output value ports.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeScalarClamp.xml b/doc/classes/VisualShaderNodeScalarClamp.xml
index 927aeb01ce..7432e8dfca 100644
--- a/doc/classes/VisualShaderNodeScalarClamp.xml
+++ b/doc/classes/VisualShaderNodeScalarClamp.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarClamp" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeScalarClamp" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Clamps a scalar value within the visual shader graph.
</brief_description>
<description>
+ Constrains a value to lie between [code]min[/code] and [code]max[/code] values.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 1.0 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
index 795054637e..33777c1e49 100644
--- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
+++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
@@ -1,24 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarDerivativeFunc" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeScalarDerivativeFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates a scalar derivative within the visual shader graph.
</brief_description>
<description>
+ This node is only available in [code]Fragment[/code] and [code]Light[/code] visual shaders.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0 ]" />
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarDerivativeFunc.Function" default="0">
+ The derivative type. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_SUM" value="0" enum="Function">
+ Sum of absolute derivative in [code]x[/code] and [code]y[/code].
</constant>
<constant name="FUNC_X" value="1" enum="Function">
+ Derivative in [code]x[/code] using local differencing.
</constant>
<constant name="FUNC_Y" value="2" enum="Function">
+ Derivative in [code]y[/code] using local differencing.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeScalarFunc.xml
deleted file mode 100644
index 81ccf8aeb6..0000000000
--- a/doc/classes/VisualShaderNodeScalarFunc.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0 ]" />
- <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13">
- </member>
- </members>
- <constants>
- <constant name="FUNC_SIN" value="0" enum="Function">
- </constant>
- <constant name="FUNC_COS" value="1" enum="Function">
- </constant>
- <constant name="FUNC_TAN" value="2" enum="Function">
- </constant>
- <constant name="FUNC_ASIN" value="3" enum="Function">
- </constant>
- <constant name="FUNC_ACOS" value="4" enum="Function">
- </constant>
- <constant name="FUNC_ATAN" value="5" enum="Function">
- </constant>
- <constant name="FUNC_SINH" value="6" enum="Function">
- </constant>
- <constant name="FUNC_COSH" value="7" enum="Function">
- </constant>
- <constant name="FUNC_TANH" value="8" enum="Function">
- </constant>
- <constant name="FUNC_LOG" value="9" enum="Function">
- </constant>
- <constant name="FUNC_EXP" value="10" enum="Function">
- </constant>
- <constant name="FUNC_SQRT" value="11" enum="Function">
- </constant>
- <constant name="FUNC_ABS" value="12" enum="Function">
- </constant>
- <constant name="FUNC_SIGN" value="13" enum="Function">
- </constant>
- <constant name="FUNC_FLOOR" value="14" enum="Function">
- </constant>
- <constant name="FUNC_ROUND" value="15" enum="Function">
- </constant>
- <constant name="FUNC_CEIL" value="16" enum="Function">
- </constant>
- <constant name="FUNC_FRAC" value="17" enum="Function">
- </constant>
- <constant name="FUNC_SATURATE" value="18" enum="Function">
- </constant>
- <constant name="FUNC_NEGATE" value="19" enum="Function">
- </constant>
- <constant name="FUNC_ACOSH" value="20" enum="Function">
- </constant>
- <constant name="FUNC_ASINH" value="21" enum="Function">
- </constant>
- <constant name="FUNC_ATANH" value="22" enum="Function">
- </constant>
- <constant name="FUNC_DEGREES" value="23" enum="Function">
- </constant>
- <constant name="FUNC_EXP2" value="24" enum="Function">
- </constant>
- <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function">
- </constant>
- <constant name="FUNC_LOG2" value="26" enum="Function">
- </constant>
- <constant name="FUNC_RADIANS" value="27" enum="Function">
- </constant>
- <constant name="FUNC_RECIPROCAL" value="28" enum="Function">
- </constant>
- <constant name="FUNC_ROUNDEVEN" value="29" enum="Function">
- </constant>
- <constant name="FUNC_TRUNC" value="30" enum="Function">
- </constant>
- <constant name="FUNC_ONEMINUS" value="31" enum="Function">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarInterp.xml b/doc/classes/VisualShaderNodeScalarInterp.xml
index 7e40304b04..393ea70e1a 100644
--- a/doc/classes/VisualShaderNodeScalarInterp.xml
+++ b/doc/classes/VisualShaderNodeScalarInterp.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarInterp" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeScalarInterp" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Linearly interpolates between two scalars within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]mix(a, b, weight)[/code] in the shader language.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 1.0, 2, 0.5 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeScalarOp.xml
deleted file mode 100644
index 3ff56bffaa..0000000000
--- a/doc/classes/VisualShaderNodeScalarOp.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0 ]" />
- <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0">
- </member>
- </members>
- <constants>
- <constant name="OP_ADD" value="0" enum="Operator">
- </constant>
- <constant name="OP_SUB" value="1" enum="Operator">
- </constant>
- <constant name="OP_MUL" value="2" enum="Operator">
- </constant>
- <constant name="OP_DIV" value="3" enum="Operator">
- </constant>
- <constant name="OP_MOD" value="4" enum="Operator">
- </constant>
- <constant name="OP_POW" value="5" enum="Operator">
- </constant>
- <constant name="OP_MAX" value="6" enum="Operator">
- </constant>
- <constant name="OP_MIN" value="7" enum="Operator">
- </constant>
- <constant name="OP_ATAN2" value="8" enum="Operator">
- </constant>
- <constant name="OP_STEP" value="9" enum="Operator">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarSmoothStep.xml b/doc/classes/VisualShaderNodeScalarSmoothStep.xml
index e71bb16f6f..e619cc8571 100644
--- a/doc/classes/VisualShaderNodeScalarSmoothStep.xml
+++ b/doc/classes/VisualShaderNodeScalarSmoothStep.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarSmoothStep" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeScalarSmoothStep" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates a scalar SmoothStep function within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 0.0 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeScalarSwitch.xml b/doc/classes/VisualShaderNodeScalarSwitch.xml
index 2828f42b47..2ad5202745 100644
--- a/doc/classes/VisualShaderNodeScalarSwitch.xml
+++ b/doc/classes/VisualShaderNodeScalarSwitch.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarSwitch" inherits="VisualShaderNodeSwitch" category="Core" version="3.2">
+<class name="VisualShaderNodeScalarSwitch" inherits="VisualShaderNodeSwitch" version="4.0">
<brief_description>
+ A boolean/scalar function for use within the visual shader graph.
</brief_description>
<description>
+ Returns an associated scalar if the provided boolean value is [code]true[/code] or [code]false[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, false, 1, 1.0, 2, 0.0 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeScalarUniform.xml b/doc/classes/VisualShaderNodeScalarUniform.xml
deleted file mode 100644
index bdbb02561b..0000000000
--- a/doc/classes/VisualShaderNodeScalarUniform.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml
index 704ac08adb..9f8a12c0fd 100644
--- a/doc/classes/VisualShaderNodeSwitch.xml
+++ b/doc/classes/VisualShaderNodeSwitch.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A boolean/vector function for use within the visual shader graph.
</brief_description>
<description>
+ Returns an associated vector if the provided boolean value is [code]true[/code] or [code]false[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, false, 1, Vector3( 1, 1, 1 ), 2, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml
index a94b798745..8e389e0b40 100644
--- a/doc/classes/VisualShaderNodeTexture.xml
+++ b/doc/classes/VisualShaderNodeTexture.xml
@@ -1,38 +1,53 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeTexture" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Performs a texture lookup within the visual shader graph.
</brief_description>
<description>
+ Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
<member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0">
+ Determines the source for the lookup. See [enum Source] for options.
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The source texture, if needed for the selected [member source].
</member>
<member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTexture.TextureType" default="0">
+ Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum TextureType] for options.
</member>
</members>
<constants>
<constant name="SOURCE_TEXTURE" value="0" enum="Source">
+ Use the texture given as an argument for this function.
</constant>
<constant name="SOURCE_SCREEN" value="1" enum="Source">
+ Use the current viewport's texture as the source.
</constant>
<constant name="SOURCE_2D_TEXTURE" value="2" enum="Source">
+ Use the texture from this shader's texture built-in (e.g. a texture of a [Sprite2D]).
</constant>
<constant name="SOURCE_2D_NORMAL" value="3" enum="Source">
+ Use the texture from this shader's normal map built-in.
</constant>
<constant name="SOURCE_DEPTH" value="4" enum="Source">
+ Use the depth texture available for this shader.
+ </constant>
+ <constant name="SOURCE_PORT" value="5" enum="Source">
+ Use the texture provided in the input port for this function.
</constant>
<constant name="TYPE_DATA" value="0" enum="TextureType">
+ 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.
</constant>
<constant name="TYPE_NORMALMAP" 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.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml
index 3d58ec88c5..107f08ba28 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureUniform.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2">
+<class name="VisualShaderNodeTextureUniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
+ Performs a uniform texture lookup within the visual shader graph.
</brief_description>
<description>
+ Performs a lookup operation on the texture provided as a uniform for the shader.
</description>
<tutorials>
</tutorials>
@@ -10,22 +12,30 @@
</methods>
<members>
<member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureUniform.ColorDefault" default="0">
+ Sets the default color if no texture is assigned to the uniform.
</member>
<member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureUniform.TextureType" default="0">
+ Defines the type of data provided by the source texture. See [enum TextureType] for options.
</member>
</members>
<constants>
<constant name="TYPE_DATA" value="0" enum="TextureType">
+ 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.
</constant>
<constant name="TYPE_NORMALMAP" 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.
</constant>
<constant name="TYPE_ANISO" value="3" enum="TextureType">
+ Adds [code]hint_aniso[/code] as hint to the uniform declaration to use for a flowmap.
</constant>
<constant name="COLOR_DEFAULT_WHITE" value="0" enum="ColorDefault">
+ Defaults to white color.
</constant>
<constant name="COLOR_DEFAULT_BLACK" value="1" enum="ColorDefault">
+ Defaults to black color.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
index d4e142651e..28504cc7ac 100644
--- a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
+++ b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureUniformTriplanar" inherits="VisualShaderNodeTextureUniform" category="Core" version="3.2">
+<class name="VisualShaderNodeTextureUniformTriplanar" inherits="VisualShaderNodeTextureUniform" version="4.0">
<brief_description>
+ Performs a uniform texture lookup with triplanar within the visual shader graph.
</brief_description>
<description>
+ Performs a lookup operation on the texture provided as a uniform for the shader, with support for triplanar mapping.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml
index 0c44e6b3c5..41762b0099 100644
--- a/doc/classes/VisualShaderNodeTransformCompose.xml
+++ b/doc/classes/VisualShaderNodeTransformCompose.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Composes a [Transform] from four [Vector3]s within the visual shader graph.
</brief_description>
<description>
+ Creates a 4x4 transform matrix using four vectors of type [code]vec3[/code]. Each vector is one row in the matrix and the last column is a [code]vec4(0, 0, 0, 1)[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 0, 0, 0 ), 3, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml
index 737961f8ec..e5004e5bb6 100644
--- a/doc/classes/VisualShaderNodeTransformConstant.xml
+++ b/doc/classes/VisualShaderNodeTransformConstant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A [Transform] constant for use within the visual shader graph.
</brief_description>
<description>
+ A constant [Transform], which can be used as an input node.
</description>
<tutorials>
</tutorials>
@@ -10,8 +12,8 @@
</methods>
<members>
<member name="constant" type="Transform" setter="set_constant" getter="get_constant" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ A [Transform] constant which represents the state of this node.
</member>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
</members>
<constants>
</constants>
diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml
index 911d2e953a..c8d893db00 100644
--- a/doc/classes/VisualShaderNodeTransformDecompose.xml
+++ b/doc/classes/VisualShaderNodeTransformDecompose.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Decomposes a [Transform] into four [Vector3]s within the visual shader graph.
</brief_description>
<description>
+ Takes a 4x4 transform matrix and decomposes it into four [code]vec3[/code] values, one from each row of the matrix.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml
index 53b7c9f1ab..d0b5c5129d 100644
--- a/doc/classes/VisualShaderNodeTransformFunc.xml
+++ b/doc/classes/VisualShaderNodeTransformFunc.xml
@@ -1,22 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Computes a [Transform] function within the visual shader graph.
</brief_description>
<description>
+ Computes an inverse or transpose function on the provided [Transform].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" />
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeTransformFunc.Function" default="0">
+ The function to be computed. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_INVERSE" value="0" enum="Function">
+ Perform the inverse operation on the [Transform] matrix.
</constant>
<constant name="FUNC_TRANSPOSE" value="1" enum="Function">
+ Perform the transpose operation on the [Transform] matrix.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml
index f5368b3b1c..02b6e0cd1c 100644
--- a/doc/classes/VisualShaderNodeTransformMult.xml
+++ b/doc/classes/VisualShaderNodeTransformMult.xml
@@ -1,26 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Multiplies [Transform] by [Transform] within the visual shader graph.
</brief_description>
<description>
+ A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), 1, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" />
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformMult.Operator" default="0">
+ The multiplication type to be performed on the transforms. See [enum Operator] for options.
</member>
</members>
<constants>
<constant name="OP_AxB" value="0" enum="Operator">
+ Multiplies transform [code]a[/code] by the transform [code]b[/code].
</constant>
<constant name="OP_BxA" value="1" enum="Operator">
+ Multiplies transform [code]b[/code] by the transform [code]a[/code].
</constant>
<constant name="OP_AxB_COMP" value="2" enum="Operator">
+ Performs a component-wise multiplication of transform [code]a[/code] by the transform [code]b[/code].
</constant>
<constant name="OP_BxA_COMP" value="3" enum="Operator">
+ Performs a component-wise multiplication of transform [code]b[/code] by the transform [code]a[/code].
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml
index 0a28e0c1f6..43696c8226 100644
--- a/doc/classes/VisualShaderNodeTransformUniform.xml
+++ b/doc/classes/VisualShaderNodeTransformUniform.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2">
+<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
+ A [Transform] uniform for use within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]uniform mat4[/code] in the shader language.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml
index 9ab9c08562..3d5f87f727 100644
--- a/doc/classes/VisualShaderNodeTransformVecMult.xml
+++ b/doc/classes/VisualShaderNodeTransformVecMult.xml
@@ -1,26 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Multiplies a [Transform] and a [Vector3] within the visual shader graph.
</brief_description>
<description>
+ A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" />
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformVecMult.Operator" default="0">
+ The multiplication type to be performed. See [enum Operator] for options.
</member>
</members>
<constants>
<constant name="OP_AxB" value="0" enum="Operator">
+ Multiplies transform [code]a[/code] by the vector [code]b[/code].
</constant>
<constant name="OP_BxA" value="1" enum="Operator">
+ Multiplies vector [code]b[/code] by the transform [code]a[/code].
</constant>
<constant name="OP_3x3_AxB" value="2" enum="Operator">
+ Multiplies transform [code]a[/code] by the vector [code]b[/code], skipping the last row and column of the transform.
</constant>
<constant name="OP_3x3_BxA" value="3" enum="Operator">
+ Multiplies vector [code]b[/code] by the transform [code]a[/code], skipping the last row and column of the transform.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml
index 05539294a0..83261344bd 100644
--- a/doc/classes/VisualShaderNodeUniform.xml
+++ b/doc/classes/VisualShaderNodeUniform.xml
@@ -1,18 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeUniform" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeUniform" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A base type for the uniforms within the visual shader graph.
</brief_description>
<description>
+ A uniform represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Uniforms are exposed as properties in the [ShaderMaterial] and can be assigned from the inspector or from a script.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
+ <member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeUniform.Qualifier" default="0">
+ </member>
<member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default="&quot;&quot;">
+ Name of the uniform, by which it can be accessed through the [ShaderMaterial] properties.
</member>
</members>
<constants>
+ <constant name="QUAL_NONE" value="0" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_GLOBAL" value="1" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_INSTANCE" value="2" enum="Qualifier">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml
index 06e033cd9d..4dfc9dc081 100644
--- a/doc/classes/VisualShaderNodeVec3Constant.xml
+++ b/doc/classes/VisualShaderNodeVec3Constant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A [Vector3] constant to be used within the visual shader graph.
</brief_description>
<description>
+ A constant [Vector3], which can be used as an input node.
</description>
<tutorials>
</tutorials>
@@ -10,8 +12,8 @@
</methods>
<members>
<member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3( 0, 0, 0 )">
+ A [Vector3] constant which represents the state of this node.
</member>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
</members>
<constants>
</constants>
diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml
index a1c9b14566..c8b44fdc8d 100644
--- a/doc/classes/VisualShaderNodeVec3Uniform.xml
+++ b/doc/classes/VisualShaderNodeVec3Uniform.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec3Uniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2">
+<class name="VisualShaderNodeVec3Uniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
+ A [Vector3] uniform to be used within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]uniform vec3[/code] in the shader language.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeVectorClamp.xml b/doc/classes/VisualShaderNodeVectorClamp.xml
index 8b9a0cacff..567fed8a41 100644
--- a/doc/classes/VisualShaderNodeVectorClamp.xml
+++ b/doc/classes/VisualShaderNodeVectorClamp.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorClamp" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorClamp" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Clamps a vector value within the visual shader graph.
</brief_description>
<description>
+ Constrains a value to lie between [code]min[/code] and [code]max[/code] values. The operation is performed on each component of the vector individually.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 1, 1, 1 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorCompose.xml b/doc/classes/VisualShaderNodeVectorCompose.xml
index 11eb4d2778..c9ff3cd38e 100644
--- a/doc/classes/VisualShaderNodeVectorCompose.xml
+++ b/doc/classes/VisualShaderNodeVectorCompose.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorCompose" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorCompose" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Composes a [Vector3] from three scalars within the visual shader graph.
</brief_description>
<description>
+ Creates a [code]vec3[/code] using three scalar values that can be provided from separate inputs.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 0.0 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorDecompose.xml b/doc/classes/VisualShaderNodeVectorDecompose.xml
index 30727379e6..95af323c9b 100644
--- a/doc/classes/VisualShaderNodeVectorDecompose.xml
+++ b/doc/classes/VisualShaderNodeVectorDecompose.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorDecompose" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorDecompose" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Decomposes a [Vector3] into three scalars within the visual shader graph.
</brief_description>
<description>
+ Takes a [code]vec3[/code] and decomposes it into three scalar values that can be used as separate inputs.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
index 56f89ffc38..859c47bc33 100644
--- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
+++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorDerivativeFunc" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorDerivativeFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates a vector derivative within the visual shader graph.
</brief_description>
<description>
+ This node is only available in [code]Fragment[/code] and [code]Light[/code] visual shaders.
</description>
<tutorials>
</tutorials>
@@ -10,14 +12,18 @@
</methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorDerivativeFunc.Function" default="0">
+ A derivative type. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_SUM" value="0" enum="Function">
+ Sum of absolute derivative in [code]x[/code] and [code]y[/code].
</constant>
<constant name="FUNC_X" value="1" enum="Function">
+ Derivative in [code]x[/code] using local differencing.
</constant>
<constant name="FUNC_Y" value="2" enum="Function">
+ Derivative in [code]y[/code] using local differencing.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorDistance.xml b/doc/classes/VisualShaderNodeVectorDistance.xml
index 3b7f743864..2da04b122e 100644
--- a/doc/classes/VisualShaderNodeVectorDistance.xml
+++ b/doc/classes/VisualShaderNodeVectorDistance.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorDistance" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorDistance" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Returns the distance between two points. To be used within the visual shader graph.
</brief_description>
<description>
+ Calculates distance from point represented by vector [code]p0[/code] to vector [code]p1[/code].
+ Translated to [code]distance(p0, p1)[/code] in the shader language.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml
index 3725a43395..cbda3dfb46 100644
--- a/doc/classes/VisualShaderNodeVectorFunc.xml
+++ b/doc/classes/VisualShaderNodeVectorFunc.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorFunc" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A vector function to be used within the visual shader graph.
</brief_description>
<description>
+ A visual shader node able to perform different functions using vectors.
</description>
<tutorials>
</tutorials>
@@ -10,78 +12,114 @@
</methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorFunc.Function" default="0">
+ The function to be performed. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_NORMALIZE" value="0" enum="Function">
+ Normalizes the vector so that it has a length of [code]1[/code] but points in the same direction.
</constant>
<constant name="FUNC_SATURATE" value="1" enum="Function">
+ Clamps the value between [code]0.0[/code] and [code]1.0[/code].
</constant>
<constant name="FUNC_NEGATE" value="2" enum="Function">
+ Returns the opposite value of the parameter.
</constant>
<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">
+ Returns the absolute value of the parameter.
</constant>
<constant name="FUNC_ACOS" value="7" enum="Function">
+ Returns the arc-cosine of the parameter.
</constant>
<constant name="FUNC_ACOSH" value="8" enum="Function">
+ Returns the inverse hyperbolic cosine of the parameter.
</constant>
<constant name="FUNC_ASIN" value="9" enum="Function">
+ Returns the arc-sine of the parameter.
</constant>
<constant name="FUNC_ASINH" value="10" enum="Function">
+ Returns the inverse hyperbolic sine of the parameter.
</constant>
<constant name="FUNC_ATAN" value="11" enum="Function">
+ Returns the arc-tangent of the parameter.
</constant>
<constant name="FUNC_ATANH" value="12" enum="Function">
+ Returns the inverse hyperbolic tangent of the parameter.
</constant>
<constant name="FUNC_CEIL" value="13" enum="Function">
+ Finds the nearest integer that is greater than or equal to the parameter.
</constant>
<constant name="FUNC_COS" value="14" enum="Function">
+ Returns the cosine of the parameter.
</constant>
<constant name="FUNC_COSH" value="15" enum="Function">
+ Returns the hyperbolic cosine of the parameter.
</constant>
<constant name="FUNC_DEGREES" value="16" enum="Function">
+ Converts a quantity in radians to degrees.
</constant>
<constant name="FUNC_EXP" value="17" enum="Function">
+ Base-e Exponential.
</constant>
<constant name="FUNC_EXP2" value="18" enum="Function">
+ Base-2 Exponential.
</constant>
<constant name="FUNC_FLOOR" value="19" enum="Function">
+ Finds the nearest integer less than or equal to the parameter.
</constant>
<constant name="FUNC_FRAC" value="20" enum="Function">
+ Computes the fractional part of the argument.
</constant>
<constant name="FUNC_INVERSE_SQRT" value="21" enum="Function">
+ Returns the inverse of the square root of the parameter.
</constant>
<constant name="FUNC_LOG" value="22" enum="Function">
+ Natural logarithm.
</constant>
<constant name="FUNC_LOG2" value="23" enum="Function">
+ Base-2 logarithm.
</constant>
<constant name="FUNC_RADIANS" value="24" enum="Function">
+ Converts a quantity in degrees to radians.
</constant>
<constant name="FUNC_ROUND" value="25" enum="Function">
+ Finds the nearest integer to the parameter.
</constant>
<constant name="FUNC_ROUNDEVEN" value="26" enum="Function">
+ Finds the nearest even integer to the parameter.
</constant>
<constant name="FUNC_SIGN" value="27" 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">
+ Returns the sine of the parameter.
</constant>
<constant name="FUNC_SINH" value="29" enum="Function">
+ Returns the hyperbolic sine of the parameter.
</constant>
<constant name="FUNC_SQRT" value="30" enum="Function">
+ Returns the square root of the parameter.
</constant>
<constant name="FUNC_TAN" value="31" enum="Function">
+ Returns the tangent of the parameter.
</constant>
<constant name="FUNC_TANH" value="32" enum="Function">
+ Returns the hyperbolic tangent of the parameter.
</constant>
<constant name="FUNC_TRUNC" value="33" 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">
+ Returns [code]1.0 - vector[/code].
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorInterp.xml b/doc/classes/VisualShaderNodeVectorInterp.xml
index 7aa525cd0e..b63d34b742 100644
--- a/doc/classes/VisualShaderNodeVectorInterp.xml
+++ b/doc/classes/VisualShaderNodeVectorInterp.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorInterp" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorInterp" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Linearly interpolates between two vectors within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]weight[/code] is a [Vector3] with weights for each component.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 1, 1, 1 ), 2, Vector3( 0.5, 0.5, 0.5 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorLen.xml b/doc/classes/VisualShaderNodeVectorLen.xml
index f6fdc0aff3..77261d3190 100644
--- a/doc/classes/VisualShaderNodeVectorLen.xml
+++ b/doc/classes/VisualShaderNodeVectorLen.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorLen" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorLen" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Returns the length of a [Vector3] within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]length(p0)[/code] in the shader language.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml
index d237ee56b0..d56c012f8f 100644
--- a/doc/classes/VisualShaderNodeVectorOp.xml
+++ b/doc/classes/VisualShaderNodeVectorOp.xml
@@ -1,42 +1,56 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorOp" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorOp" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A vector operator to be used within the visual shader graph.
</brief_description>
<description>
+ A visual shader node for use of vector operators. Operates on vector [code]a[/code] and vector [code]b[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" />
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeVectorOp.Operator" default="0">
+ The operator to be used. See [enum Operator] for options.
</member>
</members>
<constants>
<constant name="OP_ADD" value="0" enum="Operator">
+ Adds two vectors.
</constant>
<constant name="OP_SUB" value="1" enum="Operator">
+ Subtracts a vector from a vector.
</constant>
<constant name="OP_MUL" value="2" enum="Operator">
+ Multiplies two vectors.
</constant>
<constant name="OP_DIV" value="3" enum="Operator">
+ Divides vector by vector.
</constant>
<constant name="OP_MOD" value="4" enum="Operator">
+ Returns the remainder of the two vectors.
</constant>
<constant name="OP_POW" value="5" enum="Operator">
+ Returns the value of the first parameter raised to the power of the second, for each component of the vectors.
</constant>
<constant name="OP_MAX" value="6" enum="Operator">
+ Returns the greater of two values, for each component of the vectors.
</constant>
<constant name="OP_MIN" value="7" enum="Operator">
+ Returns the lesser of two values, for each component of the vectors.
</constant>
<constant name="OP_CROSS" value="8" enum="Operator">
+ Calculates the cross product of two vectors.
</constant>
<constant name="OP_ATAN2" value="9" enum="Operator">
+ Returns the arc-tangent of the parameters.
</constant>
<constant name="OP_REFLECT" value="10" enum="Operator">
+ Returns the vector that points in the direction of reflection. [code]a[/code] is incident vector and [code]b[/code] is the normal vector.
</constant>
<constant name="OP_STEP" value="11" enum="Operator">
+ Vector step operator. Returns [code]0.0[/code] if [code]a[/code] is smaller than [code]b[/code] and [code]1.0[/code] otherwise.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml
index 453c2bf02f..0fa90a69cf 100644
--- a/doc/classes/VisualShaderNodeVectorRefract.xml
+++ b/doc/classes/VisualShaderNodeVectorRefract.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Returns the [Vector3] 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 indicies of the refraction.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, 0.0 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarMix.xml b/doc/classes/VisualShaderNodeVectorScalarMix.xml
index 4ab396a14b..791a9e6be1 100644
--- a/doc/classes/VisualShaderNodeVectorScalarMix.xml
+++ b/doc/classes/VisualShaderNodeVectorScalarMix.xml
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarMix" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorScalarMix" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Linearly interpolates between two vectors using a scalar. For use within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]a[/code] and [code]b[/code] are vectors and [code]weight[/code] is a scalar.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 1, 1, 1 ), 2, 0.5 ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml
index 2aeb8c1b53..580abaf5fe 100644
--- a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml
+++ b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarSmoothStep" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorScalarSmoothStep" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates a vector SmoothStep function using scalar within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a scalar.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarStep.xml b/doc/classes/VisualShaderNodeVectorScalarStep.xml
index c448404b7f..d61414f3a8 100644
--- a/doc/classes/VisualShaderNodeVectorScalarStep.xml
+++ b/doc/classes/VisualShaderNodeVectorScalarStep.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarStep" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorScalarStep" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates a vector Step function within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]step(edge, x)[/code] in the shader language.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorSmoothStep.xml b/doc/classes/VisualShaderNodeVectorSmoothStep.xml
index bb80832c3c..1b77a3c535 100644
--- a/doc/classes/VisualShaderNodeVectorSmoothStep.xml
+++ b/doc/classes/VisualShaderNodeVectorSmoothStep.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorSmoothStep" inherits="VisualShaderNode" category="Core" version="3.2">
+<class name="VisualShaderNodeVectorSmoothStep" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Calculates a vector SmoothStep function within the visual shader graph.
</brief_description>
<description>
+ Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a vector.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
- <members>
- <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 0, 0, 0 ) ]" />
- </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index 6845c81a13..07d82289a3 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WeakRef" inherits="Reference" category="Core" version="3.2">
+<class name="WeakRef" inherits="Reference" version="4.0">
<brief_description>
Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
new file mode 100644
index 0000000000..e1a0f1f22a
--- /dev/null
+++ b/doc/classes/Window.xml
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Window" inherits="Viewport" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="can_draw" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="child_controls_changed">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Window.Flags">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_real_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_theme_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_theme_constant" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_theme_font" qualifiers="const">
+ <return type="Font">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_theme_icon" qualifiers="const">
+ <return type="Texture2D">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_theme_stylebox" qualifiers="const">
+ <return type="StyleBox">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="grab_focus">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_focus" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_theme_color" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_theme_constant" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_theme_font" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_theme_icon" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_theme_stylebox" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hide">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_embedded" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_maximize_allowed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_using_font_oversampling" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_to_foreground">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="popup">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="popup_centered">
+ <return type="void">
+ </return>
+ <argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="popup_centered_clamped">
+ <return type="void">
+ </return>
+ <argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )">
+ </argument>
+ <argument index="1" name="fallback_ratio" type="float" default="0.75">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="popup_centered_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float" default="0.8">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="popup_on_parent">
+ <return type="void">
+ </return>
+ <argument index="0" name="parent_rect" type="Rect2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="request_attention">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Window.Flags">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ime_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ime_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_font_oversampling">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="show">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false">
+ </member>
+ <member name="borderless" type="bool" setter="set_flag" getter="get_flag" default="false">
+ </member>
+ <member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
+ </member>
+ <member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
+ </member>
+ <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
+ </member>
+ <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
+ </member>
+ <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
+ </member>
+ <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 100, 100 )">
+ </member>
+ <member name="theme" type="Theme" setter="set_theme" getter="get_theme">
+ </member>
+ <member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
+ </member>
+ <member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
+ </member>
+ <member name="transparent" type="bool" setter="set_flag" getter="get_flag" default="false">
+ </member>
+ <member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false">
+ </member>
+ <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false">
+ </member>
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
+ </member>
+ <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false">
+ </member>
+ </members>
+ <signals>
+ <signal name="about_to_popup">
+ <description>
+ </description>
+ </signal>
+ <signal name="close_requested">
+ <description>
+ </description>
+ </signal>
+ <signal name="files_dropped">
+ <argument index="0" name="files" type="PackedStringArray">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="focus_entered">
+ <description>
+ </description>
+ </signal>
+ <signal name="focus_exited">
+ <description>
+ </description>
+ </signal>
+ <signal name="go_back_requested">
+ <description>
+ </description>
+ </signal>
+ <signal name="mouse_entered">
+ <description>
+ </description>
+ </signal>
+ <signal name="mouse_exited">
+ <description>
+ </description>
+ </signal>
+ <signal name="visibility_changed">
+ <description>
+ </description>
+ </signal>
+ <signal name="window_input">
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
+ </constant>
+ <constant name="MODE_WINDOWED" value="0" enum="Mode">
+ </constant>
+ <constant name="MODE_MINIMIZED" value="1" enum="Mode">
+ </constant>
+ <constant name="MODE_MAXIMIZED" value="2" enum="Mode">
+ </constant>
+ <constant name="MODE_FULLSCREEN" value="3" enum="Mode">
+ </constant>
+ <constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
+ </constant>
+ <constant name="FLAG_BORDERLESS" value="1" enum="Flags">
+ </constant>
+ <constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags">
+ </constant>
+ <constant name="FLAG_TRANSPARENT" value="3" enum="Flags">
+ </constant>
+ <constant name="FLAG_NO_FOCUS" value="4" enum="Flags">
+ </constant>
+ <constant name="FLAG_MAX" value="5" enum="Flags">
+ </constant>
+ <constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">
+ </constant>
+ <constant name="CONTENT_SCALE_MODE_OBJECTS" value="1" enum="ContentScaleMode">
+ </constant>
+ <constant name="CONTENT_SCALE_MODE_PIXELS" value="2" enum="ContentScaleMode">
+ </constant>
+ <constant name="CONTENT_SCALE_ASPECT_IGNORE" value="0" enum="ContentScaleAspect">
+ </constant>
+ <constant name="CONTENT_SCALE_ASPECT_KEEP" value="1" enum="ContentScaleAspect">
+ </constant>
+ <constant name="CONTENT_SCALE_ASPECT_KEEP_WIDTH" value="2" enum="ContentScaleAspect">
+ </constant>
+ <constant name="CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value="3" enum="ContentScaleAspect">
+ </constant>
+ <constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="close" type="Texture2D">
+ </theme_item>
+ <theme_item name="close_h_ofs" type="int" default="18">
+ </theme_item>
+ <theme_item name="close_highlight" type="Texture2D">
+ </theme_item>
+ <theme_item name="close_v_ofs" type="int" default="18">
+ </theme_item>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ <theme_item name="resize_margin" type="int" default="4">
+ </theme_item>
+ <theme_item name="scaleborder_size" type="int" default="4">
+ </theme_item>
+ <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ </theme_item>
+ <theme_item name="title_font" type="Font">
+ </theme_item>
+ <theme_item name="title_height" type="int" default="20">
+ </theme_item>
+ <theme_item name="window_panel" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml
deleted file mode 100644
index 595aaeecee..0000000000
--- a/doc/classes/WindowDialog.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WindowDialog" inherits="Popup" category="Core" version="3.2">
- <brief_description>
- Base class for window dialogs.
- </brief_description>
- <description>
- Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="get_close_button">
- <return type="TextureButton">
- </return>
- <description>
- Returns the close [TextureButton].
- </description>
- </method>
- </methods>
- <members>
- <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" default="false">
- If [code]true[/code], the user can resize the window.
- </member>
- <member name="window_title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
- The text displayed in the window's title bar.
- </member>
- </members>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="close" type="Texture">
- </theme_item>
- <theme_item name="close_h_ofs" type="int" default="18">
- </theme_item>
- <theme_item name="close_highlight" type="Texture">
- </theme_item>
- <theme_item name="close_v_ofs" type="int" default="18">
- </theme_item>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- <theme_item name="scaleborder_size" type="int" default="4">
- </theme_item>
- <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
- </theme_item>
- <theme_item name="title_font" type="Font">
- </theme_item>
- <theme_item name="title_height" type="int" default="20">
- </theme_item>
- </theme_items>
-</class>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index 66ef18f8f4..e66f21a0e7 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="World2D" inherits="Resource" category="Core" version="3.2">
+<class name="World2D" inherits="Resource" version="4.0">
<brief_description>
Class that has everything pertaining to a 2D world.
</brief_description>
@@ -13,13 +13,13 @@
</methods>
<members>
<member name="canvas" type="RID" setter="" getter="get_canvas">
- The [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing.
+ The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing.
</member>
- <member name="direct_space_state" type="Physics2DDirectSpaceState" setter="" getter="get_direct_space_state">
- The state of this world's physics space. This allows arbitrary querying for collision.
+ <member name="direct_space_state" type="PhysicsDirectSpaceState2D" setter="" getter="get_direct_space_state">
+ Direct access to the world's physics 2D space state. Used for querying current and potential collisions. Must only be accessed from the main thread within [code]_physics_process(delta)[/code].
</member>
<member name="space" type="RID" setter="" getter="get_space">
- The [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area.
+ The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area.
</member>
</members>
<constants>
diff --git a/doc/classes/World.xml b/doc/classes/World3D.xml
index c8e6944b83..6d3b94794e 100644
--- a/doc/classes/World.xml
+++ b/doc/classes/World3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="World" inherits="Resource" category="Core" version="3.2">
+<class name="World3D" inherits="Resource" version="4.0">
<brief_description>
Class that has everything pertaining to a world.
</brief_description>
<description>
- Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
+ Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Node3D nodes register their resources into the current world.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
@@ -12,20 +12,22 @@
<methods>
</methods>
<members>
- <member name="direct_space_state" type="PhysicsDirectSpaceState" setter="" getter="get_direct_space_state">
- The World's physics direct space state, used for making various queries. Might be used only during [code]_physics_process[/code].
+ <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
+ </member>
+ <member name="direct_space_state" type="PhysicsDirectSpaceState3D" setter="" getter="get_direct_space_state">
+ Direct access to the world's physics 3D space state. Used for querying current and potential collisions. Must only be accessed from within [code]_physics_process(delta)[/code].
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
- The World's [Environment].
+ The World3D's [Environment].
</member>
<member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment">
- The World's fallback_environment will be used if the World's [Environment] fails or is missing.
+ The World3D's fallback_environment will be used if the World3D's [Environment] fails or is missing.
</member>
<member name="scenario" type="RID" setter="" getter="get_scenario">
- The World's visual scenario.
+ The World3D's visual scenario.
</member>
<member name="space" type="RID" setter="" getter="get_space">
- The World's physics space.
+ The World3D's physics space.
</member>
</members>
<constants>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index b4524bfea0..92b75621c2 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldEnvironment" inherits="Node" category="Core" version="3.2">
+<class name="WorldEnvironment" inherits="Node" version="4.0">
<brief_description>
Default environment properties for the entire scene (post-processing effects, lighting and background settings).
</brief_description>
<description>
The [WorldEnvironment] node is used to configure the default [Environment] for the scene.
- The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time.
+ The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time.
The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene.
</description>
<tutorials>
@@ -14,6 +14,8 @@
<methods>
</methods>
<members>
+ <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
+ </member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] resource used by this [WorldEnvironment], defining the default properties.
</member>
diff --git a/doc/classes/WorldMarginShape3D.xml b/doc/classes/WorldMarginShape3D.xml
new file mode 100644
index 0000000000..a91447056b
--- /dev/null
+++ b/doc/classes/WorldMarginShape3D.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WorldMarginShape3D" inherits="Shape3D" version="4.0">
+ <brief_description>
+ Infinite plane shape for 3D collisions.
+ </brief_description>
+ <description>
+ An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldMarginShape3D] is used in a [PhysicsBody3D], it will cause colliding objects placed "below" it to teleport "above" the plane.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )">
+ The [Plane] used by the [WorldMarginShape3D] for collision.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml
index 50e9e4e0d4..d2b7b20cd6 100644
--- a/doc/classes/X509Certificate.xml
+++ b/doc/classes/X509Certificate.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="X509Certificate" inherits="Resource" category="Core" version="3.2">
+<class name="X509Certificate" inherits="Resource" version="4.0">
<brief_description>
An X509 certificate (e.g. for SSL).
</brief_description>
<description>
The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource].
They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream].
+ [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 6989246e24..2849ea62ab 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XMLParser" inherits="Reference" category="Core" version="3.2">
+<class name="XMLParser" inherits="Reference" version="4.0">
<brief_description>
Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/XML]XML[/url] files.
</brief_description>
@@ -84,7 +84,7 @@
<return type="int" enum="XMLParser.NodeType">
</return>
<description>
- Gets the type of the current node. Compare with [code]NODE_*[/code] constants.
+ Gets the type of the current node. Compare with [enum NodeType] constants.
</description>
</method>
<method name="has_attribute" qualifiers="const">
@@ -115,7 +115,7 @@
<method name="open_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Opens an XML raw buffer for parsing. This returns an error code.
@@ -147,25 +147,25 @@
</methods>
<constants>
<constant name="NODE_NONE" value="0" enum="NodeType">
- There's no node (no file or buffer opened)
+ There's no node (no file or buffer opened).
</constant>
<constant name="NODE_ELEMENT" value="1" enum="NodeType">
- Element (tag)
+ Element (tag).
</constant>
<constant name="NODE_ELEMENT_END" value="2" enum="NodeType">
- End of element
+ End of element.
</constant>
<constant name="NODE_TEXT" value="3" enum="NodeType">
- Text node
+ Text node.
</constant>
<constant name="NODE_COMMENT" value="4" enum="NodeType">
- Comment node
+ Comment node.
</constant>
<constant name="NODE_CDATA" value="5" enum="NodeType">
- CDATA content
+ CDATA content.
</constant>
<constant name="NODE_UNKNOWN" value="6" enum="NodeType">
- Unknown node
+ Unknown node.
</constant>
</constants>
</class>
diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/XRAnchor3D.xml
index 2177ed8930..a409c79230 100644
--- a/doc/classes/ARVRAnchor.xml
+++ b/doc/classes/XRAnchor3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.2">
+<class name="XRAnchor3D" inherits="Node3D" version="4.0">
<brief_description>
An anchor point in AR space.
</brief_description>
<description>
- The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them.
+ The [XRAnchor3D] point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them.
This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on 0,0,0 until a plane is recognized.
Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view.
</description>
@@ -29,7 +29,7 @@
<return type="Mesh">
</return>
<description>
- If provided by the ARVR Interface, this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes.
+ If provided by the [XRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes.
</description>
</method>
<method name="get_plane" qualifiers="const">
diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/XRCamera3D.xml
index 1c468f193f..4d86e24daa 100644
--- a/doc/classes/ARVRCamera.xml
+++ b/doc/classes/XRCamera3D.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRCamera" inherits="Camera" category="Core" version="3.2">
+<class name="XRCamera3D" inherits="Camera3D" version="4.0">
<brief_description>
A camera node with a few overrules for AR/VR applied, such as location tracking.
</brief_description>
<description>
This is a helper spatial node for our camera; note that, if stereoscopic rendering is applicable (VR-HMD), most of the camera properties are ignored, as the HMD information overrides them. The only properties that can be trusted are the near and far planes.
- The position and orientation of this node is automatically updated by the ARVR 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 ARVR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result.
+ 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>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/XRController3D.xml
index 9c6cfc1d7d..8e80eb9a32 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/XRController3D.xml
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRController" inherits="Spatial" category="Core" version="3.2">
+<class name="XRController3D" inherits="Node3D" version="4.0">
<brief_description>
A spatial node representing a spatially-tracked controller.
</brief_description>
<description>
This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers.
- Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene.
- The position of the controller node is automatically updated by the [ARVRServer]. This makes this node ideal to add child nodes to visualize the controller.
+ Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add XRController3D nodes to your scene.
+ The position of the controller node is automatically updated by the [XRServer]. This makes this node ideal to add child nodes to visualize the controller.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_controller_name" qualifiers="const">
@@ -19,17 +20,17 @@
</description>
</method>
<method name="get_hand" qualifiers="const">
- <return type="int" enum="ARVRPositionalTracker.TrackerHand">
+ <return type="int" enum="XRPositionalTracker.TrackerHand">
</return>
<description>
- Returns the hand holding this controller, if known. See [code]TRACKER_*[/code] constants in [ARVRPositionalTracker].
+ Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand].
</description>
</method>
<method name="get_is_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the bound controller is active. ARVR systems attempt to track active controllers.
+ Returns [code]true[/code] if the bound controller is active. XR systems attempt to track active controllers.
</description>
</method>
<method name="get_joystick_axis" qualifiers="const">
@@ -45,23 +46,23 @@
<return type="int">
</return>
<description>
- Returns the ID of the joystick object bound to this. Every controller tracked by the [ARVRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
+ Returns the ID of the joystick object bound to this. Every controller tracked by the [XRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
</description>
</method>
<method name="get_mesh" qualifiers="const">
<return type="Mesh">
</return>
<description>
- If provided by the [ARVRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller.
+ If provided by the [XRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller.
</description>
</method>
<method name="is_button_pressed" qualifiers="const">
- <return type="int">
+ <return type="bool">
</return>
<argument index="0" name="button" type="int">
</argument>
<description>
- Returns [code]true[/code] if the button at index [code]button[/code] is pressed.
+ Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButtonList].
</description>
</method>
</methods>
@@ -69,11 +70,12 @@
<member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id" default="1">
The controller's ID.
A controller ID of 0 is unbound and will always result in an inactive node. Controller ID 1 is reserved for the first controller that identifies itself as the left-hand controller and ID 2 is reserved for the first controller that identifies itself as the right-hand controller.
- For any other controller that the [ARVRServer] detects, we continue with controller ID 3.
+ For any other controller that the [XRServer] detects, we continue with controller ID 3.
When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off.
</member>
<member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
- The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly.
+ The degree to which the controller vibrates. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member XRPositionalTracker.rumble] accordingly.
+ This is a useful property to animate if you want the controller to vibrate for a limited duration.
</member>
</members>
<signals>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/XRInterface.xml
index 1da1351e49..1985010223 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRInterface" inherits="Reference" category="Core" version="3.2">
+<class name="XRInterface" inherits="Reference" version="4.0">
<brief_description>
Base class for an AR/VR interface implementation.
</brief_description>
<description>
- This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform.
- 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 [ARVRServer].
+ This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass XRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform.
+ 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>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_camera_feed_id">
@@ -21,11 +22,11 @@
<return type="int">
</return>
<description>
- Returns a combination of flags providing information about the capabilities of this interface.
+ Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.
</description>
</method>
<method name="get_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
@@ -39,7 +40,7 @@
</description>
</method>
<method name="get_tracking_status" qualifiers="const">
- <return type="int" enum="ARVRInterface.Tracking_status">
+ <return type="int" enum="XRInterface.Tracking_status">
</return>
<description>
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
@@ -51,9 +52,9 @@
<description>
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
- [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR.
- If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different.
- While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
+ [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.
+ If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different.
+ While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
</description>
</method>
<method name="is_stereo">
@@ -73,30 +74,30 @@
</methods>
<members>
<member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false">
- On an AR interface, is our anchor detection enabled?
+ On an AR interface, [code]true[/code] if anchor detection is enabled.
</member>
<member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false">
- Has this interface been initialized?
+ [code]true[/code] if this interface been initialized.
</member>
<member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false">
- Is this our primary interface?
+ [code]true[/code] if this is the primary interface.
</member>
</members>
<constants>
- <constant name="ARVR_NONE" value="0" enum="Capabilities">
- No ARVR capabilities.
+ <constant name="XR_NONE" value="0" enum="Capabilities">
+ No XR capabilities.
</constant>
- <constant name="ARVR_MONO" value="1" enum="Capabilities">
+ <constant name="XR_MONO" value="1" enum="Capabilities">
This interface can work with normal rendering output (non-HMD based AR).
</constant>
- <constant name="ARVR_STEREO" value="2" enum="Capabilities">
+ <constant name="XR_STEREO" value="2" enum="Capabilities">
This interface supports stereoscopic rendering.
</constant>
- <constant name="ARVR_AR" value="4" enum="Capabilities">
- This interface support AR (video background and real world tracking).
+ <constant name="XR_AR" value="4" enum="Capabilities">
+ This interface supports AR (video background and real world tracking).
</constant>
- <constant name="ARVR_EXTERNAL" value="8" enum="Capabilities">
- This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes.
+ <constant name="XR_EXTERNAL" value="8" enum="Capabilities">
+ This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes.
</constant>
<constant name="EYE_MONO" value="0" enum="Eyes">
Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
@@ -107,20 +108,20 @@
<constant name="EYE_RIGHT" value="2" enum="Eyes">
Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information.
</constant>
- <constant name="ARVR_NORMAL_TRACKING" value="0" enum="Tracking_status">
+ <constant name="XR_NORMAL_TRACKING" value="0" enum="Tracking_status">
Tracking is behaving as expected.
</constant>
- <constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status">
- Tracking is hindered by excessive motion, player is moving faster than tracking can keep up.
+ <constant name="XR_EXCESSIVE_MOTION" value="1" enum="Tracking_status">
+ Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up).
</constant>
- <constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status">
+ <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status">
Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc.
</constant>
- <constant name="ARVR_UNKNOWN_TRACKING" value="3" enum="Tracking_status">
+ <constant name="XR_UNKNOWN_TRACKING" value="3" enum="Tracking_status">
We don't know the status of the tracking or this interface does not provide feedback.
</constant>
- <constant name="ARVR_NOT_TRACKING" value="4" enum="Tracking_status">
- Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.)
+ <constant name="XR_NOT_TRACKING" value="4" enum="Tracking_status">
+ Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.).
</constant>
</constants>
</class>
diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/XROrigin3D.xml
index b6b55741aa..57cf673d30 100644
--- a/doc/classes/ARVROrigin.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.2">
+<class name="XROrigin3D" inherits="Node3D" version="4.0">
<brief_description>
The origin point in AR/VR.
</brief_description>
<description>
This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world.
- There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly.
+ There should be only one of these nodes in your scene and you must have one. All the XRCamera3D, XRController3D and XRAnchor3D nodes should be direct children of this node for spatial tracking to work correctly.
It is the position of this node that you update when your character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point.
- For example, if your character is driving a car, the ARVROrigin 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.
+ 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>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
</methods>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
- [b]Note:[/b] This method is a passthrough to the [ARVRServer] itself.
+ [b]Note:[/b] This method is a passthrough to the [XRServer] itself.
</member>
</members>
<constants>
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index 5551d48a08..2f7cc21703 100644
--- a/doc/classes/ARVRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.2">
+<class name="XRPositionalTracker" inherits="Object" version="4.0">
<brief_description>
A tracked object.
</brief_description>
<description>
An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally.
- As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [ARVRServer].
- The [ARVRController] and [ARVRAnchor] 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 GDNative-based interfaces can interact with them.
+ As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [XRServer].
+ 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 GDNative-based interfaces can interact with them.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_hand" qualifiers="const">
- <return type="int" enum="ARVRPositionalTracker.TrackerHand">
+ <return type="int" enum="XRPositionalTracker.TrackerHand">
</return>
<description>
- Returns the hand holding this tracker, if known. See [code]TRACKER_*[/code] constants.
+ Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
</description>
</method>
<method name="get_joy_id" qualifiers="const">
@@ -33,7 +34,7 @@
</description>
</method>
<method name="get_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the controller or anchor point's name if available.
@@ -53,6 +54,13 @@
Returns the world-space controller position.
</description>
</method>
+ <method name="get_tracker_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [XRController3D] and [XRAnchor3D] nodes.
+ </description>
+ </method>
<method name="get_tracks_orientation" qualifiers="const">
<return type="bool">
</return>
@@ -77,7 +85,7 @@
</description>
</method>
<method name="get_type" qualifiers="const">
- <return type="int" enum="ARVRServer.TrackerType">
+ <return type="int" enum="XRServer.TrackerType">
</return>
<description>
Returns the tracker's type.
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/XRServer.xml
index b71a18858f..5e6002aee3 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRServer" inherits="Object" category="Core" version="3.2">
+<class name="XRServer" inherits="Object" version="4.0">
<brief_description>
- The AR/VR server.
+ Server for AR and VR features.
</brief_description>
<description>
- The AR/VR server is the heart of our AR/VR solution and handles all the processing.
+ The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="center_on_hmd">
<return type="void">
</return>
- <argument index="0" name="rotation_mode" type="int" enum="ARVRServer.RotationMode">
+ <argument index="0" name="rotation_mode" type="int" enum="XRServer.RotationMode">
</argument>
<argument index="1" name="keep_height" type="bool">
</argument>
@@ -26,7 +27,7 @@
</description>
</method>
<method name="find_interface" qualifiers="const">
- <return type="ARVRInterface">
+ <return type="XRInterface">
</return>
<argument index="0" name="name" type="String">
</argument>
@@ -42,19 +43,19 @@
</description>
</method>
<method name="get_interface" qualifiers="const">
- <return type="ARVRInterface">
+ <return type="XRInterface">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Gets the interface registered at a given index in our list of interfaces.
+ Returns the interface registered at a given index in our list of interfaces.
</description>
</method>
<method name="get_interface_count" qualifiers="const">
<return type="int">
</return>
<description>
- Gets the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code].
+ Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code].
</description>
</method>
<method name="get_interfaces" qualifiers="const">
@@ -68,46 +69,50 @@
<return type="int">
</return>
<description>
+ Returns the absolute timestamp (in μs) of the last [XRServer] commit of the AR/VR eyes to [RenderingServer]. The value comes from an internal call to [method OS.get_ticks_usec].
</description>
</method>
<method name="get_last_frame_usec">
<return type="int">
</return>
<description>
+ Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method get_last_process_usec] when committing.
</description>
</method>
<method name="get_last_process_usec">
<return type="int">
</return>
<description>
+ Returns the absolute timestamp (in μs) of the last [XRServer] process callback. The value comes from an internal call to [method OS.get_ticks_usec].
</description>
</method>
<method name="get_reference_frame" qualifiers="const">
<return type="Transform">
</return>
<description>
- Gets the reference frame transform. Mostly used internally and exposed for GDNative build interfaces.
+ Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces.
</description>
</method>
<method name="get_tracker" qualifiers="const">
- <return type="ARVRPositionalTracker">
+ <return type="XRPositionalTracker">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Gets the positional tracker at the given ID.
+ Returns the positional tracker at the given ID.
</description>
</method>
<method name="get_tracker_count" qualifiers="const">
<return type="int">
</return>
<description>
- Gets the number of trackers currently registered.
+ Returns the number of trackers currently registered.
</description>
</method>
</methods>
<members>
- <member name="primary_interface" type="ARVRInterface" setter="set_primary_interface" getter="get_primary_interface">
+ <member name="primary_interface" type="XRInterface" setter="set_primary_interface" getter="get_primary_interface">
+ The primary [XRInterface] currently bound to the [XRServer].
</member>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
@@ -115,39 +120,39 @@
</members>
<signals>
<signal name="interface_added">
- <argument index="0" name="interface_name" type="String">
+ <argument index="0" name="interface_name" type="StringName">
</argument>
<description>
Emitted when a new interface has been added.
</description>
</signal>
<signal name="interface_removed">
- <argument index="0" name="interface_name" type="String">
+ <argument index="0" name="interface_name" type="StringName">
</argument>
<description>
Emitted when an interface is removed.
</description>
</signal>
<signal name="tracker_added">
- <argument index="0" name="tracker_name" type="String">
+ <argument index="0" name="tracker_name" type="StringName">
</argument>
<argument index="1" name="type" type="int">
</argument>
<argument index="2" name="id" type="int">
</argument>
<description>
- Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [ARVRAnchor]s for an AR solution, it is important to react to this signal to add the appropriate [ARVRController] or [ARVRAnchor] nodes related to this new tracker.
+ 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="String">
+ <argument index="0" name="tracker_name" type="StringName">
</argument>
<argument index="1" name="type" type="int">
</argument>
<argument index="2" name="id" type="int">
</argument>
<description>
- Emitted when a tracker is removed. You should remove any [ARVRController] or [ARVRAnchor] 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).
+ 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>
</signals>
diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml
index 6045a5713c..4ef6a4b4ec 100644
--- a/doc/classes/YSort.xml
+++ b/doc/classes/YSort.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="YSort" inherits="Node2D" category="Core" version="3.2">
+<class name="YSort" inherits="Node2D" version="4.0">
<brief_description>
Sort all child nodes based on their Y positions.
</brief_description>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index 533963b460..4482a280b2 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -1,10 +1,41 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="bool" category="Built-In Types" version="3.2">
+<class name="bool" version="4.0">
<brief_description>
Boolean built-in type.
</brief_description>
<description>
- Boolean built-in type.
+ Boolean is a built-in type. It can represent any data type that is either a true or false value. You can think of it as an switch with on or off (1 or 0) setting. It's often used as part of programming logic in condition statements like [code]if[/code] statements.
+ [b]Note:[/b] In a code below [code]if can_shoot[/code] is equivalent of [code]if can_shoot == true[/code]. It is good practice to follow the natural spoken language structure when possible. Use [code]if can_shoot[/code] rather than [code]if can_shoot == true[/code] and use [code]if not can_shoot[/code] rather than [code]if can_shoot == false[/code].
+ [codeblock]
+ var can_shoot = true
+
+ func shoot():
+ if can_shoot:
+ # Perform shooting actions here.
+ [/codeblock]
+ The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if [code]can_shoot[/code] is [code]true[/code].
+ [b]Note:[/b] [code]Input.is_action_pressed("shoot")[/code] is also a boolean that is [code]true[/code] when "shoot" is pressed and [code]false[/code] when "shoot" isn't pressed.
+ [codeblock]
+ var can_shoot = true
+
+ func shoot():
+ if can_shoot and Input.is_action_pressed("shoot"):
+ create_bullet()
+ [/codeblock]
+ The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again.
+ [codeblock]
+ var can_shoot = true
+ onready var cool_down = $CoolDownTimer
+
+ func shoot():
+ if can_shoot and Input.is_action_pressed("shoot"):
+ create_bullet()
+ can_shoot = false
+ cool_down.start()
+
+ func _on_CoolDownTimer_timeout():
+ can_shoot = true
+ [/codeblock]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 4c4ea83157..16a696f959 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="float" category="Built-In Types" version="3.2">
+<class name="float" version="4.0">
<brief_description>
- Float built-in type
+ Float built-in type.
</brief_description>
<description>
Float built-in type.
@@ -33,7 +33,7 @@
<argument index="0" name="from" type="String">
</argument>
<description>
- Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001.
+ Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. Calling this method with an invalid float string will return 0. This method stops parsing at the first invalid character and will return the parsed result so far, so calling [code]float("1a3")[/code] will return 1 while calling [code]float("1e3a2")[/code] will return 1000.0.
</description>
</method>
</methods>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index dad0f0d8c0..2c9f0ad371 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="int" category="Built-In Types" version="3.2">
+<class name="int" version="4.0">
<brief_description>
Integer built-in type.
</brief_description>
@@ -8,16 +8,16 @@
It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around.
[int] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint.
[codeblock]
- var my_variant = 0 # int, value 0
- my_variant += 4.2 # float, value 4.2
- var my_int: int = 1 # int, value 1
- my_int = 4.2 # int, value 4, the right value is implicitly cast to int
- my_int = int("6.7") # int, value 6, the String is explicitly cast with [method int]
+ var my_variant = 0 # int, value 0.
+ my_variant += 4.2 # float, value 4.2.
+ var my_int: int = 1 # int, value 1.
+ my_int = 4.2 # int, value 4, the right value is implicitly cast to int.
+ my_int = int("6.7") # int, value 6, the String is explicitly cast with int.
var max_int = 9223372036854775807
- print(max_int) # 9223372036854775807, OK
+ print(max_int) # 9223372036854775807, OK.
max_int += 1
- print(max_int) # -9223372036854775808, we overflowed and wrapped around
+ print(max_int) # -9223372036854775808, we overflowed and wrapped around.
[/codeblock]
</description>
<tutorials>