summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml283
-rw-r--r--doc/classes/AABB.xml120
-rw-r--r--doc/classes/AESContext.xml2
-rw-r--r--doc/classes/AStar.xml14
-rw-r--r--doc/classes/AStar2D.xml14
-rw-r--r--doc/classes/AcceptDialog.xml12
-rw-r--r--doc/classes/AnimatableBody2D.xml2
-rw-r--r--doc/classes/AnimatableBody3D.xml2
-rw-r--r--doc/classes/AnimatedSprite2D.xml12
-rw-r--r--doc/classes/AnimatedSprite3D.xml4
-rw-r--r--doc/classes/AnimatedTexture.xml2
-rw-r--r--doc/classes/Animation.xml44
-rw-r--r--doc/classes/AnimationNode.xml15
-rw-r--r--doc/classes/AnimationNodeAdd2.xml4
-rw-r--r--doc/classes/AnimationNodeAdd3.xml4
-rw-r--r--doc/classes/AnimationNodeAnimation.xml13
-rw-r--r--doc/classes/AnimationNodeBlend2.xml4
-rw-r--r--doc/classes/AnimationNodeBlend3.xml4
-rw-r--r--doc/classes/AnimationNodeBlendSpace1D.xml4
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml4
-rw-r--r--doc/classes/AnimationNodeBlendTree.xml4
-rw-r--r--doc/classes/AnimationNodeOneShot.xml19
-rw-r--r--doc/classes/AnimationNodeOutput.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml6
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml6
-rw-r--r--doc/classes/AnimationNodeTimeScale.xml4
-rw-r--r--doc/classes/AnimationNodeTimeSeek.xml4
-rw-r--r--doc/classes/AnimationNodeTransition.xml4
-rw-r--r--doc/classes/AnimationPlayer.xml6
-rw-r--r--doc/classes/AnimationRootNode.xml2
-rw-r--r--doc/classes/AnimationTrackEditPlugin.xml2
-rw-r--r--doc/classes/AnimationTree.xml4
-rw-r--r--doc/classes/Area2D.xml53
-rw-r--r--doc/classes/Area3D.xml53
-rw-r--r--doc/classes/Array.xml210
-rw-r--r--doc/classes/ArrayMesh.xml7
-rw-r--r--doc/classes/ArrayOccluder3D.xml27
-rw-r--r--doc/classes/AspectRatioContainer.xml14
-rw-r--r--doc/classes/AtlasTexture.xml2
-rw-r--r--doc/classes/AudioBusLayout.xml2
-rw-r--r--doc/classes/AudioEffect.xml9
-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/AudioEffectCapture.xml2
-rw-r--r--doc/classes/AudioEffectChorus.xml2
-rw-r--r--doc/classes/AudioEffectCompressor.xml2
-rw-r--r--doc/classes/AudioEffectDelay.xml2
-rw-r--r--doc/classes/AudioEffectDistortion.xml4
-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.xml4
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml4
-rw-r--r--doc/classes/AudioEffectInstance.xml17
-rw-r--r--doc/classes/AudioEffectLimiter.xml2
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml4
-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.xml10
-rw-r--r--doc/classes/AudioEffectReverb.xml2
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzer.xml6
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzerInstance.xml2
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml2
-rw-r--r--doc/classes/AudioListener2D.xml2
-rw-r--r--doc/classes/AudioListener3D.xml2
-rw-r--r--doc/classes/AudioServer.xml22
-rw-r--r--doc/classes/AudioStream.xml10
-rw-r--r--doc/classes/AudioStreamGenerator.xml6
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml8
-rw-r--r--doc/classes/AudioStreamMicrophone.xml2
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/AudioStreamPlaybackResampled.xml21
-rw-r--r--doc/classes/AudioStreamPlayer.xml4
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml6
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml6
-rw-r--r--doc/classes/AudioStreamRandomPitch.xml19
-rw-r--r--doc/classes/AudioStreamRandomizer.xml90
-rw-r--r--doc/classes/AudioStreamSample.xml4
-rw-r--r--doc/classes/BackBufferCopy.xml2
-rw-r--r--doc/classes/BaseButton.xml16
-rw-r--r--doc/classes/BaseMaterial3D.xml38
-rw-r--r--doc/classes/Basis.xml149
-rw-r--r--doc/classes/BitMap.xml17
-rw-r--r--doc/classes/Bone2D.xml2
-rw-r--r--doc/classes/BoneAttachment3D.xml2
-rw-r--r--doc/classes/BoxContainer.xml15
-rw-r--r--doc/classes/BoxMesh.xml4
-rw-r--r--doc/classes/BoxOccluder3D.xml17
-rw-r--r--doc/classes/BoxShape3D.xml4
-rw-r--r--doc/classes/Button.xml72
-rw-r--r--doc/classes/ButtonGroup.xml6
-rw-r--r--doc/classes/CPUParticles2D.xml7
-rw-r--r--doc/classes/CPUParticles3D.xml13
-rw-r--r--doc/classes/Callable.xml71
-rw-r--r--doc/classes/CallbackTweener.xml2
-rw-r--r--doc/classes/Camera2D.xml26
-rw-r--r--doc/classes/Camera3D.xml6
-rw-r--r--doc/classes/CameraEffects.xml2
-rw-r--r--doc/classes/CameraFeed.xml2
-rw-r--r--doc/classes/CameraServer.xml2
-rw-r--r--doc/classes/CameraTexture.xml2
-rw-r--r--doc/classes/CanvasGroup.xml2
-rw-r--r--doc/classes/CanvasItem.xml44
-rw-r--r--doc/classes/CanvasItemMaterial.xml2
-rw-r--r--doc/classes/CanvasLayer.xml29
-rw-r--r--doc/classes/CanvasModulate.xml2
-rw-r--r--doc/classes/CanvasTexture.xml2
-rw-r--r--doc/classes/CapsuleMesh.xml6
-rw-r--r--doc/classes/CapsuleShape2D.xml2
-rw-r--r--doc/classes/CapsuleShape3D.xml6
-rw-r--r--doc/classes/CenterContainer.xml2
-rw-r--r--doc/classes/CharFXTransform.xml4
-rw-r--r--doc/classes/CharacterBody2D.xml51
-rw-r--r--doc/classes/CharacterBody3D.xml43
-rw-r--r--doc/classes/CheckBox.xml76
-rw-r--r--doc/classes/CheckButton.xml62
-rw-r--r--doc/classes/CircleShape2D.xml2
-rw-r--r--doc/classes/ClassDB.xml2
-rw-r--r--doc/classes/CodeEdit.xml134
-rw-r--r--doc/classes/CodeHighlighter.xml8
-rw-r--r--doc/classes/CollisionObject2D.xml8
-rw-r--r--doc/classes/CollisionObject3D.xml8
-rw-r--r--doc/classes/CollisionPolygon2D.xml2
-rw-r--r--doc/classes/CollisionPolygon3D.xml2
-rw-r--r--doc/classes/CollisionShape2D.xml4
-rw-r--r--doc/classes/CollisionShape3D.xml4
-rw-r--r--doc/classes/Color.xml314
-rw-r--r--doc/classes/ColorPicker.xml34
-rw-r--r--doc/classes/ColorPickerButton.xml42
-rw-r--r--doc/classes/ColorRect.xml2
-rw-r--r--doc/classes/CompressedCubemap.xml9
-rw-r--r--doc/classes/CompressedCubemapArray.xml9
-rw-r--r--doc/classes/CompressedTexture2D.xml (renamed from doc/classes/StreamTexture2D.xml)8
-rw-r--r--doc/classes/CompressedTexture2DArray.xml9
-rw-r--r--doc/classes/CompressedTexture3D.xml (renamed from doc/classes/StreamTexture3D.xml)2
-rw-r--r--doc/classes/CompressedTextureLayered.xml (renamed from doc/classes/StreamTextureLayered.xml)2
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml2
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml2
-rw-r--r--doc/classes/ConeTwistJoint3D.xml2
-rw-r--r--doc/classes/ConfigFile.xml2
-rw-r--r--doc/classes/ConfirmationDialog.xml8
-rw-r--r--doc/classes/Container.xml18
-rw-r--r--doc/classes/Control.xml127
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml4
-rw-r--r--doc/classes/ConvexPolygonShape3D.xml2
-rw-r--r--doc/classes/Crypto.xml2
-rw-r--r--doc/classes/CryptoKey.xml4
-rw-r--r--doc/classes/Cubemap.xml2
-rw-r--r--doc/classes/CubemapArray.xml2
-rw-r--r--doc/classes/Curve.xml2
-rw-r--r--doc/classes/Curve2D.xml4
-rw-r--r--doc/classes/Curve3D.xml4
-rw-r--r--doc/classes/CurveTexture.xml4
-rw-r--r--doc/classes/CurveXYZTexture.xml4
-rw-r--r--doc/classes/CylinderMesh.xml6
-rw-r--r--doc/classes/CylinderShape3D.xml4
-rw-r--r--doc/classes/DTLSServer.xml2
-rw-r--r--doc/classes/DampedSpringJoint2D.xml2
-rw-r--r--doc/classes/Decal.xml2
-rw-r--r--doc/classes/Dictionary.xml65
-rw-r--r--doc/classes/DirectionalLight2D.xml2
-rw-r--r--doc/classes/DirectionalLight3D.xml6
-rw-r--r--doc/classes/Directory.xml44
-rw-r--r--doc/classes/DisplayServer.xml136
-rw-r--r--doc/classes/EditorCommandPalette.xml4
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml2
-rw-r--r--doc/classes/EditorExportPlugin.xml14
-rw-r--r--doc/classes/EditorFeatureProfile.xml2
-rw-r--r--doc/classes/EditorFileDialog.xml6
-rw-r--r--doc/classes/EditorFileSystem.xml2
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml14
-rw-r--r--doc/classes/EditorInspector.xml15
-rw-r--r--doc/classes/EditorInspectorPlugin.xml21
-rw-r--r--doc/classes/EditorInterface.xml14
-rw-r--r--doc/classes/EditorNode3DGizmo.xml26
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml33
-rw-r--r--doc/classes/EditorPaths.xml32
-rw-r--r--doc/classes/EditorPlugin.xml14
-rw-r--r--doc/classes/EditorProperty.xml12
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml2
-rw-r--r--doc/classes/EditorResourcePicker.xml7
-rw-r--r--doc/classes/EditorResourcePreview.xml2
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml2
-rw-r--r--doc/classes/EditorSceneFormatImporter.xml27
-rw-r--r--doc/classes/EditorSceneFormatImporterFBX.xml2
-rw-r--r--doc/classes/EditorSceneFormatImporterGLTF.xml2
-rw-r--r--doc/classes/EditorScenePostImport.xml4
-rw-r--r--doc/classes/EditorScenePostImportPlugin.xml6
-rw-r--r--doc/classes/EditorScript.xml2
-rw-r--r--doc/classes/EditorScriptPicker.xml2
-rw-r--r--doc/classes/EditorSelection.xml2
-rw-r--r--doc/classes/EditorSettings.xml22
-rw-r--r--doc/classes/EditorSpinSlider.xml4
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml2
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml2
-rw-r--r--doc/classes/EditorVCSInterface.xml4
-rw-r--r--doc/classes/EncodedObjectAsID.xml2
-rw-r--r--doc/classes/Engine.xml9
-rw-r--r--doc/classes/EngineDebugger.xml11
-rw-r--r--doc/classes/EngineProfiler.xml39
-rw-r--r--doc/classes/Environment.xml65
-rw-r--r--doc/classes/Expression.xml2
-rw-r--r--doc/classes/File.xml7
-rw-r--r--doc/classes/FileDialog.xml30
-rw-r--r--doc/classes/FileSystemDock.xml2
-rw-r--r--doc/classes/FlowContainer.xml20
-rw-r--r--doc/classes/FogMaterial.xml2
-rw-r--r--doc/classes/FogVolume.xml3
-rw-r--r--doc/classes/Font.xml14
-rw-r--r--doc/classes/FontData.xml178
-rw-r--r--doc/classes/GPUParticles2D.xml33
-rw-r--r--doc/classes/GPUParticles3D.xml10
-rw-r--r--doc/classes/GPUParticlesAttractor3D.xml2
-rw-r--r--doc/classes/GPUParticlesAttractorBox3D.xml (renamed from doc/classes/GPUParticlesCollisionBox.xml)2
-rw-r--r--doc/classes/GPUParticlesAttractorSphere3D.xml (renamed from doc/classes/GPUParticlesAttractorSphere.xml)2
-rw-r--r--doc/classes/GPUParticlesAttractorVectorField3D.xml (renamed from doc/classes/GPUParticlesAttractorVectorField.xml)2
-rw-r--r--doc/classes/GPUParticlesCollision3D.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionBox3D.xml (renamed from doc/classes/GPUParticlesAttractorBox.xml)2
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField3D.xml (renamed from doc/classes/GPUParticlesCollisionHeightField.xml)6
-rw-r--r--doc/classes/GPUParticlesCollisionSDF3D.xml (renamed from doc/classes/GPUParticlesCollisionSDF.xml)4
-rw-r--r--doc/classes/GPUParticlesCollisionSphere3D.xml (renamed from doc/classes/GPUParticlesCollisionSphere.xml)2
-rw-r--r--doc/classes/Generic6DOFJoint3D.xml2
-rw-r--r--doc/classes/Geometry2D.xml4
-rw-r--r--doc/classes/Geometry3D.xml2
-rw-r--r--doc/classes/GeometryInstance3D.xml33
-rw-r--r--doc/classes/Gradient.xml22
-rw-r--r--doc/classes/GradientTexture1D.xml (renamed from doc/classes/GradientTexture.xml)6
-rw-r--r--doc/classes/GradientTexture2D.xml2
-rw-r--r--doc/classes/GraphEdit.xml115
-rw-r--r--doc/classes/GraphNode.xml70
-rw-r--r--doc/classes/GridContainer.xml2
-rw-r--r--doc/classes/GrooveJoint2D.xml2
-rw-r--r--doc/classes/HBoxContainer.xml2
-rw-r--r--doc/classes/HFlowContainer.xml19
-rw-r--r--doc/classes/HMACContext.xml86
-rw-r--r--doc/classes/HScrollBar.xml20
-rw-r--r--doc/classes/HSeparator.xml2
-rw-r--r--doc/classes/HSlider.xml18
-rw-r--r--doc/classes/HSplitContainer.xml8
-rw-r--r--doc/classes/HTTPClient.xml24
-rw-r--r--doc/classes/HTTPRequest.xml24
-rw-r--r--doc/classes/HashingContext.xml2
-rw-r--r--doc/classes/HeightMapShape3D.xml2
-rw-r--r--doc/classes/HingeJoint3D.xml2
-rw-r--r--doc/classes/IP.xml2
-rw-r--r--doc/classes/Image.xml74
-rw-r--r--doc/classes/ImageTexture.xml6
-rw-r--r--doc/classes/ImageTexture3D.xml2
-rw-r--r--doc/classes/ImageTextureLayered.xml2
-rw-r--r--doc/classes/ImmediateMesh.xml2
-rw-r--r--doc/classes/ImporterMesh.xml7
-rw-r--r--doc/classes/ImporterMeshInstance3D.xml2
-rw-r--r--doc/classes/Input.xml37
-rw-r--r--doc/classes/InputEvent.xml8
-rw-r--r--doc/classes/InputEventAction.xml4
-rw-r--r--doc/classes/InputEventFromWindow.xml2
-rw-r--r--doc/classes/InputEventGesture.xml2
-rw-r--r--doc/classes/InputEventJoypadButton.xml4
-rw-r--r--doc/classes/InputEventJoypadMotion.xml4
-rw-r--r--doc/classes/InputEventKey.xml8
-rw-r--r--doc/classes/InputEventMIDI.xml71
-rw-r--r--doc/classes/InputEventMagnifyGesture.xml2
-rw-r--r--doc/classes/InputEventMouse.xml12
-rw-r--r--doc/classes/InputEventMouseButton.xml4
-rw-r--r--doc/classes/InputEventMouseMotion.xml12
-rw-r--r--doc/classes/InputEventPanGesture.xml2
-rw-r--r--doc/classes/InputEventScreenDrag.xml10
-rw-r--r--doc/classes/InputEventScreenTouch.xml6
-rw-r--r--doc/classes/InputEventShortcut.xml2
-rw-r--r--doc/classes/InputEventWithModifiers.xml4
-rw-r--r--doc/classes/InputMap.xml4
-rw-r--r--doc/classes/InstancePlaceholder.xml4
-rw-r--r--doc/classes/IntervalTweener.xml2
-rw-r--r--doc/classes/ItemList.xml59
-rw-r--r--doc/classes/JNISingleton.xml4
-rw-r--r--doc/classes/JSON.xml44
-rw-r--r--doc/classes/JSONRPC.xml2
-rw-r--r--doc/classes/JavaClass.xml2
-rw-r--r--doc/classes/JavaClassWrapper.xml2
-rw-r--r--doc/classes/JavaScript.xml28
-rw-r--r--doc/classes/JavaScriptObject.xml2
-rw-r--r--doc/classes/Joint2D.xml3
-rw-r--r--doc/classes/Joint3D.xml2
-rw-r--r--doc/classes/KinematicCollision2D.xml2
-rw-r--r--doc/classes/KinematicCollision3D.xml2
-rw-r--r--doc/classes/Label.xml80
-rw-r--r--doc/classes/Light2D.xml4
-rw-r--r--doc/classes/Light3D.xml41
-rw-r--r--doc/classes/LightOccluder2D.xml4
-rw-r--r--doc/classes/LightmapGI.xml6
-rw-r--r--doc/classes/LightmapGIData.xml2
-rw-r--r--doc/classes/LightmapProbe.xml2
-rw-r--r--doc/classes/Lightmapper.xml2
-rw-r--r--doc/classes/LightmapperRD.xml2
-rw-r--r--doc/classes/Line2D.xml11
-rw-r--r--doc/classes/LineEdit.xml84
-rw-r--r--doc/classes/LinkButton.xml30
-rw-r--r--doc/classes/MainLoop.xml2
-rw-r--r--doc/classes/MarginContainer.xml2
-rw-r--r--doc/classes/Marshalls.xml2
-rw-r--r--doc/classes/Material.xml24
-rw-r--r--doc/classes/MenuButton.xml49
-rw-r--r--doc/classes/Mesh.xml87
-rw-r--r--doc/classes/MeshDataTool.xml6
-rw-r--r--doc/classes/MeshInstance2D.xml6
-rw-r--r--doc/classes/MeshInstance3D.xml2
-rw-r--r--doc/classes/MeshLibrary.xml2
-rw-r--r--doc/classes/MeshTexture.xml2
-rw-r--r--doc/classes/MethodTweener.xml2
-rw-r--r--doc/classes/MultiMesh.xml6
-rw-r--r--doc/classes/MultiMeshInstance2D.xml4
-rw-r--r--doc/classes/MultiMeshInstance3D.xml8
-rw-r--r--doc/classes/MultiplayerAPI.xml8
-rw-r--r--doc/classes/MultiplayerPeer.xml4
-rw-r--r--doc/classes/MultiplayerPeerExtension.xml2
-rw-r--r--doc/classes/MultiplayerReplicator.xml191
-rw-r--r--doc/classes/MultiplayerSpawner.xml47
-rw-r--r--doc/classes/MultiplayerSynchronizer.xml17
-rw-r--r--doc/classes/Mutex.xml4
-rw-r--r--doc/classes/NativeExtension.xml6
-rw-r--r--doc/classes/NativeExtensionManager.xml2
-rw-r--r--doc/classes/NavigationAgent2D.xml4
-rw-r--r--doc/classes/NavigationAgent3D.xml2
-rw-r--r--doc/classes/NavigationMesh.xml2
-rw-r--r--doc/classes/NavigationMeshGenerator.xml2
-rw-r--r--doc/classes/NavigationObstacle2D.xml10
-rw-r--r--doc/classes/NavigationObstacle3D.xml10
-rw-r--r--doc/classes/NavigationPolygon.xml6
-rw-r--r--doc/classes/NavigationRegion2D.xml2
-rw-r--r--doc/classes/NavigationRegion3D.xml2
-rw-r--r--doc/classes/NavigationServer2D.xml2
-rw-r--r--doc/classes/NavigationServer3D.xml2
-rw-r--r--doc/classes/NinePatchRect.xml8
-rw-r--r--doc/classes/Node.xml94
-rw-r--r--doc/classes/Node2D.xml4
-rw-r--r--doc/classes/Node3D.xml18
-rw-r--r--doc/classes/Node3DGizmo.xml2
-rw-r--r--doc/classes/NodePath.xml38
-rw-r--r--doc/classes/ORMMaterial3D.xml2
-rw-r--r--doc/classes/OS.xml137
-rw-r--r--doc/classes/Object.xml13
-rw-r--r--doc/classes/Occluder3D.xml25
-rw-r--r--doc/classes/OccluderInstance3D.xml23
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/OmniLight3D.xml4
-rw-r--r--doc/classes/OptimizedTranslation.xml2
-rw-r--r--doc/classes/OptionButton.xml76
-rw-r--r--doc/classes/PCKPacker.xml6
-rw-r--r--doc/classes/PackedByteArray.xml110
-rw-r--r--doc/classes/PackedColorArray.xml109
-rw-r--r--doc/classes/PackedDataContainer.xml2
-rw-r--r--doc/classes/PackedDataContainerRef.xml2
-rw-r--r--doc/classes/PackedFloat32Array.xml109
-rw-r--r--doc/classes/PackedFloat64Array.xml109
-rw-r--r--doc/classes/PackedInt32Array.xml109
-rw-r--r--doc/classes/PackedInt64Array.xml109
-rw-r--r--doc/classes/PackedScene.xml14
-rw-r--r--doc/classes/PackedStringArray.xml109
-rw-r--r--doc/classes/PackedVector2Array.xml121
-rw-r--r--doc/classes/PackedVector3Array.xml121
-rw-r--r--doc/classes/PacketPeer.xml2
-rw-r--r--doc/classes/PacketPeerDTLS.xml2
-rw-r--r--doc/classes/PacketPeerExtension.xml2
-rw-r--r--doc/classes/PacketPeerStream.xml2
-rw-r--r--doc/classes/PacketPeerUDP.xml58
-rw-r--r--doc/classes/Panel.xml12
-rw-r--r--doc/classes/PanelContainer.xml4
-rw-r--r--doc/classes/PanoramaSkyMaterial.xml5
-rw-r--r--doc/classes/ParallaxBackground.xml4
-rw-r--r--doc/classes/ParallaxLayer.xml2
-rw-r--r--doc/classes/ParticlesMaterial.xml26
-rw-r--r--doc/classes/Path2D.xml2
-rw-r--r--doc/classes/Path3D.xml2
-rw-r--r--doc/classes/PathFollow2D.xml2
-rw-r--r--doc/classes/PathFollow3D.xml2
-rw-r--r--doc/classes/Performance.xml2
-rw-r--r--doc/classes/PhysicalBone2D.xml2
-rw-r--r--doc/classes/PhysicalBone3D.xml40
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml14
-rw-r--r--doc/classes/PhysicsBody2D.xml20
-rw-r--r--doc/classes/PhysicsBody3D.xml18
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml94
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml96
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml58
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml43
-rw-r--r--doc/classes/PhysicsMaterial.xml2
-rw-r--r--doc/classes/PhysicsPointQueryParameters2D.xml31
-rw-r--r--doc/classes/PhysicsPointQueryParameters3D.xml28
-rw-r--r--doc/classes/PhysicsRayQueryParameters2D.xml34
-rw-r--r--doc/classes/PhysicsRayQueryParameters3D.xml37
-rw-r--r--doc/classes/PhysicsServer2D.xml191
-rw-r--r--doc/classes/PhysicsServer3D.xml210
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml6
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml9
-rw-r--r--doc/classes/PhysicsTestMotionParameters2D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionParameters3D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml22
-rw-r--r--doc/classes/PhysicsTestMotionResult3D.xml22
-rw-r--r--doc/classes/PinJoint2D.xml2
-rw-r--r--doc/classes/PinJoint3D.xml2
-rw-r--r--doc/classes/Plane.xml116
-rw-r--r--doc/classes/PlaneMesh.xml2
-rw-r--r--doc/classes/PointLight2D.xml2
-rw-r--r--doc/classes/PointMesh.xml2
-rw-r--r--doc/classes/Polygon2D.xml2
-rw-r--r--doc/classes/PolygonOccluder3D.xml18
-rw-r--r--doc/classes/PolygonPathFinder.xml2
-rw-r--r--doc/classes/Popup.xml22
-rw-r--r--doc/classes/PopupMenu.xml240
-rw-r--r--doc/classes/PopupPanel.xml2
-rw-r--r--doc/classes/Position2D.xml2
-rw-r--r--doc/classes/Position3D.xml2
-rw-r--r--doc/classes/PrimitiveMesh.xml9
-rw-r--r--doc/classes/PrismMesh.xml2
-rw-r--r--doc/classes/ProceduralSkyMaterial.xml16
-rw-r--r--doc/classes/ProgressBar.xml30
-rw-r--r--doc/classes/ProjectSettings.xml283
-rw-r--r--doc/classes/PropertyTweener.xml2
-rw-r--r--doc/classes/ProximityGroup3D.xml42
-rw-r--r--doc/classes/ProxyTexture.xml2
-rw-r--r--doc/classes/QuadMesh.xml2
-rw-r--r--doc/classes/QuadOccluder3D.xml17
-rw-r--r--doc/classes/Quaternion.xml201
-rw-r--r--doc/classes/RDAttachmentFormat.xml2
-rw-r--r--doc/classes/RDFramebufferPass.xml4
-rw-r--r--doc/classes/RDPipelineColorBlendState.xml2
-rw-r--r--doc/classes/RDPipelineColorBlendStateAttachment.xml2
-rw-r--r--doc/classes/RDPipelineDepthStencilState.xml2
-rw-r--r--doc/classes/RDPipelineMultisampleState.xml2
-rw-r--r--doc/classes/RDPipelineRasterizationState.xml2
-rw-r--r--doc/classes/RDPipelineSpecializationConstant.xml2
-rw-r--r--doc/classes/RDSamplerState.xml2
-rw-r--r--doc/classes/RDShaderFile.xml2
-rw-r--r--doc/classes/RDShaderSPIRV.xml2
-rw-r--r--doc/classes/RDShaderSource.xml2
-rw-r--r--doc/classes/RDTextureFormat.xml2
-rw-r--r--doc/classes/RDTextureView.xml4
-rw-r--r--doc/classes/RDUniform.xml2
-rw-r--r--doc/classes/RDVertexAttribute.xml4
-rw-r--r--doc/classes/RID.xml54
-rw-r--r--doc/classes/RandomNumberGenerator.xml4
-rw-r--r--doc/classes/Range.xml8
-rw-r--r--doc/classes/RayCast2D.xml19
-rw-r--r--doc/classes/RayCast3D.xml24
-rw-r--r--doc/classes/Rect2.xml111
-rw-r--r--doc/classes/Rect2i.xml102
-rw-r--r--doc/classes/RectangleShape2D.xml2
-rw-r--r--doc/classes/RefCounted.xml4
-rw-r--r--doc/classes/ReferenceRect.xml4
-rw-r--r--doc/classes/ReflectionProbe.xml36
-rw-r--r--doc/classes/RemoteTransform2D.xml2
-rw-r--r--doc/classes/RemoteTransform3D.xml2
-rw-r--r--doc/classes/RenderingDevice.xml43
-rw-r--r--doc/classes/RenderingServer.xml202
-rw-r--r--doc/classes/Resource.xml11
-rw-r--r--doc/classes/ResourceFormatLoader.xml4
-rw-r--r--doc/classes/ResourceFormatSaver.xml2
-rw-r--r--doc/classes/ResourceImporter.xml4
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/ResourcePreloader.xml2
-rw-r--r--doc/classes/ResourceSaver.xml9
-rw-r--r--doc/classes/ResourceUID.xml4
-rw-r--r--doc/classes/RibbonTrailMesh.xml2
-rw-r--r--doc/classes/RichTextEffect.xml4
-rw-r--r--doc/classes/RichTextLabel.xml183
-rw-r--r--doc/classes/RigidDynamicBody2D.xml97
-rw-r--r--doc/classes/RigidDynamicBody3D.xml98
-rw-r--r--doc/classes/RootMotionView.xml4
-rw-r--r--doc/classes/SceneReplicationConfig.xml61
-rw-r--r--doc/classes/SceneState.xml13
-rw-r--r--doc/classes/SceneTree.xml13
-rw-r--r--doc/classes/SceneTreeTimer.xml5
-rw-r--r--doc/classes/Script.xml5
-rw-r--r--doc/classes/ScriptCreateDialog.xml6
-rw-r--r--doc/classes/ScriptEditor.xml2
-rw-r--r--doc/classes/ScriptEditorBase.xml2
-rw-r--r--doc/classes/ScrollBar.xml6
-rw-r--r--doc/classes/ScrollContainer.xml50
-rw-r--r--doc/classes/SegmentShape2D.xml2
-rw-r--r--doc/classes/Semaphore.xml4
-rw-r--r--doc/classes/SeparationRayShape2D.xml2
-rw-r--r--doc/classes/SeparationRayShape3D.xml2
-rw-r--r--doc/classes/Separator.xml2
-rw-r--r--doc/classes/Shader.xml8
-rw-r--r--doc/classes/ShaderGlobalsOverride.xml2
-rw-r--r--doc/classes/ShaderMaterial.xml4
-rw-r--r--doc/classes/Shape2D.xml7
-rw-r--r--doc/classes/Shape3D.xml8
-rw-r--r--doc/classes/ShapeCast2D.xml157
-rw-r--r--doc/classes/Shortcut.xml2
-rw-r--r--doc/classes/Signal.xml38
-rw-r--r--doc/classes/Skeleton2D.xml4
-rw-r--r--doc/classes/Skeleton3D.xml6
-rw-r--r--doc/classes/SkeletonIK3D.xml2
-rw-r--r--doc/classes/SkeletonModification2D.xml2
-rw-r--r--doc/classes/SkeletonModification2DCCDIK.xml2
-rw-r--r--doc/classes/SkeletonModification2DFABRIK.xml2
-rw-r--r--doc/classes/SkeletonModification2DJiggle.xml2
-rw-r--r--doc/classes/SkeletonModification2DLookAt.xml2
-rw-r--r--doc/classes/SkeletonModification2DPhysicalBones.xml2
-rw-r--r--doc/classes/SkeletonModification2DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification2DTwoBoneIK.xml2
-rw-r--r--doc/classes/SkeletonModification3D.xml4
-rw-r--r--doc/classes/SkeletonModification3DCCDIK.xml4
-rw-r--r--doc/classes/SkeletonModification3DFABRIK.xml6
-rw-r--r--doc/classes/SkeletonModification3DJiggle.xml6
-rw-r--r--doc/classes/SkeletonModification3DLookAt.xml2
-rw-r--r--doc/classes/SkeletonModification3DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification3DTwoBoneIK.xml4
-rw-r--r--doc/classes/SkeletonModificationStack2D.xml2
-rw-r--r--doc/classes/SkeletonModificationStack3D.xml4
-rw-r--r--doc/classes/Skin.xml9
-rw-r--r--doc/classes/SkinReference.xml2
-rw-r--r--doc/classes/Sky.xml2
-rw-r--r--doc/classes/Slider.xml19
-rw-r--r--doc/classes/SliderJoint3D.xml2
-rw-r--r--doc/classes/SoftDynamicBody3D.xml9
-rw-r--r--doc/classes/SphereMesh.xml2
-rw-r--r--doc/classes/SphereOccluder3D.xml17
-rw-r--r--doc/classes/SphereShape3D.xml2
-rw-r--r--doc/classes/SpinBox.xml9
-rw-r--r--doc/classes/SplitContainer.xml2
-rw-r--r--doc/classes/SpotLight3D.xml6
-rw-r--r--doc/classes/SpringArm3D.xml4
-rw-r--r--doc/classes/Sprite2D.xml2
-rw-r--r--doc/classes/Sprite3D.xml7
-rw-r--r--doc/classes/SpriteBase3D.xml8
-rw-r--r--doc/classes/SpriteFrames.xml6
-rw-r--r--doc/classes/StandardMaterial3D.xml4
-rw-r--r--doc/classes/StaticBody2D.xml2
-rw-r--r--doc/classes/StaticBody3D.xml2
-rw-r--r--doc/classes/StreamCubemap.xml9
-rw-r--r--doc/classes/StreamCubemapArray.xml9
-rw-r--r--doc/classes/StreamPeer.xml4
-rw-r--r--doc/classes/StreamPeerBuffer.xml12
-rw-r--r--doc/classes/StreamPeerExtension.xml2
-rw-r--r--doc/classes/StreamPeerSSL.xml4
-rw-r--r--doc/classes/StreamPeerTCP.xml2
-rw-r--r--doc/classes/StreamTexture2DArray.xml9
-rw-r--r--doc/classes/String.xml293
-rw-r--r--doc/classes/StringName.xml68
-rw-r--r--doc/classes/StyleBox.xml33
-rw-r--r--doc/classes/StyleBoxEmpty.xml2
-rw-r--r--doc/classes/StyleBoxFlat.xml2
-rw-r--r--doc/classes/StyleBoxLine.xml2
-rw-r--r--doc/classes/StyleBoxTexture.xml2
-rw-r--r--doc/classes/SubViewport.xml7
-rw-r--r--doc/classes/SubViewportContainer.xml9
-rw-r--r--doc/classes/SurfaceTool.xml6
-rw-r--r--doc/classes/SyntaxHighlighter.xml2
-rw-r--r--doc/classes/TCPServer.xml2
-rw-r--r--doc/classes/TabBar.xml165
-rw-r--r--doc/classes/TabContainer.xml116
-rw-r--r--doc/classes/TextEdit.xml120
-rw-r--r--doc/classes/TextLine.xml13
-rw-r--r--doc/classes/TextParagraph.xml20
-rw-r--r--doc/classes/TextServer.xml245
-rw-r--r--doc/classes/TextServerExtension.xml207
-rw-r--r--doc/classes/TextServerManager.xml2
-rw-r--r--doc/classes/Texture.xml2
-rw-r--r--doc/classes/Texture2D.xml54
-rw-r--r--doc/classes/Texture2DArray.xml2
-rw-r--r--doc/classes/Texture3D.xml32
-rw-r--r--doc/classes/TextureButton.xml14
-rw-r--r--doc/classes/TextureLayered.xml38
-rw-r--r--doc/classes/TextureProgressBar.xml4
-rw-r--r--doc/classes/TextureRect.xml27
-rw-r--r--doc/classes/Theme.xml219
-rw-r--r--doc/classes/Thread.xml6
-rw-r--r--doc/classes/TileData.xml2
-rw-r--r--doc/classes/TileMap.xml29
-rw-r--r--doc/classes/TileMapPattern.xml4
-rw-r--r--doc/classes/TileSet.xml8
-rw-r--r--doc/classes/TileSetAtlasSource.xml23
-rw-r--r--doc/classes/TileSetScenesCollectionSource.xml8
-rw-r--r--doc/classes/TileSetSource.xml2
-rw-r--r--doc/classes/Time.xml9
-rw-r--r--doc/classes/Timer.xml4
-rw-r--r--doc/classes/TouchScreenButton.xml14
-rw-r--r--doc/classes/Transform2D.xml173
-rw-r--r--doc/classes/Transform3D.xml172
-rw-r--r--doc/classes/Translation.xml6
-rw-r--r--doc/classes/TranslationServer.xml69
-rw-r--r--doc/classes/Tree.xml217
-rw-r--r--doc/classes/TreeItem.xml57
-rw-r--r--doc/classes/TriangleMesh.xml2
-rw-r--r--doc/classes/TubeTrailMesh.xml2
-rw-r--r--doc/classes/Tween.xml38
-rw-r--r--doc/classes/Tweener.xml2
-rw-r--r--doc/classes/UDPServer.xml2
-rw-r--r--doc/classes/UndoRedo.xml4
-rw-r--r--doc/classes/VBoxContainer.xml2
-rw-r--r--doc/classes/VFlowContainer.xml19
-rw-r--r--doc/classes/VScrollBar.xml24
-rw-r--r--doc/classes/VSeparator.xml2
-rw-r--r--doc/classes/VSlider.xml22
-rw-r--r--doc/classes/VSplitContainer.xml8
-rw-r--r--doc/classes/Variant.xml5
-rw-r--r--doc/classes/Vector2.xml335
-rw-r--r--doc/classes/Vector2i.xml268
-rw-r--r--doc/classes/Vector3.xml364
-rw-r--r--doc/classes/Vector3i.xml287
-rw-r--r--doc/classes/VehicleBody3D.xml4
-rw-r--r--doc/classes/VehicleWheel3D.xml9
-rw-r--r--doc/classes/VelocityTracker3D.xml2
-rw-r--r--doc/classes/VideoStream.xml4
-rw-r--r--doc/classes/VideoStreamPlayer.xml (renamed from doc/classes/VideoPlayer.xml)8
-rw-r--r--doc/classes/Viewport.xml97
-rw-r--r--doc/classes/ViewportTexture.xml4
-rw-r--r--doc/classes/VisibleOnScreenEnabler2D.xml2
-rw-r--r--doc/classes/VisibleOnScreenEnabler3D.xml2
-rw-r--r--doc/classes/VisibleOnScreenNotifier2D.xml2
-rw-r--r--doc/classes/VisibleOnScreenNotifier3D.xml2
-rw-r--r--doc/classes/VisualInstance3D.xml7
-rw-r--r--doc/classes/VisualShader.xml40
-rw-r--r--doc/classes/VisualShaderNode.xml18
-rw-r--r--doc/classes/VisualShaderNodeBillboard.xml2
-rw-r--r--doc/classes/VisualShaderNodeBooleanConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeBooleanUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeClamp.xml11
-rw-r--r--doc/classes/VisualShaderNodeColorConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeColorFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeColorOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeColorUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeComment.xml2
-rw-r--r--doc/classes/VisualShaderNodeCompare.xml15
-rw-r--r--doc/classes/VisualShaderNodeConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeCubemap.xml2
-rw-r--r--doc/classes/VisualShaderNodeCubemapUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeCurveTexture.xml2
-rw-r--r--doc/classes/VisualShaderNodeCurveXYZTexture.xml2
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml34
-rw-r--r--doc/classes/VisualShaderNodeDerivativeFunc.xml45
-rw-r--r--doc/classes/VisualShaderNodeDeterminant.xml2
-rw-r--r--doc/classes/VisualShaderNodeDotProduct.xml2
-rw-r--r--doc/classes/VisualShaderNodeExpression.xml2
-rw-r--r--doc/classes/VisualShaderNodeFaceForward.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeFresnel.xml2
-rw-r--r--doc/classes/VisualShaderNodeGlobalExpression.xml2
-rw-r--r--doc/classes/VisualShaderNodeGroupBase.xml2
-rw-r--r--doc/classes/VisualShaderNodeIf.xml2
-rw-r--r--doc/classes/VisualShaderNodeInput.xml4
-rw-r--r--doc/classes/VisualShaderNodeIntConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml7
-rw-r--r--doc/classes/VisualShaderNodeIntOp.xml19
-rw-r--r--doc/classes/VisualShaderNodeIntUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeIs.xml2
-rw-r--r--doc/classes/VisualShaderNodeMix.xml20
-rw-r--r--doc/classes/VisualShaderNodeMultiplyAdd.xml13
-rw-r--r--doc/classes/VisualShaderNodeOuterProduct.xml2
-rw-r--r--doc/classes/VisualShaderNodeOutput.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleAccelerator.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleBoxEmitter.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleConeVelocity.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleEmit.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleEmitter.xml8
-rw-r--r--doc/classes/VisualShaderNodeParticleMeshEmitter.xml17
-rw-r--r--doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleOutput.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleRandomness.xml12
-rw-r--r--doc/classes/VisualShaderNodeParticleRingEmitter.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleSphereEmitter.xml2
-rw-r--r--doc/classes/VisualShaderNodeResizableBase.xml2
-rw-r--r--doc/classes/VisualShaderNodeSDFRaymarch.xml2
-rw-r--r--doc/classes/VisualShaderNodeSDFToScreenUV.xml2
-rw-r--r--doc/classes/VisualShaderNodeSample3D.xml2
-rw-r--r--doc/classes/VisualShaderNodeScalarDerivativeFunc.xml30
-rw-r--r--doc/classes/VisualShaderNodeScreenUVToSDF.xml2
-rw-r--r--doc/classes/VisualShaderNodeSmoothStep.xml20
-rw-r--r--doc/classes/VisualShaderNodeStep.xml20
-rw-r--r--doc/classes/VisualShaderNodeSwitch.xml15
-rw-r--r--doc/classes/VisualShaderNodeTexture.xml2
-rw-r--r--doc/classes/VisualShaderNodeTexture2DArray.xml2
-rw-r--r--doc/classes/VisualShaderNodeTexture2DArrayUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeTexture3D.xml2
-rw-r--r--doc/classes/VisualShaderNodeTexture3DUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeTextureSDF.xml2
-rw-r--r--doc/classes/VisualShaderNodeTextureSDFNormal.xml2
-rw-r--r--doc/classes/VisualShaderNodeTextureUniform.xml38
-rw-r--r--doc/classes/VisualShaderNodeTextureUniformTriplanar.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformCompose.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformDecompose.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformVecMult.xml2
-rw-r--r--doc/classes/VisualShaderNodeUVFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeUniformRef.xml2
-rw-r--r--doc/classes/VisualShaderNodeVarying.xml15
-rw-r--r--doc/classes/VisualShaderNodeVaryingGetter.xml9
-rw-r--r--doc/classes/VisualShaderNodeVaryingSetter.xml9
-rw-r--r--doc/classes/VisualShaderNodeVec2Constant.xml16
-rw-r--r--doc/classes/VisualShaderNodeVec2Uniform.xml19
-rw-r--r--doc/classes/VisualShaderNodeVec3Constant.xml2
-rw-r--r--doc/classes/VisualShaderNodeVec3Uniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorBase.xml26
-rw-r--r--doc/classes/VisualShaderNodeVectorCompose.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorDecompose.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorDerivativeFunc.xml30
-rw-r--r--doc/classes/VisualShaderNodeVectorDistance.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorLen.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorRefract.xml2
-rw-r--r--doc/classes/VoxelGI.xml17
-rw-r--r--doc/classes/VoxelGIData.xml16
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/Window.xml54
-rw-r--r--doc/classes/World2D.xml4
-rw-r--r--doc/classes/World3D.xml4
-rw-r--r--doc/classes/WorldBoundaryShape2D.xml2
-rw-r--r--doc/classes/WorldBoundaryShape3D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml4
-rw-r--r--doc/classes/X509Certificate.xml2
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--doc/classes/XRAnchor3D.xml2
-rw-r--r--doc/classes/XRCamera3D.xml4
-rw-r--r--doc/classes/XRController3D.xml10
-rw-r--r--doc/classes/XRInterface.xml6
-rw-r--r--doc/classes/XRInterfaceExtension.xml52
-rw-r--r--doc/classes/XRNode3D.xml2
-rw-r--r--doc/classes/XROrigin3D.xml4
-rw-r--r--doc/classes/XRPose.xml16
-rw-r--r--doc/classes/XRPositionalTracker.xml17
-rw-r--r--doc/classes/XRServer.xml22
-rw-r--r--doc/classes/bool.xml55
-rw-r--r--doc/classes/float.xml187
-rw-r--r--doc/classes/int.xml226
742 files changed, 10271 insertions, 6112 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 4b710d5f12..f692a49ba1 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1,19 +1,41 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GlobalScope" version="4.0">
+<class name="@GlobalScope" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Global scope constants and variables.
+ Global scope constants and functions.
</brief_description>
<description>
- Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
+ A list of global scope enumerated constants and built-in functions. 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.
+ For the entries related to GDScript which can be accessed in any script see [@GDScript].
</description>
<tutorials>
+ <link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
</tutorials>
<methods>
<method name="abs">
<return type="Variant" />
<argument index="0" name="x" type="Variant" />
<description>
+ Returns the absolute value of a [Variant] parameter [code]x[/code] (i.e. non-negative value). Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ [codeblock]
+ var a = abs(-1)
+ # a is 1
+
+ var b = abs(-1.2)
+ # b is 1.2
+
+ var c = abs(Vector2(-3.5, -4))
+ # c is (3.5, 4)
+
+ var d = abs(Vector2i(-5, -6))
+ # d is (5, 6)
+
+ var e = abs(Vector3(-7, 8.5, -3.8))
+ # e is (7, 8.5, 3.8)
+
+ var f = abs(Vector3i(-7, -8, -9))
+ # f is (7, 8, 9)
+ [/codeblock]
</description>
</method>
<method name="absf">
@@ -118,6 +140,26 @@
<argument index="1" name="min" type="Variant" />
<argument index="2" name="max" type="Variant" />
<description>
+ Clamps the [Variant] [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ [codeblock]
+ var a = clamp(-10, -1, 5)
+ # a is -1
+
+ var b = clamp(8.1, 0.9, 5.5)
+ # b is 5.5
+
+ var c = clamp(Vector2(-3.5, -4), Vector2(-3.2, -2), Vector2(2, 6.5))
+ # c is (-3.2, -2)
+
+ var d = clamp(Vector2i(7, 8), Vector2i(-3, -2), Vector2i(2, 6))
+ # d is (2, 6)
+
+ var e = clamp(Vector3(-7, 8.5, -3.8), Vector3(-3, -2, 5.4), Vector3(-2, 6, -4.1))
+ # e is (-3, -2, 5.4)
+
+ var f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6))
+ # f is (-4, -5, -6)
+ [/codeblock]
</description>
</method>
<method name="clampf">
@@ -179,6 +221,17 @@
[/codeblock]
</description>
</method>
+ <method name="cubic_interpolate">
+ <return type="float" />
+ <argument index="0" name="from" type="float" />
+ <argument index="1" name="to" type="float" />
+ <argument index="2" name="pre" type="float" />
+ <argument index="3" name="post" type="float" />
+ <argument index="4" name="weight" type="float" />
+ <description>
+ Cubic interpolates between two values by the factor defined in [code]weight[/code] with pre and post values.
+ </description>
+ </method>
<method name="db2linear">
<return type="float" />
<argument index="0" name="db" type="float" />
@@ -208,9 +261,9 @@
- 1.0: Linear
- Between -1.0 and 0.0 (exclusive): Ease out-in
- 0.0: Constant
- - Between 0.0 to 1.0 (exclusive): Ease in
+ - Between 0.0 to 1.0 (exclusive): Ease out
- 1.0: Linear
- - Greater than 1.0 (exclusive): Ease out
+ - Greater than 1.0 (exclusive): Ease in
[/codeblock]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
See also [method smoothstep]. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
@@ -316,14 +369,16 @@
<argument index="1" name="to" type="float" />
<argument index="2" name="weight" type="float" />
<description>
- Returns a normalized value considering the given range. This is the opposite of [method lerp].
+ Returns an interpolation or extrapolation factor considering the range specified in [code]from[/code] and [code]to[/code], and the interpolated value specified in [code]weight[/code]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [code]weight[/code] is between [code]from[/code] and [code]to[/code] (inclusive). If [code]weight[/code] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]).
[codeblock]
+ # The interpolation ratio in the `lerp()` call below is 0.75.
var middle = lerp(20, 30, 0.75)
# `middle` is now 27.5.
# Now, we pretend to have forgotten the original ratio and want to get it back.
var ratio = inverse_lerp(20, 30, 27.5)
# `ratio` is now 0.75.
[/codeblock]
+ See also [method lerp] which performs the reverse of this operation.
</description>
</method>
<method name="is_equal_approx">
@@ -347,6 +402,7 @@
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
+ Returns [code]true[/code] if the Object that corresponds to [code]instance_id[/code] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
</description>
</method>
<method name="is_instance_valid">
@@ -377,10 +433,11 @@
<argument index="1" name="to" type="float" />
<argument index="2" name="weight" type="float" />
<description>
- Linearly interpolates between two values by a normalized value. This is the opposite of [method inverse_lerp].
+ Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i].
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
+ See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep].
</description>
</method>
<method name="lerp_angle">
@@ -390,7 +447,7 @@
<argument index="2" name="weight" type="float" />
<description>
Linearly interpolates between two angles (in radians) by a normalized value.
- Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU].
+ Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. To perform eased interpolation with [method lerp_angle], combine it with [method ease] or [method smoothstep].
[codeblock]
extends Sprite
var elapsed = 0.0
@@ -525,6 +582,26 @@
[b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
+ <method name="pingpong">
+ <return type="float" />
+ <argument index="0" name="value" type="float" />
+ <argument index="1" name="length" type="float" />
+ <description>
+ Returns the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave). If [code]length[/code] is less than zero, it becomes positive.
+ [codeblock]
+ pingpong(-3.0, 3.0) # Returns 3
+ pingpong(-2.0, 3.0) # Returns 2
+ pingpong(-1.0, 3.0) # Returns 1
+ pingpong(0.0, 3.0) # Returns 0
+ pingpong(1.0, 3.0) # Returns 1
+ pingpong(2.0, 3.0) # Returns 2
+ pingpong(3.0, 3.0) # Returns 3
+ pingpong(4.0, 3.0) # Returns 2
+ pingpong(5.0, 3.0) # Returns 1
+ pingpong(6.0, 3.0) # Returns 0
+ [/codeblock]
+ </description>
+ </method>
<method name="posmod">
<return type="int" />
<argument index="0" name="x" type="int" />
@@ -662,6 +739,14 @@
[/codeblock]
</description>
</method>
+ <method name="randfn">
+ <return type="float" />
+ <argument index="0" name="mean" type="float" />
+ <argument index="1" name="deviation" type="float" />
+ <description>
+ Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution.
+ </description>
+ </method>
<method name="randi">
<return type="int" />
<description>
@@ -706,12 +791,6 @@
[/codeblock]
</description>
</method>
- <method name="range_step_decimals">
- <return type="int" />
- <argument index="0" name="x" type="float" />
- <description>
- </description>
- </method>
<method name="rid_allocate_id">
<return type="int" />
<description>
@@ -750,6 +829,14 @@
<return type="Variant" />
<argument index="0" name="x" type="Variant" />
<description>
+ Returns the sign of [code]x[/code] as same type of [Variant] as [code]x[/code] with each component being -1, 0 and 1 for each negative, zero and positive values respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ [codeblock]
+ sign(-6.0) # Returns -1
+ sign(0.0) # Returns 0
+ sign(6.0) # Returns 1
+
+ sign(Vector3(-6.0, 0.0, 6.0) # Returns (-1, 0, 1)
+ [/codeblock]
</description>
</method>
<method name="signf">
@@ -1131,58 +1218,70 @@
</constant>
<constant name="COUNTERCLOCKWISE" value="1" enum="ClockDirection">
</constant>
- <constant name="HALIGN_LEFT" value="0" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_LEFT" value="0" enum="HorizontalAlignment">
Horizontal left alignment, usually for text-derived classes.
</constant>
- <constant name="HALIGN_CENTER" value="1" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_CENTER" value="1" enum="HorizontalAlignment">
Horizontal center alignment, usually for text-derived classes.
</constant>
- <constant name="HALIGN_RIGHT" value="2" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_RIGHT" value="2" enum="HorizontalAlignment">
Horizontal right alignment, usually for text-derived classes.
</constant>
- <constant name="HALIGN_FILL" value="3" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_FILL" value="3" enum="HorizontalAlignment">
Expand row to fit width, usually for text-derived classes.
</constant>
- <constant name="VALIGN_TOP" value="0" enum="VAlign">
+ <constant name="VERTICAL_ALIGNMENT_TOP" value="0" enum="VerticalAlignment">
Vertical top alignment, usually for text-derived classes.
</constant>
- <constant name="VALIGN_CENTER" value="1" enum="VAlign">
+ <constant name="VERTICAL_ALIGNMENT_CENTER" value="1" enum="VerticalAlignment">
Vertical center alignment, usually for text-derived classes.
</constant>
- <constant name="VALIGN_BOTTOM" value="2" enum="VAlign">
+ <constant name="VERTICAL_ALIGNMENT_BOTTOM" value="2" enum="VerticalAlignment">
Vertical bottom alignment, usually for text-derived classes.
</constant>
- <constant name="INLINE_ALIGN_TOP_TO" value="0" enum="InlineAlign">
- Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant.
+ <constant name="VERTICAL_ALIGNMENT_FILL" value="3" enum="VerticalAlignment">
+ Expand rows to fit height, usually for text-derived classes.
</constant>
- <constant name="INLINE_ALIGN_CENTER_TO" value="1" enum="InlineAlign">
- Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant.
+ <constant name="INLINE_ALIGNMENT_TOP_TO" value="0" enum="InlineAlignment">
+ Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
</constant>
- <constant name="INLINE_ALIGN_BOTTOM_TO" value="2" enum="InlineAlign">
- Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant.
+ <constant name="INLINE_ALIGNMENT_CENTER_TO" value="1" enum="InlineAlignment">
+ Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
</constant>
- <constant name="INLINE_ALIGN_TO_TOP" value="0" enum="InlineAlign">
- Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the top of the text.
+ <constant name="INLINE_ALIGNMENT_BOTTOM_TO" value="2" enum="InlineAlignment">
+ Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
</constant>
- <constant name="INLINE_ALIGN_TO_CENTER" value="4" enum="InlineAlign">
- Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the center of the text.
+ <constant name="INLINE_ALIGNMENT_TO_TOP" value="0" enum="InlineAlignment">
+ Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the top of the text.
</constant>
- <constant name="INLINE_ALIGN_TO_BASELINE" value="8" enum="InlineAlign">
- Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the baseline of the text.
+ <constant name="INLINE_ALIGNMENT_TO_CENTER" value="4" enum="InlineAlignment">
+ Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the center of the text.
</constant>
- <constant name="INLINE_ALIGN_TO_BOTTOM" value="12" enum="InlineAlign">
+ <constant name="INLINE_ALIGNMENT_TO_BASELINE" value="8" enum="InlineAlignment">
+ Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the baseline of the text.
+ </constant>
+ <constant name="INLINE_ALIGNMENT_TO_BOTTOM" value="12" enum="InlineAlignment">
Aligns inline object (e.g. image, table) to the bottom of the text.
</constant>
- <constant name="INLINE_ALIGN_TOP" value="0" enum="InlineAlign">
- Aligns top of the inline object (e.g. image, table) to the top of the text. Equvalent to [code]INLINE_ALIGN_TOP_TO | INLINE_ALIGN_TO_TOP[/code].
+ <constant name="INLINE_ALIGNMENT_TOP" value="0" enum="InlineAlignment">
+ Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code].
+ </constant>
+ <constant name="INLINE_ALIGNMENT_CENTER" value="5" enum="InlineAlignment">
+ Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code].
+ </constant>
+ <constant name="INLINE_ALIGNMENT_BOTTOM" value="14" enum="InlineAlignment">
+ Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code].
+ </constant>
+ <constant name="INLINE_ALIGNMENT_IMAGE_MASK" value="3" enum="InlineAlignment">
+ A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants.
</constant>
- <constant name="INLINE_ALIGN_CENTER" value="5" enum="InlineAlign">
- Aligns center of the inline object (e.g. image, table) to the center of the text. Equvalent to [code]INLINE_ALIGN_CENTER_TO | INLINE_ALIGN_TO_CENTER[/code].
+ <constant name="INLINE_ALIGNMENT_TEXT_MASK" value="12" enum="InlineAlignment">
+ A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants.
</constant>
- <constant name="INLINE_ALIGN_BOTTOM" value="14" enum="InlineAlign">
- Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equvalent to [code]INLINE_ALIGN_BOTTOM_TO | INLINE_ALIGN_TO_BOTTOM[/code].
+ <constant name="KEY_NONE" value="0" enum="Key">
+ Enum value which doesn't correspond to any key. This is used to initialize [enum Key] properties with a generic state.
</constant>
- <constant name="SPKEY" value="16777216">
+ <constant name="KEY_SPECIAL" value="16777216" enum="Key">
Keycodes with this bit applied are non-printable.
</constant>
<constant name="KEY_ESCAPE" value="16777217" enum="Key">
@@ -1938,6 +2037,9 @@
<constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask">
Group Switch key mask.
</constant>
+ <constant name="MOUSE_BUTTON_NONE" value="0" enum="MouseButton">
+ Enum value which doesn't correspond to any mouse button. This is used to initialize [enum MouseButton] properties with a generic state.
+ </constant>
<constant name="MOUSE_BUTTON_LEFT" value="1" enum="MouseButton">
Left mouse button.
</constant>
@@ -1947,12 +2049,6 @@
<constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton">
Middle mouse button.
</constant>
- <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
- Extra mouse button 1 (only present on some mice).
- </constant>
- <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
- Extra mouse button 2 (only present on some mice).
- </constant>
<constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton">
Mouse wheel up.
</constant>
@@ -1965,6 +2061,12 @@
<constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="MouseButton">
Mouse wheel right button (only present on some mice).
</constant>
+ <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
+ Extra mouse button 1 (only present on some mice).
+ </constant>
+ <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
+ Extra mouse button 2 (only present on some mice).
+ </constant>
<constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton">
Left mouse button mask.
</constant>
@@ -2049,8 +2151,11 @@
<constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButton">
The number of SDL game controller buttons.
</constant>
- <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButton">
- The maximum number of game controller buttons: Android supports up to 36 buttons.
+ <constant name="JOY_BUTTON_MAX" value="128" enum="JoyButton">
+ The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
+ - Android: Up to 36 buttons.
+ - Linux: Up to 80 buttons.
+ - Windows and macOS: Up to 128 buttons.
</constant>
<constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxis">
An invalid game controller axis.
@@ -2079,26 +2184,62 @@
<constant name="JOY_AXIS_MAX" value="10" enum="JoyAxis">
The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
</constant>
+ <constant name="MIDI_MESSAGE_NONE" value="0" enum="MIDIMessage">
+ Enum value which doesn't correspond to any MIDI message. This is used to initialize [enum MIDIMessage] properties with a generic state.
+ </constant>
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
- MIDI note OFF message.
+ MIDI note OFF message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
</constant>
<constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
- MIDI note ON message.
+ MIDI note ON message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
</constant>
<constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage">
- MIDI aftertouch message.
+ MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
</constant>
<constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage">
- MIDI control change message.
+ MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.
</constant>
<constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage">
- MIDI program change message.
+ MIDI program change message. This message sent when the program patch number changes.
</constant>
<constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage">
- MIDI channel pressure message.
+ MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.
</constant>
<constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage">
- MIDI pitch bend message.
+ MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
+ </constant>
+ <constant name="MIDI_MESSAGE_SYSTEM_EXCLUSIVE" value="240" enum="MIDIMessage">
+ MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_QUARTER_FRAME" value="241" enum="MIDIMessage">
+ MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_SONG_POSITION_POINTER" value="242" enum="MIDIMessage">
+ MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_SONG_SELECT" value="243" enum="MIDIMessage">
+ MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_TUNE_REQUEST" value="246" enum="MIDIMessage">
+ MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.
+ </constant>
+ <constant name="MIDI_MESSAGE_TIMING_CLOCK" value="248" enum="MIDIMessage">
+ MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.
+ </constant>
+ <constant name="MIDI_MESSAGE_START" value="250" enum="MIDIMessage">
+ MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.
+ </constant>
+ <constant name="MIDI_MESSAGE_CONTINUE" value="251" enum="MIDIMessage">
+ MIDI continue message. Continue at the point the sequence was stopped.
+ </constant>
+ <constant name="MIDI_MESSAGE_STOP" value="252" enum="MIDIMessage">
+ MIDI stop message. Stop the current sequence.
+ </constant>
+ <constant name="MIDI_MESSAGE_ACTIVE_SENSING" value="254" enum="MIDIMessage">
+ MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.
+ </constant>
+ <constant name="MIDI_MESSAGE_SYSTEM_RESET" value="255" enum="MIDIMessage">
+ MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
</constant>
<constant name="OK" value="0" enum="Error">
Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to standard output.
@@ -2267,7 +2408,7 @@
Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
</constant>
<constant name="PROPERTY_HINT_ENUM_SUGGESTION" value="3" enum="PropertyHint">
- Hints that a string property is can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
+ Hints that a string property can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
Unlike [constant PROPERTY_HINT_ENUM] a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
</constant>
<constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
@@ -2372,7 +2513,13 @@
</constant>
<constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LOCALE_ID" value="41" enum="PropertyHint">
+ Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
+ </constant>
+ <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="42" enum="PropertyHint">
+ Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
+ </constant>
+ <constant name="PROPERTY_HINT_MAX" value="43" enum="PropertyHint">
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags">
</constant>
@@ -2453,7 +2600,7 @@
<constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71" enum="PropertyUsageFlags">
Default usage for translatable strings (storage, editor, network and internationalized).
</constant>
- <constant name="PROPERTY_USAGE_NOEDITOR" value="5" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NO_EDITOR" value="5" enum="PropertyUsageFlags">
Default usage but without showing the property in the editor (storage, network).
</constant>
<constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags">
@@ -2581,31 +2728,31 @@
<constant name="TYPE_ARRAY" value="25" enum="Variant.Type">
Variable is of type [Array].
</constant>
- <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type">
+ <constant name="TYPE_PACKED_BYTE_ARRAY" value="26" enum="Variant.Type">
Variable is of type [PackedByteArray].
</constant>
- <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT32_ARRAY" value="27" enum="Variant.Type">
Variable is of type [PackedInt32Array].
</constant>
- <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT64_ARRAY" value="28" enum="Variant.Type">
Variable is of type [PackedInt64Array].
</constant>
- <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="29" enum="Variant.Type">
Variable is of type [PackedFloat32Array].
</constant>
- <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="30" enum="Variant.Type">
Variable is of type [PackedFloat64Array].
</constant>
- <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type">
+ <constant name="TYPE_PACKED_STRING_ARRAY" value="31" enum="Variant.Type">
Variable is of type [PackedStringArray].
</constant>
- <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="32" enum="Variant.Type">
Variable is of type [PackedVector2Array].
</constant>
- <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="33" enum="Variant.Type">
Variable is of type [PackedVector3Array].
</constant>
- <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type">
+ <constant name="TYPE_PACKED_COLOR_ARRAY" value="34" enum="Variant.Type">
Variable is of type [PackedColorArray].
</constant>
<constant name="TYPE_MAX" value="35" enum="Variant.Type">
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 1be6d5a440..6e4a4a2145 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -1,40 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AABB" version="4.0">
+<class name="AABB" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>
<description>
[AABB] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
It uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2].
+ Negative values for [member size] are not supported and will not work for most methods. Use [method abs] to get an AABB with a positive size.
[b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
</tutorials>
- <methods>
- <method name="AABB" qualifiers="constructor">
+ <constructors>
+ <constructor name="AABB">
<return type="AABB" />
<description>
Constructs a default-initialized [AABB] with default (zero) values of [member position] and [member size].
</description>
- </method>
- <method name="AABB" qualifiers="constructor">
+ </constructor>
+ <constructor name="AABB">
<return type="AABB" />
<argument index="0" name="from" type="AABB" />
<description>
Constructs an [AABB] as a copy of the given [AABB].
</description>
- </method>
- <method name="AABB" qualifiers="constructor">
+ </constructor>
+ <constructor name="AABB">
<return type="AABB" />
<argument index="0" name="position" type="Vector3" />
<argument index="1" name="size" type="Vector3" />
<description>
Constructs an [AABB] from a position and size.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="abs" qualifiers="const">
<return type="AABB" />
<description>
@@ -52,13 +55,22 @@
<return type="AABB" />
<argument index="0" name="to_point" type="Vector3" />
<description>
- Returns this [AABB] expanded to include a given point.
- </description>
- </method>
- <method name="get_area" qualifiers="const">
- <return type="float" />
- <description>
- Returns the volume of the [AABB].
+ Returns a copy of this [AABB] expanded to include a given point.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ # position (-3, 2, 0), size (1, 1, 1)
+ var box = AABB(Vector3(-3, 2, 0), Vector3(1, 1, 1))
+ # position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
+ var box2 = box.expand(Vector3(0, -1, 2))
+ [/gdscript]
+ [csharp]
+ // position (-3, 2, 0), size (1, 1, 1)
+ var box = new AABB(new Vector3(-3, 2, 0), new Vector3(1, 1, 1));
+ // position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
+ var box2 = box.Expand(new Vector3(0, -1, 2));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_center" qualifiers="const">
@@ -117,6 +129,12 @@
Returns the support point in a given direction. This is useful for collision detection algorithms.
</description>
</method>
+ <method name="get_volume" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the volume of the [AABB].
+ </description>
+ </method>
<method name="grow" qualifiers="const">
<return type="AABB" />
<argument index="0" name="by" type="float" />
@@ -124,30 +142,31 @@
Returns a copy of the [AABB] grown a given amount of units towards all the sides.
</description>
</method>
- <method name="has_no_area" qualifiers="const">
+ <method name="has_no_surface" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the [AABB] is flat or empty.
+ Returns [code]true[/code] if the [AABB] is empty.
</description>
</method>
- <method name="has_no_surface" qualifiers="const">
+ <method name="has_no_volume" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the [AABB] is empty.
+ Returns [code]true[/code] if the [AABB] is flat or empty.
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="point" type="Vector3" />
<description>
- Returns [code]true[/code] if the [AABB] contains a point.
+ Returns [code]true[/code] if the [AABB] contains a point. Points on the faces of the AABB are considered included, though float-point precision errors may impact the accuracy of such checks.
+ [b]Note:[/b] This method is not reliable for [AABB] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent [AABB] to check for contained points.
</description>
</method>
<method name="intersection" qualifiers="const">
<return type="AABB" />
<argument index="0" name="with" type="AABB" />
<description>
- Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
+ Returns the intersection between two [AABB]. An empty AABB (size [code](0, 0, 0)[/code]) is returned on failure.
</description>
</method>
<method name="intersects" qualifiers="const">
@@ -193,45 +212,52 @@
Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ </methods>
+ <members>
+ <member name="end" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
+ Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
+ </member>
+ <member name="position" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
+ Beginning corner. Typically has values lower than [member end].
+ </member>
+ <member name="size" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
+ Size from [member position] to [member end]. Typically, all components are positive.
+ If the size is negative, you can use [method abs] to fix it.
+ </member>
+ </members>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="AABB" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="AABB" />
<argument index="0" name="right" type="Transform3D" />
<description>
+ Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="AABB" />
<description>
+ Returns [code]true[/code] if the AABBs are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
- </method>
- </methods>
- <members>
- <member name="end" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
- Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
- </member>
- <member name="position" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
- Beginning corner. Typically has values lower than [member end].
- </member>
- <member name="size" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
- Size from [member position] to [member end]. Typically, all components are positive.
- If the size is negative, you can use [method abs] to fix it.
- </member>
- </members>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml
index 8c390155ee..82634f8859 100644
--- a/doc/classes/AESContext.xml
+++ b/doc/classes/AESContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AESContext" inherits="RefCounted" version="4.0">
+<class name="AESContext" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Interface to low level AES encryption features.
</brief_description>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 11c0fc33b8..cb76fe8cf6 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="RefCounted" version="4.0">
+<class name="AStar" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An implementation of A* to find the shortest paths among connected points in space.
</brief_description>
@@ -244,6 +244,12 @@
Returns the number of points currently in the points pool.
</description>
</method>
+ <method name="get_point_ids">
+ <return type="Array" />
+ <description>
+ Returns an array of all point IDs.
+ </description>
+ </method>
<method name="get_point_path">
<return type="PackedVector3Array" />
<argument index="0" name="from_id" type="int" />
@@ -267,12 +273,6 @@
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
- <method name="get_points">
- <return type="Array" />
- <description>
- Returns an array of all points.
- </description>
- </method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 43e7d59665..2dde3ad340 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar2D" inherits="RefCounted" version="4.0">
+<class name="AStar2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
AStar class representation that uses 2D vectors as edges.
</brief_description>
@@ -215,6 +215,12 @@
Returns the number of points currently in the points pool.
</description>
</method>
+ <method name="get_point_ids">
+ <return type="Array" />
+ <description>
+ Returns an array of all point IDs.
+ </description>
+ </method>
<method name="get_point_path">
<return type="PackedVector2Array" />
<argument index="0" name="from_id" type="int" />
@@ -238,12 +244,6 @@
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
- <method name="get_points">
- <return type="Array" />
- <description>
- Returns an array of all points.
- </description>
- </method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index df0cc6f268..4836f48a57 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="Window" version="4.0">
+<class name="AcceptDialog" inherits="Window" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base dialog for user notification.
</brief_description>
@@ -68,11 +68,11 @@
<member name="dialog_text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The text displayed by the dialog.
</member>
- <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" override="true" default="true" />
- <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" />
+ <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" overrides="Window" default="true" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Alert!&quot;" />
+ <member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible" overrides="Window" default="false" />
+ <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" overrides="Window" default="true" />
</members>
<signals>
<signal name="cancelled">
diff --git a/doc/classes/AnimatableBody2D.xml b/doc/classes/AnimatableBody2D.xml
index bc169cf9c9..fbc2fb8509 100644
--- a/doc/classes/AnimatableBody2D.xml
+++ b/doc/classes/AnimatableBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0">
+<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors.
</brief_description>
diff --git a/doc/classes/AnimatableBody3D.xml b/doc/classes/AnimatableBody3D.xml
index 86cff38c51..2a08c4c8f1 100644
--- a/doc/classes/AnimatableBody3D.xml
+++ b/doc/classes/AnimatableBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0">
+<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors.
</brief_description>
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index b468e1d109..e89134d1ac 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedSprite2D" inherits="Node2D" version="4.0">
+<class name="AnimatedSprite2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Sprite node that can use multiple textures for animation.
</brief_description>
@@ -8,16 +8,10 @@
[b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps.
</description>
<tutorials>
- <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
+ <link title="2D Sprite animation">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
- <method name="is_playing" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if an animation is currently being played.
- </description>
- </method>
<method name="play">
<return type="void" />
<argument index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
@@ -55,7 +49,7 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
</member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
+ <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="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 59d7553ef4..30ea2249a3 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" version="4.0">
+<class name="AnimatedSprite3D" inherits="SpriteBase3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
@@ -7,7 +7,7 @@
Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
</description>
<tutorials>
- <link title="2D Sprite animation (also applies to 3D)">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
+ <link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index 808b8bf053..c322db9c37 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedTexture" inherits="Texture2D" version="4.0">
+<class name="AnimatedTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Proxy texture for simple frame-based animations.
</brief_description>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index e3bb60f6de..a92b237624 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" version="4.0">
+<class name="Animation" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Contains data used to animate everything in the engine.
</brief_description>
@@ -28,7 +28,7 @@
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 title="Animation documentation index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
+ <link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link>
</tutorials>
<methods>
<method name="add_track">
@@ -130,6 +130,14 @@
Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
+ <method name="bezier_track_get_key_handle_mode" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="key_idx" type="int" />
+ <description>
+ Returns the handle mode of the key identified by [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track.
+ </description>
+ </method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="track_idx" type="int" />
@@ -161,6 +169,7 @@
<argument index="2" name="value" type="float" />
<argument index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)" />
<argument index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)" />
+ <argument index="5" name="handle_mode" type="int" enum="Animation.HandleMode" default="1" />
<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.
@@ -174,11 +183,22 @@
Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
+ <method name="bezier_track_set_key_handle_mode">
+ <return type="void" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="key_idx" type="int" />
+ <argument index="2" name="key_handle_mode" type="int" enum="Animation.HandleMode" />
+ <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
+ <description>
+ Changes the handle mode of the keyframe at the given [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track.
+ </description>
+ </method>
<method name="bezier_track_set_key_in_handle">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="in_handle" type="Vector2" />
+ <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
<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>
@@ -188,6 +208,7 @@
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="out_handle" type="Vector2" />
+ <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
<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>
@@ -551,8 +572,8 @@
The total length of the animation (in seconds).
[b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
</member>
- <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false">
- A flag indicating that the animation must loop. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
+ <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="Animation.LoopMode" default="0">
+ Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
</member>
<member name="step" type="float" setter="set_step" getter="get_step" default="0.1">
The animation step value.
@@ -610,5 +631,20 @@
<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>
+ <constant name="LOOP_NONE" value="0" enum="LoopMode">
+ At both ends of the animation, the animation will stop playing.
+ </constant>
+ <constant name="LOOP_LINEAR" value="1" enum="LoopMode">
+ At both ends of the animation, the animation will be repeated without changing the playback direction.
+ </constant>
+ <constant name="LOOP_PINGPONG" value="2" enum="LoopMode">
+ Repeats playback and reverse playback at both ends of the animation.
+ </constant>
+ <constant name="HANDLE_MODE_FREE" value="0" enum="HandleMode">
+ Assigning the free handle mode to a Bezier Track's keyframe allows you to edit the keyframe's left and right handles independently from one another.
+ </constant>
+ <constant name="HANDLE_MODE_BALANCED" value="1" enum="HandleMode">
+ Assigning the balanced handle mode to a Bezier Track's keyframe makes it so the two handles of the keyframe always stay aligned when changing either the keyframe's left or right handle.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index 173ff43d2a..99d21706ee 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNode" inherits="Resource" version="4.0">
+<class name="AnimationNode" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base resource for [AnimationTree] nodes.
</brief_description>
<description>
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
- Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
+ Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="_get_caption" qualifiers="virtual const">
@@ -46,7 +46,7 @@
<method name="_has_filter" qualifiers="virtual const">
<return type="bool" />
<description>
- Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
+ Returns whether you want the blend tree editor to display filter editing on this node.
</description>
</method>
<method name="_process" qualifiers="virtual const">
@@ -73,6 +73,7 @@
<argument index="2" name="delta" type="float" />
<argument index="3" name="seeked" type="bool" />
<argument index="4" name="blend" type="float" />
+ <argument index="5" name="pingponged" type="int" default="0" />
<description>
Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened.
</description>
@@ -126,7 +127,7 @@
<return type="bool" />
<argument index="0" name="path" type="NodePath" />
<description>
- Returns [code]true[/code] whether a given path is filtered.
+ Returns whether the given path is filtered.
</description>
</method>
<method name="remove_input">
@@ -149,7 +150,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
- Sets a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes.
+ Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.
</description>
</method>
</methods>
@@ -161,7 +162,7 @@
<signals>
<signal name="removed_from_graph">
<description>
- Called when the node was removed from the graph.
+ Emitted when the node was removed from the graph.
</description>
</signal>
<signal name="tree_changed">
diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml
index 20ee33209b..ca117e3ecd 100644
--- a/doc/classes/AnimationNodeAdd2.xml
+++ b/doc/classes/AnimationNodeAdd2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -7,7 +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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml
index 26738499bb..91e030a6ae 100644
--- a/doc/classes/AnimationNodeAdd3.xml
+++ b/doc/classes/AnimationNodeAdd3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -11,7 +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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<members>
diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml
index 668a35226f..5a8bac1629 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" version="4.0">
+<class name="AnimationNodeAnimation" inherits="AnimationRootNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input animation to use in an [AnimationNodeBlendTree].
</brief_description>
@@ -7,7 +7,7 @@
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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
@@ -15,5 +15,14 @@
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&amp;&quot;&quot;">
Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player].
</member>
+ <member name="play_mode" type="int" setter="set_play_mode" getter="get_play_mode" enum="AnimationNodeAnimation.PlayMode" default="0">
+ Determines the playback direction of the animation.
+ </member>
</members>
+ <constants>
+ <constant name="PLAY_MODE_FORWARD" value="0" enum="PlayMode">
+ </constant>
+ <constant name="PLAY_MODE_BACKWARD" value="1" enum="PlayMode">
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml
index 1f7a4c91c8..f17163e155 100644
--- a/doc/classes/AnimationNodeBlend2.xml
+++ b/doc/classes/AnimationNodeBlend2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -7,7 +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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml
index ed827e2535..6bc7a20823 100644
--- a/doc/classes/AnimationNodeBlend3.xml
+++ b/doc/classes/AnimationNodeBlend3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -11,7 +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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml
index 6e55a79fd2..6ded3a7ff9 100644
--- a/doc/classes/AnimationNodeBlendSpace1D.xml
+++ b/doc/classes/AnimationNodeBlendSpace1D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" version="4.0">
+<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis.
</brief_description>
@@ -10,7 +10,7 @@
You can set the extents of the axis using the [member min_space] and [member max_space].
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_blend_point">
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index 8d51f9aecc..9e0e408ac5 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" version="4.0">
+<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends linearly between three [AnimationNode] of any type placed in a 2D space.
</brief_description>
@@ -9,7 +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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml
index da532dc059..20eb349363 100644
--- a/doc/classes/AnimationNodeBlendTree.xml
+++ b/doc/classes/AnimationNodeBlendTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.0">
+<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
[AnimationTree] node resource that contains many blend type nodes.
</brief_description>
@@ -7,7 +7,7 @@
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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_node">
diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml
index 2ecc0ae07b..727a09e110 100644
--- a/doc/classes/AnimationNodeOneShot.xml
+++ b/doc/classes/AnimationNodeOneShot.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plays an animation once in [AnimationNodeBlendTree].
</brief_description>
@@ -7,22 +7,9 @@
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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- <method name="get_mix_mode" qualifiers="const">
- <return type="int" enum="AnimationNodeOneShot.MixMode" />
- <description>
- </description>
- </method>
- <method name="set_mix_mode">
- <return type="void" />
- <argument index="0" name="mode" type="int" enum="AnimationNodeOneShot.MixMode" />
- <description>
- </description>
- </method>
- </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.
@@ -37,6 +24,8 @@
</member>
<member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.1">
</member>
+ <member name="mix_mode" type="int" setter="set_mix_mode" getter="get_mix_mode" enum="AnimationNodeOneShot.MixMode" default="0">
+ </member>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
</member>
</members>
diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml
index 34c96d13ea..875ca6ac92 100644
--- a/doc/classes/AnimationNodeOutput.xml
+++ b/doc/classes/AnimationNodeOutput.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Generic output node to be added to [AnimationNodeBlendTree].
</brief_description>
<description>
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 17ef565b3a..2cafdf8aaa 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" version="4.0">
+<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
State machine for control of animations.
</brief_description>
@@ -18,7 +18,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_node">
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 15c6c96302..901ab569c8 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.0">
+<class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Playback control for [AnimationNodeStateMachine].
</brief_description>
@@ -18,7 +18,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="get_current_length" qualifiers="const">
@@ -72,6 +72,6 @@
</method>
</methods>
<members>
- <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
</class>
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 763bba6e93..94e6a2f23d 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeStateMachineTransition" inherits="Resource" version="4.0">
+<class name="AnimationNodeStateMachineTransition" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<members>
<member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&amp;&quot;&quot;">
- Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=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]:
+ Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
[codeblocks]
[gdscript]
$animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0))
diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml
index 5b40b39bca..da85d533c4 100644
--- a/doc/classes/AnimationNodeTimeScale.xml
+++ b/doc/classes/AnimationNodeTimeScale.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A time-scaling animation node to be used with [AnimationTree].
</brief_description>
@@ -7,7 +7,7 @@
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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
</class>
diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml
index d927c663c8..0a7da8ba07 100644
--- a/doc/classes/AnimationNodeTimeSeek.xml
+++ b/doc/classes/AnimationNodeTimeSeek.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A time-seeking animation node to be used with [AnimationTree].
</brief_description>
@@ -27,6 +27,6 @@
[/codeblocks]
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index b297832ac0..70c874d251 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0">
+<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A generic animation transition node for [AnimationTree].
</brief_description>
@@ -7,7 +7,7 @@
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 title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 2fd923df85..b1d04ce1f2 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationPlayer" inherits="Node" version="4.0">
+<class name="AnimationPlayer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Container and player of [Animation] resources.
</brief_description>
@@ -9,8 +9,8 @@
Updating the target properties of animations occurs at process time.
</description>
<tutorials>
- <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
- <link title="Animation documentation index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
+ <link title="2D Sprite animation">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
+ <link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/AnimationRootNode.xml b/doc/classes/AnimationRootNode.xml
index 056edbd230..d364c15f77 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" version="4.0">
+<class name="AnimationRootNode" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AnimationTrackEditPlugin.xml b/doc/classes/AnimationTrackEditPlugin.xml
index 4a4c7157d2..85c32cae59 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="RefCounted" version="4.0">
+<class name="AnimationTrackEditPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 40dcd950d7..67e64c6bee 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTree" inherits="Node" version="4.0">
+<class name="AnimationTree" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node to be used for advanced animation transitions in an [AnimationPlayer].
</brief_description>
@@ -8,7 +8,7 @@
[b]Note:[/b] When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
</description>
<tutorials>
- <link title="Using AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index c6a3f87042..1eb74768f5 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" version="4.0">
+<class name="Area2D" inherits="CollisionObject2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D area for detection and physics and audio influence.
</brief_description>
@@ -7,7 +7,7 @@
2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus.
</description>
<tutorials>
- <link title="Using Area2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link>
+ <link title="Using Area2D">$DOCS_URL/tutorials/physics/using_area_2d.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
@@ -31,7 +31,7 @@
<return type="bool" />
<argument index="0" name="area" type="Node" />
<description>
- If [code]true[/code], the given area overlaps the Area2D.
+ Returns [code]true[/code] if the given [Area2D] intersects or overlaps this [Area2D], [code]false[/code] otherwise.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
@@ -39,9 +39,9 @@
<return type="bool" />
<argument index="0" name="body" type="Node" />
<description>
- If [code]true[/code], the given physics body overlaps the Area2D.
+ Returns [code]true[/code] if the given physics body intersects or overlaps this [Area2D], [code]false[/code] otherwise.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
- The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body).
+ The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body.
</description>
</method>
</methods>
@@ -50,6 +50,9 @@
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping.
</member>
+ <member name="angular_damp_space_override" type="int" setter="set_angular_damp_space_override_mode" getter="get_angular_damp_space_override_mode" enum="Area2D.SpaceOverride" default="0">
+ Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&amp;&quot;Master&quot;">
The name of the area's audio bus.
</member>
@@ -57,21 +60,30 @@
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="980.0">
- The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+ The area's gravity intensity (in pixels per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction.
</member>
- <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
- The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+ <member name="gravity_direction" type="Vector2" setter="set_gravity_direction" getter="get_gravity_direction" default="Vector2(0, 1)">
+ The area's gravity vector (not normalized).
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
- If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
+ If [code]true[/code], gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override].
</member>
- <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2(0, 1)">
- The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ <member name="gravity_point_center" type="Vector2" setter="set_gravity_point_center" getter="get_gravity_point_center" default="Vector2(0, 1)">
+ If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ </member>
+ <member name="gravity_point_distance_scale" type="float" setter="set_gravity_point_distance_scale" getter="get_gravity_point_distance_scale" default="0.0">
+ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+ </member>
+ <member name="gravity_space_override" type="int" setter="set_gravity_space_override_mode" getter="get_gravity_space_override_mode" enum="Area2D.SpaceOverride" default="0">
+ Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping.
</member>
+ <member name="linear_damp_space_override" type="int" setter="set_linear_damp_space_override_mode" getter="get_linear_damp_space_override_mode" enum="Area2D.SpaceOverride" default="0">
+ Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true">
If [code]true[/code], other monitoring areas can detect this area.
</member>
@@ -81,9 +93,6 @@
<member name="priority" type="float" setter="set_priority" getter="get_priority" default="0.0">
The area's priority. Higher priority areas are processed first.
</member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.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">
@@ -109,8 +118,8 @@
Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
[code]area[/code] the other Area2D.
- [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="area_shape_exited">
@@ -122,8 +131,8 @@
Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
[code]area[/code] the other Area2D.
- [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_entered">
@@ -149,8 +158,8 @@
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -162,8 +171,8 @@
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index 14225c52a4..7d14fd825b 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Area3D" inherits="CollisionObject3D" version="4.0">
+<class name="Area3D" inherits="CollisionObject3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
3D area for detection and physics and audio influence.
</brief_description>
@@ -29,7 +29,7 @@
<return type="bool" />
<argument index="0" name="area" type="Node" />
<description>
- If [code]true[/code], the given area overlaps the Area3D.
+ Returns [code]true[/code] if the given [Area3D] intersects or overlaps this [Area3D], [code]false[/code] otherwise.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
@@ -37,9 +37,9 @@
<return type="bool" />
<argument index="0" name="body" type="Node" />
<description>
- If [code]true[/code], the given physics body overlaps the Area3D.
+ Returns [code]true[/code] if the given physics body intersects or overlaps this [Area3D], [code]false[/code] otherwise.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
- The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ The [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>
</methods>
@@ -48,6 +48,9 @@
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
+ <member name="angular_damp_space_override" type="int" setter="set_angular_damp_space_override_mode" getter="get_angular_damp_space_override_mode" enum="Area3D.SpaceOverride" default="0">
+ Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&amp;&quot;Master&quot;">
The name of the area's audio bus.
</member>
@@ -55,21 +58,30 @@
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8">
- The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+ The area's gravity intensity (in meters per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction.
</member>
- <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
- The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+ <member name="gravity_direction" type="Vector3" setter="set_gravity_direction" getter="get_gravity_direction" default="Vector3(0, -1, 0)">
+ The area's gravity vector (not normalized).
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
- If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
+ If [code]true[/code], gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override].
+ </member>
+ <member name="gravity_point_center" type="Vector3" setter="set_gravity_point_center" getter="get_gravity_point_center" default="Vector3(0, -1, 0)">
+ If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ </member>
+ <member name="gravity_point_distance_scale" type="float" setter="set_gravity_point_distance_scale" getter="get_gravity_point_distance_scale" default="0.0">
+ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
</member>
- <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3(0, -1, 0)">
- The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ <member name="gravity_space_override" type="int" setter="set_gravity_space_override_mode" getter="get_gravity_space_override_mode" enum="Area3D.SpaceOverride" default="0">
+ Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
</member>
+ <member name="linear_damp_space_override" type="int" setter="set_linear_damp_space_override_mode" getter="get_linear_damp_space_override_mode" enum="Area3D.SpaceOverride" default="0">
+ Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true">
If [code]true[/code], other monitoring areas can detect this area.
</member>
@@ -91,9 +103,6 @@
<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="Area3D.SpaceOverride" default="0">
- Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
- </member>
<member name="wind_attenuation_factor" type="float" setter="set_wind_attenuation_factor" getter="get_wind_attenuation_factor" default="0.0">
The exponential rate at which wind force decreases with distance from its origin.
</member>
@@ -128,8 +137,8 @@
Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
[code]area[/code] the other Area3D.
- [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="area_shape_exited">
@@ -138,11 +147,11 @@
<argument index="2" name="area_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
- Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
+ Emitted when one of another Area3D's [Shape3D]s exits one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
[code]area[/code] the other Area3D.
- [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_entered">
@@ -168,8 +177,8 @@
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -181,8 +190,8 @@
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 8898a59036..6852fb5228 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" version="4.0">
+<class name="Array" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A generic array datatype.
</brief_description>
@@ -44,83 +44,85 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="Array" qualifiers="constructor">
+ <constructors>
+ <constructor name="Array">
<return type="Array" />
<description>
Constructs an empty [Array].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="Array" />
<description>
Constructs an [Array] as a copy of the given [Array].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedByteArray" />
<description>
Constructs an array from a [PackedByteArray].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedColorArray" />
<description>
Constructs an array from a [PackedColorArray].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedFloat32Array" />
<description>
Constructs an array from a [PackedFloat32Array].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedFloat64Array" />
<description>
Constructs an array from a [PackedFloat64Array].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedInt32Array" />
<description>
Constructs an array from a [PackedInt32Array].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedInt64Array" />
<description>
Constructs an array from a [PackedInt64Array].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedStringArray" />
<description>
Constructs an array from a [PackedStringArray].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedVector2Array" />
<description>
Constructs an array from a [PackedVector2Array].
</description>
- </method>
- <method name="Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="Array">
<return type="Array" />
<argument index="0" name="from" type="PackedVector3Array" />
<description>
Constructs an array from a [PackedVector3Array].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="void" />
<argument index="0" name="value" type="Variant" />
@@ -192,7 +194,7 @@
<return type="void" />
<argument index="0" name="value" type="Variant" />
<description>
- Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead.
+ Removes the first occurrence of a value from the array. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
@@ -297,8 +299,8 @@
<method name="hash" qualifiers="const">
<return type="int" />
<description>
- Returns a hashed integer value representing the array and its contents.
- [b]Note:[/b] Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value.
+ Returns a hashed 32-bit integer value representing the array and its contents.
+ [b]Note:[/b] [Array]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] imply the arrays are equal, because different arrays can have identical hash values due to hash collisions.
</description>
</method>
<method name="insert">
@@ -345,64 +347,6 @@
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Array" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Array" />
- <argument index="0" name="right" type="Array" />
- <description>
- </description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Array" />
- <description>
- </description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Array" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Array" />
- <description>
- </description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Array" />
- <description>
- </description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Array" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="void" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="pop_at">
<return type="Variant" />
<argument index="0" name="position" type="int" />
@@ -456,7 +400,7 @@
[/codeblock]
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="position" type="int" />
<description>
@@ -501,11 +445,15 @@
<method name="slice" qualifiers="const">
<return type="Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<argument index="2" name="step" type="int" default="1" />
<argument index="3" name="deep" type="bool" default="false" />
<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. Wraps around if [code]begin[/code] or [code]end[/code] are out of bounds or negative. Returns an empty array for invalid parameters.
+ Returns the slice of the [Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ If specified, [code]step[/code] is the relative index between source elements. It can be negative, then [code]begin[/code] must be higher than [code]end[/code]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code]).
+ If [code]deep[/code] is true, each element will be copied by value rather than by reference.
</description>
</method>
<method name="sort">
@@ -523,6 +471,12 @@
// There is no sort support for Godot.Collections.Array
[/csharp]
[/codeblocks]
+ To perform natural order sorting, you can use [method sort_custom] with [method String.naturalnocasecmp_to] as follows:
+ [codeblock]
+ var strings = ["string1", "string2", "string10", "string11"]
+ strings.sort_custom(func(a, b): return a.naturalnocasecmp_to(b) &lt; 0)
+ print(strings) # Prints [string1, string2, string10, string11]
+ [/codeblock]
</description>
</method>
<method name="sort_custom">
@@ -533,15 +487,19 @@
[b]Note:[/b] You cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblocks]
[gdscript]
- class MyCustomSorter:
- static func sort_ascending(a, b):
- if a[0] &lt; b[0]:
- return true
- return false
+ func sort_ascending(a, b):
+ if a[0] &lt; b[0]:
+ return true
+ return false
+
+ func _ready():
+ var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
+ my_items.sort_custom(sort_ascending)
+ print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
- var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
- my_items.sort_custom(MyCustomSorter.sort_ascending)
- print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
+ # Descending, lambda version.
+ my_items.sort_custom(func(a, b): return a[0] &gt; b[0])
+ print(my_items) # Prints [[9, Rice], [5, Potato], [4, Tomato]].
[/gdscript]
[csharp]
// There is no custom sort support for Godot.Collections.Array
@@ -550,4 +508,64 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Array" />
+ <argument index="0" name="right" type="Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 7b77462322..0f2dd6587a 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ArrayMesh" inherits="Mesh" version="4.0">
+<class name="ArrayMesh" inherits="Mesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
[Mesh] type that provides utility for constructing a surface from arrays.
</brief_description>
@@ -47,7 +47,7 @@
[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 title="Procedural geometry using the ArrayMesh">https://docs.godotengine.org/en/latest/tutorials/3d/procedural_geometry/arraymesh.html</link>
+ <link title="Procedural geometry using the ArrayMesh">$DOCS_URL/tutorials/3d/procedural_geometry/arraymesh.html</link>
</tutorials>
<methods>
<method name="add_blend_shape">
@@ -62,8 +62,7 @@
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<argument index="1" name="arrays" type="Array" />
<argument index="2" name="blend_shapes" type="Array" default="[]" />
- <argument index="3" name="lods" type="Dictionary" default="{
-}" />
+ <argument index="3" name="lods" type="Dictionary" default="{}" />
<argument index="4" name="compress_flags" type="int" default="0" />
<description>
Creates a new surface.
diff --git a/doc/classes/ArrayOccluder3D.xml b/doc/classes/ArrayOccluder3D.xml
new file mode 100644
index 0000000000..7f6bf93c8f
--- /dev/null
+++ b/doc/classes/ArrayOccluder3D.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ArrayOccluder3D" inherits="Occluder3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ 3D polygon shape for use with occlusion culling in [OccluderInstance3D].
+ </brief_description>
+ <description>
+ [ArrayOccluder3D] stores an arbitrary 3D polygon shape that can be used by the engine's occlusion culling system. This is analogous to [ArrayMesh], but for occluders.
+ See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_arrays">
+ <return type="void" />
+ <argument index="0" name="vertices" type="PackedVector3Array" />
+ <argument index="1" name="indices" type="PackedInt32Array" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()">
+ </member>
+ <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/AspectRatioContainer.xml b/doc/classes/AspectRatioContainer.xml
index 4c0af0b997..742a7276d4 100644
--- a/doc/classes/AspectRatioContainer.xml
+++ b/doc/classes/AspectRatioContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AspectRatioContainer" inherits="Container" version="4.0">
+<class name="AspectRatioContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Container that preserves its child controls' aspect ratio.
</brief_description>
@@ -9,10 +9,10 @@
<tutorials>
</tutorials>
<members>
- <member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignMode" default="1">
+ <member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignmentMode" default="1">
Specifies the horizontal relative position of child controls.
</member>
- <member name="alignment_vertical" type="int" setter="set_alignment_vertical" getter="get_alignment_vertical" enum="AspectRatioContainer.AlignMode" default="1">
+ <member name="alignment_vertical" type="int" setter="set_alignment_vertical" getter="get_alignment_vertical" enum="AspectRatioContainer.AlignmentMode" default="1">
Specifies the vertical relative position of child controls.
</member>
<member name="ratio" type="float" setter="set_ratio" getter="get_ratio" default="1.0">
@@ -34,15 +34,15 @@
</constant>
<constant name="STRETCH_COVER" value="3" enum="StretchMode">
The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio.
- When the bounding rectangle of child controls exceed the container's size and [member Control.rect_clip_content] is enabled, this allows to show only the container's area restricted by its own bounding rectangle.
+ When the bounding rectangle of child controls exceed the container's size and [member Control.clip_contents] is enabled, this allows to show only the container's area restricted by its own bounding rectangle.
</constant>
- <constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
+ <constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode">
Aligns child controls with the beginning (left or top) of the container.
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="AlignMode">
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
Aligns child controls with the center of the container.
</constant>
- <constant name="ALIGN_END" value="2" enum="AlignMode">
+ <constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
Aligns child controls with the end (right or bottom) of the container.
</constant>
</constants>
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index 3435bbec59..759acff773 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AtlasTexture" inherits="Texture2D" version="4.0">
+<class name="AtlasTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Crops out one part of a texture, such as a texture from a texture atlas.
</brief_description>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
index b7e8d8932c..d7d7a0eb17 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" version="4.0">
+<class name="AudioBusLayout" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Stores information about the audio buses.
</brief_description>
diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml
index fd2bab073f..5bfa5be0ca 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" version="4.0">
+<class name="AudioEffect" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Audio effect for audio.
</brief_description>
@@ -9,4 +9,11 @@
<tutorials>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
+ <methods>
+ <method name="_instantiate" qualifiers="virtual">
+ <return type="AudioEffectInstance" />
+ <description>
+ </description>
+ </method>
+ </methods>
</class>
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
index 7fcfe24d97..7ae0b06dad 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" version="4.0">
+<class name="AudioEffectAmplify" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds an amplifying audio effect to an audio bus.
Increases or decreases the volume of the selected audio bus.
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index ed0a33deb1..3635f122f2 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" version="4.0">
+<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 642b70428e..5e7713f3d4 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" version="4.0">
+<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a band pass filter to the audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
index 6aecaa170a..5ab4403be5 100644
--- a/doc/classes/AudioEffectCapture.xml
+++ b/doc/classes/AudioEffectCapture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectCapture" inherits="AudioEffect" version="4.0">
+<class name="AudioEffectCapture" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Captures audio from an audio bus in real-time.
</brief_description>
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
index e3ab141e3d..ca04126da4 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" version="4.0">
+<class name="AudioEffectChorus" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a chorus audio effect.
</brief_description>
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 28a5587377..5ad948feba 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" version="4.0">
+<class name="AudioEffectCompressor" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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.
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index 96bd43bc3b..8a95e315cd 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" version="4.0">
+<class name="AudioEffectDelay" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 600ca93028..6bd8522459 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" version="4.0">
+<class name="AudioEffectDistortion" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a distortion audio effect to an Audio bus.
Modify the sound to make it distorted.
@@ -9,7 +9,7 @@
By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently.
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="drive" type="float" setter="set_drive" getter="get_drive" default="0.0">
diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
index 9d84f87cbe..908ae956ed 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" version="4.0">
+<class name="AudioEffectEQ" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 be89a0c4d6..0b03ea99dd 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" version="4.0">
+<class name="AudioEffectEQ10" inherits="AudioEffectEQ" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 0b1a8b2a1d..6861a74596 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" version="4.0">
+<class name="AudioEffectEQ21" inherits="AudioEffectEQ" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 9f7efad375..5aea8efaa9 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" version="4.0">
+<class name="AudioEffectEQ6" inherits="AudioEffectEQ" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 5b43646077..07c9339653 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" version="4.0">
+<class name="AudioEffectFilter" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a filter to the audio bus.
</brief_description>
@@ -7,7 +7,7 @@
Allows frequencies other than the [member cutoff_hz] to pass.
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" default="2000.0">
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index e1bd7a3ff5..02d8dbfffc 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" version="4.0">
+<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a high-pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index c572824448..bb5cf5c4a0 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0">
+<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz].
</brief_description>
<description>
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml
index f9836226fc..f50246d6ca 100644
--- a/doc/classes/AudioEffectInstance.xml
+++ b/doc/classes/AudioEffectInstance.xml
@@ -1,9 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectInstance" inherits="RefCounted" version="4.0">
+<class name="AudioEffectInstance" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="_process" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="src_buffer" type="const void*" />
+ <argument index="1" name="dst_buffer" type="AudioFrame*" />
+ <argument index="2" name="frame_count" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_process_silence" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ </methods>
</class>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index 813429e42f..3fd099b55e 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" version="4.0">
+<class name="AudioEffectLimiter" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 ece2e57c96..8a9ca04354 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" version="4.0">
+<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a low-pass filter to the Audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index e78dbf9732..04cc1ab1d8 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0">
+<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz].
</brief_description>
<description>
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index f5e4abae96..a2cc764003 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" version="4.0">
+<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 858c48c3b6..1dd2d9fa27 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" version="4.0">
+<class name="AudioEffectPanner" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a panner audio effect to an Audio bus. Pans sound left or right.
</brief_description>
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
index 2855d12d51..9c10052b6a 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" version="4.0">
+<class name="AudioEffectPhaser" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a phaser audio effect to an Audio bus.
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 0c323fd85c..aab380aa72 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" version="4.0">
+<class name="AudioEffectPitchShift" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a pitch-shifting audio effect to an Audio bus.
Raises or lowers the pitch of original sound.
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index b32206726d..9728011bb2 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectRecord" inherits="AudioEffect" version="4.0">
+<class name="AudioEffectRecord" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Audio effect used for recording sound from a microphone.
+ Audio effect used for recording the sound from an audio bus.
</brief_description>
<description>
- Allows the user to record sound from a microphone. It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample.
+ Allows the user to record the sound from an audio bus. This can include all audio output by Godot when used on the "Master" audio bus.
+ Can be used (with an [AudioStreamMicrophone]) to record from a microphone.
+ It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample.
</description>
<tutorials>
- <link title="Recording with microphone">https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link>
+ <link title="Recording with microphone">$DOCS_URL/tutorials/audio/recording_with_microphone.html</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
<methods>
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index d931720e88..5525102806 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" version="4.0">
+<class name="AudioEffectReverb" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a reverberation audio effect to an Audio bus.
Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml
index b2f2c55aa2..f4bed6af19 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" version="4.0">
+<class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Audio effect that can be used for real-time audio visualizations.
</brief_description>
@@ -8,8 +8,8 @@
See also [AudioStreamGenerator] for procedurally generating sounds.
</description>
<tutorials>
- <link title="https://godotengine.org/asset-library/asset/528">Audio Spectrum Demo</link>
- <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
+ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
+ <link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0">
diff --git a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml
index 0febf2abc1..08dd5a5d69 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" version="4.0">
+<class name="AudioEffectSpectrumAnalyzerInstance" inherits="AudioEffectInstance" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
index e82892f355..ff176c6ad8 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" version="4.0">
+<class name="AudioEffectStereoEnhance" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioListener2D.xml b/doc/classes/AudioListener2D.xml
index a7cdd0348c..de08ec8232 100644
--- a/doc/classes/AudioListener2D.xml
+++ b/doc/classes/AudioListener2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioListener2D" inherits="Node2D" version="4.0">
+<class name="AudioListener2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Overrides the location sounds are heard from.
</brief_description>
diff --git a/doc/classes/AudioListener3D.xml b/doc/classes/AudioListener3D.xml
index 4a56071b57..c1d716b076 100644
--- a/doc/classes/AudioListener3D.xml
+++ b/doc/classes/AudioListener3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioListener3D" inherits="Node3D" version="4.0">
+<class name="AudioListener3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Overrides the location sounds are heard from.
</brief_description>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 66fa57cb52..1e076654fb 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioServer" inherits="Object" version="4.0">
+<class name="AudioServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server interface for low-level audio access.
</brief_description>
@@ -7,7 +7,7 @@
[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 title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
<link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
@@ -29,25 +29,12 @@
Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code].
</description>
</method>
- <method name="capture_get_device">
- <return type="String" />
- <description>
- Name of the current device for audio input (see [method capture_get_device_list]).
- </description>
- </method>
<method name="capture_get_device_list">
<return type="Array" />
<description>
Returns the names of all audio input devices detected on the system.
</description>
</method>
- <method name="capture_set_device">
- <return type="void" />
- <argument index="0" name="name" type="String" />
- <description>
- Sets which audio input device is used for audio capture.
- </description>
- </method>
<method name="generate_bus_layout" qualifiers="const">
<return type="AudioBusLayout" />
<description>
@@ -308,8 +295,11 @@
<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;Default&quot;">
+ Name of the current device for audio input (see [method get_device_list]). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value [code]"Default"[/code] will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to [code]"Default"[/code].
+ </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]).
+ Name of the current device for audio output (see [method get_device_list]). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value [code]"Default"[/code] will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to [code]"Default"[/code].
</member>
<member name="playback_speed_scale" type="float" setter="set_playback_speed_scale" getter="get_playback_speed_scale" default="1.0">
Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played at half its speed).
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index cff7199c4a..6343da6eed 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" version="4.0">
+<class name="AudioStream" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for audio streams.
</brief_description>
@@ -7,7 +7,7 @@
Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats.
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
@@ -39,6 +39,12 @@
Returns the length of the audio stream in seconds.
</description>
</method>
+ <method name="instance_playback">
+ <return type="AudioStreamPlayback" />
+ <description>
+ Returns an AudioStreamPlayback. Useful for when you want to extend `_instance_playback` but call `instance_playback` from an internally held AudioStream subresource. An example of this can be found in the source files for `AudioStreamRandomPitch::instance_playback`.
+ </description>
+ </method>
<method name="is_monophonic" qualifiers="const">
<return type="bool" />
<description>
diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml
index 05406846ce..c8f081215d 100644
--- a/doc/classes/AudioStreamGenerator.xml
+++ b/doc/classes/AudioStreamGenerator.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamGenerator" inherits="AudioStream" version="4.0">
+<class name="AudioStreamGenerator" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Audio stream that generates sounds procedurally.
</brief_description>
<description>
This audio stream does not play back sounds, but expects a script to generate audio data for it instead. See also [AudioStreamGeneratorPlayback].
See also [AudioEffectSpectrumAnalyzer] for performing real-time audio spectrum analysis.
- [b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDNative. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz.
+ [b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
- <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
+ <link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5">
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index 7520d5d97a..06c285bff7 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" version="4.0">
+<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plays back audio generated using [AudioStreamGenerator].
</brief_description>
@@ -8,7 +8,7 @@
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
- <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
+ <link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<methods>
<method name="can_push_buffer" qualifiers="const">
@@ -39,14 +39,14 @@
<return type="bool" />
<argument index="0" name="frames" type="PackedVector2Array" />
<description>
- Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDNative, but [method push_buffer] may be [i]less[/i] efficient in GDScript.
+ Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDExtension, but [method push_buffer] may be [i]less[/i] efficient in GDScript.
</description>
</method>
<method name="push_frame">
<return type="bool" />
<argument index="0" name="frame" type="Vector2" />
<description>
- Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDNative, but [method push_frame] may be [i]more[/i] efficient in GDScript.
+ Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDExtension, but [method push_frame] may be [i]more[/i] efficient in GDScript.
</description>
</method>
</methods>
diff --git a/doc/classes/AudioStreamMicrophone.xml b/doc/classes/AudioStreamMicrophone.xml
index 13b0c2cd67..e760bd526a 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" version="4.0">
+<class name="AudioStreamMicrophone" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index bcf0b55b31..1909c4b621 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="RefCounted" version="4.0">
+<class name="AudioStreamPlayback" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Meta class for playing back audio.
</brief_description>
diff --git a/doc/classes/AudioStreamPlaybackResampled.xml b/doc/classes/AudioStreamPlaybackResampled.xml
index d60d1acb7a..eb41e4256e 100644
--- a/doc/classes/AudioStreamPlaybackResampled.xml
+++ b/doc/classes/AudioStreamPlaybackResampled.xml
@@ -1,9 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" version="4.0">
+<class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="_get_stream_sampling_rate" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_mix_resampled" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="dst_buffer" type="AudioFrame*" />
+ <argument index="1" name="frame_count" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="begin_resample">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ </methods>
</class>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index b692ae858e..26fe1278f7 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" version="4.0">
+<class name="AudioStreamPlayer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plays back audio non-positionally.
</brief_description>
@@ -8,7 +8,7 @@
To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer].
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 9c76eefbf9..7d0470f396 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" version="4.0">
+<class name="AudioStreamPlayer2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plays positional sound in 2D space.
</brief_description>
@@ -9,7 +9,7 @@
[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
</tutorials>
<methods>
<method name="get_playback_position">
@@ -47,7 +47,7 @@
</methods>
<members>
<member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" default="1">
- Areas in which this sound plays.
+ Determines which [Area2D] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater.
</member>
<member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0">
Dampens audio over distance with this as an exponent.
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index e8a78d5a4c..8356596f54 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="Node3D" version="4.0">
+<class name="AudioStreamPlayer3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plays positional sound in 3D space.
</brief_description>
@@ -10,7 +10,7 @@
[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
</tutorials>
<methods>
<method name="get_playback_position">
@@ -48,7 +48,7 @@
</methods>
<members>
<member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" default="1">
- Areas in which this sound plays.
+ Determines which [Area3D] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater.
</member>
<member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz" default="5000.0">
Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to [code]20500[/code] as this frequency is above the human hearing limit.
diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml
deleted file mode 100644
index 0f580699e9..0000000000
--- a/doc/classes/AudioStreamRandomPitch.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamRandomPitch" inherits="AudioStream" version="4.0">
- <brief_description>
- Plays audio with random pitch shifting.
- </brief_description>
- <description>
- Randomly varies pitch on each start.
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream">
- The current [AudioStream].
- </member>
- <member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch" default="1.1">
- The intensity of random pitch variation.
- </member>
- </members>
-</class>
diff --git a/doc/classes/AudioStreamRandomizer.xml b/doc/classes/AudioStreamRandomizer.xml
new file mode 100644
index 0000000000..0eb733582a
--- /dev/null
+++ b/doc/classes/AudioStreamRandomizer.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamRandomizer" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Wraps a pool of audio streams with pitch and volume shifting.
+ </brief_description>
+ <description>
+ Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_stream">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Insert a stream at the specified index.
+ </description>
+ </method>
+ <method name="get_stream" qualifiers="const">
+ <return type="AudioStream" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the stream at the specified index.
+ </description>
+ </method>
+ <method name="get_stream_probability_weight" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the probability weight associated with the stream at the given index.
+ </description>
+ </method>
+ <method name="move_stream">
+ <return type="void" />
+ <argument index="0" name="index_from" type="int" />
+ <argument index="1" name="index_to" type="int" />
+ <description>
+ Move a stream from one index to another.
+ </description>
+ </method>
+ <method name="remove_stream">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Remove the stream at the specified index.
+ </description>
+ </method>
+ <method name="set_stream">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <argument index="1" name="stream" type="AudioStream" />
+ <description>
+ Set the AudioStream at the specified index.
+ </description>
+ </method>
+ <method name="set_stream_probability_weight">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <argument index="1" name="weight" type="float" />
+ <description>
+ Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="playback_mode" type="int" setter="set_playback_mode" getter="get_playback_mode" enum="AudioStreamRandomizer.PlaybackMode" default="0">
+ Controls how this AudioStreamRandomizer picks which AudioStream to play next.
+ </member>
+ <member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch" default="1.1">
+ The intensity of random pitch variation. A value of 1 means no variation.
+ </member>
+ <member name="random_volume_offset_db" type="float" setter="set_random_volume_offset_db" getter="get_random_volume_offset_db" default="5.0">
+ The intensity of random volume variation. A value of 0 means no variation.
+ </member>
+ <member name="streams_count" type="int" setter="set_streams_count" getter="get_streams_count" default="0">
+ The number of streams in the stream pool.
+ </member>
+ </members>
+ <constants>
+ <constant name="PLAYBACK_RANDOM_NO_REPEATS" value="0" enum="PlaybackMode">
+ Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible.
+ </constant>
+ <constant name="PLAYBACK_RANDOM" value="1" enum="PlaybackMode">
+ Pick a stream at random according to the probability weights chosen for each stream.
+ </constant>
+ <constant name="PLAYBACK_SEQUENTIAL" value="2" enum="PlaybackMode">
+ Play streams in the order they appear in the stream pool.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index 7e1155d89b..62f27ce876 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" version="4.0">
+<class name="AudioStreamSample" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Stores audio data loaded from WAV files.
</brief_description>
@@ -61,7 +61,7 @@
<constant name="LOOP_FORWARD" value="1" enum="LoopMode">
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">
+ <constant name="LOOP_PINGPONG" value="2" enum="LoopMode">
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">
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 6f1dd9fc76..3c811e6226 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BackBufferCopy" inherits="Node2D" version="4.0">
+<class name="BackBufferCopy" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 889c703b07..8e73a0dd91 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" version="4.0">
+<class name="BaseButton" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for different kinds of buttons.
</brief_description>
@@ -38,7 +38,7 @@
<return type="void" />
<argument index="0" name="pressed" type="bool" />
<description>
- Changes the [member pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is [code]true[/code].
+ Changes the [member button_pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is [code]true[/code].
[b]Note:[/b] This method doesn't unpress other buttons in [member button_group].
</description>
</method>
@@ -50,22 +50,22 @@
<member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
The [ButtonGroup] associated with the button. Not to be confused with node groups.
</member>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="1">
Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code].
</member>
+ <member name="button_pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
+ If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code].
+ [b]Note:[/b] Setting [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal].
+ </member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false">
If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
[b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value.
</member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
- If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code].
- [b]Note:[/b] Setting [member pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal].
- </member>
<member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut">
[Shortcut] associated to the button.
</member>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 818ab50030..ae7b0afaa7 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BaseMaterial3D" inherits="Material" version="4.0">
+<class name="BaseMaterial3D" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Default 3D rendering material.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Standard Material 3D">https://docs.godotengine.org/en/latest/tutorials/3d/standard_material_3d.html</link>
+ <link title="Standard Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
<methods>
<method name="get_feature" qualifiers="const">
@@ -79,13 +79,16 @@
Threshold at which the alpha scissor will discard values.
</member>
<member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy" default="0.0">
- The strength of the anisotropy effect.
+ The strength of the anisotropy effect. This is multiplied by [member anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel.
</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.
+ If [code]true[/code], anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections.
+ [b]Note:[/b] Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.
+ [b]Note:[/b] Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting [member texture_filter] to [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC].
</member>
<member name="anisotropy_flowmap" type="Texture2D" setter="set_texture" getter="get_texture">
- Texture that offsets the tangent map for anisotropy calculations.
+ Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion.
+ If present, the texture's alpha channel will be used to multiply the strength of the [member anisotropy] effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored.
</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].
@@ -129,14 +132,14 @@
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.
[b]Note:[/b] Clearcoat rendering is not visible if the material's [member shading_mode] is [constant SHADING_MODE_UNSHADED].
</member>
- <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss" default="0.5">
- 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 name="clearcoat_roughness" type="float" setter="set_clearcoat_roughness" getter="get_clearcoat_roughness" default="0.5">
+ Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother 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].
+ Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. 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].
@@ -155,7 +158,7 @@
</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.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV" default="0">
Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.
@@ -252,7 +255,7 @@
<member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh].
[b]Note:[/b] The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with [SurfaceTool], you can use [method SurfaceTool.generate_normals] and [method SurfaceTool.generate_tangents] to automatically generate normals and tangents respectively.
- [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
+ [b]Note:[/b] 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>
@@ -316,6 +319,7 @@
</member>
<member name="specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="BaseMaterial3D.SpecularMode" default="0">
The method for rendering the specular blob. See [enum SpecularMode].
+ [b]Note:[/b] Only applies to the specular blob. Does not affect specular reflections from the Sky, SSR, or ReflectionProbes.
</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.
@@ -576,10 +580,10 @@
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.
+ Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes this means that only the exterior of the mesh will be visible.
</constant>
<constant name="CULL_FRONT" value="1" enum="CullMode">
- The front of the object is culled when not visible.
+ Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes this means that the interior of the mesh will be drawn instead of the exterior.
</constant>
<constant name="CULL_DISABLED" value="2" enum="CullMode">
No culling is performed.
@@ -661,16 +665,10 @@
<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">
+ <constant name="SPECULAR_TOON" value="1" enum="SpecularMode">
Toon blob which changes size based on roughness.
</constant>
- <constant name="SPECULAR_DISABLED" value="4" enum="SpecularMode">
+ <constant name="SPECULAR_DISABLED" value="2" enum="SpecularMode">
No specular blob.
</constant>
<constant name="BILLBOARD_DISABLED" value="0" enum="BillboardMode">
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 6215c658c3..f31e962632 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" version="4.0">
+<class name="Basis" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
3×3 matrix datatype.
</brief_description>
@@ -10,44 +10,44 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
- <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Matrices and transforms">$DOCS_URL/tutorials/math/matrices_and_transforms.html</link>
+ <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
<link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
- <methods>
- <method name="Basis" qualifiers="constructor">
+ <constructors>
+ <constructor name="Basis">
<return type="Basis" />
<description>
Constructs a default-initialized [Basis] set to [constant IDENTITY].
</description>
- </method>
- <method name="Basis" qualifiers="constructor">
+ </constructor>
+ <constructor name="Basis">
<return type="Basis" />
<argument index="0" name="from" type="Basis" />
<description>
Constructs a [Basis] as a copy of the given [Basis].
</description>
- </method>
- <method name="Basis" qualifiers="constructor">
+ </constructor>
+ <constructor name="Basis">
<return type="Basis" />
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="phi" type="float" />
<description>
Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector.
</description>
- </method>
- <method name="Basis" qualifiers="constructor">
+ </constructor>
+ <constructor name="Basis">
<return type="Basis" />
<argument index="0" name="from" type="Quaternion" />
<description>
Constructs a pure rotation basis matrix from the given quaternion.
</description>
- </method>
- <method name="Basis" qualifiers="constructor">
+ </constructor>
+ <constructor name="Basis">
<return type="Basis" />
<argument index="0" name="x_axis" type="Vector3" />
<argument index="1" name="y_axis" type="Vector3" />
@@ -55,7 +55,9 @@
<description>
Constructs a basis matrix from 3 axis vectors (matrix columns).
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="determinant" qualifiers="const">
<return type="float" />
<description>
@@ -125,60 +127,6 @@
The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [code]target[/code] and [code]up[/code] vectors cannot be zero, and cannot be parallel to each other.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Basis" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Basis" />
- <argument index="0" name="right" type="Basis" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Basis" />
- <argument index="0" name="right" type="float" />
- <description>
- This operator multiplies all components of the [Basis], which scales it uniformly.
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Basis" />
- <argument index="0" name="right" type="int" />
- <description>
- This operator multiplies all components of the [Basis], which scales it uniformly.
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Basis" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="orthonormalized" qualifiers="const">
<return type="Basis" />
<description>
@@ -274,4 +222,67 @@
The basis that will flip something along the Z axis when used in a transformation.
</constant>
</constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Basis" />
+ <description>
+ Returns [code]true[/code] if the [Basis] matrices are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Basis" />
+ <argument index="0" name="right" type="Basis" />
+ <description>
+ Composes these two basis matrices by multiplying them together. This has the effect of transforming the second basis (the child) by the first basis (the parent).
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Transforms (multiplies) the [Vector3] by the given [Basis] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Basis" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ This operator multiplies all components of the [Basis], which scales it uniformly.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Basis" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ This operator multiplies all components of the [Basis], which scales it uniformly.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Basis" />
+ <description>
+ Returns [code]true[/code] if the [Basis] matrices are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Vector3" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Access basis components using their index. [code]b[0][/code] is equivalent to [code]b.x[/code], [code]b[1][/code] is equivalent to [code]b.y[/code], and [code]b[2][/code] is equivalent to [code]b.z[/code].
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 0997896260..f248bec15f 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" version="4.0">
+<class name="BitMap" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Boolean matrix.
</brief_description>
@@ -9,6 +9,12 @@
<tutorials>
</tutorials>
<methods>
+ <method name="convert_to_image" qualifiers="const">
+ <return type="Image" />
+ <description>
+ Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [code]FORMAT_L8[/code]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black.
+ </description>
+ </method>
<method name="create">
<return type="void" />
<argument index="0" name="size" type="Vector2" />
@@ -48,7 +54,7 @@
<argument index="0" name="pixels" type="int" />
<argument index="1" name="rect" type="Rect2" />
<description>
- Applies morphological dilation to the bitmap. The first argument is the dilation amount, Rect2 is the area where the dilation will be applied.
+ Applies morphological dilation or erosion to the bitmap. If [code]pixels[/code] is positive, dilation is applied to the bitmap. If [code]pixels[/code] is negative, erosion is applied to the bitmap. [code]rect[/code] defines the area where the morphological operation is applied. Pixels located outside the [code]rect[/code] are unaffected by [method grow_mask].
</description>
</method>
<method name="opaque_to_polygons" qualifiers="const">
@@ -64,6 +70,13 @@
[code]epsilon[/code] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [code]epsilon[/code] corresponds to more points in the polygons.
</description>
</method>
+ <method name="resize">
+ <return type="void" />
+ <argument index="0" name="new_size" type="Vector2" />
+ <description>
+ Resizes the image to [code]new_size[/code].
+ </description>
+ </method>
<method name="set_bit">
<return type="void" />
<argument index="0" name="position" type="Vector2" />
diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml
index ef0778682f..1e09e90d4a 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" version="4.0">
+<class name="Bone2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Joint used with [Skeleton2D] to control and animate other nodes.
</brief_description>
diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml
index a1670430e6..bb4b45cd48 100644
--- a/doc/classes/BoneAttachment3D.xml
+++ b/doc/classes/BoneAttachment3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoneAttachment3D" inherits="Node3D" version="4.0">
+<class name="BoneAttachment3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node that will attach to a bone.
</brief_description>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index ec81b866f6..92fccaa884 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxContainer" inherits="Container" version="4.0">
+<class name="BoxContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for box containers.
</brief_description>
@@ -18,19 +18,16 @@
</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]).
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignmentMode" default="0">
+ The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]).
</member>
</members>
<constants>
- <constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
- Aligns children with the beginning of the container.
+ <constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="AlignMode">
- Aligns children with the center of the container.
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_END" value="2" enum="AlignMode">
- Aligns children with the end of the container.
+ <constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
</constant>
</constants>
</class>
diff --git a/doc/classes/BoxMesh.xml b/doc/classes/BoxMesh.xml
index af3365b6ea..84e6d6f87d 100644
--- a/doc/classes/BoxMesh.xml
+++ b/doc/classes/BoxMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxMesh" inherits="PrimitiveMesh" version="4.0">
+<class name="BoxMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Generate an axis-aligned box [PrimitiveMesh].
</brief_description>
@@ -11,7 +11,7 @@
<tutorials>
</tutorials>
<members>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)">
The box's width, height and depth.
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0">
diff --git a/doc/classes/BoxOccluder3D.xml b/doc/classes/BoxOccluder3D.xml
new file mode 100644
index 0000000000..f65ac2881a
--- /dev/null
+++ b/doc/classes/BoxOccluder3D.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BoxOccluder3D" inherits="Occluder3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Cuboid shape for use with occlusion culling in [OccluderInstance3D].
+ </brief_description>
+ <description>
+ [BoxOccluder3D] stores a cuboid shape that can be used by the engine's occlusion culling system.
+ See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)">
+ The box's size in 3D units.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml
index 3bfded6512..154af1221f 100644
--- a/doc/classes/BoxShape3D.xml
+++ b/doc/classes/BoxShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxShape3D" inherits="Shape3D" version="4.0">
+<class name="BoxShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Box shape resource.
</brief_description>
@@ -12,7 +12,7 @@
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
<members>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)">
The box's width, height and depth.
</member>
</members>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index ba55fda59c..af9724af08 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" version="4.0">
+<class name="Button" inherits="BaseButton" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Standard themed Button.
</brief_description>
@@ -64,8 +64,8 @@
</method>
</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 [enum TextAlign] constants.
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" enum="HorizontalAlignment" default="1">
+ Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants.
</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.
@@ -78,9 +78,10 @@
</member>
<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.
+ To edit margin and spacing of the icon, use [theme_item hseparation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es.
</member>
- <member name="icon_align" type="int" setter="set_icon_align" getter="get_icon_align" enum="Button.TextAlign" default="0">
- Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum TextAlign] constants as the text alignment. If centered, text will draw on top of the icon.
+ <member name="icon_alignment" type="int" setter="set_icon_alignment" getter="get_icon_alignment" enum="HorizontalAlignment" default="0">
+ Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum @GlobalScope.HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon.
</member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
@@ -92,37 +93,17 @@
Base text writing direction.
</member>
</members>
- <constants>
- <constant name="ALIGN_LEFT" value="0" enum="TextAlign">
- Align the text to the left.
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="TextAlign">
- Align the text to the center.
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TextAlign">
- Align the text to the right.
- </constant>
- </constants>
<theme_items>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [Button] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" 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" data_type="font" type="Font">
- [Font] of the [Button]'s text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [Button].
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Text [Color] used when the [Button] is disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [Button] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -134,16 +115,7 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [Button] is being pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [Button]'s text.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- [StyleBox] used when the [Button] is being hovered.
- </theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="2">
- The horizontal space between [Button]'s icon and text.
- </theme_item>
- <theme_item name="icon_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="icon_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.4)">
Icon modulate [Color] used when the [Button] is disabled.
</theme_item>
<theme_item name="icon_focus_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -161,12 +133,30 @@
<theme_item name="icon_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being pressed.
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Default [StyleBox] for the [Button].
+ <theme_item name="hseparation" data_type="constant" type="int" default="2">
+ The horizontal space between [Button]'s icon and text.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [Button]'s text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [Button]'s text.
+ </theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Button] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Button] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Button] is being hovered.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Default [StyleBox] for the [Button].
+ </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being pressed.
</theme_item>
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index 9229e69fa7..a887404932 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" version="4.0">
+<class name="ButtonGroup" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Group of Buttons.
</brief_description>
@@ -24,11 +24,11 @@
</method>
</methods>
<members>
- <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
<signals>
<signal name="pressed">
- <argument index="0" name="button" type="Object" />
+ <argument index="0" name="button" type="BaseButton" />
<description>
Emitted when one of the buttons of the group is pressed.
</description>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index 9226140c1a..4a7ffe1536 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CPUParticles2D" inherits="Node2D" version="4.0">
+<class name="CPUParticles2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
CPU-based 2D particle emitter.
</brief_description>
@@ -8,7 +8,7 @@
See also [GPUParticles2D], which provides the same functionality with hardware acceleration, but may not run on older devices.
</description>
<tutorials>
- <link title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link>
+ <link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link>
</tutorials>
<methods>
<method name="convert_from_particles">
@@ -116,6 +116,9 @@
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If [member texture] is defined, it will be multiplied by this color.
</member>
+ <member name="color_initial_ramp" type="Gradient" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
+ Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ </member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [Gradient] (multiplied with [member color]).
</member>
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index fe8c354427..7152f67f48 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CPUParticles3D" inherits="GeometryInstance3D" version="4.0">
+<class name="CPUParticles3D" inherits="GeometryInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
CPU-based 3D particle emitter.
</brief_description>
@@ -96,13 +96,13 @@
Minimum angle.
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
- Each particle's angular velocity will vary along this [Curve].
+ Each particle's angular velocity (rotation speed) will vary along this [Curve] over its lifetime.
</member>
<member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum angular velocity.
+ Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum angular velocity.
+ Minimum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
@@ -125,8 +125,11 @@
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
</member>
+ <member name="color_initial_ramp" type="Gradient" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
+ Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ </member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
- Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]).
+ Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]).
</member>
<member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Damping will vary along this [Curve].
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index 0a95836e96..7c7e37d0a5 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Callable" version="4.0">
+<class name="Callable" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An object representing a method in a certain object that can be called.
</brief_description>
@@ -35,28 +35,30 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="Callable" qualifiers="constructor">
+ <constructors>
+ <constructor name="Callable">
<return type="Callable" />
<description>
Constructs a null [Callable] with no object nor method bound.
</description>
- </method>
- <method name="Callable" qualifiers="constructor">
+ </constructor>
+ <constructor name="Callable">
<return type="Callable" />
<argument index="0" name="from" type="Callable" />
<description>
Constructs a [Callable] as a copy of the given [Callable].
</description>
- </method>
- <method name="Callable" qualifiers="constructor">
+ </constructor>
+ <constructor name="Callable">
<return type="Callable" />
<argument index="0" name="object" type="Object" />
<argument index="1" name="method" type="StringName" />
<description>
Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="bind" qualifiers="vararg const">
<return type="Callable" />
<description>
@@ -96,7 +98,8 @@
<method name="hash" qualifiers="const">
<return type="int" />
<description>
- Returns the hash value of this [Callable]'s object.
+ Returns the 32-bit hash value of this [Callable]'s object.
+ [b]Note:[/b] [Callable]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] imply the callables are equal, because different callables can have identical hash values due to hash collisions. The engine uses a 32-bit hash algorithm for [method hash].
</description>
</method>
<method name="is_custom" qualifiers="const">
@@ -123,30 +126,6 @@
Returns [code]true[/code] if the object exists and has a valid function assigned, or is a custom callable.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Callable" />
- <description>
- Returns [code]true[/code] if both [Callable]s invoke different targets.
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Callable" />
- <description>
- Returns [code]true[/code] if both [Callable]s invoke the same custom target.
- </description>
- </method>
<method name="rpc" qualifiers="vararg const">
<return type="void" />
<description>
@@ -168,4 +147,30 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Callable" />
+ <description>
+ Returns [code]true[/code] if both [Callable]s invoke different targets.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Callable" />
+ <description>
+ Returns [code]true[/code] if both [Callable]s invoke the same custom target.
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml
index 70709d269c..3d80d8f3ab 100644
--- a/doc/classes/CallbackTweener.xml
+++ b/doc/classes/CallbackTweener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CallbackTweener" inherits="Tweener" version="4.0">
+<class name="CallbackTweener" inherits="Tweener" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Calls the specified method after optional delay.
</brief_description>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index a3a891cdcb..3350735ca2 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera2D" inherits="Node2D" version="4.0">
+<class name="Camera2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Camera node for 2D scenes.
</brief_description>
@@ -30,13 +30,15 @@
<method name="get_camera_position" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the camera position.
+ Returns the camera's [code]position[/code] (the tracked point the camera attempts to follow), relative to the origin.
+ [b]Note:[/b] The returned value is not the same as [member Node2D.position] or [member Node2D.global_position], as it is affected by the [code]drag[/code] properties.
</description>
</method>
<method name="get_camera_screen_center" qualifiers="const">
<return type="Vector2" />
<description>
Returns the location of the [Camera2D]'s screen-center, relative to the origin.
+ [b]Note:[/b] The real [code]position[/code] of the camera may be different, see [method get_camera_position].
</description>
</method>
<method name="get_drag_margin" qualifiers="const">
@@ -57,7 +59,7 @@
<return type="void" />
<description>
Sets the camera's position immediately to its current smoothing destination.
- This has no effect if smoothing is disabled.
+ This method has no effect if [member smoothing_enabled] is [code]false[/code].
</description>
</method>
<method name="set_drag_margin">
@@ -95,7 +97,7 @@
</member>
<member name="drag_horizontal_offset" type="float" setter="set_drag_horizontal_offset" getter="get_drag_horizontal_offset" default="0.0">
The relative horizontal drag offset of the camera between the right ([code]-1[/code]) and left ([code]1[/code]) drag margins.
- [b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when the horizontal drag margin is enabled or the drag margins are changed.
+ [b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_horizontal_enabled] is [code]true[/code] or the drag margins are changed.
</member>
<member name="drag_left_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the left edge of the screen.
@@ -111,7 +113,7 @@
</member>
<member name="drag_vertical_offset" type="float" setter="set_drag_vertical_offset" getter="get_drag_vertical_offset" default="0.0">
The relative vertical drag offset of the camera between the bottom ([code]-1[/code]) and top ([code]1[/code]) drag margins.
- [b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when the vertical drag margin is enabled or the drag margins are changed.
+ [b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_vertical_enabled] is [code]true[/code] or the drag margins are changed.
</member>
<member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled" default="false">
If [code]true[/code], draws the camera's drag margin rectangle in the editor.
@@ -123,30 +125,30 @@
If [code]true[/code], draws the camera's screen rectangle in the editor.
</member>
<member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" default="10000000">
- Bottom scroll limit in pixels. The camera stops moving when reaching this value.
+ Bottom scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="limit_left" type="int" setter="set_limit" getter="get_limit" default="-10000000">
- Left scroll limit in pixels. The camera stops moving when reaching this value.
+ Left scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="limit_right" type="int" setter="set_limit" getter="get_limit" default="10000000">
- Right scroll limit in pixels. The camera stops moving when reaching this value.
+ Right scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly stops when reaches its limits.
- This has no effect if smoothing is disabled.
+ This property has no effect if [member smoothing_enabled] is [code]false[/code].
[b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing].
</member>
<member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000">
- Top scroll limit in pixels. The camera stops moving when reaching this value.
+ Top scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
- The camera's offset, useful for looking around or camera shake animations.
+ The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right].
</member>
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1">
The camera's process callback. See [enum Camera2DProcessCallback].
</member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false">
- If [code]true[/code], the camera rotates with the target.
+ If [code]true[/code], the camera view rotates with the target.
</member>
<member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed].
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 06e2f83f05..f7a0d41626 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera3D" inherits="Node3D" version="4.0">
+<class name="Camera3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Camera node, displays from a point of view.
</brief_description>
@@ -218,10 +218,10 @@
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 [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]).
+ 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 [member AudioStreamPlayer3D.pitch_scale]).
</constant>
<constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking">
- 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]).
+ 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 [member AudioStreamPlayer3D.pitch_scale]).
</constant>
</constants>
</class>
diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml
index 5cbd489143..c108b30f23 100644
--- a/doc/classes/CameraEffects.xml
+++ b/doc/classes/CameraEffects.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraEffects" inherits="Resource" version="4.0">
+<class name="CameraEffects" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Contains camera-specific effects such as depth of field and exposure override.
</brief_description>
diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml
index 2dda36a1bc..28fdab9be4 100644
--- a/doc/classes/CameraFeed.xml
+++ b/doc/classes/CameraFeed.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraFeed" inherits="RefCounted" version="4.0">
+<class name="CameraFeed" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A camera feed gives you access to a single physical camera attached to your device.
</brief_description>
diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml
index 404ea08851..1ccdee58f7 100644
--- a/doc/classes/CameraServer.xml
+++ b/doc/classes/CameraServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraServer" inherits="Object" version="4.0">
+<class name="CameraServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server keeping track of different cameras accessible in Godot.
</brief_description>
diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml
index 2030d3bb45..8eedfe3580 100644
--- a/doc/classes/CameraTexture.xml
+++ b/doc/classes/CameraTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraTexture" inherits="Texture2D" version="4.0">
+<class name="CameraTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Texture provided by a [CameraFeed].
</brief_description>
diff --git a/doc/classes/CanvasGroup.xml b/doc/classes/CanvasGroup.xml
index e9b2c9a915..3bea8cde21 100644
--- a/doc/classes/CanvasGroup.xml
+++ b/doc/classes/CanvasGroup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasGroup" inherits="Node2D" version="4.0">
+<class name="CanvasGroup" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 7be18c1d5c..d71762801c 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasItem" inherits="Node" version="4.0">
+<class name="CanvasItem" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class of anything 2D.
</brief_description>
@@ -12,8 +12,8 @@
[b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
- <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
+ <link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.html</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
@@ -44,7 +44,7 @@
<argument index="6" name="width" type="float" default="1.0" />
<argument index="7" name="antialiased" type="bool" default="false" />
<description>
- Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve.
+ Draws a unfilled arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. See also [method draw_circle].
</description>
</method>
<method name="draw_char" qualifiers="const">
@@ -67,7 +67,7 @@
<argument index="1" name="radius" type="float" />
<argument index="2" name="color" type="Color" />
<description>
- Draws a colored circle.
+ Draws a colored, unfilled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon].
</description>
</method>
<method name="draw_colored_polygon">
@@ -77,7 +77,7 @@
<argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
<argument index="3" name="texture" type="Texture2D" default="null" />
<description>
- Draws a colored polygon of any amount of points, convex or concave.
+ Draws a colored polygon of any amount of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon.
</description>
</method>
<method name="draw_end_animation">
@@ -93,7 +93,7 @@
<argument index="2" name="color" type="Color" />
<argument index="3" name="width" type="float" default="1.0" />
<description>
- Draws a line from a 2D point to another, with a given color and width.
+ Draws a line from a 2D point to another, with a given color and width. See also [method draw_multiline] and [method draw_polyline].
</description>
</method>
<method name="draw_mesh">
@@ -115,7 +115,7 @@
<argument index="4" name="outline" type="float" default="0.0" />
<argument index="5" name="pixel_range" type="float" default="4.0" />
<description>
- Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [method FontData.set_multichannel_signed_distance_field] for more information and caveats about MSDF font rendering.
+ Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontData.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering.
If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius.
Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation.
</description>
@@ -126,7 +126,7 @@
<argument index="1" name="color" type="Color" />
<argument index="2" name="width" type="float" default="1.0" />
<description>
- Draws multiple, parallel lines with a uniform [code]color[/code].
+ Draws multiple disconnected lines with a uniform [code]color[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead.
</description>
</method>
<method name="draw_multiline_colors">
@@ -135,7 +135,7 @@
<argument index="1" name="colors" type="PackedColorArray" />
<argument index="2" name="width" type="float" default="1.0" />
<description>
- 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].
+ Draws multiple disconnected lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead.
</description>
</method>
<method name="draw_multiline_string" qualifiers="const">
@@ -143,7 +143,7 @@
<argument index="0" name="font" type="Font" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="max_lines" type="int" default="-1" />
<argument index="6" name="size" type="int" default="16" />
@@ -170,7 +170,7 @@
<argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
<argument index="3" name="texture" type="Texture2D" default="null" />
<description>
- Draws a polygon of any amount of points, convex or concave.
+ Draws a solid polygon of any amount of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors].
</description>
</method>
<method name="draw_polyline">
@@ -180,7 +180,7 @@
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
- Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code].
+ Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon].
</description>
</method>
<method name="draw_polyline_colors">
@@ -190,7 +190,7 @@
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
- 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].
+ 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]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon].
</description>
</method>
<method name="draw_primitive">
@@ -201,7 +201,7 @@
<argument index="3" name="texture" type="Texture2D" default="null" />
<argument index="4" name="width" type="float" default="1.0" />
<description>
- Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad.
+ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [method draw_line], [method draw_polyline], [method draw_polygon], and [method draw_rect].
</description>
</method>
<method name="draw_rect">
@@ -236,7 +236,7 @@
<argument index="0" name="font" type="Font" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
@@ -253,7 +253,7 @@
# so the Control is only created once.
var default_font = Control.new().get_font("font")
var default_font_size = Control.new().get_font_size("font_size")
- draw_string(default_font, Vector2(64, 64), "Hello world", HALIGN_LEFT, -1, font_size)
+ draw_string(default_font, Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, font_size)
[/gdscript]
[csharp]
// If using this method in a script that redraws constantly, move the
@@ -261,7 +261,7 @@
// so the Control is only created once.
Font defaultFont = new Control().GetFont("font");
int defaultFontSize = new Control().GetFontSize("font_size");
- DrawString(defaultFont, new Vector2(64, 64), "Hello world", HALIGN_LEFT, -1, defaultFontSize);
+ DrawString(defaultFont, new Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, defaultFontSize);
[/csharp]
[/codeblocks]
See also [method Font.draw_string].
@@ -334,7 +334,7 @@
<method name="get_global_mouse_position" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the global position of the mouse.
+ Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer].
</description>
</method>
<method name="get_global_transform" qualifiers="const">
@@ -352,7 +352,7 @@
<method name="get_local_mouse_position" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the mouse position relative to this item's position.
+ Returns the mouse's position in this [CanvasItem] using the local coordinate system of this [CanvasItem].
</description>
</method>
<method name="get_transform" qualifiers="const">
@@ -382,7 +382,7 @@
<method name="hide">
<return type="void" />
<description>
- Hide the [CanvasItem] if it's currently visible.
+ Hide the [CanvasItem] if it's currently visible. This is equivalent to setting [member visible] to [code]false[/code].
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
@@ -434,7 +434,7 @@
<method name="show">
<return type="void" />
<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. This is equivalent to setting [member visible] to [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</description>
</method>
<method name="update">
diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml
index 3f9dd02e4c..22daf79074 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" version="4.0">
+<class name="CanvasItemMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A material for [CanvasItem]s.
</brief_description>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 2f99f94893..ff2c3a8855 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" version="4.0">
+<class name="CanvasLayer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Canvas drawing layer.
</brief_description>
@@ -7,8 +7,8 @@
Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
</description>
<tutorials>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
- <link title="Canvas layers">https://docs.godotengine.org/en/latest/tutorials/2d/canvas_layers.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
+ <link title="Canvas layers">$DOCS_URL/tutorials/2d/canvas_layers.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
@@ -18,6 +18,18 @@
Returns the RID of the canvas used by this layer.
</description>
</method>
+ <method name="hide">
+ <return type="void" />
+ <description>
+ Hides any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to [code]false[/code].
+ </description>
+ </method>
+ <method name="show">
+ <return type="void" />
+ <description>
+ Shows any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to [code]true[/code].
+ </description>
+ </method>
</methods>
<members>
<member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport">
@@ -44,5 +56,16 @@
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
The layer's transform.
</member>
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
+ If [code]false[/code], any [CanvasItem] under this [CanvasLayer] will be hidden.
+ Unlike [member CanvasItem.visible], visibility of a [CanvasLayer] isn't propagated to underlying layers.
+ </member>
</members>
+ <signals>
+ <signal name="visibility_changed">
+ <description>
+ Emitted when visibility of the layer is changed. See [member visible].
+ </description>
+ </signal>
+ </signals>
</class>
diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml
index d5f85132a5..42be28b9a4 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" version="4.0">
+<class name="CanvasModulate" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Tint the entire canvas.
</brief_description>
diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml
index 28a62ae1e1..ac18c2d474 100644
--- a/doc/classes/CanvasTexture.xml
+++ b/doc/classes/CanvasTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasTexture" inherits="Texture2D" version="4.0">
+<class name="CanvasTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml
index 3b4e60ce93..a3f99b83e0 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" version="4.0">
+<class name="CapsuleMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class representing a capsule-shaped [PrimitiveMesh].
</brief_description>
@@ -9,13 +9,13 @@
<tutorials>
</tutorials>
<members>
- <member name="height" type="float" setter="set_height" getter="get_height" default="3.0">
+ <member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
Total height of the capsule mesh (including the hemispherical ends).
</member>
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64">
Number of radial segments on the capsule mesh.
</member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
Radius of the capsule mesh.
</member>
<member name="rings" type="int" setter="set_rings" getter="get_rings" default="8">
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
index 74db0da033..ae8e1ca001 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" version="4.0">
+<class name="CapsuleShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Capsule shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml
index 8856ec3779..5f15aaafad 100644
--- a/doc/classes/CapsuleShape3D.xml
+++ b/doc/classes/CapsuleShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleShape3D" inherits="Shape3D" version="4.0">
+<class name="CapsuleShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Capsule shape for collisions.
</brief_description>
@@ -10,10 +10,10 @@
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<members>
- <member name="height" type="float" setter="set_height" getter="get_height" default="3.0">
+ <member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
The capsule's height.
</member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
The capsule's radius.
</member>
</members>
diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml
index 8f8a978f9e..08cdf64cea 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" version="4.0">
+<class name="CenterContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Keeps children controls centered.
</brief_description>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index b11d9c341a..c98b194a4d 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CharFXTransform" inherits="RefCounted" version="4.0">
+<class name="CharFXTransform" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Controls how an individual character will be displayed in a [RichTextEffect].
</brief_description>
@@ -7,7 +7,7 @@
By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect].
</description>
<tutorials>
- <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/ui/bbcode_in_richtextlabel.html</link>
+ <link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
<link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<members>
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index e14c2dc110..28060f6579 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0">
+<class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Specialized 2D physics body node for characters moved by script.
</brief_description>
@@ -9,8 +9,8 @@
[b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody2D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
- <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
- <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link>
+ <link title="Kinematic character (2D)">$DOCS_URL/tutorials/physics/kinematic_character_2d.html</link>
+ <link title="Using KinematicBody2D">$DOCS_URL/tutorials/physics/using_kinematic_body_2d.html</link>
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
</tutorials>
@@ -55,7 +55,7 @@
<method name="get_real_velocity" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member motion_velocity] which returns the requested velocity.
+ Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member velocity] which returns the requested velocity.
</description>
</method>
<method name="get_slide_collision">
@@ -95,47 +95,46 @@
<method name="is_on_ceiling" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.
</description>
</method>
<method name="is_on_ceiling_only" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.
</description>
</method>
<method name="is_on_floor" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.
</description>
</method>
<method name="is_on_floor_only" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.
</description>
</method>
<method name="is_on_wall" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.
</description>
</method>
<method name="is_on_wall_only" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.
</description>
</method>
<method name="move_and_slide">
<return type="bool" />
<description>
- Moves the body based on [member motion_velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidDynamicBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
- This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- Modifies [member motion_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision].
+ Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidDynamicBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision].
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
- The general behaviour and available properties change according to the [member motion_mode].
+ The general behavior and available properties change according to the [member motion_mode].
Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code].
</description>
</method>
@@ -163,22 +162,16 @@
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
- If [code]false[/code], the body will slide on floor's slopes when [member motion_velocity] applies a downward force.
- </member>
- <member name="free_mode_min_slide_angle" type="float" setter="set_free_mode_min_slide_angle" getter="get_free_mode_min_slide_angle" default="0.261799">
- Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees.
+ If [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force.
</member>
<member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
</member>
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0">
- Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
- </member>
- <member name="motion_velocity" type="Vector2" setter="set_motion_velocity" getter="get_motion_velocity" default="Vector2(0, 0)">
- Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
+ Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
<member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody2D.MovingPlatformApplyVelocityOnLeave" default="0">
- Sets the behaviour to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behaviour.
+ Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
</member>
<member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
@@ -192,19 +185,25 @@
<member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2(0, -1)">
Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. If set to [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
</member>
+ <member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2(0, 0)">
+ Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
+ </member>
+ <member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.261799">
+ Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. This property only affects movement when [member motion_mode] is [constant MOTION_MODE_FLOATING].
+ </member>
</members>
<constants>
<constant name="MOTION_MODE_GROUNDED" value="0" enum="MotionMode">
Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers.
</constant>
- <constant name="MOTION_MODE_FREE" value="1" enum="MotionMode">
+ <constant name="MOTION_MODE_FLOATING" value="1" enum="MotionMode">
Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games.
</constant>
<constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave">
- Add the last platform velocity to the [member motion_velocity] when you leave a moving platform.
+ Add the last platform velocity to the [member velocity] when you leave a moving platform.
</constant>
<constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave">
- Add the last platform velocity to the [member motion_velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
+ Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
</constant>
<constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave">
Do nothing when leaving a platform.
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 24b26fb16e..4895e2cff7 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0">
+<class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Specialized 3D physics body node for characters moved by script.
</brief_description>
@@ -9,7 +9,7 @@
[b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody3D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
- <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
+ <link title="Kinematic character (2D)">$DOCS_URL/tutorials/physics/kinematic_character_2d.html</link>
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
@@ -56,7 +56,7 @@
<method name="get_real_velocity" qualifiers="const">
<return type="Vector3" />
<description>
- Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member motion_velocity] which returns the requested velocity.
+ Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member velocity] which returns the requested velocity.
</description>
</method>
<method name="get_slide_collision">
@@ -81,45 +81,44 @@
<method name="is_on_ceiling" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.
</description>
</method>
<method name="is_on_ceiling_only" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.
</description>
</method>
<method name="is_on_floor" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.
</description>
</method>
<method name="is_on_floor_only" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.
</description>
</method>
<method name="is_on_wall" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.
</description>
</method>
<method name="is_on_wall_only" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.
</description>
</method>
<method name="move_and_slide">
<return type="bool" />
<description>
- Moves the body based on [member motion_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidDynamicBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
- This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- Modifies [member motion_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision].
+ Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidDynamicBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision].
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code].
</description>
@@ -148,19 +147,16 @@
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
- If [code]false[/code], the body will slide on floor's slopes when [member motion_velocity] applies a downward force.
+ If [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force.
</member>
<member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="6">
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
</member>
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody3D.MotionMode" default="0">
- Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
- </member>
- <member name="motion_velocity" type="Vector3" setter="set_motion_velocity" getter="get_motion_velocity" default="Vector3(0, 0, 0)">
- Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
+ Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
<member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody3D.MovingPlatformApplyVelocityOnLeave" default="0">
- Sets the behaviour to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behaviour.
+ Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
</member>
<member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
@@ -174,22 +170,25 @@
<member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3(0, 1, 0)">
Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
</member>
+ <member name="velocity" type="Vector3" setter="set_velocity" getter="get_velocity" default="Vector3(0, 0, 0)">
+ Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
+ </member>
<member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.261799">
- Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. In [code]MOTION_MODE_GROUNDED[/code], it works only when [member floor_block_on_wall] is [code]true[/code].
+ Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. When [member motion_mode] is [constant MOTION_MODE_GROUNDED], it only affects movement if [member floor_block_on_wall] is [code]true[/code].
</member>
</members>
<constants>
<constant name="MOTION_MODE_GROUNDED" value="0" enum="MotionMode">
Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers.
</constant>
- <constant name="MOTION_MODE_FREE" value="1" enum="MotionMode">
+ <constant name="MOTION_MODE_FLOATING" value="1" enum="MotionMode">
Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games.
</constant>
<constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave">
- Add the last platform velocity to the [member motion_velocity] when you leave a moving platform.
+ Add the last platform velocity to the [member velocity] when you leave a moving platform.
</constant>
<constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave">
- Add the last platform velocity to the [member motion_velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
+ Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
</constant>
<constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave">
Do nothing when leaving a platform.
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 18f668a052..606f5ca51f 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckBox" inherits="Button" version="4.0">
+<class name="CheckBox" inherits="Button" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Binary choice user interface widget. See also [CheckButton].
</brief_description>
@@ -10,38 +10,20 @@
<tutorials>
</tutorials>
<members>
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
- <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
- The vertical offset used when rendering the check icons (in pixels).
- </theme_item>
- <theme_item name="checked" data_type="icon" type="Texture2D">
- The check icon to display when the [CheckBox] is checked.
- </theme_item>
- <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
- The check icon to display when the [CheckBox] is checked and disabled.
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is focused.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- The [Font] to use for the [CheckBox] text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The [CheckBox] text's font color.
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
The [CheckBox] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckBox] text's font color when it's focused. Only replaces the normal text color of the checkbox. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckBox] text's font color when it's hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -53,26 +35,26 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckBox] text's font color when it's pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [CheckBox]'s text.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is hovered.
- </theme_item>
- <theme_item name="hover_pressed" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
+ <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
+ The vertical offset used when rendering the check icons (in pixels).
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The separation between the check icon and the text (in pixels).
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background.
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="pressed" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is pressed.
+ <theme_item name="font" data_type="font" type="Font">
+ The [Font] to use for the [CheckBox] text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [CheckBox]'s text.
+ </theme_item>
+ <theme_item name="checked" data_type="icon" type="Texture2D">
+ The check icon to display when the [CheckBox] is checked.
+ </theme_item>
+ <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
+ The check icon to display when the [CheckBox] is checked and disabled.
</theme_item>
<theme_item name="radio_checked" data_type="icon" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
@@ -90,5 +72,23 @@
<theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
The check icon to display when the [CheckBox] is unchecked and disabled.
</theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered.
+ </theme_item>
+ <theme_item name="hover_pressed" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background.
+ </theme_item>
+ <theme_item name="pressed" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is pressed.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index c86fadb6b0..c6ebfaf4b0 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckButton" inherits="Button" version="4.0">
+<class name="CheckButton" inherits="Button" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Checkable button. See also [CheckBox].
</brief_description>
@@ -10,32 +10,20 @@
<tutorials>
</tutorials>
<members>
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
- <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
- The vertical offset used when rendering the toggle icons (in pixels).
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is focused.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- The [Font] to use for the [CheckButton] text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The [CheckButton] text's font color.
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
The [CheckButton] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckButton] text's font color when it's focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckButton] text's font color when it's hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -47,20 +35,20 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckButton] text's font color when it's pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [CheckButton]'s text.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is hovered.
- </theme_item>
- <theme_item name="hover_pressed" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed.
+ <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
+ The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The separation between the toggle icon and the text (in pixels).
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background.
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ The [Font] to use for the [CheckButton] text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [CheckButton]'s text.
</theme_item>
<theme_item name="off" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
@@ -86,8 +74,20 @@
<theme_item name="on_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for right-to-left layouts).
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered.
+ </theme_item>
+ <theme_item name="hover_pressed" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background.
</theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is pressed.
diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml
index 3969734d3f..b0336086dc 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" version="4.0">
+<class name="CircleShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Circular shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index b4f98c6c5f..835588b293 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" version="4.0">
+<class name="ClassDB" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class information repository.
</brief_description>
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index bd1f3af436..ab55aeba05 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CodeEdit" inherits="TextEdit" version="4.0">
+<class name="CodeEdit" inherits="TextEdit" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Multiline text control intended for editing code.
</brief_description>
@@ -234,7 +234,7 @@
<method name="get_folded_lines" qualifiers="const">
<return type="int[]" />
<description>
- Return all lines that are current folded.
+ Returns all lines that are current folded.
</description>
</method>
<method name="get_text_for_code_completion" qualifiers="const">
@@ -288,7 +288,7 @@
<argument index="0" name="line" type="int" />
<argument index="1" name="column" type="int" default="-1" />
<description>
- Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code].
+ Returns delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_in_string" qualifiers="const">
@@ -296,7 +296,7 @@
<argument index="0" name="line" type="int" />
<argument index="1" name="column" type="int" default="-1" />
<description>
- Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code].
+ Returns the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_line_bookmarked" qualifiers="const">
@@ -345,7 +345,7 @@
<return type="void" />
<argument index="0" name="force" type="bool" default="false" />
<description>
- Emits [signal request_code_completion], if [code]force[/code] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal.
+ Emits [signal code_completion_requested], if [code]force[/code] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal.
</description>
</method>
<method name="set_code_completion_selected_index">
@@ -442,7 +442,7 @@
<member name="auto_brace_completion_highlight_matching" type="bool" setter="set_highlight_matching_braces_enabled" getter="is_highlight_matching_braces_enabled" default="false">
Highlight mismatching brace pairs.
</member>
- <member name="auto_brace_completion_pairs" type="Dictionary" setter="set_auto_brace_completion_pairs" getter="get_auto_brace_completion_pairs" default="{&quot;\&quot;&quot;: &quot;\&quot;&quot;,&quot;&apos;&quot;: &quot;&apos;&quot;,&quot;(&quot;: &quot;)&quot;,&quot;[&quot;: &quot;]&quot;,&quot;{&quot;: &quot;}&quot;}">
+ <member name="auto_brace_completion_pairs" type="Dictionary" setter="set_auto_brace_completion_pairs" getter="get_auto_brace_completion_pairs" default="{ &quot;\&quot;&quot;: &quot;\&quot;&quot;, &quot;&apos;&quot;: &quot;&apos;&quot;, &quot;(&quot;: &quot;)&quot;, &quot;[&quot;: &quot;]&quot;, &quot;{&quot;: &quot;}&quot; }">
Sets the brace pairs to be autocompleted.
</member>
<member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false">
@@ -487,18 +487,17 @@
<member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false">
Use spaces instead of tabs for indentation.
</member>
- <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" />
+ <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" overrides="Control" enum="Control.LayoutDirection" default="2" />
<member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="false">
Sets whether line folding is allowed.
</member>
<member name="line_length_guidelines" type="int[]" setter="set_line_length_guidelines" getter="get_line_length_guidelines" default="[]">
Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently
</member>
- <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[]" />
<member name="symbol_lookup_on_click" type="bool" setter="set_symbol_lookup_on_click_enabled" getter="is_symbol_lookup_on_click_enabled" default="false">
Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted.
</member>
- <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" />
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" overrides="TextEdit" enum="Control.TextDirection" default="1" />
</members>
<signals>
<signal name="breakpoint_toggled">
@@ -507,7 +506,7 @@
Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line.
</description>
</signal>
- <signal name="request_code_completion">
+ <signal name="code_completion_requested">
<description>
Emitted when the user requests code completion.
</description>
@@ -563,36 +562,24 @@
<theme_item name="background_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
Sets the background [Color].
</theme_item>
- <theme_item name="bookmark" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines.
- </theme_item>
<theme_item name="bookmark_color" data_type="color" type="Color" default="Color(0.5, 0.64, 1, 0.8)">
[Color] of the bookmark icon for bookmarked lines.
</theme_item>
<theme_item name="brace_mismatch_color" data_type="color" type="Color" default="Color(1, 0.2, 0.2, 1)">
[Color] of the text to highlight mismatched braces.
</theme_item>
- <theme_item name="breakpoint" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines.
- </theme_item>
<theme_item name="breakpoint_color" data_type="color" type="Color" default="Color(0.9, 0.29, 0.3, 1)">
[Color] of the breakpoint icon for bookmarked lines.
</theme_item>
- <theme_item name="can_fold" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded.
- </theme_item>
<theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
[Color] of the text behind the caret when block caret is enabled.
</theme_item>
- <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] of the caret.
</theme_item>
<theme_item name="code_folding_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)">
[Color] for all icons related to line folding.
</theme_item>
- <theme_item name="completion" data_type="style" type="StyleBox">
- [StyleBox] for the code completion popup.
- </theme_item>
<theme_item name="completion_background_color" data_type="color" type="Color" default="Color(0.17, 0.16, 0.2, 1)">
Sets the background [Color] for the code completion popup.
</theme_item>
@@ -602,83 +589,89 @@
<theme_item name="completion_font_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 1)">
Font [Color] for the code completion popup.
</theme_item>
- <theme_item name="completion_lines" data_type="constant" type="int" default="7">
- Max number of options to display in the code completion popup at any one time.
- </theme_item>
- <theme_item name="completion_max_width" data_type="constant" type="int" default="50">
- Max width of options in the code completion popup. Options longer then this will be cut off.
- </theme_item>
- <theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.29)">
[Color] of the scrollbar in the code completion popup.
</theme_item>
- <theme_item name="completion_scroll_width" data_type="constant" type="int" default="3">
- Width of the scrollbar in the code completion popup.
- </theme_item>
<theme_item name="completion_selected_color" data_type="color" type="Color" default="Color(0.26, 0.26, 0.27, 1)">
Background highlight [Color] for the current selected option item in the code completion popup.
</theme_item>
<theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
Background [Color] of the line containing the caret.
</theme_item>
- <theme_item name="executing_line" data_type="icon" type="Texture2D">
- Icon to draw in the executing gutter for executing lines.
- </theme_item>
<theme_item name="executing_line_color" data_type="color" type="Color" default="Color(0.98, 0.89, 0.27, 1)">
[Color] of the executing icon for executing lines.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- Sets the [StyleBox] when in focus.
- </theme_item>
- <theme_item name="folded" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded.
- </theme_item>
- <theme_item name="folded_eol_icon" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw at the end of a folded line.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Sets the default [Font].
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Sets the font [Color].
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [CodeEdit].
</theme_item>
- <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+ <theme_item name="font_placeholder_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.6)">
+ Font color for [member TextEdit.placeholder_text].
+ </theme_item>
+ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member TextEdit.editable] is disabled.
</theme_item>
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Sets default font size.
- </theme_item>
<theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)">
[Color] of the main line length guideline, secondary guidelines will have 50% alpha applied.
</theme_item>
<theme_item name="line_number_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)">
Sets the [Color] of line numbers.
</theme_item>
+ <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
+ [Color] of the border around text that matches the search query.
+ </theme_item>
+ <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
+ [Color] behind the text that matches the search query.
+ </theme_item>
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
+ Sets the highlight [Color] of text selections.
+ </theme_item>
+ <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
+ Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled.
+ </theme_item>
+ <theme_item name="completion_lines" data_type="constant" type="int" default="7">
+ Max number of options to display in the code completion popup at any one time.
+ </theme_item>
+ <theme_item name="completion_max_width" data_type="constant" type="int" default="50">
+ Max width of options in the code completion popup. Options longer then this will be cut off.
+ </theme_item>
+ <theme_item name="completion_scroll_width" data_type="constant" type="int" default="6">
+ Width of the scrollbar in the code completion popup.
+ </theme_item>
<theme_item name="line_spacing" data_type="constant" type="int" default="4">
Sets the spacing between the lines.
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Sets the [StyleBox].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="read_only" data_type="style" type="StyleBox">
- Sets the [StyleBox] when [member TextEdit.editable] is disabled.
+ <theme_item name="font" data_type="font" type="Font">
+ Sets the default [Font].
</theme_item>
- <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
- [Color] of the border around text that matches the search query.
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Sets default font size.
</theme_item>
- <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
- [Color] behind the text that matches the search query.
+ <theme_item name="bookmark" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines.
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
- Sets the highlight [Color] of text selections.
+ <theme_item name="breakpoint" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines.
+ </theme_item>
+ <theme_item name="can_fold" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded.
+ </theme_item>
+ <theme_item name="executing_line" data_type="icon" type="Texture2D">
+ Icon to draw in the executing gutter for executing lines.
+ </theme_item>
+ <theme_item name="folded" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded.
+ </theme_item>
+ <theme_item name="folded_eol_icon" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw at the end of a folded line.
</theme_item>
<theme_item name="space" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for space text characters.
@@ -686,8 +679,17 @@
<theme_item name="tab" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for tab text characters.
</theme_item>
- <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
- Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled.
+ <theme_item name="completion" data_type="style" type="StyleBox">
+ [StyleBox] for the code completion popup.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ Sets the [StyleBox] when in focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Sets the [StyleBox].
+ </theme_item>
+ <theme_item name="read_only" data_type="style" type="StyleBox">
+ Sets the [StyleBox] when [member TextEdit.editable] is disabled.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
index 064be0c29d..b4bde1d00b 100644
--- a/doc/classes/CodeHighlighter.xml
+++ b/doc/classes/CodeHighlighter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0">
+<class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A syntax highlighter for code.
</brief_description>
@@ -76,21 +76,21 @@
<return type="bool" />
<argument index="0" name="start_key" type="String" />
<description>
- Return [code]true[/code] if the start key exists, else [code]false[/code].
+ Returns [code]true[/code] if the start key exists, else [code]false[/code].
</description>
</method>
<method name="has_keyword_color" qualifiers="const">
<return type="bool" />
<argument index="0" name="keyword" type="String" />
<description>
- Return [code]true[/code] if the keyword exists, else [code]false[/code].
+ Returns [code]true[/code] if the keyword exists, else [code]false[/code].
</description>
</method>
<method name="has_member_keyword_color" qualifiers="const">
<return type="bool" />
<argument index="0" name="member_keyword" type="String" />
<description>
- Return [code]true[/code] if the member keyword exists, else [code]false[/code].
+ Returns [code]true[/code] if the member keyword exists, else [code]false[/code].
</description>
</method>
<method name="remove_color_region">
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index ba1ee3909d..99bf9f7853 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" version="4.0">
+<class name="CollisionObject2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base node for 2D collision objects.
</brief_description>
@@ -198,17 +198,17 @@
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject2D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
</member>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true">
- If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set.
+ If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set.
</member>
</members>
<signals>
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 19bcdcbb27..2aac5528f4 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionObject3D" inherits="Node3D" version="4.0">
+<class name="CollisionObject3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base node for collision objects.
</brief_description>
@@ -170,11 +170,11 @@
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this CollisionObject3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject3D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
@@ -183,7 +183,7 @@
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 [CollisionObject3D]'s shapes will respond to [RayCast3D]s.
+ If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set.
</member>
</members>
<signals>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index cdaa0638ba..48fd7c19dc 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon2D" inherits="Node2D" version="4.0">
+<class name="CollisionPolygon2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Defines a 2D collision polygon.
</brief_description>
diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml
index b70f517da1..c8c3752254 100644
--- a/doc/classes/CollisionPolygon3D.xml
+++ b/doc/classes/CollisionPolygon3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon3D" inherits="Node3D" version="4.0">
+<class name="CollisionPolygon3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Editor-only class for defining a collision polygon in 3D space.
</brief_description>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 5159b2b15b..f3a4cbc2d6 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" version="4.0">
+<class name="CollisionShape2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node that represents collision shape data in 2D space.
</brief_description>
@@ -7,7 +7,7 @@
Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml
index 84e362c38b..521a11effd 100644
--- a/doc/classes/CollisionShape3D.xml
+++ b/doc/classes/CollisionShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionShape3D" inherits="Node3D" version="4.0">
+<class name="CollisionShape3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node that represents collision shape data in 3D space.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index c85bc775c7..bc0baf42c9 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Color" version="4.0">
+<class name="Color" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Color in RGBA format using floats on the range of 0 to 1.
</brief_description>
<description>
- A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
+ A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for opacity. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
You can also create a color from standardized color names by using the string constructor 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].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
@@ -15,21 +15,14 @@
<link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link>
<link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
</tutorials>
- <methods>
- <method name="Color" qualifiers="constructor">
+ <constructors>
+ <constructor name="Color">
<return type="Color" />
<description>
Constructs a default-initialized [Color] with all components set to [code]0[/code].
</description>
- </method>
- <method name="Color" qualifiers="constructor">
- <return type="Color" />
- <argument index="0" name="from" type="Color" />
- <description>
- Constructs a [Color] as a copy of the given [Color].
- </description>
- </method>
- <method name="Color" qualifiers="constructor">
+ </constructor>
+ <constructor name="Color">
<return type="Color" />
<argument index="0" name="from" type="Color" />
<argument index="1" name="alpha" type="float" />
@@ -37,64 +30,73 @@
Constructs a [Color] from an existing color, but with a custom alpha value.
[codeblocks]
[gdscript]
- var red = Color(Color.red, 0.5) # 50% transparent red.
+ var red = Color(Color.red, 0.2) # 20% opaque red.
[/gdscript]
[csharp]
- var red = new Color(Colors.Red, 0.5f); // 50% transparent red.
+ var red = new Color(Colors.Red, 0.2f); // 20% opaque red.
[/csharp]
[/codeblocks]
</description>
- </method>
- <method name="Color" qualifiers="constructor">
+ </constructor>
+ <constructor name="Color">
+ <return type="Color" />
+ <argument index="0" name="from" type="Color" />
+ <description>
+ Constructs a [Color] as a copy of the given [Color].
+ </description>
+ </constructor>
+ <constructor name="Color">
<return type="Color" />
<argument index="0" name="code" type="String" />
<description>
Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants.
</description>
- </method>
- <method name="Color" qualifiers="constructor">
+ </constructor>
+ <constructor name="Color">
<return type="Color" />
<argument index="0" name="code" type="String" />
<argument index="1" name="alpha" type="float" />
<description>
Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants.
</description>
- </method>
- <method name="Color" qualifiers="constructor">
+ </constructor>
+ <constructor name="Color">
<return type="Color" />
<argument index="0" name="r" type="float" />
<argument index="1" name="g" type="float" />
<argument index="2" name="b" type="float" />
- <argument index="3" name="a" type="float" />
<description>
- Constructs a [Color] from RGBA values, typically between 0 and 1.
+ Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
[codeblocks]
[gdscript]
- var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
+ var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
[/gdscript]
[csharp]
- var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`
+ var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`
[/csharp]
[/codeblocks]
</description>
- </method>
- <method name="Color" qualifiers="constructor">
+ </constructor>
+ <constructor name="Color">
<return type="Color" />
<argument index="0" name="r" type="float" />
<argument index="1" name="g" type="float" />
<argument index="2" name="b" type="float" />
+ <argument index="3" name="a" type="float" />
<description>
- Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
+ Constructs a [Color] from RGBA values, typically between 0 and 1.
[codeblocks]
[gdscript]
- var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
+ var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
[/gdscript]
[csharp]
- var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`
+ var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`
[/csharp]
[/codeblocks]
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="blend" qualifiers="const">
<return type="Color" />
<argument index="0" name="over" type="Color" />
@@ -145,6 +147,24 @@
<description>
</description>
</method>
+ <method name="from_hsv" qualifiers="static">
+ <return type="Color" />
+ <argument index="0" name="h" type="float" />
+ <argument index="1" name="s" type="float" />
+ <argument index="2" name="v" type="float" />
+ <argument index="3" name="alpha" type="float" default="1.0" />
+ <description>
+ Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1.
+ [codeblocks]
+ [gdscript]
+ var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8)
+ [/gdscript]
+ [csharp]
+ var c = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f);
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="from_rgbe9995" qualifiers="static">
<return type="Color" />
<argument index="0" name="rgbe" type="int" />
@@ -158,6 +178,13 @@
<description>
</description>
</method>
+ <method name="get_luminance" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the luminance of the color in the [code][0.0, 1.0][/code] range.
+ This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.
+ </description>
+ </method>
<method name="get_named_color" qualifiers="static">
<return type="Color" />
<argument index="0" name="idx" type="int" />
@@ -191,12 +218,46 @@
<return type="Color" />
<argument index="0" name="rgba" type="String" />
<description>
+ Returns a new color from [code]rgba[/code], an HTML hexadecimal color string. [code]rgba[/code] is not case sensitive, and may be prefixed with a '#' character.
+ [code]rgba[/code] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [code]rgba[/code] does not contain an alpha channel value, an alpha channel value of 1.0 is applied.
+ If [code]rgba[/code] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned.
+ [b]Note:[/b] This method is not implemented in C#, but the same functionality is provided in the class constructor.
+ [codeblocks]
+ [gdscript]
+ var green = Color.html("#00FF00FF") # set green to Color(0.0, 1.0, 0.0, 1.0)
+ var blue = Color.html("#0000FF") # set blue to Color(0.0, 0.0, 1.0, 1.0)
+ [/gdscript]
+ [csharp]
+ var green = new Color("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0)
+ var blue = new Color("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="html_is_valid" qualifiers="static">
<return type="bool" />
<argument index="0" name="color" type="String" />
<description>
+ Returns [code]true[/code] if [code]color[/code] is a valid HTML hexadecimal color string. [code]color[/code] is not case sensitive, and may be prefixed with a '#' character.
+ For a string to be valid it must be three-digit or six-digit hexadecimal, and may contain an alpha channel value.
+ [codeblocks]
+ [gdscript]
+ var result = Color.html_is_valid("#55aaFF") # result is true
+ result = Color.html_is_valid("#55AAFF20") # result is true
+ result = Color.html_is_valid("55AAFF") # result is true
+ result = Color.html_is_valid("#F2C") # result is true
+ result = Color.html_is_valid("#AABBC) # result is false
+ result = Color.html_is_valid("#55aaFF5") # result is false
+ [/gdscript]
+ [csharp]
+ var result = Color.HtmlIsValid("#55AAFF"); // result is true
+ result = Color.HtmlIsValid("#55AAFF20"); // result is true
+ result = Color.HtmlIsValid("55AAFF); // result is true
+ result = Color.HtmlIsValid("#F2C"); // result is true
+ result = Color.HtmlIsValid("#AABBC"); // result is false
+ result = Color.HtmlIsValid("#55aaFF5"); // result is false
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="inverted" qualifiers="const">
@@ -259,92 +320,6 @@
[/codeblocks]
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Color" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="Color" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="float" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="int" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="Color" />
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="Color" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="Color" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="float" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="int" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Color" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
- <method name="operator unary+" qualifiers="operator">
- <return type="Color" />
- <description>
- </description>
- </method>
- <method name="operator unary-" qualifiers="operator">
- <return type="Color" />
- <description>
- </description>
- </method>
<method name="to_abgr32" qualifiers="const">
<return type="int" />
<description>
@@ -464,7 +439,7 @@
</methods>
<members>
<member name="a" type="float" setter="" getter="" default="1.0">
- The color's alpha (transparency) component, typically on the range of 0 to 1.
+ The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque.
</member>
<member name="a8" type="int" setter="" getter="" default="255">
Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1.
@@ -937,4 +912,107 @@
Yellow green color.
</constant>
</constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Color" />
+ <description>
+ Returns [code]true[/code] if the colors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Color" />
+ <argument index="0" name="right" type="Color" />
+ <description>
+ Multiplies each component of the [Color] by the components of the given [Color].
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Color" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Multiplies each component of the [Color] by the given [float].
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Color" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Multiplies each component of the [Color] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Color" />
+ <argument index="0" name="right" type="Color" />
+ <description>
+ Adds each component of the [Color] with the components of the given [Color].
+ </description>
+ </operator>
+ <operator name="operator -">
+ <return type="Color" />
+ <argument index="0" name="right" type="Color" />
+ <description>
+ Subtracts each component of the [Color] by the components of the given [Color].
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Color" />
+ <argument index="0" name="right" type="Color" />
+ <description>
+ Divides each component of the [Color] by the components of the given [Color].
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Color" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Divides each component of the [Color] by the given [float].
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Color" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Divides each component of the [Color] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Color" />
+ <description>
+ Returns [code]true[/code] if the colors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Access color components using their index. [code]c[0][/code] is equivalent to [code]c.r[/code], [code]c[1][/code] is equivalent to [code]c.g[/code], [code]c[2][/code] is equivalent to [code]c.b[/code], and [code]c[3][/code] is equivalent to [code]c.a[/code].
+ </description>
+ </operator>
+ <operator name="operator unary+">
+ <return type="Color" />
+ <description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Color" />
+ <description>
+ Inverts the given color. This is equivalent to [code]Color.WHITE - c[/code] or [code]Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)[/code].
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index fca6a7631a..5c47d6fb54 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPicker" inherits="BoxContainer" version="4.0">
+<class name="ColorPicker" inherits="BoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Color picker control.
</brief_description>
@@ -41,7 +41,7 @@
If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
- If [code]true[/code], shows an alpha channel slider (transparency).
+ If [code]true[/code], shows an alpha channel slider (opacity).
</member>
<member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false">
If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.
@@ -93,6 +93,20 @@
</constant>
</constants>
<theme_items>
+ <theme_item name="h_width" data_type="constant" type="int" default="30">
+ The width of the hue selection slider.
+ </theme_item>
+ <theme_item name="label_width" data_type="constant" type="int" default="10">
+ </theme_item>
+ <theme_item name="margin" data_type="constant" type="int" default="4">
+ The margin around the [ColorPicker].
+ </theme_item>
+ <theme_item name="sv_height" data_type="constant" type="int" default="256">
+ The height of the saturation-value selection box.
+ </theme_item>
+ <theme_item name="sv_width" data_type="constant" type="int" default="256">
+ The width of the saturation-value selection box.
+ </theme_item>
<theme_item name="add_preset" data_type="icon" type="Texture2D">
The icon for the "Add Preset" button.
</theme_item>
@@ -102,16 +116,6 @@
<theme_item name="color_hue" data_type="icon" type="Texture2D">
Custom texture for the hue selection slider on the right.
</theme_item>
- <theme_item name="color_sample" data_type="icon" type="Texture2D">
- </theme_item>
- <theme_item name="h_width" data_type="constant" type="int" default="30">
- The width of the hue selection slider.
- </theme_item>
- <theme_item name="label_width" data_type="constant" type="int" default="10">
- </theme_item>
- <theme_item name="margin" data_type="constant" type="int" default="4">
- The margin around the [ColorPicker].
- </theme_item>
<theme_item name="overbright_indicator" data_type="icon" type="Texture2D">
The indicator used to signalize that the color value is outside the 0-1 range.
</theme_item>
@@ -122,11 +126,5 @@
<theme_item name="screen_picker" data_type="icon" type="Texture2D">
The icon for the screen color picker button.
</theme_item>
- <theme_item name="sv_height" data_type="constant" type="int" default="256">
- The height of the saturation-value selection box.
- </theme_item>
- <theme_item name="sv_width" data_type="constant" 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 fff27d2d56..f5e752578e 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPickerButton" inherits="Button" version="4.0">
+<class name="ColorPickerButton" inherits="Button" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Button that pops out a [ColorPicker].
</brief_description>
<description>
Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility.
See also [BaseButton] which contains common properties and methods associated with this node.
- [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.rect_min_size] to a big enough value to give the button enough space.
+ [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.minimum_size] to a big enough value to give the button enough space.
</description>
<tutorials>
<link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
@@ -35,7 +35,7 @@
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<signals>
<signal name="color_changed">
@@ -56,18 +56,6 @@
</signal>
</signals>
<theme_items>
- <theme_item name="bg" data_type="icon" type="Texture2D">
- The background of the color preview rect on the button.
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [ColorPickerButton] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" 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" data_type="font" type="Font">
- [Font] of the [ColorPickerButton]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [ColorPickerButton].
</theme_item>
@@ -86,21 +74,33 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 1)">
Text [Color] used when the [ColorPickerButton] is being pressed.
</theme_item>
+ <theme_item name="hseparation" data_type="constant" type="int" default="2">
+ The horizontal space between [ColorPickerButton]'s icon and text.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [ColorPickerButton]'s text.
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [ColorPickerButton]'s text.
</theme_item>
+ <theme_item name="bg" data_type="icon" type="Texture2D">
+ The background of the color preview rect on the button.
+ </theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [ColorPickerButton] is being hovered.
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="2">
- The horizontal space between [ColorPickerButton]'s icon and text.
- </theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [ColorPickerButton].
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
- </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [ColorPickerButton] is being pressed.
</theme_item>
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
index db0dfc705e..35f2d50d04 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" version="4.0">
+<class name="ColorRect" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Colored rectangle.
</brief_description>
diff --git a/doc/classes/CompressedCubemap.xml b/doc/classes/CompressedCubemap.xml
new file mode 100644
index 0000000000..fbb0879fdc
--- /dev/null
+++ b/doc/classes/CompressedCubemap.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CompressedCubemap" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/CompressedCubemapArray.xml b/doc/classes/CompressedCubemapArray.xml
new file mode 100644
index 0000000000..ff096cea47
--- /dev/null
+++ b/doc/classes/CompressedCubemapArray.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CompressedCubemapArray" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/StreamTexture2D.xml b/doc/classes/CompressedTexture2D.xml
index fb32f1e5d9..5f73b55f69 100644
--- a/doc/classes/StreamTexture2D.xml
+++ b/doc/classes/CompressedTexture2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTexture2D" inherits="Texture2D" version="4.0">
+<class name="CompressedTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [code].stex[/code] texture.
+ A [code].ctex[/code] texture.
</brief_description>
<description>
- A texture that is loaded from a [code].stex[/code] file.
+ A texture that is loaded from a [code].ctex[/code] file.
</description>
<tutorials>
</tutorials>
@@ -19,7 +19,7 @@
</methods>
<members>
<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.
+ The CompressedTexture's file path to a [code].ctex[/code] file.
</member>
</members>
</class>
diff --git a/doc/classes/CompressedTexture2DArray.xml b/doc/classes/CompressedTexture2DArray.xml
new file mode 100644
index 0000000000..0c751759af
--- /dev/null
+++ b/doc/classes/CompressedTexture2DArray.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CompressedTexture2DArray" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/StreamTexture3D.xml b/doc/classes/CompressedTexture3D.xml
index 1892676935..de7a93d788 100644
--- a/doc/classes/StreamTexture3D.xml
+++ b/doc/classes/CompressedTexture3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTexture3D" inherits="Texture3D" version="4.0">
+<class name="CompressedTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/StreamTextureLayered.xml b/doc/classes/CompressedTextureLayered.xml
index 7793bf8420..03bea84ba4 100644
--- a/doc/classes/StreamTextureLayered.xml
+++ b/doc/classes/CompressedTextureLayered.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTextureLayered" inherits="TextureLayered" version="4.0">
+<class name="CompressedTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index 2ace8c72d7..924178f9bf 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" version="4.0">
+<class name="ConcavePolygonShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Concave polygon 2D shape resource for physics.
</brief_description>
diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml
index fbbd0b4876..4e67f91db8 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConcavePolygonShape3D" inherits="Shape3D" version="4.0">
+<class name="ConcavePolygonShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Concave polygon shape.
</brief_description>
diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml
index dd65b3c688..f78a5b5332 100644
--- a/doc/classes/ConeTwistJoint3D.xml
+++ b/doc/classes/ConeTwistJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConeTwistJoint3D" inherits="Joint3D" version="4.0">
+<class name="ConeTwistJoint3D" inherits="Joint3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A twist joint between two 3D PhysicsBodies.
</brief_description>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 4f6f099ebd..b766981f1e 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="RefCounted" version="4.0">
+<class name="ConfigFile" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper class to handle INI-style files.
</brief_description>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index c4bdaf436d..2316e32b5d 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfirmationDialog" inherits="AcceptDialog" version="4.0">
+<class name="ConfirmationDialog" inherits="AcceptDialog" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Dialog for confirmation of actions.
</brief_description>
@@ -27,8 +27,8 @@
</method>
</methods>
<members>
- <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i(200, 70)" />
- <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i(200, 100)" />
- <member name="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" overrides="Window" default="Vector2i(200, 70)" />
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" overrides="Window" default="Vector2i(200, 100)" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Please Confirm...&quot;" />
</members>
</class>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index 24e73534d3..11b20b5654 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" version="4.0">
+<class name="Container" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base node for containers.
</brief_description>
@@ -10,6 +10,20 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <description>
+ Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
+ </description>
+ </method>
+ <method name="_get_allowed_size_flags_vertical" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <description>
+ Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
+ </description>
+ </method>
<method name="fit_child_in_rect">
<return type="void" />
<argument index="0" name="child" type="Control" />
@@ -26,7 +40,7 @@
</method>
</methods>
<members>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
</members>
<signals>
<signal name="pre_sort_children">
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 63e3eb7a5f..97fd584ed1 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" version="4.0">
+<class name="Control" inherits="CanvasItem" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
All user interface nodes inherit from Control. A control's anchors and offsets adapt its position and size relative to its parent.
</brief_description>
@@ -16,9 +16,9 @@
[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class.
</description>
<tutorials>
- <link title="GUI documentation index">https://docs.godotengine.org/en/latest/tutorials/ui/index.html</link>
- <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
- <link title="Control node gallery">https://docs.godotengine.org/en/latest/tutorials/ui/control_node_gallery.html</link>
+ <link title="GUI documentation index">$DOCS_URL/tutorials/ui/index.html</link>
+ <link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Control node gallery">$DOCS_URL/tutorials/ui/control_node_gallery.html</link>
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
@@ -100,8 +100,9 @@
<method name="_get_minimum_size" qualifiers="virtual const">
<return type="Vector2" />
<description>
- Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member rect_min_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
+ Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
If not overridden, defaults to [constant Vector2.ZERO].
+ [b]Note:[/b] This method will not be called when the script is attached to a [Control] node that already overrides its minimum size (e.g. [Label], [Button], [PanelContainer] etc.). It can only be used with most basic GUI nodes, like [Control], [Container], [Panel] etc.
</description>
</method>
<method name="_gui_input" qualifiers="virtual">
@@ -136,7 +137,7 @@
* control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event;
- * it happens outside the parent's rectangle and the parent has either [member rect_clip_content] enabled.
+ * it happens outside the parent's rectangle and the parent has either [member clip_contents] enabled.
[b]Note:[/b] Event position is relative to the control origin.
</description>
</method>
@@ -156,7 +157,7 @@
Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property.
The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead.
The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member hint_tooltip] for an example).
- [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member rect_min_size] to some non-zero value.
+ [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member minimum_size] to some non-zero value.
[b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably.
Example of usage with a custom-constructed node:
[codeblocks]
@@ -200,7 +201,7 @@
<argument index="1" name="text" type="String" />
<description>
User defined BiDi algorithm override function.
- Return [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately.
+ Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
<method name="accept_event">
@@ -350,13 +351,13 @@
<method name="get_begin" qualifiers="const">
<return type="Vector2" />
<description>
- Returns [member offset_left] and [member offset_top]. See also [member rect_position].
+ Returns [member offset_left] and [member offset_top]. See also [member position].
</description>
</method>
<method name="get_combined_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns combined minimum size from [member rect_min_size] and [method get_minimum_size].
+ Returns combined minimum size from [member minimum_size] and [method get_minimum_size].
</description>
</method>
<method name="get_cursor_shape" qualifiers="const">
@@ -379,22 +380,16 @@
Returns the focus neighbor for the specified [enum Side]. A getter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
</description>
</method>
- <method name="get_focus_owner" qualifiers="const">
- <return type="Control" />
- <description>
- Returns the control that has the keyboard focus or [code]null[/code] if none.
- </description>
- </method>
<method name="get_global_rect" qualifiers="const">
<return type="Rect2" />
<description>
- Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size].
+ Returns the position and size of the control relative to the top-left corner of the screen. See [member position] and [member size].
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the minimum size for this control. See [member rect_min_size].
+ Returns the minimum size for this control. See [member minimum_size].
</description>
</method>
<method name="get_offset" qualifiers="const">
@@ -419,7 +414,7 @@
<method name="get_rect" qualifiers="const">
<return type="Rect2" />
<description>
- Returns the position and size of the control relative to the top-left corner of the parent Control. See [member rect_position] and [member rect_size].
+ Returns the position and size of the control relative to the top-left corner of the parent Control. See [member position] and [member size].
</description>
</method>
<method name="get_theme_color" qualifiers="const">
@@ -654,16 +649,16 @@
See [method add_theme_stylebox_override].
</description>
</method>
- <method name="is_layout_rtl" qualifiers="const">
+ <method name="is_drag_successful" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if layout is right-to-left.
+ Returns [code]true[/code] if drag operation is successful.
</description>
</method>
- <method name="minimum_size_changed">
- <return type="void" />
+ <method name="is_layout_rtl" qualifiers="const">
+ <return type="bool" />
<description>
- Invalidates the size cache in this node and in parent nodes up to top_level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically.
+ Returns [code]true[/code] if layout is right-to-left.
</description>
</method>
<method name="release_focus">
@@ -714,6 +709,12 @@
Removes a local override for a theme [StyleBox] with the specified [code]name[/code] previously added by [method add_theme_stylebox_override] or via the Inspector dock.
</description>
</method>
+ <method name="reset_size">
+ <return type="void" />
+ <description>
+ Resets the size to [method get_combined_minimum_size]. This is equivalent to calling [code]set_size(Vector2())[/code] (or any size below the minimum).
+ </description>
+ </method>
<method name="set_anchor">
<return type="void" />
<argument index="0" name="side" type="int" enum="Side" />
@@ -758,7 +759,7 @@
<return type="void" />
<argument index="0" name="position" type="Vector2" />
<description>
- Sets [member offset_left] and [member offset_top] at the same time. Equivalent of changing [member rect_position].
+ Sets [member offset_left] and [member offset_top] at the same time. Equivalent of changing [member position].
</description>
</method>
<method name="set_drag_forwarding">
@@ -839,7 +840,7 @@
# Use a control that is not in the tree
var cpb = ColorPickerButton.new()
cpb.color = color
- cpb.rect_size = Vector2(50, 50)
+ cpb.size = Vector2(50, 50)
set_drag_preview(cpb)
return color
[/gdscript]
@@ -880,7 +881,7 @@
<argument index="0" name="position" type="Vector2" />
<argument index="1" name="keep_offsets" type="bool" default="false" />
<description>
- Sets the [member rect_global_position] to given [code]position[/code].
+ Sets the [member global_position] to given [code]position[/code].
If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
@@ -908,7 +909,7 @@
<argument index="0" name="position" type="Vector2" />
<argument index="1" name="keep_offsets" type="bool" default="false" />
<description>
- Sets the [member rect_position] to given [code]position[/code].
+ Sets the [member position] to given [code]position[/code].
If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
@@ -917,15 +918,21 @@
<argument index="0" name="size" type="Vector2" />
<argument index="1" name="keep_offsets" type="bool" default="false" />
<description>
- Sets the size (see [member rect_size]).
+ Sets the size (see [member size]).
If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
+ <method name="update_minimum_size">
+ <return type="void" />
+ <description>
+ Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member minimum_size] directly calls this method automatically.
+ </description>
+ </method>
<method name="warp_mouse">
<return type="void" />
<argument index="0" name="to_position" type="Vector2" />
<description>
- Moves the mouse cursor to [code]to_position[/code], relative to [member rect_position] of this [Control].
+ Moves the mouse cursor to [code]to_position[/code], relative to [member position] of this [Control].
</description>
</method>
</methods>
@@ -946,6 +953,9 @@
Toggles if any text should automatically change to its translated version depending on the current locale. Note that this will not affect any internal nodes (e.g. the popup of a [MenuButton]).
Also decides if the node's strings should be parsed for POT generation.
</member>
+ <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
+ Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.
+ </member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
</member>
@@ -969,6 +979,9 @@
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="global_position" type="Vector2" setter="_set_global_position" getter="get_global_position">
+ The node's global position, relative to the world (usually to the top-left corner of the window).
+ </member>
<member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection" default="1">
Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
</member>
@@ -1000,6 +1013,9 @@
<member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" enum="Control.LayoutDirection" default="0">
Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</member>
+ <member name="minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
+ The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
+ </member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0">
The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.
[b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system.
@@ -1023,30 +1039,21 @@
Distance between the node's top edge and its parent control, based on [member anchor_top].
Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
- Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.
- </member>
- <member name="rect_global_position" type="Vector2" setter="_set_global_position" getter="get_global_position">
- The node's global position, relative to the world (usually to the top-left corner of the window).
+ <member name="pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" default="Vector2(0, 0)">
+ By default, the node's pivot is its top-left corner. When you change its [member rotation] or [member scale], it will rotate or scale around this pivot. Set this property to [member size] / 2 to pivot around the Control's center.
</member>
- <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
- The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
+ <member name="position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2(0, 0)">
+ The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member pivot_offset].
</member>
- <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" default="Vector2(0, 0)">
- By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle.
+ <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
+ The node's rotation around its pivot, in radians. See [member pivot_offset] to change the pivot's position.
</member>
- <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2(0, 0)">
- The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset].
+ <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
+ The node's scale, relative to its [member size]. Change this property to scale the node around its [member pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
+ [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
+ [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]await get_tree().process_frame[/code] then set its [member scale] property.
</member>
- <member name="rect_rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
- The node's rotation around its pivot, in radians. See [member rect_pivot_offset] to change the pivot's position.
- </member>
- <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
- The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
- [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
- [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]await get_tree().process_frame[/code] then set its [member rect_scale] property.
- </member>
- <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)">
+ <member name="size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
</member>
<member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" default="1">
@@ -1100,6 +1107,12 @@
<description>
Emitted when the mouse leaves the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it.
[b]Note:[/b] [signal mouse_exited] will be emitted if the mouse enters a child [Control] node, even if the mouse cursor is still inside the parent's [code]Rect[/code] area.
+ If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this:
+ [codeblock]
+ func _on_mouse_exited():
+ if not Rect2(Vector2(), size).has_point(get_local_mouse_position()):
+ # Not hovering over area.
+ [/codeblock]
</description>
</signal>
<signal name="resized">
@@ -1128,7 +1141,7 @@
The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with [member focus_mode].
</constant>
<constant name="NOTIFICATION_RESIZED" value="40">
- Sent when the node changes size. Use [member rect_size] to get the new size.
+ Sent when the node changes size. Use [member size] to get the new size.
</constant>
<constant name="NOTIFICATION_MOUSE_ENTER" value="41">
Sent when the mouse pointer enters the node.
@@ -1265,20 +1278,24 @@
<constant name="PRESET_MODE_KEEP_SIZE" value="3" enum="LayoutPresetMode">
The control's size will not change.
</constant>
+ <constant name="SIZE_SHRINK_BEGIN" value="0" enum="SizeFlags">
+ Tells the parent [Container] to align the node with its start, either the top or the left edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ [b]Note:[/b] Setting this flag is equal to not having any size flags.
+ </constant>
<constant name="SIZE_FILL" value="1" enum="SizeFlags">
- Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="SIZE_EXPAND" value="2" enum="SizeFlags">
Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="SIZE_EXPAND_FILL" value="3" enum="SizeFlags">
- Sets the node's size flags to both fill and expand. See the 2 constants above for more information.
+ Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information.
</constant>
<constant name="SIZE_SHRINK_CENTER" value="4" enum="SizeFlags">
- Tells the parent [Container] to center the node in itself. It centers the control based on its bounding box, so it doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ Tells the parent [Container] to center the node in the available space. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="SIZE_SHRINK_END" value="8" enum="SizeFlags">
- Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter">
The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls.
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index ec7583e68b..449c3132c7 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" version="4.0">
+<class name="ConvexPolygonShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Convex polygon shape for 2D physics.
</brief_description>
@@ -20,7 +20,7 @@
</methods>
<members>
<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.
+ The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [method set_point_cloud] to generate a convex hull shape from concave shape points.
</member>
</members>
</class>
diff --git a/doc/classes/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml
index 832e073665..d2f110d187 100644
--- a/doc/classes/ConvexPolygonShape3D.xml
+++ b/doc/classes/ConvexPolygonShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConvexPolygonShape3D" inherits="Shape3D" version="4.0">
+<class name="ConvexPolygonShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Convex polygon shape for 3D physics.
</brief_description>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index 04aee347e0..c0a76dc80e 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="RefCounted" version="4.0">
+<class name="Crypto" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Access to advanced cryptographic functionalities.
</brief_description>
diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml
index 111da858ea..b0abdf60c8 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CryptoKey" inherits="Resource" version="4.0">
+<class name="CryptoKey" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A cryptographic key (RSA).
</brief_description>
@@ -14,7 +14,7 @@
<method name="is_public_only" qualifiers="const">
<return type="bool" />
<description>
- Return [code]true[/code] if this CryptoKey only has the public part, and not the private one.
+ Returns [code]true[/code] if this CryptoKey only has the public part, and not the private one.
</description>
</method>
<method name="load">
diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml
index 886dc36bdf..7173388027 100644
--- a/doc/classes/Cubemap.xml
+++ b/doc/classes/Cubemap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Cubemap" inherits="ImageTextureLayered" version="4.0">
+<class name="Cubemap" inherits="ImageTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
6-sided texture typically used in 3D rendering.
</brief_description>
diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml
index 9f2231886d..4fca842b5a 100644
--- a/doc/classes/CubemapArray.xml
+++ b/doc/classes/CubemapArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubemapArray" inherits="ImageTextureLayered" version="4.0">
+<class name="CubemapArray" inherits="ImageTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
index 2c337c32db..16d0e82a1f 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" version="4.0">
+<class name="Curve" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A mathematic curve.
</brief_description>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 8c5b39a895..94e52912a1 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" version="4.0">
+<class name="Curve2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Describes a Bézier curve in 2D space.
</brief_description>
@@ -17,7 +17,7 @@
<argument index="2" name="out" type="Vector2" default="Vector2(0, 0)" />
<argument index="3" name="at_position" type="int" default="-1" />
<description>
- Adds a point to a curve at [code]position[/code], with control points [code]in[/code] and [code]out[/code].
+ Adds a point to a curve at [code]position[/code] relative to the [Curve2D]'s position, with control points [code]in[/code] and [code]out[/code].
If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt;0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list.
</description>
</method>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 30e9e2ac68..ed642e0ddc 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve3D" inherits="Resource" version="4.0">
+<class name="Curve3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Describes a Bézier curve in 3D space.
</brief_description>
@@ -17,7 +17,7 @@
<argument index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)" />
<argument index="3" name="at_position" type="int" default="-1" />
<description>
- Adds a point to a curve at [code]position[/code], with control points [code]in[/code] and [code]out[/code].
+ Adds a point to a curve at [code]position[/code] relative to the [Curve3D]'s position, with control points [code]in[/code] and [code]out[/code].
If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt;0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list.
</description>
</method>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index fe75f029f0..6aa39e453e 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="Texture2D" version="4.0">
+<class name="CurveTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A texture that shows a curve.
</brief_description>
@@ -14,7 +14,7 @@
</member>
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0">
</member>
- <member name="width" type="int" setter="set_width" getter="get_width" default="2048">
+ <member name="width" type="int" setter="set_width" getter="get_width" default="256">
The width of the texture.
</member>
</members>
diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml
index 815653e987..d289e394aa 100644
--- a/doc/classes/CurveXYZTexture.xml
+++ b/doc/classes/CurveXYZTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CurveXYZTexture" inherits="Texture2D" version="4.0">
+<class name="CurveXYZTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -13,7 +13,7 @@
</member>
<member name="curve_z" type="Curve" setter="set_curve_z" getter="get_curve_z">
</member>
- <member name="width" type="int" setter="set_width" getter="get_width" default="2048">
+ <member name="width" type="int" setter="set_width" getter="get_width" default="256">
</member>
</members>
</class>
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
index 077435990b..e141ba8203 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" version="4.0">
+<class name="CylinderMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class representing a cylindrical [PrimitiveMesh].
</brief_description>
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<members>
- <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="1.0">
+ <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="0.5">
Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape.
</member>
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
@@ -21,7 +21,7 @@
<member name="rings" type="int" setter="set_rings" getter="get_rings" default="4">
Number of edge rings along the height of the cylinder. Changing [member rings] does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, [member rings] should be kept to its default value.
</member>
- <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" default="1.0">
+ <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" default="0.5">
Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape.
</member>
</members>
diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml
index d40b96710b..06ad590bb3 100644
--- a/doc/classes/CylinderShape3D.xml
+++ b/doc/classes/CylinderShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CylinderShape3D" inherits="Shape3D" version="4.0">
+<class name="CylinderShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Cylinder shape for collisions.
</brief_description>
@@ -15,7 +15,7 @@
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
The cylinder's height.
</member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
The cylinder's radius.
</member>
</members>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
index f98d8813c9..5d8a2bc16d 100644
--- a/doc/classes/DTLSServer.xml
+++ b/doc/classes/DTLSServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DTLSServer" inherits="RefCounted" version="4.0">
+<class name="DTLSServer" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper class to implement a DTLS server.
</brief_description>
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
index 76e38d5271..994b3503b3 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" version="4.0">
+<class name="DampedSpringJoint2D" inherits="Joint2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Damped spring constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
index e993fc6198..342bc762af 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Decal" inherits="VisualInstance3D" version="4.0">
+<class name="Decal" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node that projects a texture onto a [MeshInstance3D].
</brief_description>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index bab1a261ab..ab04366eb7 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Dictionary" version="4.0">
+<class name="Dictionary" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Dictionary type.
</brief_description>
@@ -177,24 +177,26 @@
[b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary itself can still be mutated by defining the values of individual keys. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
</description>
<tutorials>
- <link title="GDScript basics: Dictionary">https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link>
+ <link title="GDScript basics: Dictionary">$DOCS_URL/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
- <methods>
- <method name="Dictionary" qualifiers="constructor">
+ <constructors>
+ <constructor name="Dictionary">
<return type="Dictionary" />
<description>
Constructs an empty [Dictionary].
</description>
- </method>
- <method name="Dictionary" qualifiers="constructor">
+ </constructor>
+ <constructor name="Dictionary">
<return type="Dictionary" />
<argument index="0" name="from" type="Dictionary" />
<description>
Constructs a [Dictionary] as a copy of the given [Dictionary].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="clear">
<return type="void" />
<description>
@@ -257,7 +259,7 @@
<method name="hash" qualifiers="const">
<return type="int" />
<description>
- Returns a hashed integer value representing the dictionary contents. This can be used to compare dictionaries by value:
+ Returns a hashed 32-bit integer value representing the dictionary contents. This can be used to compare dictionaries by value:
[codeblocks]
[gdscript]
var dict1 = {0: 10}
@@ -274,6 +276,7 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] Dictionaries with the same keys/values but in a different order will have a different hash.
+ [b]Note:[/b] Dictionaries with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] imply the dictionaries are equal, because different dictionaries can have identical hash values due to hash collisions.
</description>
</method>
<method name="is_empty" qualifiers="const">
@@ -288,45 +291,47 @@
Returns the list of keys in the [Dictionary].
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
+ <method name="size" qualifiers="const">
+ <return type="int" />
<description>
+ Returns the number of keys in the dictionary.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Dictionary" />
+ <method name="values" qualifiers="const">
+ <return type="Array" />
<description>
+ Returns the list of values in the [Dictionary].
</description>
</method>
- <method name="operator ==" qualifiers="operator">
+ </methods>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="Dictionary" />
<description>
</description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="Variant" />
- <argument index="0" name="key" type="Variant" />
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
<description>
</description>
- </method>
- <method name="size" qualifiers="const">
- <return type="int" />
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Dictionary" />
<description>
- Returns the number of keys in the dictionary.
</description>
- </method>
- <method name="values" qualifiers="const">
- <return type="Array" />
+ </operator>
+ <operator name="operator []">
+ <return type="Variant" />
+ <argument index="0" name="key" type="Variant" />
<description>
- Returns the list of values in the [Dictionary].
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/DirectionalLight2D.xml b/doc/classes/DirectionalLight2D.xml
index 1e5c9bc09a..a1b8ea86be 100644
--- a/doc/classes/DirectionalLight2D.xml
+++ b/doc/classes/DirectionalLight2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DirectionalLight2D" inherits="Light2D" version="4.0">
+<class name="DirectionalLight2D" inherits="Light2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index 44d982cbcc..ad2663a61b 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DirectionalLight3D" inherits="Light3D" version="4.0">
+<class name="DirectionalLight3D" inherits="Light3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Directional light from a distance, as from the Sun.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="Lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
</tutorials>
<members>
<member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false">
@@ -34,7 +34,7 @@
<member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5">
The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS].
</member>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.1" />
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.1" />
<member name="use_in_sky_only" type="bool" setter="set_sky_only" getter="is_sky_only" default="false">
If [code]true[/code], this [DirectionalLight3D] will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
</member>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 93f04ff2a2..7d72cd867c 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="RefCounted" version="4.0">
+<class name="Directory" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Type used to handle the filesystem.
</brief_description>
@@ -54,7 +54,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="File system">https://docs.godotengine.org/en/latest/tutorials/scripting/filesystem.html</link>
+ <link title="File system">$DOCS_URL/tutorials/scripting/filesystem.html</link>
</tutorials>
<methods>
<method name="change_dir">
@@ -108,17 +108,37 @@
Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive.
</description>
</method>
+ <method name="get_directories">
+ <return type="PackedStringArray" />
+ <description>
+ Returns a [PackedStringArray] containing filenames of the directory contents, excluding files. The array is sorted alphabetically.
+ Affected by [member include_hidden] and [member include_navigational].
+ </description>
+ </method>
<method name="get_drive">
<return type="String" />
<argument index="0" name="idx" type="int" />
<description>
- On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not exist, the method returns an empty String.
+ On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]).
+ On macOS, returns the path to the mounted volume passed as an argument.
+ On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument.
+ On other platforms, or if the requested drive does not exist, the method returns an empty String.
</description>
</method>
<method name="get_drive_count">
<return type="int" />
<description>
- On Windows, returns the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0.
+ On Windows, returns the number of drives (partitions) mounted on the current filesystem.
+ On macOS, returns the number of mounted volumes.
+ On Linux, returns the number of mounted volumes and GTK 3 bookmarks.
+ On other platforms, the method returns 0.
+ </description>
+ </method>
+ <method name="get_files">
+ <return type="PackedStringArray" />
+ <description>
+ Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories. The array is sorted alphabetically.
+ Affected by [member include_hidden].
</description>
</method>
<method name="get_next">
@@ -136,12 +156,10 @@
</method>
<method name="list_dir_begin">
<return type="int" enum="Error" />
- <argument index="0" name="show_navigational" type="bool" default="false" />
- <argument index="1" name="show_hidden" type="bool" default="false" />
<description>
Initializes the stream used to list all files and directories using the [method get_next] function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
- If [code]show_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are included too.
- If [code]show_hidden[/code] is [code]true[/code], hidden files are included too.
+ Affected by [member include_hidden] and [member include_navigational].
+ [b]Note:[/b] The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use [method get_files] or [method get_directories].
</description>
</method>
<method name="list_dir_end">
@@ -192,4 +210,14 @@
</description>
</method>
</methods>
+ <members>
+ <member name="include_hidden" type="bool" setter="set_include_hidden" getter="get_include_hidden" default="false">
+ If [code]true[/code], hidden files are included when the navigating directory.
+ Affects [method list_dir_begin], [method get_directories] and [method get_files].
+ </member>
+ <member name="include_navigational" type="bool" setter="set_include_navigational" getter="get_include_navigational" default="false">
+ If [code]true[/code], [code].[/code] and [code]..[/code] are included when navigating the directory.
+ Affects [method list_dir_begin] and [method get_directories].
+ </member>
+ </members>
</class>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 92d6a220d2..5a67170086 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DisplayServer" inherits="Object" version="4.0">
+<class name="DisplayServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -20,6 +20,12 @@
[b]Note:[/b] This method is only implemented on Linux.
</description>
</method>
+ <method name="clipboard_has" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if there is content on the user's clipboard.
+ </description>
+ </method>
<method name="clipboard_set">
<return type="void" />
<argument index="0" name="clipboard" type="String" />
@@ -35,12 +41,6 @@
[b]Note:[/b] This method is only implemented on Linux.
</description>
</method>
- <method name="console_set_visible">
- <return type="void" />
- <argument index="0" name="console_visible" type="bool" />
- <description>
- </description>
- </method>
<method name="create_sub_window">
<return type="int" />
<argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode" />
@@ -281,11 +281,6 @@
<description>
</description>
</method>
- <method name="is_console_visible" qualifiers="const">
- <return type="bool" />
- <description>
- </description>
- </method>
<method name="keyboard_get_current_layout" qualifiers="const">
<return type="int" />
<description>
@@ -332,11 +327,6 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
- <method name="mouse_get_absolute_position" qualifiers="const">
- <return type="Vector2i" />
- <description>
- </description>
- </method>
<method name="mouse_get_button_state" qualifiers="const">
<return type="int" enum="MouseButton" />
<description>
@@ -392,7 +382,7 @@
<method name="screen_get_max_scale" qualifiers="const">
<return type="float" />
<description>
- Return the greatest scale factor of all screens.
+ Returns the greatest scale factor of all screens.
[b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -409,11 +399,25 @@
<description>
</description>
</method>
+ <method name="screen_get_refresh_rate" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="screen" type="int" default="-1" />
+ <description>
+ Returns the current refresh rate of the specified screen. If [code]screen[/code] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used.
+ [b]Note:[/b] Returns [code]-1.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, [method screen_get_refresh_rate] will always return [code]-1.0[/code] as there is no way to retrieve the refresh rate on that platform.
+ To fallback to a default refresh rate if the method fails, try:
+ [codeblock]
+ var refresh_rate = DisplayServer.screen_get_refresh_rate()
+ if refresh_rate &lt; 0:
+ refresh_rate = 60.0
+ [/codeblock]
+ </description>
+ </method>
<method name="screen_get_scale" qualifiers="const">
<return type="float" />
<argument index="0" name="screen" type="int" default="-1" />
<description>
- Return the scale factor of the specified screen by index.
+ Returns the scale factor of the specified screen by index.
[b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -511,7 +515,7 @@
<method name="virtual_keyboard_show">
<return type="void" />
<argument index="0" name="existing_text" type="String" />
- <argument index="1" name="position" type="Rect2" default="Rect2i(0, 0, 0, 0)" />
+ <argument index="1" name="position" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<argument index="2" name="multiline" type="bool" default="false" />
<argument index="3" name="max_length" type="int" default="-1" />
<argument index="4" name="cursor_start" type="int" default="-1" />
@@ -540,6 +544,12 @@
<description>
</description>
</method>
+ <method name="window_get_active_popup" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns ID of the active popup window, or [constant INVALID_WINDOW_ID] if there is none.
+ </description>
+ </method>
<method name="window_get_attached_instance_id" qualifiers="const">
<return type="int" />
<argument index="0" name="window_id" type="int" default="0" />
@@ -579,6 +589,22 @@
Returns the mode of the given window.
</description>
</method>
+ <method name="window_get_native_handle" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="handle_type" type="int" enum="DisplayServer.HandleType" />
+ <argument index="1" name="window_id" type="int" default="0" />
+ <description>
+ Returns internal structure pointers for use in plugins.
+ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
+ </description>
+ </method>
+ <method name="window_get_popup_safe_rect" qualifiers="const">
+ <return type="Rect2i" />
+ <argument index="0" name="window" type="int" />
+ <description>
+ Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
+ </description>
+ </method>
<method name="window_get_position" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="window_id" type="int" default="0" />
@@ -631,6 +657,16 @@
<description>
</description>
</method>
+ <method name="window_set_exclusive">
+ <return type="void" />
+ <argument index="0" name="window_id" type="int" />
+ <argument index="1" name="exclusive" type="bool" />
+ <description>
+ If set to [code]true[/code], this window will always stay on top of its parent window, parent window will ignore input while this window is opened.
+ [b]Note:[/b] On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
+ [b]Note:[/b] This method is implemented on macOS and Windows.
+ </description>
+ </method>
<method name="window_set_flag">
<return type="void" />
<argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" />
@@ -726,6 +762,14 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
+ <method name="window_set_popup_safe_rect">
+ <return type="void" />
+ <argument index="0" name="window" type="int" />
+ <argument index="1" name="rect" type="Rect2i" />
+ <description>
+ Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup.
+ </description>
+ </method>
<method name="window_set_position">
<return type="void" />
<argument index="0" name="position" type="Vector2i" />
@@ -803,23 +847,21 @@
</constant>
<constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature">
</constant>
- <constant name="FEATURE_CONSOLE_WINDOW" value="10" enum="Feature">
- </constant>
- <constant name="FEATURE_IME" value="11" enum="Feature">
+ <constant name="FEATURE_IME" value="10" enum="Feature">
</constant>
- <constant name="FEATURE_WINDOW_TRANSPARENCY" value="12" enum="Feature">
+ <constant name="FEATURE_WINDOW_TRANSPARENCY" value="11" enum="Feature">
</constant>
- <constant name="FEATURE_HIDPI" value="13" enum="Feature">
+ <constant name="FEATURE_HIDPI" value="12" enum="Feature">
</constant>
- <constant name="FEATURE_ICON" value="14" enum="Feature">
+ <constant name="FEATURE_ICON" value="13" enum="Feature">
</constant>
- <constant name="FEATURE_NATIVE_ICON" value="15" enum="Feature">
+ <constant name="FEATURE_NATIVE_ICON" value="14" enum="Feature">
</constant>
- <constant name="FEATURE_ORIENTATION" value="16" enum="Feature">
+ <constant name="FEATURE_ORIENTATION" value="15" enum="Feature">
</constant>
- <constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature">
+ <constant name="FEATURE_SWAP_BUFFERS" value="16" enum="Feature">
</constant>
- <constant name="FEATURE_CLIPBOARD_PRIMARY" value="19" enum="Feature">
+ <constant name="FEATURE_CLIPBOARD_PRIMARY" value="18" enum="Feature">
</constant>
<constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
Makes the mouse cursor visible if it is hidden.
@@ -901,19 +943,32 @@
</constant>
<constant name="WINDOW_MODE_FULLSCREEN" value="3" enum="WindowMode">
Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ </constant>
+ <constant name="WINDOW_MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="WindowMode">
+ Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN].
+ Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
</constant>
<constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags">
+ Window can't be resizing by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
</constant>
<constant name="WINDOW_FLAG_BORDERLESS" value="1" enum="WindowFlags">
+ Window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
</constant>
<constant name="WINDOW_FLAG_ALWAYS_ON_TOP" value="2" enum="WindowFlags">
+ Window is floating above other regular windows. This flag is ignored for full-screen windows.
</constant>
<constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags">
+ Window is will be destroyed with its transient parent and displayed on top of non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
</constant>
<constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags">
+ Window can't be focused. No-focus window will ignore all input, except mouse clicks.
+ </constant>
+ <constant name="WINDOW_FLAG_POPUP" value="5" enum="WindowFlags">
+ Window is part of menu or [OptionButton] dropdown. This flag can't be changed when window is visible. An active popup window will exclusivly receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [constant WINDOW_FLAG_TRANSPARENT] set.
</constant>
- <constant name="WINDOW_FLAG_MAX" value="5" enum="WindowFlags">
+ <constant name="WINDOW_FLAG_MAX" value="6" enum="WindowFlags">
</constant>
<constant name="WINDOW_EVENT_MOUSE_ENTER" value="0" enum="WindowEvent">
</constant>
@@ -942,5 +997,22 @@
Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible).
Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag.
</constant>
+ <constant name="DISPLAY_HANDLE" value="0" enum="HandleType">
+ Display handle:
+ - Linux: [code]X11::Display*[/code] for the display.
+ </constant>
+ <constant name="WINDOW_HANDLE" value="1" enum="HandleType">
+ Window handle:
+ - Windows: [code]HWND[/code] for the window.
+ - Linux: [code]X11::Window*[/code] for the window.
+ - MacOS: [code]NSWindow*[/code] for the window.
+ - iOS: [code]UIViewController*[/code] for the view controller.
+ - Android: [code]jObject[/code] for the activity.
+ </constant>
+ <constant name="WINDOW_VIEW" value="2" enum="HandleType">
+ Window view:
+ - MacOS: [code]NSView*[/code] for the window main view.
+ - iOS: [code]UIView*[/code] for the window main view.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml
index 01b8593f89..2cc07c7f1b 100644
--- a/doc/classes/EditorCommandPalette.xml
+++ b/doc/classes/EditorCommandPalette.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorCommandPalette" inherits="ConfirmationDialog" version="4.0">
+<class name="EditorCommandPalette" inherits="ConfirmationDialog" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Godot editor's command palette.
</brief_description>
@@ -49,6 +49,6 @@
</method>
</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="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
</members>
</class>
diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml
index 6687d3c3ac..ba0a479fa7 100644
--- a/doc/classes/EditorDebuggerPlugin.xml
+++ b/doc/classes/EditorDebuggerPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorDebuggerPlugin" inherits="Control" version="4.0">
+<class name="EditorDebuggerPlugin" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A base class to implement debugger plugins.
</brief_description>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 3830bfc60e..698d3bfcce 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorExportPlugin" inherits="RefCounted" version="4.0">
+<class name="EditorExportPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A script that is executed when exporting the project.
</brief_description>
@@ -96,12 +96,22 @@
Adds a static lib from the given [code]path[/code] to the iOS project.
</description>
</method>
+ <method name="add_osx_plugin_file">
+ <return type="void" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Adds file or directory matching [code]path[/code] to [code]PlugIns[/code] directory of macOS app bundle.
+ [b]Note:[/b] This is useful only for macOS exports.
+ </description>
+ </method>
<method name="add_shared_object">
<return type="void" />
<argument index="0" name="path" type="String" />
<argument index="1" name="tags" type="PackedStringArray" />
<description>
- Adds a shared object with the given [code]tags[/code] and destination [code]path[/code].
+ Adds a shared object or a directory containing only shared objects with the given [code]tags[/code] and destination [code]path[/code].
+ [b]Note:[/b] In case of macOS exports, those shared objects will be added to [code]Frameworks[/code] directory of app bundle.
+ In case of a directory code-sign will error if you place non code object in directory.
</description>
</method>
<method name="skip">
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index a41730d5d0..2ab87b0dd1 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFeatureProfile" inherits="RefCounted" version="4.0">
+<class name="EditorFeatureProfile" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An editor feature profile which can be used to disable specific features.
</brief_description>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 65f8ddfb97..b1fd7b4e76 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileDialog" inherits="ConfirmationDialog" version="4.0">
+<class name="EditorFileDialog" inherits="ConfirmationDialog" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modified version of [FileDialog] used by the editor.
</brief_description>
@@ -49,7 +49,7 @@
<member name="current_path" type="String" setter="set_current_path" getter="get_current_path">
The file system path in the address bar.
</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="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
<member name="disable_overwrite_warning" type="bool" setter="set_disable_overwrite_warning" getter="is_overwrite_warning_disabled" default="false">
If [code]true[/code], the [EditorFileDialog] will not warn the user before overwriting files.
</member>
@@ -62,7 +62,7 @@
<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="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" overrides="Window" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 859480078b..300cb4bfd6 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileSystem" inherits="Node" version="4.0">
+<class name="EditorFileSystem" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Resource filesystem, as the editor sees it.
</brief_description>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index 6a0a94a4c4..98fea40a50 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" version="4.0">
+<class name="EditorFileSystemDirectory" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A directory for the resource filesystem.
</brief_description>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index cb33f159ef..2e84d3094f 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" version="4.0">
+<class name="EditorImportPlugin" inherits="ResourceImporter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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>
@@ -111,12 +111,13 @@
To use [EditorImportPlugin], register it using the [method EditorPlugin.add_import_plugin] method first.
</description>
<tutorials>
- <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
+ <link title="Import plugins">$DOCS_URL/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<methods>
<method name="_get_import_options" qualifiers="virtual const">
<return type="Array" />
- <argument index="0" name="preset_index" type="int" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="preset_index" type="int" />
<description>
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional).
</description>
@@ -135,8 +136,9 @@
</method>
<method name="_get_option_visibility" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="option_name" type="StringName" />
- <argument index="1" name="options" type="Dictionary" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="option_name" type="StringName" />
+ <argument index="2" name="options" type="Dictionary" />
<description>
This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
[codeblocks]
@@ -161,7 +163,7 @@
}
[/csharp]
[/codeblocks]
- Return [code]true[/code] to make all options always visible.
+ Returns [code]true[/code] to make all options always visible.
</description>
</method>
<method name="_get_preset_count" qualifiers="virtual const">
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 0c47298180..cd249ed319 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInspector" inherits="ScrollContainer" version="4.0">
+<class name="EditorInspector" inherits="ScrollContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A tab used to edit properties of the selected node.
</brief_description>
@@ -10,9 +10,14 @@
<tutorials>
</tutorials>
<members>
- <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" />
+ <member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
</members>
<signals>
+ <signal name="edited_object_changed">
+ <description>
+ Emitted when the object being edited by the inspector has changed.
+ </description>
+ </signal>
<signal name="object_id_selected">
<argument index="0" name="id" type="int" />
<description>
@@ -33,6 +38,8 @@
</signal>
<signal name="property_keyed">
<argument index="0" name="property" type="String" />
+ <argument index="1" name="value" type="Variant" />
+ <argument index="2" name="advance" type="bool" />
<description>
Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled.
</description>
@@ -52,8 +59,8 @@
</description>
</signal>
<signal name="resource_selected">
- <argument index="0" name="res" type="Object" />
- <argument index="1" name="prop" type="String" />
+ <argument index="0" name="resource" type="Resource" />
+ <argument index="1" name="path" type="String" />
<description>
Emitted when a resource is selected in the inspector.
</description>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index f65e974d47..2bbed84b1e 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="RefCounted" version="4.0">
+<class name="EditorInspectorPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plugin for adding custom property editors on inspector.
</brief_description>
@@ -13,7 +13,7 @@
To use [EditorInspectorPlugin], register it using the [method EditorPlugin.add_inspector_plugin] method first.
</description>
<tutorials>
- <link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link>
+ <link title="Inspector plugins">$DOCS_URL/tutorials/plugins/editor/inspector_plugins.html</link>
</tutorials>
<methods>
<method name="_can_handle" qualifiers="virtual const">
@@ -25,8 +25,9 @@
</method>
<method name="_parse_begin" qualifiers="virtual">
<return type="void" />
+ <argument index="0" name="object" type="Object" />
<description>
- Called to allow adding controls at the beginning of the list.
+ Called to allow adding controls at the beginning of the property list for [code]object[/code].
</description>
</method>
<method name="_parse_category" qualifiers="virtual">
@@ -34,12 +35,22 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="category" type="String" />
<description>
+ Called to allow adding controls at the beginning of a category in the property list for [code]object[/code].
</description>
</method>
<method name="_parse_end" qualifiers="virtual">
<return type="void" />
+ <argument index="0" name="object" type="Object" />
+ <description>
+ Called to allow adding controls at the end of the property list for [code]object[/code].
+ </description>
+ </method>
+ <method name="_parse_group" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="group" type="String" />
<description>
- Called to allow adding controls at the end of the list.
+ Called to allow adding controls at the beginning of a group or a sub-group in the property list for [code]object[/code].
</description>
</method>
<method name="_parse_property" qualifiers="virtual">
@@ -52,7 +63,7 @@
<argument index="5" name="usage_flags" type="int" />
<argument index="6" name="wide" type="bool" />
<description>
- Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
+ Called to allow adding property-specific editors to the property list for [code]object[/code]. The added editor control must extend [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
</description>
</method>
<method name="add_custom_control">
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 5790d8c5af..cc2f33ce89 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInterface" inherits="Node" version="4.0">
+<class name="EditorInterface" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Godot editor's interface.
</brief_description>
@@ -21,7 +21,17 @@
<return type="void" />
<argument index="0" name="resource" type="Resource" />
<description>
- Edits the given [Resource].
+ Edits the given [Resource]. If the resource is a [Script] you can also edit it with [method edit_script] to specify the line and column position.
+ </description>
+ </method>
+ <method name="edit_script">
+ <return type="void" />
+ <argument index="0" name="script" type="Script" />
+ <argument index="1" name="line" type="int" default="-1" />
+ <argument index="2" name="column" type="int" default="0" />
+ <argument index="3" name="grab_focus" type="bool" default="true" />
+ <description>
+ Edits the given [Script]. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor.
</description>
</method>
<method name="get_base_control">
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index c804bb70e0..2eec5310dc 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorNode3DGizmo" inherits="Node3DGizmo" version="4.0">
+<class name="EditorNode3DGizmo" inherits="Node3DGizmo" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Gizmo for editing Node3D objects.
</brief_description>
@@ -12,11 +12,13 @@
<method name="_commit_handle" qualifiers="virtual">
<return type="void" />
<argument index="0" name="id" type="int" />
- <argument index="1" name="restore" type="Variant" />
- <argument index="2" name="cancel" type="bool" />
+ <argument index="1" name="secondary" type="bool" />
+ <argument index="2" name="restore" type="Variant" />
+ <argument index="3" name="cancel" type="bool" />
<description>
Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo".
If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action.
+ The [code]secondary[/code] argument is [code]true[/code] when the committed handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_commit_subgizmos" qualifiers="virtual">
@@ -32,16 +34,19 @@
<method name="_get_handle_name" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="id" type="int" />
+ <argument index="1" name="secondary" type="bool" />
<description>
- Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]).
- Handles can be named for reference to the user when editing.
+ Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing.
+ The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_get_handle_value" qualifiers="virtual const">
<return type="Variant" />
<argument index="0" name="id" type="int" />
+ <argument index="1" name="secondary" type="bool" />
<description>
Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle].
+ The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_get_subgizmo_transform" qualifiers="virtual const">
@@ -54,8 +59,10 @@
<method name="_is_handle_highlighted" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="id" type="int" />
+ <argument index="1" name="secondary" type="bool" />
<description>
Override this method to return [code]true[/code] whenever the given handle should be highlighted in the editor.
+ The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_redraw" qualifiers="virtual">
@@ -67,10 +74,12 @@
<method name="_set_handle" qualifiers="virtual">
<return type="void" />
<argument index="0" name="id" type="int" />
- <argument index="1" name="camera" type="Camera3D" />
- <argument index="2" name="point" type="Vector2" />
+ <argument index="1" name="secondary" type="bool" />
+ <argument index="2" name="camera" type="Camera3D" />
+ <argument index="3" name="point" type="Vector2" />
<description>
Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts.
+ The [code]secondary[/code] argument is [code]true[/code] when the edited handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_set_subgizmo_transform" qualifiers="virtual">
@@ -120,6 +129,7 @@
<argument index="4" name="secondary" type="bool" default="false" />
<description>
Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The [code]ids[/code] argument can be used to specify a custom identifier for each handle, if an empty [code]Array[/code] is passed, the ids will be assigned automatically from the [code]handles[/code] argument order.
+ The [code]secondary[/code] argument marks the added handles as secondary, meaning they will normally have less selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection.
There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw].
</description>
</method>
@@ -135,7 +145,7 @@
</method>
<method name="add_mesh">
<return type="void" />
- <argument index="0" name="mesh" type="ArrayMesh" />
+ <argument index="0" name="mesh" type="Mesh" />
<argument index="1" name="material" type="Material" default="null" />
<argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
<argument index="3" name="skeleton" type="SkinReference" default="null" />
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 08423c4577..d194786131 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorNode3DGizmoPlugin" inherits="Resource" version="4.0">
+<class name="EditorNode3DGizmoPlugin" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Used by the editor to define Node3D gizmo types.
</brief_description>
@@ -8,7 +8,7 @@
To use [EditorNode3DGizmoPlugin], register it using the [method EditorPlugin.add_spatial_gizmo_plugin] method first.
</description>
<tutorials>
- <link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link>
+ <link title="Spatial gizmo plugins">$DOCS_URL/tutorials/plugins/editor/spatial_gizmos.html</link>
</tutorials>
<methods>
<method name="_can_be_hidden" qualifiers="virtual const">
@@ -21,11 +21,14 @@
<return type="void" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="handle_id" type="int" />
- <argument index="2" name="restore" type="Variant" />
- <argument index="3" name="cancel" type="bool" />
+ <argument index="2" name="secondary" type="bool" />
+ <argument index="3" name="restore" type="Variant" />
+ <argument index="4" name="cancel" type="bool" />
<description>
Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo".
- If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. Called for this plugin's active gizmos.
+ If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action.
+ The [code]secondary[/code] argument is [code]true[/code] when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
+ Called for this plugin's active gizmos.
</description>
</method>
<method name="_commit_subgizmos" qualifiers="virtual">
@@ -56,16 +59,20 @@
<return type="String" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="handle_id" type="int" />
+ <argument index="2" name="secondary" type="bool" />
<description>
- Override this method to provide gizmo's handle names. Called for this plugin's active gizmos.
+ Override this method to provide gizmo's handle names. The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.
</description>
</method>
<method name="_get_handle_value" qualifiers="virtual const">
<return type="Variant" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="handle_id" type="int" />
+ <argument index="2" name="secondary" type="bool" />
<description>
- Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. Called for this plugin's active gizmos.
+ Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle].
+ The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
+ Called for this plugin's active gizmos.
</description>
</method>
<method name="_get_priority" qualifiers="virtual const">
@@ -94,8 +101,9 @@
<return type="bool" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="handle_id" type="int" />
+ <argument index="2" name="secondary" type="bool" />
<description>
- Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. Called for this plugin's active gizmos.
+ Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.
</description>
</method>
<method name="_is_selectable_when_hidden" qualifiers="virtual const">
@@ -115,10 +123,13 @@
<return type="void" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="handle_id" type="int" />
- <argument index="2" name="camera" type="Camera3D" />
- <argument index="3" name="screen_pos" type="Vector2" />
+ <argument index="2" name="secondary" type="bool" />
+ <argument index="3" name="camera" type="Camera3D" />
+ <argument index="4" name="screen_pos" type="Vector2" />
<description>
- Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. Called for this plugin's active gizmos.
+ Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts.
+ The [code]secondary[/code] argument is [code]true[/code] when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
+ Called for this plugin's active gizmos.
</description>
</method>
<method name="_set_subgizmo_transform" qualifiers="virtual">
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index 92a2cff27f..d44c08cb0f 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -1,35 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorPaths" inherits="Object" version="4.0">
+<class name="EditorPaths" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Editor-only singleton that returns paths to various OS-specific data folders and files.
</brief_description>
<description>
+ This editor-only singleton returns OS-specific paths to various data folders and files. It can be used in editor plugins to ensure files are saved in the correct location on each operating system.
+ [b]Note:[/b] This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use [method Engine.has_singleton] to check whether the singleton is available before using it.
+ [b]Note:[/b] Godot complies with the [url=https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html]XDG Base Directory Specification[/url] on [i]all[/i] platforms. You can override environment variables following the specification to change the editor and project data paths.
</description>
<tutorials>
+ <link title="File paths in Godot projects">https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html</link>
</tutorials>
<methods>
<method name="get_cache_dir" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails).
+ [b]Default paths per platform:[/b]
+ [codeblock]
+ - Windows: %LOCALAPPDATA%\Godot\
+ - macOS: ~/Library/Caches/Godot/
+ - Linux: ~/.cache/godot/
+ [/codeblock]
</description>
</method>
<method name="get_config_dir" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the user's configuration folder. This folder should be used for [i]persistent[/i] user configuration files.
+ [b]Default paths per platform:[/b]
+ [codeblock]
+ - Windows: %APPDATA%\Godot\ (same as `get_data_dir()`)
+ - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`)
+ - Linux: ~/.config/godot/
+ [/codeblock]
</description>
</method>
<method name="get_data_dir" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the user's data folder. This folder should be used for [i]persistent[/i] user data files such as installed export templates.
+ [b]Default paths per platform:[/b]
+ [codeblock]
+ - Windows: %APPDATA%\Godot\ (same as `get_config_dir()`)
+ - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`)
+ - Linux: ~/.local/share/godot/
+ [/codeblock]
</description>
</method>
<method name="get_self_contained_file" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also [method is_self_contained].
</description>
</method>
<method name="is_self_contained" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the editor is marked as self-contained, [code]false[/code] otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an [code]editor_data/[/code] folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects.
+ Self-contained mode can be enabled by creating a file named [code]._sc_[/code] or [code]_sc_[/code] in the same folder as the editor binary while the editor is not running. See also [method get_self_contained_file].
+ [b]Note:[/b] The Steam release of Godot uses self-contained mode by default.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 8df6d721d4..d28bf80a1e 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" version="4.0">
+<class name="EditorPlugin" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Used by the editor to extend its functionality.
</brief_description>
@@ -7,7 +7,7 @@
Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also [EditorScript] to add functions to the editor.
</description>
<tutorials>
- <link title="Editor plugins documentation index">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link>
+ <link title="Editor plugins documentation index">$DOCS_URL/tutorials/plugins/editor/index.html</link>
</tutorials>
<methods>
<method name="_apply_changes" qualifiers="virtual">
@@ -379,8 +379,10 @@
<method name="add_import_plugin">
<return type="void" />
<argument index="0" name="importer" type="EditorImportPlugin" />
+ <argument index="1" name="first_priority" type="bool" default="false" />
<description>
Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
+ If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
[b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead.
See [method add_inspector_plugin] for an example of how to register a plugin.
</description>
@@ -408,15 +410,19 @@
<method name="add_scene_format_importer_plugin">
<return type="void" />
<argument index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
+ <argument index="1" name="first_priority" type="bool" default="false" />
<description>
Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes.
+ If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
</description>
</method>
<method name="add_scene_post_import_plugin">
<return type="void" />
<argument index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" />
+ <argument index="1" name="first_priority" type="bool" default="false" />
<description>
Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs.
+ If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
</description>
</method>
<method name="add_spatial_gizmo_plugin">
@@ -438,9 +444,9 @@
<method name="add_tool_submenu_item">
<return type="void" />
<argument index="0" name="name" type="String" />
- <argument index="1" name="submenu" type="Object" />
+ <argument index="1" name="submenu" type="PopupMenu" />
<description>
- Adds a custom submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
+ Adds a custom [PopupMenu] submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
</description>
</method>
<method name="add_translation_parser_plugin">
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 5f342e6dc2..c428233372 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" version="4.0">
+<class name="EditorProperty" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Custom control to edit properties for adding into the inspector.
</brief_description>
@@ -110,7 +110,7 @@
</signal>
<signal name="property_checked">
<argument index="0" name="property" type="StringName" />
- <argument index="1" name="bool" type="String" />
+ <argument index="1" name="checked" type="bool" />
<description>
Emitted when a property was checked. Used internally.
</description>
@@ -134,6 +134,14 @@
Emit it if you want to key a property with a single value.
</description>
</signal>
+ <signal name="property_pinned">
+ <argument index="0" name="property" type="StringName" />
+ <argument index="1" name="pinned" type="bool" />
+ <description>
+ Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value.
+ The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instancing chain, a script or a builtin class.
+ </description>
+ </signal>
<signal name="resource_selected">
<argument index="0" name="path" type="String" />
<argument index="1" name="resource" type="Resource" />
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 820c7775f7..8a4aee0eef 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="RefCounted" version="4.0">
+<class name="EditorResourceConversionPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index 9c490cbb3e..aa8f75d764 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePicker" inherits="HBoxContainer" version="4.0">
+<class name="EditorResourcePicker" inherits="HBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Godot editor's control for selecting [Resource] type properties.
</brief_description>
@@ -11,7 +11,7 @@
</tutorials>
<methods>
<method name="_handle_menu_selected" qualifiers="virtual">
- <return type="void" />
+ <return type="bool" />
<argument index="0" name="id" type="int" />
<description>
This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options].
@@ -62,8 +62,9 @@
</signal>
<signal name="resource_selected">
<argument index="0" name="resource" type="Resource" />
+ <argument index="1" name="edit" type="bool" />
<description>
- Emitted when the resource value was set and user clicked to edit it.
+ Emitted when the resource value was set and user clicked to edit it. When [code]edit[/code] is [code]true[/code], the signal was caused by the context menu "Edit" option.
</description>
</signal>
</signals>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index c780045263..5df797f516 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreview" inherits="Node" version="4.0">
+<class name="EditorResourcePreview" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper to generate previews of resources or files.
</brief_description>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index 53c692aad9..d8b4a86a97 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="RefCounted" version="4.0">
+<class name="EditorResourcePreviewGenerator" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Custom generator of previews.
</brief_description>
diff --git a/doc/classes/EditorSceneFormatImporter.xml b/doc/classes/EditorSceneFormatImporter.xml
index 6dbd80604e..63c1498f20 100644
--- a/doc/classes/EditorSceneFormatImporter.xml
+++ b/doc/classes/EditorSceneFormatImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneFormatImporter" inherits="RefCounted" version="4.0">
+<class name="EditorSceneFormatImporter" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Imports scenes from third-parties' 3D files.
</brief_description>
@@ -20,35 +20,34 @@
<description>
</description>
</method>
- <method name="_import_animation" qualifiers="virtual">
- <return type="Animation" />
+ <method name="_get_import_options" qualifiers="virtual">
+ <return type="void" />
<argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
<description>
</description>
</method>
- <method name="_import_scene" qualifiers="virtual">
- <return type="Object" />
+ <method name="_get_option_visibility" qualifiers="virtual const">
+ <return type="Variant" />
<argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
+ <argument index="1" name="option" type="String" />
<description>
</description>
</method>
- <method name="import_animation_from_other_importer">
+ <method name="_import_animation" qualifiers="virtual">
<return type="Animation" />
<argument index="0" name="path" type="String" />
<argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
+ <argument index="2" name="options" type="Dictionary" />
+ <argument index="3" name="bake_fps" type="int" />
<description>
</description>
</method>
- <method name="import_scene_from_other_importer">
- <return type="Node" />
+ <method name="_import_scene" qualifiers="virtual">
+ <return type="Object" />
<argument index="0" name="path" type="String" />
<argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
+ <argument index="2" name="options" type="Dictionary" />
+ <argument index="3" name="bake_fps" type="int" />
<description>
</description>
</method>
diff --git a/doc/classes/EditorSceneFormatImporterFBX.xml b/doc/classes/EditorSceneFormatImporterFBX.xml
index 117030dfd5..21aebd4507 100644
--- a/doc/classes/EditorSceneFormatImporterFBX.xml
+++ b/doc/classes/EditorSceneFormatImporterFBX.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneFormatImporterFBX" inherits="EditorSceneFormatImporter" version="4.0">
+<class name="EditorSceneFormatImporterFBX" inherits="EditorSceneFormatImporter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
FBX 3D asset importer.
</brief_description>
diff --git a/doc/classes/EditorSceneFormatImporterGLTF.xml b/doc/classes/EditorSceneFormatImporterGLTF.xml
index 1476a22aef..6478e853eb 100644
--- a/doc/classes/EditorSceneFormatImporterGLTF.xml
+++ b/doc/classes/EditorSceneFormatImporterGLTF.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneFormatImporterGLTF" inherits="EditorSceneFormatImporter" version="4.0">
+<class name="EditorSceneFormatImporterGLTF" inherits="EditorSceneFormatImporter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 8a731a6d1d..3adf814947 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="RefCounted" version="4.0">
+<class name="EditorScenePostImport" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Post-processes scenes after import.
</brief_description>
@@ -52,7 +52,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="Importing 3D scenes: Custom script">https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_scenes.html#custom-script</link>
+ <link title="Importing 3D scenes: Custom script">$DOCS_URL/tutorials/assets_pipeline/importing_scenes.html#custom-script</link>
</tutorials>
<methods>
<method name="_post_import" qualifiers="virtual">
diff --git a/doc/classes/EditorScenePostImportPlugin.xml b/doc/classes/EditorScenePostImportPlugin.xml
index 07d8fa28b9..de9d5e067a 100644
--- a/doc/classes/EditorScenePostImportPlugin.xml
+++ b/doc/classes/EditorScenePostImportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScenePostImportPlugin" inherits="RefCounted" version="4.0">
+<class name="EditorScenePostImportPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plugin to control and modifying the process of importing a scene.
</brief_description>
@@ -11,6 +11,7 @@
<methods>
<method name="_get_import_options" qualifiers="virtual">
<return type="void" />
+ <argument index="0" name="path" type="String" />
<description>
Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced].
</description>
@@ -40,7 +41,8 @@
</method>
<method name="_get_option_visibility" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="option" type="String" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="option" type="String" />
<description>
Return true or false whether a given option should be visible. Return null to ignore.
</description>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index a2508118c6..68ee939370 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScript" inherits="RefCounted" version="4.0">
+<class name="EditorScript" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base script that can be used to add extension functions to the editor.
</brief_description>
diff --git a/doc/classes/EditorScriptPicker.xml b/doc/classes/EditorScriptPicker.xml
index 6c0538a5ab..6c472382d3 100644
--- a/doc/classes/EditorScriptPicker.xml
+++ b/doc/classes/EditorScriptPicker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScriptPicker" inherits="EditorResourcePicker" version="4.0">
+<class name="EditorScriptPicker" inherits="EditorResourcePicker" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Godot editor's control for selecting the [code]script[/code] property of a [Node].
</brief_description>
diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml
index 28c8ff7d7f..ff6f5f9206 100644
--- a/doc/classes/EditorSelection.xml
+++ b/doc/classes/EditorSelection.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSelection" inherits="Object" version="4.0">
+<class name="EditorSelection" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Manages the SceneTree selection in the editor.
</brief_description>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index ad63abafa6..ac2250ab6d 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" version="4.0">
+<class name="EditorSettings" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Object that holds the project-independent editor settings.
</brief_description>
@@ -70,6 +70,13 @@
[/codeblocks]
</description>
</method>
+ <method name="check_changed_settings_in_group" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="setting_prefix" type="String" />
+ <description>
+ Checks if any settings with the prefix [code]setting_prefix[/code] exist in the set of changed settings. See also [method get_changed_settings].
+ </description>
+ </method>
<method name="erase">
<return type="void" />
<argument index="0" name="property" type="String" />
@@ -77,6 +84,12 @@
Erases the setting whose name is specified by [code]property[/code].
</description>
</method>
+ <method name="get_changed_settings" qualifiers="const">
+ <return type="Array" />
+ <description>
+ Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED]
+ </description>
+ </method>
<method name="get_favorites" qualifiers="const">
<return type="PackedStringArray" />
<description>
@@ -118,6 +131,13 @@
Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise.
</description>
</method>
+ <method name="mark_setting_changed">
+ <return type="void" />
+ <argument index="0" name="setting" type="String" />
+ <description>
+ Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted.
+ </description>
+ </method>
<method name="property_can_revert">
<return type="bool" />
<argument index="0" name="name" type="String" />
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 9341b514c7..a45882b063 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" version="4.0">
+<class name="EditorSpinSlider" inherits="Range" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Godot editor's control for editing numeric values.
</brief_description>
@@ -11,7 +11,7 @@
<members>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
</member>
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
index 462323a067..15b730acb4 100644
--- a/doc/classes/EditorSyntaxHighlighter.xml
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSyntaxHighlighter" inherits="SyntaxHighlighter" version="4.0">
+<class name="EditorSyntaxHighlighter" inherits="SyntaxHighlighter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base Syntax highlighter resource for the [ScriptEditor].
</brief_description>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index 900d877f12..84a671a93c 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorTranslationParserPlugin" inherits="RefCounted" version="4.0">
+<class name="EditorTranslationParserPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).
</brief_description>
diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml
index bd932bede4..0215d81a4e 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorVCSInterface" inherits="Object" version="4.0">
+<class name="EditorVCSInterface" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Version Control System (VCS) interface which reads and writes to the local VCS in use.
</brief_description>
<description>
- Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDNative plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of [code]EditorVCSInterface[/code]. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience.
+ Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDExtension plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of [code]EditorVCSInterface[/code]. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index fb056f4631..5c43bea944 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="RefCounted" version="4.0">
+<class name="EncodedObjectAsID" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 f05a216301..af4df321c1 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Engine" inherits="Object" version="4.0">
+<class name="Engine" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Access to engine properties.
</brief_description>
@@ -157,7 +157,7 @@
else:
simulate_physics()
[/codeblock]
- See [url=https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information.
+ See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information.
[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project.
</description>
</method>
@@ -187,7 +187,8 @@
[b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code].
</member>
<member name="physics_ticks_per_second" type="int" setter="set_physics_ticks_per_second" getter="get_physics_ticks_per_second" default="60">
- The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps].
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second].
+ [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS.
</member>
<member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true">
If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting.
@@ -195,7 +196,7 @@
[b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
</member>
<member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0">
- The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second].
+ The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second] and [member ProjectSettings.debug/settings/fps/force_fps].
</member>
<member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0">
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.
diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml
index 861053b1c9..cd502dce81 100644
--- a/doc/classes/EngineDebugger.xml
+++ b/doc/classes/EngineDebugger.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EngineDebugger" inherits="Object" version="4.0">
+<class name="EngineDebugger" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Exposes the internal debugger.
</brief_description>
@@ -65,14 +65,9 @@
<method name="register_profiler">
<return type="void" />
<argument index="0" name="name" type="StringName" />
- <argument index="1" name="toggle" type="Callable" />
- <argument index="2" name="add" type="Callable" />
- <argument index="3" name="tick" type="Callable" />
+ <argument index="1" name="profiler" type="EngineProfiler" />
<description>
- Registers a profiler with the given [code]name[/code].
- [code]toggle[/code] callable is called when the profiler is enabled/disabled. It must take an argument array as an argument.
- [code]add[/code] callable is called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. It must take a data array as argument.
- [code]tick[/code] callable is called at every active profiler iteration. It must take frame time, idle time, physics time, and physics idle time as arguments.
+ Registers a profiler with the given [code]name[/code]. See [EngineProfiler] for more information.
</description>
</method>
<method name="send_message">
diff --git a/doc/classes/EngineProfiler.xml b/doc/classes/EngineProfiler.xml
new file mode 100644
index 0000000000..45eb926108
--- /dev/null
+++ b/doc/classes/EngineProfiler.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EngineProfiler" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Base class for creating custom profilers.
+ </brief_description>
+ <description>
+ This class can be used to implement custom profilers that are able to interact with the engine and editor debugger.
+ See [EngineDebugger] and [EditorDebuggerPlugin] for more information.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_add_frame" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="data" type="Array" />
+ <description>
+ Called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data].
+ </description>
+ </method>
+ <method name="_tick" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="frame_time" type="float" />
+ <argument index="1" name="idle_time" type="float" />
+ <argument index="2" name="physics_time" type="float" />
+ <argument index="3" name="physics_frame_time" type="float" />
+ <description>
+ Called once every engine iteration when the profiler is active with information about the current frame.
+ </description>
+ </method>
+ <method name="_toggle" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="enable" type="bool" />
+ <argument index="1" name="options" type="Array" />
+ <description>
+ Called when the profiler is enabled/disabled, along with a set of [code]options[/code].
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 57f6e9547a..90d774058b 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" version="4.0">
+<class name="Environment" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.
</brief_description>
@@ -11,8 +11,8 @@
- Adjustments
</description>
<tutorials>
- <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link>
- <link title="Light transport in game engines">https://docs.godotengine.org/en/latest/tutorials/3d/high_dynamic_range.html</link>
+ <link title="Environment and post-processing">$DOCS_URL/tutorials/3d/environment_and_post_processing.html</link>
+ <link title="Light transport in game engines">$DOCS_URL/tutorials/3d/high_dynamic_range.html</link>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
<link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
@@ -39,7 +39,7 @@
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">
- The [Texture2D] or [Texture3D] lookup table (LUT) to use for the built-in post-process color grading. Can use a [GradientTexture] for a 1-dimensional LUT, or a [Texture3D] for a more complex LUT. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
+ The [Texture2D] or [Texture3D] lookup table (LUT) to use for the built-in post-process color grading. Can use a [GradientTexture1D] for a 1-dimensional LUT, or a [Texture3D] for a more complex LUT. 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">
The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
@@ -57,7 +57,8 @@
The ambient light's energy. The higher the value, the stronger the light.
</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.
+ Defines the amount of light that the sky brings on the scene. A value of [code]0.0[/code] means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of [code]1.0[/code] means that [i]all[/i] the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
+ [b]Note:[/b] [member ambient_light_sky_contribution] is internally clamped between [code]0.0[/code] and [code]1.0[/code] (inclusive).
</member>
<member name="ambient_light_source" type="int" setter="set_ambient_source" getter="get_ambient_source" enum="Environment.AmbientSource" default="0">
</member>
@@ -128,10 +129,10 @@
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">
- 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.
+ The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case.
</member>
<member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8">
- The overall brightness multiplier of the glow effect. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
+ The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
</member>
<member name="glow_levels/1" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0">
The intensity of the 1st level of glow. This is the most "local" level (least blurry).
@@ -154,29 +155,38 @@
<member name="glow_levels/7" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0">
The intensity of the 7th level of glow. This is the most "global" level (blurriest).
</member>
+ <member name="glow_map" type="Texture" setter="set_glow_map" getter="get_glow_map">
+ The texture that should be used as a glow map to [i]multiply[/i] the resulting glow color according to [member glow_map_strength]. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored.
+ [b]Note:[/b] The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9).
+ </member>
+ <member name="glow_map_strength" type="float" setter="set_glow_map_strength" getter="get_glow_map_strength" default="0.8">
+ How strong of an impact the [member glow_map] should have on the overall glow effect. A strength of [code]0.0[/code] means the glow map has no effect on the overall glow effect. A strength of [code]1.0[/code] means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas).
+ </member>
<member name="glow_mix" type="float" setter="set_glow_mix" getter="get_glow_mix" default="0.05">
</member>
<member name="glow_normalized" type="bool" setter="set_glow_normalized" getter="is_glow_normalized" default="false">
If [code]true[/code], glow levels will be normalized so that summed together their intensities equal [code]1.0[/code].
</member>
<member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0">
- The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
+ The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
</member>
<member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0">
</member>
- <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.0">
+ <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.5">
</member>
<member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8">
</member>
- <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1">
+ <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" default="4">
+ The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between [code]1[/code] and [code]4[/code] to improve performance.
</member>
<member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false">
- If [code]true[/code], enables signed distance field global illumination.
+ If [code]true[/code], enables signed distance field global illumination for meshes that have their [member GeometryInstance3D.gi_mode] set to [constant GeometryInstance3D.GI_MODE_STATIC]. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.
+ [b]Performance:[/b] SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider [LightmapGI] instead). To improve SDFGI performance, enable [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution] in the Project Settings.
[b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</member>
<member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0">
</member>
- <member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="819.2">
+ <member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="204.8">
</member>
<member name="sdfgi_min_cell_size" type="float" setter="set_sdfgi_min_cell_size" getter="get_sdfgi_min_cell_size" default="0.2">
</member>
@@ -184,11 +194,11 @@
</member>
<member name="sdfgi_probe_bias" type="float" setter="set_sdfgi_probe_bias" getter="get_sdfgi_probe_bias" default="1.1">
</member>
- <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="false">
+ <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="true">
</member>
<member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false">
</member>
- <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="0">
+ <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="1">
</member>
<member name="sky" type="Sky" setter="set_sky" getter="get_sky">
The [Sky] resource used for this [Environment].
@@ -237,7 +247,22 @@
The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality.
</member>
<member name="ssao_sharpness" type="float" setter="set_ssao_sharpness" getter="get_ssao_sharpness" default="0.98">
- Sharpness refers to the amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
+ The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
+ </member>
+ <member name="ssil_enabled" type="bool" setter="set_ssil_enabled" getter="is_ssil_enabled" default="false">
+ If [code]true[/code], the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or [VoxelGI]. Screen-space indirect lighting is not affected by individual light's [member Light3D.light_indirect_energy].
+ </member>
+ <member name="ssil_intensity" type="float" setter="set_ssil_intensity" getter="get_ssil_intensity" default="1.0">
+ The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.
+ </member>
+ <member name="ssil_normal_rejection" type="float" setter="set_ssil_normal_rejection" getter="get_ssil_normal_rejection" default="1.0">
+ Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera.
+ </member>
+ <member name="ssil_radius" type="float" setter="set_ssil_radius" getter="get_ssil_radius" default="5.0">
+ The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources.
+ </member>
+ <member name="ssil_sharpness" type="float" setter="set_ssil_sharpness" getter="get_ssil_sharpness" default="0.98">
+ The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0">
The default exposure used for tonemapping.
@@ -355,17 +380,11 @@
<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="SDFGI_CASCADES_4" value="0" enum="SDFGICascades">
- </constant>
- <constant name="SDFGI_CASCADES_6" value="1" enum="SDFGICascades">
- </constant>
- <constant name="SDFGI_CASCADES_8" value="2" enum="SDFGICascades">
- </constant>
- <constant name="SDFGI_Y_SCALE_DISABLED" value="0" enum="SDFGIYScale">
+ <constant name="SDFGI_Y_SCALE_50_PERCENT" value="0" enum="SDFGIYScale">
</constant>
<constant name="SDFGI_Y_SCALE_75_PERCENT" value="1" enum="SDFGIYScale">
</constant>
- <constant name="SDFGI_Y_SCALE_50_PERCENT" value="2" enum="SDFGIYScale">
+ <constant name="SDFGI_Y_SCALE_100_PERCENT" value="2" enum="SDFGIYScale">
</constant>
</constants>
</class>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index f0b0775753..b37de09e04 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="RefCounted" version="4.0">
+<class name="Expression" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A class that stores an expression you can execute.
</brief_description>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 811aeb8aab..29283e107d 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="RefCounted" version="4.0">
+<class name="File" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
@@ -40,12 +40,12 @@
}
[/csharp]
[/codeblocks]
- In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation.
+ In the example above, the file will be saved in the user data folder as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation.
[b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package.
[b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
</description>
<tutorials>
- <link title="File system">https://docs.godotengine.org/en/latest/tutorials/scripting/filesystem.html</link>
+ <link title="File system">$DOCS_URL/tutorials/scripting/filesystem.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
@@ -417,6 +417,7 @@
<argument index="0" name="string" type="String" />
<description>
Appends [code]string[/code] to the file without a line return, encoding the text as UTF-8.
+ [b]Note:[/b] This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use [code]get_buffer(length).get_string_from_utf8()[/code] (if you know the length) or [method get_as_text].
</description>
</method>
<method name="store_var">
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 5e96158707..db536a738a 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" version="4.0">
+<class name="FileDialog" inherits="ConfirmationDialog" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Dialog for selecting files or directories in the filesystem.
</brief_description>
@@ -13,7 +13,9 @@
<return type="void" />
<argument index="0" name="filter" type="String" />
<description>
- Adds [code]filter[/code] as a custom filter; [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/code]. For example, [code]"*.png ; PNG Images"[/code].
+ Adds [code]filter[/code] to the list of filters, which restricts what files can be picked.
+ A [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
+ Example filters: [code]"*.png ; PNG Images"[/code], [code]"project.godot ; Godot Project"[/code].
</description>
</method>
<method name="clear_filters">
@@ -63,12 +65,12 @@
<member name="current_path" type="String" setter="set_current_path" getter="get_current_path">
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="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="FileDialog.FileMode" default="4">
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
</member>
<member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray()">
- 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].
+ 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]. Multiple file types can also be specified in a single filter. [code]"*.png, *.jpg, *.jpeg ; Supported Images"[/code] will show both PNG and JPEG files when selected.
</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 FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
@@ -76,7 +78,7 @@
<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="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" overrides="Window" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
@@ -125,24 +127,24 @@
</constant>
</constants>
<theme_items>
- <theme_item name="back_folder" data_type="icon" type="Texture2D">
- Custom icon for the back arrow.
- </theme_item>
- <theme_item name="file" data_type="icon" type="Texture2D">
- Custom icon for files.
- </theme_item>
<theme_item name="file_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color modulation applied to the file icon.
</theme_item>
<theme_item name="files_disabled" data_type="color" type="Color" default="Color(0, 0, 0, 0.7)">
The color tint for disabled files (when the [FileDialog] is used in open folder mode).
</theme_item>
- <theme_item name="folder" data_type="icon" type="Texture2D">
- Custom icon for folders.
- </theme_item>
<theme_item name="folder_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color modulation applied to the folder icon.
</theme_item>
+ <theme_item name="back_folder" data_type="icon" type="Texture2D">
+ Custom icon for the back arrow.
+ </theme_item>
+ <theme_item name="file" data_type="icon" type="Texture2D">
+ Custom icon for files.
+ </theme_item>
+ <theme_item name="folder" data_type="icon" type="Texture2D">
+ Custom icon for folders.
+ </theme_item>
<theme_item name="forward_folder" data_type="icon" type="Texture2D">
Custom icon for the forward arrow.
</theme_item>
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
index b6e708cc03..31299deb7d 100644
--- a/doc/classes/FileSystemDock.xml
+++ b/doc/classes/FileSystemDock.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FileSystemDock" inherits="VBoxContainer" version="4.0">
+<class name="FileSystemDock" inherits="VBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/FlowContainer.xml b/doc/classes/FlowContainer.xml
new file mode 100644
index 0000000000..256e20447b
--- /dev/null
+++ b/doc/classes/FlowContainer.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FlowContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Base class for flow containers.
+ </brief_description>
+ <description>
+ Arranges child [Control] nodes vertically or horizontally in a left-to-right or top-to-bottom flow.
+ A line is filled with [Control] nodes until no more fit on the same line, similar to text in an autowrapped label.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_line_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the current line count.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/FogMaterial.xml b/doc/classes/FogMaterial.xml
index 431f3ac2b7..e63d4ddf3e 100644
--- a/doc/classes/FogMaterial.xml
+++ b/doc/classes/FogMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FogMaterial" inherits="Material" version="4.0">
+<class name="FogMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
[Material] used with a [FogVolume] to draw things with the volumetric fog effect.
</brief_description>
diff --git a/doc/classes/FogVolume.xml b/doc/classes/FogVolume.xml
index ba1b5d3372..d28a6a8783 100644
--- a/doc/classes/FogVolume.xml
+++ b/doc/classes/FogVolume.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FogVolume" inherits="VisualInstance3D" version="4.0">
+<class name="FogVolume" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node used to add local fog with the volumetric fog effect.
</brief_description>
@@ -12,6 +12,7 @@
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
Sets the size of the [FogVolume] when [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX].
+ [b]Note:[/b] Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing [member ProjectSettings.rendering/environment/volumetric_fog/volume_depth] (at a performance cost) or by decreasing [member Environment.volumetric_fog_length] (at no performance cost, but at the cost of lower fog range). Alternatively, the [FogVolume] can be made thicker and use a lower density in the [member material].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
Sets the [Material] to be used by the [FogVolume]. Can be either a [FogMaterial] or a custom [ShaderMaterial].
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 01bc2837f1..4ba15d7afc 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" version="4.0">
+<class name="Font" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Font class is set of font data sources used to draw text.
</brief_description>
@@ -96,7 +96,7 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="max_lines" type="int" default="-1" />
<argument index="6" name="size" type="int" default="16" />
@@ -114,7 +114,7 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
@@ -202,7 +202,7 @@
<return type="Vector2" />
<argument index="0" name="text" type="String" />
<argument index="1" name="size" type="int" default="16" />
- <argument index="2" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="2" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="3" name="width" type="float" default="-1" />
<argument index="4" name="flags" type="int" default="3" />
<description>
@@ -222,7 +222,7 @@
<return type="float" />
<argument index="0" name="size" type="int" default="16" />
<description>
- Return average pixel offset of the underline below the baseline.
+ Returns average pixel offset of the underline below the baseline.
[b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
</description>
</method>
@@ -230,7 +230,7 @@
<return type="float" />
<argument index="0" name="size" type="int" default="16" />
<description>
- Return average thickness of the underline.
+ Returns average thickness of the underline.
[b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
</description>
</method>
@@ -238,7 +238,7 @@
<return type="bool" />
<argument index="0" name="char" type="int" />
<description>
- Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
<method name="remove_data">
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index 04932ddd2d..9344a1fe80 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FontData" inherits="Resource" version="4.0">
+<class name="FontData" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Font source data and prerendered glyph cache, imported from dynamic or bitmap font.
Supported font formats:
@@ -79,12 +79,6 @@
Returns text server font cache entry resource id.
</description>
</method>
- <method name="get_data" qualifiers="const">
- <return type="PackedByteArray" />
- <description>
- Returns contents of the dynamic font source file.
- </description>
- </method>
<method name="get_descent" qualifiers="const">
<return type="float" />
<argument index="0" name="cache_index" type="int" />
@@ -156,12 +150,6 @@
Returns rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="get_hinting" qualifiers="const">
- <return type="int" enum="TextServer.Hinting" />
- <description>
- Returns the font hinting mode. Used by dynamic fonts only.
- </description>
- </method>
<method name="get_kerning" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="cache_index" type="int" />
@@ -192,24 +180,6 @@
Returns list of language support overrides.
</description>
</method>
- <method name="get_msdf_pixel_range" qualifiers="const">
- <return type="int" />
- <description>
- Returns the width of the range around the shape between the minimum and maximum representable signed distance.
- </description>
- </method>
- <method name="get_msdf_size" qualifiers="const">
- <return type="int" />
- <description>
- Returns source font size used to generate MSDF textures.
- </description>
- </method>
- <method name="get_oversampling" qualifiers="const">
- <return type="float" />
- <description>
- Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
- </description>
- </method>
<method name="get_scale" qualifiers="const">
<return type="float" />
<argument index="0" name="cache_index" type="int" />
@@ -235,7 +205,7 @@
<return type="Array" />
<argument index="0" name="cache_index" type="int" />
<description>
- Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
<method name="get_spacing" qualifiers="const">
@@ -319,19 +289,7 @@
<return type="bool" />
<argument index="0" name="char" type="int" />
<description>
- Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
- </description>
- </method>
- <method name="is_antialiased" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
- </description>
- </method>
- <method name="is_force_autohinter" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
+ Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
<method name="is_language_supported" qualifiers="const">
@@ -341,12 +299,6 @@
Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
- <method name="is_multichannel_signed_distance_field" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
- </description>
- </method>
<method name="is_script_supported" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -354,6 +306,22 @@
Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
+ <method name="load_bitmap_font">
+ <return type="int" enum="Error" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [code]path[/code].
+ [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
+ </description>
+ </method>
+ <method name="load_dynamic_font">
+ <return type="int" enum="Error" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff) or Type 1 (.pfb, .pfm) dynamic font from file [code]path[/code].
+ [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
+ </description>
+ </method>
<method name="remove_cache">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -431,13 +399,6 @@
Renders the range of characters to the font cache texture.
</description>
</method>
- <method name="set_antialiased">
- <return type="void" />
- <argument index="0" name="antialiased" type="bool" />
- <description>
- If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
- </description>
- </method>
<method name="set_ascent">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -447,13 +408,6 @@
Sets the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="set_data">
- <return type="void" />
- <argument index="0" name="data" type="PackedByteArray" />
- <description>
- Sets font source data, e.g contents of the dynamic font source file.
- </description>
- </method>
<method name="set_descent">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -463,13 +417,6 @@
Sets the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="set_force_autohinter">
- <return type="void" />
- <argument index="0" name="force_autohinter" type="bool" />
- <description>
- If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
- </description>
- </method>
<method name="set_glyph_advance">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -521,13 +468,6 @@
Sets rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="set_hinting">
- <return type="void" />
- <argument index="0" name="hinting" type="int" enum="TextServer.Hinting" />
- <description>
- Sets font hinting mode. Used by dynamic fonts only.
- </description>
- </method>
<method name="set_kerning">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -546,35 +486,6 @@
Adds override for [method is_language_supported].
</description>
</method>
- <method name="set_msdf_pixel_range">
- <return type="void" />
- <argument index="0" name="msdf_pixel_range" type="int" />
- <description>
- Sets the width of the range around the shape between the minimum and maximum representable signed distance.
- </description>
- </method>
- <method name="set_msdf_size">
- <return type="void" />
- <argument index="0" name="msdf_size" type="int" />
- <description>
- Sets source font size used to generate MSDF textures.
- </description>
- </method>
- <method name="set_multichannel_signed_distance_field">
- <return type="void" />
- <argument index="0" name="msdf" type="bool" />
- <description>
- If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
- [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
- </description>
- </method>
- <method name="set_oversampling">
- <return type="void" />
- <argument index="0" name="oversampling" type="float" />
- <description>
- Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
- </description>
- </method>
<method name="set_scale">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -649,4 +560,55 @@
</description>
</method>
</methods>
+ <members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
+ If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled.
+ </member>
+ <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()">
+ Contents of the dynamic font source file.
+ </member>
+ <member name="embolden" type="float" setter="set_embolden" getter="get_embolden" default="0.0">
+ If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ </member>
+ <member name="fixed_size" type="int" setter="set_fixed_size" getter="get_fixed_size" default="0">
+ Font size, used only for the bitmap fonts.
+ </member>
+ <member name="font_name" type="String" setter="set_font_name" getter="get_font_name" default="&quot;&quot;">
+ Font family name.
+ </member>
+ <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" default="0">
+ Font style flags, see [enum TextServer.FontStyle].
+ </member>
+ <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
+ If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
+ </member>
+ <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1">
+ Font hinting mode. Used by dynamic fonts only.
+ </member>
+ <member name="msdf_pixel_range" type="int" setter="set_msdf_pixel_range" getter="get_msdf_pixel_range" default="16">
+ The width of the range around the shape between the minimum and maximum representable signed distance.
+ </member>
+ <member name="msdf_size" type="int" setter="set_msdf_size" getter="get_msdf_size" default="48">
+ Source font size used to generate MSDF textures.
+ </member>
+ <member name="multichannel_signed_distance_field" type="bool" setter="set_multichannel_signed_distance_field" getter="is_multichannel_signed_distance_field" default="false">
+ If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
+ </member>
+ <member name="opentype_feature_overrides" type="Dictionary" setter="set_opentype_feature_overrides" getter="get_opentype_feature_overrides" default="{}">
+ Font OpenType feature set override.
+ </member>
+ <member name="oversampling" type="float" setter="set_oversampling" getter="get_oversampling" default="0.0">
+ Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </member>
+ <member name="style_name" type="String" setter="set_font_style_name" getter="get_font_style_name" default="&quot;&quot;">
+ Font style name.
+ </member>
+ <member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
+ Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+ </member>
+ <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
+ 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
+ For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
+ </member>
+ </members>
</class>
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index 72bd6a6411..3de0d0dbe9 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticles2D" inherits="Node2D" version="4.0">
+<class name="GPUParticles2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D particle emitter.
</brief_description>
@@ -8,7 +8,7 @@
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 title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link>
+ <link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
@@ -18,6 +18,17 @@
Returns a rectangle containing the positions of all existing particles.
</description>
</method>
+ <method name="emit_particle">
+ <return type="void" />
+ <argument index="0" name="xform" type="Transform2D" />
+ <argument index="1" name="velocity" type="Vector2" />
+ <argument index="2" name="color" type="Color" />
+ <argument index="3" name="custom" type="Color" />
+ <argument index="4" name="flags" type="int" />
+ <description>
+ Emits a single particle. Whether [code]xform[/code], [code]velocity[/code], [code]color[/code] and [code]custom[/code] are applied depends on the value of [code]flags[/code]. See [enum EmitFlags].
+ </description>
+ </method>
<method name="restart">
<return type="void" />
<description>
@@ -67,6 +78,9 @@
<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="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath(&quot;&quot;)">
+ The [NodePath] to the [GPUParticles2D] used for sub-emissions.
+ </member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
</member>
@@ -92,5 +106,20 @@
</constant>
<constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder">
</constant>
+ <constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags">
+ Particle starts at the specified position.
+ </constant>
+ <constant name="EMIT_FLAG_ROTATION_SCALE" value="2" enum="EmitFlags">
+ Particle starts with specified rotation and scale.
+ </constant>
+ <constant name="EMIT_FLAG_VELOCITY" value="4" enum="EmitFlags">
+ Particle starts with the specified velocity vector, which defines the emission direction and speed.
+ </constant>
+ <constant name="EMIT_FLAG_COLOR" value="8" enum="EmitFlags">
+ Particle starts with specified color.
+ </constant>
+ <constant name="EMIT_FLAG_CUSTOM" value="16" enum="EmitFlags">
+ Particle starts with specified [code]CUSTOM[/code] data.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index 0bed561de3..899b5dec27 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticles3D" inherits="GeometryInstance3D" version="4.0">
+<class name="GPUParticles3D" inherits="GeometryInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
3D particle emitter.
</brief_description>
@@ -8,7 +8,7 @@
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 title="Controlling thousands of fish with Particles">https://docs.godotengine.org/en/latest/tutorials/performance/vertex_animation/controlling_thousands_of_fish.html</link>
+ <link title="Controlling thousands of fish with Particles">$DOCS_URL/tutorials/performance/vertex_animation/controlling_thousands_of_fish.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
@@ -26,6 +26,7 @@
<argument index="3" name="custom" type="Color" />
<argument index="4" name="flags" type="int" />
<description>
+ Emits a single particle. Whether [code]xform[/code], [code]velocity[/code], [code]color[/code] and [code]custom[/code] are applied depends on the value of [code]flags[/code]. See [enum EmitFlags].
</description>
</method>
<method name="get_draw_pass_mesh" qualifiers="const">
@@ -137,14 +138,19 @@
Particles are drawn in order of depth.
</constant>
<constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags">
+ Particle starts at the specified position.
</constant>
<constant name="EMIT_FLAG_ROTATION_SCALE" value="2" enum="EmitFlags">
+ Particle starts with specified rotation and scale.
</constant>
<constant name="EMIT_FLAG_VELOCITY" value="4" enum="EmitFlags">
+ Particle starts with the specified velocity vector, which defines the emission direction and speed.
</constant>
<constant name="EMIT_FLAG_COLOR" value="8" enum="EmitFlags">
+ Particle starts with specified color.
</constant>
<constant name="EMIT_FLAG_CUSTOM" value="16" enum="EmitFlags">
+ Particle starts with specified [code]CUSTOM[/code] data.
</constant>
<constant name="MAX_DRAW_PASSES" value="4">
Maximum number of draw passes supported.
diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml
index 7de52eedd7..5577b47c89 100644
--- a/doc/classes/GPUParticlesAttractor3D.xml
+++ b/doc/classes/GPUParticlesAttractor3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesAttractor3D" inherits="VisualInstance3D" version="4.0">
+<class name="GPUParticlesAttractor3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesCollisionBox.xml b/doc/classes/GPUParticlesAttractorBox3D.xml
index d2bf4ef538..3fa8276579 100644
--- a/doc/classes/GPUParticlesCollisionBox.xml
+++ b/doc/classes/GPUParticlesAttractorBox3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionBox" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesAttractorBox3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesAttractorSphere.xml b/doc/classes/GPUParticlesAttractorSphere3D.xml
index 4398de55e9..2b68637b38 100644
--- a/doc/classes/GPUParticlesAttractorSphere.xml
+++ b/doc/classes/GPUParticlesAttractorSphere3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesAttractorSphere" inherits="GPUParticlesAttractor3D" version="4.0">
+<class name="GPUParticlesAttractorSphere3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesAttractorVectorField.xml b/doc/classes/GPUParticlesAttractorVectorField3D.xml
index e164343528..cbf817f407 100644
--- a/doc/classes/GPUParticlesAttractorVectorField.xml
+++ b/doc/classes/GPUParticlesAttractorVectorField3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesAttractorVectorField" inherits="GPUParticlesAttractor3D" version="4.0">
+<class name="GPUParticlesAttractorVectorField3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml
index 1a7901839c..45bc9b402b 100644
--- a/doc/classes/GPUParticlesCollision3D.xml
+++ b/doc/classes/GPUParticlesCollision3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollision3D" inherits="VisualInstance3D" version="4.0">
+<class name="GPUParticlesCollision3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesAttractorBox.xml b/doc/classes/GPUParticlesCollisionBox3D.xml
index 93fdc45e56..091b4ca730 100644
--- a/doc/classes/GPUParticlesAttractorBox.xml
+++ b/doc/classes/GPUParticlesCollisionBox3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesAttractorBox" inherits="GPUParticlesAttractor3D" version="4.0">
+<class name="GPUParticlesCollisionBox3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesCollisionHeightField.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml
index 99b2ad3ce0..e7e14375d9 100644
--- a/doc/classes/GPUParticlesCollisionHeightField.xml
+++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionHeightField" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesCollisionHeightField3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -13,9 +13,9 @@
</member>
<member name="follow_camera_push_ratio" type="float" setter="set_follow_camera_push_ratio" getter="get_follow_camera_push_ratio" default="0.1">
</member>
- <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField.Resolution" default="2">
+ <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField3D.Resolution" default="2">
</member>
- <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField.UpdateMode" default="0">
+ <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField3D.UpdateMode" default="0">
</member>
</members>
<constants>
diff --git a/doc/classes/GPUParticlesCollisionSDF.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml
index 8d798a9d28..6f59a18eb5 100644
--- a/doc/classes/GPUParticlesCollisionSDF.xml
+++ b/doc/classes/GPUParticlesCollisionSDF3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionSDF" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesCollisionSDF3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -9,7 +9,7 @@
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
- <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF.Resolution" default="2">
+ <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF3D.Resolution" default="2">
</member>
<member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
</member>
diff --git a/doc/classes/GPUParticlesCollisionSphere.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml
index ddb2391fd9..b78e114d09 100644
--- a/doc/classes/GPUParticlesCollisionSphere.xml
+++ b/doc/classes/GPUParticlesCollisionSphere3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionSphere" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesCollisionSphere3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml
index ebfcaa7678..b1bc411a21 100644
--- a/doc/classes/Generic6DOFJoint3D.xml
+++ b/doc/classes/Generic6DOFJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Generic6DOFJoint3D" inherits="Joint3D" version="4.0">
+<class name="Generic6DOFJoint3D" inherits="Joint3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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>
diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml
index 157124cded..cbd83e8d7d 100644
--- a/doc/classes/Geometry2D.xml
+++ b/doc/classes/Geometry2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Geometry2D" inherits="Object" version="4.0">
+<class name="Geometry2D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper node to calculate generic geometry operations in 2D space.
</brief_description>
@@ -209,7 +209,7 @@
<return type="PackedInt32Array" />
<argument index="0" name="polygon" type="PackedVector2Array" />
<description>
- Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] 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). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
</methods>
diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml
index 5b2e065d1a..0bf6f880c2 100644
--- a/doc/classes/Geometry3D.xml
+++ b/doc/classes/Geometry3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Geometry3D" inherits="Object" version="4.0">
+<class name="Geometry3D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper node to calculate generic geometry operations in 3D space.
</brief_description>
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index 0a2c0fbe81..77afb98225 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GeometryInstance3D" inherits="VisualInstance3D" version="4.0">
+<class name="GeometryInstance3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base node for geometry-based visual instances.
</brief_description>
@@ -38,31 +38,42 @@
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">
+ The texel density to use for lightmapping in [LightmapGI]. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes.
</member>
<member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
+ The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic).
+ [b]Note:[/b] Lights' bake mode will also affect the global illumination rendering. See [member Light3D.light_bake_mode].
</member>
<member name="ignore_occlusion_culling" type="bool" setter="set_ignore_occlusion_culling" getter="is_ignoring_occlusion_culling" default="false">
</member>
<member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0">
</member>
+ <member name="material_overlay" type="Material" setter="set_material_overlay" getter="get_material_overlay">
+ The material overlay for the whole geometry.
+ If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces.
+ </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="transparency" type="float" setter="set_transparency" getter="get_transparency" default="0.0">
- Transparency applied to the whole geometry. In spatial shaders, transparency is set as the default value of the [code]ALPHA[/code] built-in.
+ The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [member transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering.
+ In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in.
+ [b]Note:[/b] [member transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are.
</member>
<member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0">
Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check.
</member>
<member name="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin" default="0.0">
Margin for the [member visibility_range_begin] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_begin] threshold by this amount.
+ If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
<member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end" default="0.0">
Distance from which the GeometryInstance3D will be hidden, taking [member visibility_range_end_margin] into account as well. The default value of 0 is used to disable the range check.
</member>
<member name="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin" default="0.0">
Margin for the [member visibility_range_end] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_end] threshold by this amount.
+ If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
<member name="visibility_range_fade_mode" type="int" setter="set_visibility_range_fade_mode" getter="get_visibility_range_fade_mode" enum="GeometryInstance3D.VisibilityRangeFadeMode" default="0">
Controls which instances will be faded when approaching the limits of the visibility range. See [enum VisibilityRangeFadeMode] for possible values.
@@ -70,7 +81,7 @@
</members>
<constants>
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
- Will not cast any shadows.
+ Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris).
</constant>
<constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
Will cast shadows from all visible faces in the GeometryInstance3D.
@@ -85,29 +96,37 @@
In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
</constant>
<constant name="GI_MODE_DISABLED" value="0" enum="GIMode">
+ Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using [VoxelGI] and SDFGI, the geometry will [i]receive[/i] indirect lighting and reflections but the geometry will not be considered in GI baking. When using [LightmapGI], the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture.
</constant>
- <constant name="GI_MODE_BAKED" value="1" enum="GIMode">
+ <constant name="GI_MODE_STATIC" value="1" enum="GIMode">
+ Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using [VoxelGI], SDFGI and [LightmapGI].
</constant>
<constant name="GI_MODE_DYNAMIC" value="2" enum="GIMode">
+ Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using [VoxelGI], but it has a higher performance impact than [constant GI_MODE_STATIC]. When using other GI methods, this will act the same as [constant GI_MODE_DISABLED].
</constant>
<constant name="LIGHTMAP_SCALE_1X" value="0" enum="LightmapScale">
+ The standard texel density for lightmapping with [LightmapGI].
</constant>
<constant name="LIGHTMAP_SCALE_2X" value="1" enum="LightmapScale">
+ Multiplies texel density by 2× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0.
</constant>
<constant name="LIGHTMAP_SCALE_4X" value="2" enum="LightmapScale">
+ Multiplies texel density by 4× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0.
</constant>
<constant name="LIGHTMAP_SCALE_8X" value="3" enum="LightmapScale">
+ Multiplies texel density by 8× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0.
</constant>
<constant name="LIGHTMAP_SCALE_MAX" value="4" enum="LightmapScale">
+ Represents the size of the [enum LightmapScale] enum.
</constant>
<constant name="VISIBILITY_RANGE_FADE_DISABLED" value="0" enum="VisibilityRangeFadeMode">
- Will not fade itself nor its visibility dependencies, hysteresis will be used instead. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information.
+ Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information.
</constant>
<constant name="VISIBILITY_RANGE_FADE_SELF" value="1" enum="VisibilityRangeFadeMode">
- Will fade-out itself when reaching the limits of its own visibility range. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
+ Will fade-out itself when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
</constant>
<constant name="VISIBILITY_RANGE_FADE_DEPENDENCIES" value="2" enum="VisibilityRangeFadeMode">
- Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
+ Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
</constant>
</constants>
</class>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 93cef07b79..89c968cc9e 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" version="4.0">
+<class name="Gradient" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A color interpolator resource which can be used to generate colors between user-defined color points.
</brief_description>
@@ -51,6 +51,12 @@
Removes the color at the index [code]point[/code].
</description>
</method>
+ <method name="reverse">
+ <return type="void" />
+ <description>
+ Reverses/mirrors the gradient.
+ </description>
+ </method>
<method name="set_color">
<return type="void" />
<argument index="0" name="point" type="int" />
@@ -72,8 +78,22 @@
<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="interpolation_mode" type="int" setter="set_interpolation_mode" getter="get_interpolation_mode" enum="Gradient.InterpolationMode" default="0">
+ Defines how the colors between points of the gradient are interpolated. See [enum InterpolationMode] for available modes.
+ </member>
<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>
+ <constant name="GRADIENT_INTERPOLATE_LINEAR" value="0" enum="InterpolationMode">
+ Linear interpolation.
+ </constant>
+ <constant name="GRADIENT_INTERPOLATE_CONSTANT" value="1" enum="InterpolationMode">
+ Constant interpolation, color changes abruptly at each point and stays uniform between. This might cause visible aliasing when used for a gradient texture in some cases.
+ </constant>
+ <constant name="GRADIENT_INTERPOLATE_CUBIC" value="2" enum="InterpolationMode">
+ Cubic interpolation.
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture1D.xml
index 0f0f0b1a37..a124753a9f 100644
--- a/doc/classes/GradientTexture.xml
+++ b/doc/classes/GradientTexture1D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GradientTexture" inherits="Texture2D" version="4.0">
+<class name="GradientTexture1D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Gradient-filled texture.
</brief_description>
<description>
- GradientTexture uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]).
+ GradientTexture1D uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]).
</description>
<tutorials>
</tutorials>
@@ -15,7 +15,7 @@
<member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false">
If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
</member>
- <member name="width" type="int" setter="set_width" getter="get_width" default="2048">
+ <member name="width" type="int" setter="set_width" getter="get_width" default="256">
The number of color samples that will be obtained from the [Gradient].
</member>
</members>
diff --git a/doc/classes/GradientTexture2D.xml b/doc/classes/GradientTexture2D.xml
index d1520861ec..4362578932 100644
--- a/doc/classes/GradientTexture2D.xml
+++ b/doc/classes/GradientTexture2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GradientTexture2D" inherits="Texture2D" version="4.0">
+<class name="GradientTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Gradient-filled 2D texture.
</brief_description>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 673bf19122..19f2915087 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" version="4.0">
+<class name="GraphEdit" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
</brief_description>
@@ -18,6 +18,43 @@
Virtual method which can be overridden to customize how connections are drawn.
</description>
</method>
+ <method name="_is_in_input_hotzone" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="graph_node" type="Object" />
+ <argument index="1" name="slot_index" type="int" />
+ <argument index="2" name="mouse_position" type="Vector2" />
+ <description>
+ Returns whether the [code]mouse_position[/code] is in the input hot zone.
+ By default, a hot zone is a [Rect2] positioned such that its center is at [code]graph_node[/code].[method GraphNode.get_connection_input_position]([code]slot_index[/code]) (For output's case, call [method GraphNode.get_connection_output_position] instead). The hot zone's width is twice the Theme Property [code]port_grab_distance_horizontal[/code], and its height is twice the [code]port_grab_distance_vertical[/code].
+ Below is a sample code to help get started:
+ [codeblock]
+ func _is_in_input_hotzone(graph_node, slot_index, mouse_position):
+ var slot_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var slot_pos : Vector2 = graph_node.get_position() + graph_node.get_connection_input_position(slot_index) - slot_size / 2
+ var rect = Rect2(slot_pos, slot_size)
+
+ return rect.has_point(mouse_position)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="_is_in_output_hotzone" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="graph_node" type="Object" />
+ <argument index="1" name="slot_index" type="int" />
+ <argument index="2" name="mouse_position" type="Vector2" />
+ <description>
+ Returns whether the [code]mouse_position[/code] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone].
+ Below is a sample code to help get started:
+ [codeblock]
+ func _is_in_output_hotzone(graph_node, slot_index, mouse_position):
+ var slot_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var slot_pos : Vector2 = graph_node.get_position() + graph_node.get_connection_output_position(slot_index) - slot_size / 2
+ var rect = Rect2(slot_pos, slot_size)
+
+ return rect.has_point(mouse_position)
+ [/codeblock]
+ </description>
+ </method>
<method name="add_valid_connection_type">
<return type="void" />
<argument index="0" name="from_type" type="int" />
@@ -72,6 +109,14 @@
Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed.
</description>
</method>
+ <method name="force_connection_drag_end">
+ <return type="void" />
+ <description>
+ Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor.
+ This is best used together with [signal connection_drag_started] and [signal connection_drag_ended] to add custom behavior like node addition through shortcuts.
+ [b]Note:[/b] This method suppresses any other connection request signals apart from [signal connection_drag_ended].
+ </description>
+ </method>
<method name="get_connection_line">
<return type="PackedVector2Array" />
<argument index="0" name="from" type="Vector2" />
@@ -141,7 +186,7 @@
<argument index="3" name="to_port" type="int" />
<argument index="4" name="amount" type="float" />
<description>
- Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property.
+ Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [theme_item activity] theme property.
</description>
</method>
<method name="set_selected">
@@ -153,13 +198,14 @@
</method>
</methods>
<members>
+ <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="connection_lines_antialiased" type="bool" setter="set_connection_lines_antialiased" getter="is_connection_lines_antialiased" default="true">
If [code]true[/code], the lines between nodes will use antialiasing.
</member>
<member name="connection_lines_thickness" type="float" setter="set_connection_lines_thickness" getter="get_connection_lines_thickness" default="2.0">
The thickness of the lines between the nodes.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="minimap_enabled" type="bool" setter="set_minimap_enabled" getter="is_minimap_enabled" default="true">
If [code]true[/code], the minimap is visible.
</member>
@@ -169,7 +215,9 @@
<member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2(240, 160)">
The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="panning_scheme" type="int" setter="set_panning_scheme" getter="get_panning_scheme" enum="GraphEdit.PanningScheme" default="0">
+ Defines the control scheme for panning with mouse wheel.
+ </member>
<member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled" default="false">
If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
</member>
@@ -204,6 +252,19 @@
Emitted at the beginning of a GraphNode movement.
</description>
</signal>
+ <signal name="connection_drag_ended">
+ <description>
+ Emitted at the end of a connection drag.
+ </description>
+ </signal>
+ <signal name="connection_drag_started">
+ <argument index="0" name="from" type="String" />
+ <argument index="1" name="slot" type="String" />
+ <argument index="2" name="is_output" type="bool" />
+ <description>
+ Emitted at the beginning of a connection drag.
+ </description>
+ </signal>
<signal name="connection_from_empty">
<argument index="0" name="to" type="StringName" />
<argument index="1" name="to_slot" type="int" />
@@ -287,22 +348,39 @@
</description>
</signal>
</signals>
+ <constants>
+ <constant name="SCROLL_ZOOMS" value="0" enum="PanningScheme">
+ [kbd]Mouse Wheel[/kbd] will zoom, [kbd]Ctrl + Mouse Wheel[/kbd] will move the view.
+ </constant>
+ <constant name="SCROLL_PANS" value="1" enum="PanningScheme">
+ [kbd]Mouse Wheel[/kbd] will move the view, [kbd]Ctrl + Mouse Wheel[/kbd] will zoom.
+ </constant>
+ </constants>
<theme_items>
<theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
</theme_item>
- <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160">
- </theme_item>
- <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80">
- </theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- The background drawn under the grid.
- </theme_item>
<theme_item name="grid_major" data_type="color" type="Color" default="Color(1, 1, 1, 0.2)">
Color of major grid lines.
</theme_item>
<theme_item name="grid_minor" data_type="color" type="Color" default="Color(1, 1, 1, 0.05)">
Color of minor grid lines.
</theme_item>
+ <theme_item name="selection_fill" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
+ The fill color of the selection rectangle.
+ </theme_item>
+ <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)">
+ The outline color of the selection rectangle.
+ </theme_item>
+ <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160">
+ </theme_item>
+ <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80">
+ </theme_item>
+ <theme_item name="port_grab_distance_horizontal" data_type="constant" type="int" default="24">
+ The horizontal range within which a port can be grabbed (on both sides).
+ </theme_item>
+ <theme_item name="port_grab_distance_vertical" data_type="constant" type="int" default="26">
+ The vertical range within which a port can be grabbed (on both sides).
+ </theme_item>
<theme_item name="layout" data_type="icon" type="Texture2D">
</theme_item>
<theme_item name="minimap" data_type="icon" type="Texture2D">
@@ -313,23 +391,14 @@
<theme_item name="more" data_type="icon" type="Texture2D">
The icon for the zoom in button.
</theme_item>
- <theme_item name="port_grab_distance_horizontal" data_type="constant" type="int" default="24">
- The horizontal range within which a port can be grabbed (on both sides).
- </theme_item>
- <theme_item name="port_grab_distance_vertical" data_type="constant" type="int" default="6">
- The vertical range within which a port can be grabbed (on both sides).
- </theme_item>
<theme_item name="reset" data_type="icon" type="Texture2D">
The icon for the zoom reset button.
</theme_item>
- <theme_item name="selection_fill" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
- The fill color of the selection rectangle.
- </theme_item>
- <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)">
- The outline color of the selection rectangle.
- </theme_item>
<theme_item name="snap" data_type="icon" type="Texture2D">
The icon for the snap toggle button.
</theme_item>
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ The background drawn under the grid.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index ff6271d2aa..1e9169146e 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphNode" inherits="Container" version="4.0">
+<class name="GraphNode" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A GraphNode is a container with potentially several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
</brief_description>
@@ -218,7 +218,7 @@
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="0" />
<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>
@@ -285,67 +285,63 @@
No overlay is shown.
</constant>
<constant name="OVERLAY_BREAKPOINT" value="1" enum="Overlay">
- Show overlay set in the [code]breakpoint[/code] theme property.
+ Show overlay set in the [theme_item breakpoint] theme property.
</constant>
<constant name="OVERLAY_POSITION" value="2" enum="Overlay">
- Show overlay set in the [code]position[/code] theme property.
+ Show overlay set in the [theme_item position] theme property.
</constant>
</constants>
<theme_items>
- <theme_item name="breakpoint" data_type="style" type="StyleBox">
- The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT].
+ <theme_item name="close_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ The color modulation applied to the close button icon.
</theme_item>
- <theme_item name="close" data_type="icon" type="Texture2D">
- The icon for the close button, visible when [member show_close] is enabled.
+ <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ The color modulation applied to the resizer icon.
</theme_item>
- <theme_item name="close_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- The color modulation applied to the close button icon.
+ <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ Color of the title text.
</theme_item>
- <theme_item name="close_offset" data_type="constant" type="int" default="18">
+ <theme_item name="close_offset" data_type="constant" type="int" default="22">
The vertical offset of the close button.
</theme_item>
- <theme_item name="comment" data_type="style" type="StyleBox">
- The [StyleBox] used when [member comment] is enabled.
+ <theme_item name="port_offset" data_type="constant" type="int" default="0">
+ Horizontal offset for the ports.
</theme_item>
- <theme_item name="commentfocus" data_type="style" type="StyleBox">
- The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused.
+ <theme_item name="separation" data_type="constant" type="int" default="2">
+ The vertical distance between ports.
</theme_item>
- <theme_item name="defaultfocus" data_type="style" type="StyleBox">
+ <theme_item name="title_offset" data_type="constant" type="int" default="26">
+ Vertical offset of the title text.
</theme_item>
- <theme_item name="defaultframe" data_type="style" type="StyleBox">
+ <theme_item name="title_font" data_type="font" type="Font">
+ Font used for the title text.
</theme_item>
- <theme_item name="frame" data_type="style" type="StyleBox">
- The default background for [GraphNode].
+ <theme_item name="close" data_type="icon" type="Texture2D">
+ The icon for the close button, visible when [member show_close] is enabled.
</theme_item>
<theme_item name="port" data_type="icon" type="Texture2D">
The icon used for representing ports.
</theme_item>
- <theme_item name="port_offset" data_type="constant" type="int" default="3">
- Horizontal offset for the ports.
- </theme_item>
- <theme_item name="position" data_type="style" type="StyleBox">
- The background used when [member overlay] is set to [constant OVERLAY_POSITION].
- </theme_item>
<theme_item name="resizer" data_type="icon" type="Texture2D">
The icon used for resizer, visible when [member resizable] is enabled.
</theme_item>
- <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- The color modulation applied to the resizer icon.
+ <theme_item name="breakpoint" data_type="style" type="StyleBox">
+ The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT].
</theme_item>
- <theme_item name="selectedframe" data_type="style" type="StyleBox">
- The background used when the [GraphNode] is selected.
+ <theme_item name="comment" data_type="style" type="StyleBox">
+ The [StyleBox] used when [member comment] is enabled.
</theme_item>
- <theme_item name="separation" data_type="constant" type="int" default="1">
- The vertical distance between ports.
+ <theme_item name="commentfocus" data_type="style" type="StyleBox">
+ The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused.
</theme_item>
- <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- Color of the title text.
+ <theme_item name="frame" data_type="style" type="StyleBox">
+ The default background for [GraphNode].
</theme_item>
- <theme_item name="title_font" data_type="font" type="Font">
- Font used for the title text.
+ <theme_item name="position" data_type="style" type="StyleBox">
+ The background used when [member overlay] is set to [constant OVERLAY_POSITION].
</theme_item>
- <theme_item name="title_offset" data_type="constant" type="int" default="20">
- Vertical offset of the title text.
+ <theme_item name="selectedframe" data_type="style" type="StyleBox">
+ The background used when the [GraphNode] is selected.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml
index 758bab465d..59777ffb79 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" version="4.0">
+<class name="GridContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Grid container used to arrange Control-derived children in a grid like layout.
</brief_description>
diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml
index 1683842d65..7c9dde9589 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" version="4.0">
+<class name="GrooveJoint2D" inherits="Joint2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Groove constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml
index ce254d8a15..0af9f7a0f4 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" version="4.0">
+<class name="HBoxContainer" inherits="BoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Horizontal box container.
</brief_description>
diff --git a/doc/classes/HFlowContainer.xml b/doc/classes/HFlowContainer.xml
new file mode 100644
index 0000000000..3cee25e3ab
--- /dev/null
+++ b/doc/classes/HFlowContainer.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HFlowContainer" inherits="FlowContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Horizontal flow container.
+ </brief_description>
+ <description>
+ Horizontal version of [FlowContainer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <theme_items>
+ <theme_item name="hseparation" data_type="constant" type="int" default="4">
+ The horizontal separation of children nodes.
+ </theme_item>
+ <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ The vertical separation of children nodes.
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
index 69ad194fe0..fa60a7eb58 100644
--- a/doc/classes/HMACContext.xml
+++ b/doc/classes/HMACContext.xml
@@ -1,56 +1,56 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HMACContext" inherits="RefCounted" version="4.0">
+<class name="HMACContext" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Used to create an HMAC for a message using a key.
</brief_description>
<description>
The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once.
- [codeblocks]
- [gdscript]
- extends Node
- var ctx = HMACContext.new()
+ [codeblocks]
+ [gdscript]
+ extends Node
+ var ctx = HMACContext.new()
- func _ready():
- var key = "supersecret".to_utf8()
- var err = ctx.start(HashingContext.HASH_SHA256, key)
- assert(err == OK)
- var msg1 = "this is ".to_utf8()
- var msg2 = "vewy vewy secret".to_utf8()
- err = ctx.update(msg1)
- assert(err == OK)
- err = ctx.update(msg2)
- assert(err == OK)
- var hmac = ctx.finish()
- print(hmac.hex_encode())
+ func _ready():
+ var key = "supersecret".to_utf8()
+ var err = ctx.start(HashingContext.HASH_SHA256, key)
+ assert(err == OK)
+ var msg1 = "this is ".to_utf8()
+ var msg2 = "super duper secret".to_utf8()
+ err = ctx.update(msg1)
+ assert(err == OK)
+ err = ctx.update(msg2)
+ assert(err == OK)
+ var hmac = ctx.finish()
+ print(hmac.hex_encode())
- [/gdscript]
- [csharp]
- using Godot;
- using System;
- using System.Diagnostics;
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+ using System.Diagnostics;
- public class CryptoNode : Node
- {
- private HMACContext ctx = new HMACContext();
- public override void _Ready()
- {
- PackedByteArray key = String("supersecret").to_utf8();
- Error err = ctx.Start(HashingContext.HASH_SHA256, key);
- GD.Assert(err == OK);
- PackedByteArray msg1 = String("this is ").to_utf8();
- PackedByteArray msg2 = String("vewy vew secret").to_utf8();
- err = ctx.Update(msg1);
- GD.Assert(err == OK);
- err = ctx.Update(msg2);
- GD.Assert(err == OK);
- PackedByteArray hmac = ctx.Finish();
- GD.Print(hmac.HexEncode());
- }
- }
+ public class CryptoNode : Node
+ {
+ private HMACContext ctx = new HMACContext();
+ public override void _Ready()
+ {
+ PackedByteArray key = String("supersecret").to_utf8();
+ Error err = ctx.Start(HashingContext.HASH_SHA256, key);
+ GD.Assert(err == OK);
+ PackedByteArray msg1 = String("this is ").to_utf8();
+ PackedByteArray msg2 = String("super duper secret").to_utf8();
+ err = ctx.Update(msg1);
+ GD.Assert(err == OK);
+ err = ctx.Update(msg2);
+ GD.Assert(err == OK);
+ PackedByteArray hmac = ctx.Finish();
+ GD.Print(hmac.HexEncode());
+ }
+ }
- [/csharp]
- [/codeblocks]
- [b]Note:[/b] Not available in HTML5 exports.
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml
index fa9961710f..270bb9b1f8 100644
--- a/doc/classes/HScrollBar.xml
+++ b/doc/classes/HScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HScrollBar" inherits="ScrollBar" version="4.0">
+<class name="HScrollBar" inherits="ScrollBar" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Horizontal scroll bar.
</brief_description>
@@ -18,15 +18,6 @@
<theme_item name="decrement_pressed" data_type="icon" type="Texture2D">
Displayed when the decrement button is being pressed.
</theme_item>
- <theme_item name="grabber" data_type="style" type="StyleBox">
- Used as texture for the grabber, the draggable element representing current scroll.
- </theme_item>
- <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
- Used when the mouse hovers over the grabber.
- </theme_item>
- <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
- Used when the grabber is being dragged.
- </theme_item>
<theme_item name="increment" data_type="icon" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
@@ -36,6 +27,15 @@
<theme_item name="increment_pressed" data_type="icon" type="Texture2D">
Displayed when the increment button is being pressed.
</theme_item>
+ <theme_item name="grabber" data_type="style" type="StyleBox">
+ Used as texture for the grabber, the draggable element representing current scroll.
+ </theme_item>
+ <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
+ Used when the mouse hovers over the grabber.
+ </theme_item>
+ <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
+ Used when the grabber is being dragged.
+ </theme_item>
<theme_item name="scroll" data_type="style" type="StyleBox">
Used as background of this [ScrollBar].
</theme_item>
diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml
index 5a1011525c..5decec9be9 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" version="4.0">
+<class name="HSeparator" inherits="Separator" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Horizontal separator.
</brief_description>
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
index fa88085a70..60208eee0f 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" version="4.0">
+<class name="HSlider" inherits="Slider" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Horizontal slider.
</brief_description>
@@ -13,22 +13,22 @@
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
</theme_item>
- <theme_item name="grabber_area" data_type="style" type="StyleBox">
- The background of the area to the left of the grabber.
- </theme_item>
- <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
- </theme_item>
<theme_item name="grabber_disabled" data_type="icon" type="Texture2D">
The texture for the grabber when it's disabled.
</theme_item>
<theme_item name="grabber_highlight" data_type="icon" type="Texture2D">
The texture for the grabber when it's focused.
</theme_item>
- <theme_item name="slider" data_type="style" type="StyleBox">
- The background for the whole slider. Determines the height of the [code]grabber_area[/code].
- </theme_item>
<theme_item name="tick" data_type="icon" type="Texture2D">
The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
</theme_item>
+ <theme_item name="grabber_area" data_type="style" type="StyleBox">
+ The background of the area to the left of the grabber.
+ </theme_item>
+ <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
+ </theme_item>
+ <theme_item name="slider" data_type="style" type="StyleBox">
+ The background for the whole slider. Determines the height of the [code]grabber_area[/code].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index 379d4cfbdb..f240718176 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" version="4.0">
+<class name="HSplitContainer" inherits="SplitContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Horizontal split container.
</brief_description>
@@ -12,13 +12,11 @@
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
+ <theme_item name="separation" data_type="constant" type="int" default="12">
+ The space between sides of the container.
</theme_item>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area.
</theme_item>
- <theme_item name="separation" data_type="constant" 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 9f33c400f4..5a9d12d01b 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="RefCounted" version="4.0">
+<class name="HTTPClient" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Low-level hyper-text transfer protocol client.
</brief_description>
@@ -15,8 +15,8 @@
[b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
</description>
<tutorials>
- <link title="HTTP client class">https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link>
- <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
+ <link title="HTTP client class">$DOCS_URL/tutorials/networking/http_client_class.html</link>
+ <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="close">
@@ -173,6 +173,24 @@
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
</method>
+ <method name="set_http_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTP requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
+ <method name="set_https_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTPS requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
</methods>
<members>
<member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 558e51aefe..42047a68c8 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPRequest" inherits="Node" version="4.0">
+<class name="HTTPRequest" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node with the ability to send HTTP(S) requests.
</brief_description>
@@ -153,8 +153,8 @@
[b]Gzipped response bodies[/b]: HTTPRequest will automatically handle decompression of response bodies. A [code]Accept-Encoding[/code] header will be automatically added to each of your requests, unless one is already specified. Any response with a [code]Content-Encoding: gzip[/code] header will automatically be decompressed and delivered to you as uncompressed bytes.
</description>
<tutorials>
- <link title="Making HTTP requests">https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link>
- <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
+ <link title="Making HTTP requests">$DOCS_URL/tutorials/networking/http_request_class.html</link>
+ <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="cancel_request">
@@ -208,6 +208,24 @@
Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.
</description>
</method>
+ <method name="set_http_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTP requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
+ <method name="set_https_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTPS requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
</methods>
<members>
<member name="accept_gzip" type="bool" setter="set_accept_gzip" getter="is_accepting_gzip" default="true">
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index f470f1611d..9ecf2872f3 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="RefCounted" version="4.0">
+<class name="HashingContext" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Context to compute cryptographic hashes over multiple iterations.
</brief_description>
diff --git a/doc/classes/HeightMapShape3D.xml b/doc/classes/HeightMapShape3D.xml
index 705415171f..b8fe094490 100644
--- a/doc/classes/HeightMapShape3D.xml
+++ b/doc/classes/HeightMapShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HeightMapShape3D" inherits="Shape3D" version="4.0">
+<class name="HeightMapShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Height map shape for 3D physics.
</brief_description>
diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml
index a8e7f343ff..eb1d1d5eca 100644
--- a/doc/classes/HingeJoint3D.xml
+++ b/doc/classes/HingeJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HingeJoint3D" inherits="Joint3D" version="4.0">
+<class name="HingeJoint3D" inherits="Joint3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A hinge between two 3D PhysicsBodies.
</brief_description>
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index 8eb994a913..7ecac8680a 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" version="4.0">
+<class name="IP" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Internet protocol (IP) support functions such as DNS resolution.
</brief_description>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 492bddca1f..35868563de 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Image" inherits="Resource" version="4.0">
+<class name="Image" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Image datatype.
</brief_description>
@@ -9,7 +9,7 @@
[b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import.
</description>
<tutorials>
- <link title="Importing images">https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_images.html</link>
+ <link title="Importing images">$DOCS_URL/tutorials/assets_pipeline/importing_images.html</link>
</tutorials>
<methods>
<method name="adjust_bcs">
@@ -88,6 +88,15 @@
<description>
</description>
</method>
+ <method name="compute_image_metrics">
+ <return type="Dictionary" />
+ <argument index="0" name="compared_image" type="Image" />
+ <argument index="1" name="use_luma" type="bool" />
+ <description>
+ Compute image metrics on the current image and the compared image.
+ The dictionary contains [code]max[/code], [code]mean[/code], [code]mean_squared[/code], [code]root_mean_squared[/code] and [code]peak_snr[/code].
+ </description>
+ </method>
<method name="convert">
<return type="void" />
<argument index="0" name="format" type="int" enum="Image.Format" />
@@ -135,7 +144,7 @@
<return type="int" enum="Error" />
<description>
Decompresses the image if it is VRAM compressed in a supported format. Returns [constant OK] if the format is supported, otherwise [constant ERR_UNAVAILABLE].
- [b]Note:[/b] The following formats can be decompressed: DXT, RGTC, BPTC, PVRTC1. The formats ETC1 and ETC2 are not supported.
+ [b]Note:[/b] The following formats can be decompressed: DXT, RGTC, BPTC. The formats ETC1 and ETC2 are not supported.
</description>
</method>
<method name="detect_alpha" qualifiers="const">
@@ -154,7 +163,15 @@
<return type="void" />
<argument index="0" name="color" type="Color" />
<description>
- Fills the image with a given [Color].
+ Fills the image with [code]color[/code].
+ </description>
+ </method>
+ <method name="fill_rect">
+ <return type="void" />
+ <argument index="0" name="rect" type="Rect2" />
+ <argument index="1" name="color" type="Color" />
+ <description>
+ Fills [code]rect[/code] with [code]color[/code].
</description>
</method>
<method name="fix_alpha_edges">
@@ -278,7 +295,7 @@
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
- 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.
+ Loads an image from file [code]path[/code]. See [url=$DOCS_URL/tutorials/assets_pipeline/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects.
See also [ImageTexture] description for usage examples.
</description>
@@ -444,7 +461,7 @@
</method>
</methods>
<members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PackedByteArray(),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{ &quot;data&quot;: PackedByteArray(), &quot;format&quot;: &quot;Lum8&quot;, &quot;height&quot;: 0, &quot;mipmaps&quot;: false, &quot;width&quot;: 0 }">
Holds all the image's color data in a given format. See [enum Format] constants.
</member>
</members>
@@ -535,52 +552,38 @@
<constant name="FORMAT_BPTC_RGBFU" value="24" enum="Format">
Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned floating-point RGB components.
</constant>
- <constant name="FORMAT_PVRTC1_2" value="25" enum="Format">
- Texture format used on PowerVR-supported mobile platforms, uses 2-bit color depth with no alpha. More information can be found [url=https://en.wikipedia.org/wiki/PVRTC]here[/url].
- [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
- </constant>
- <constant name="FORMAT_PVRTC1_2A" value="26" enum="Format">
- Same as [constant FORMAT_PVRTC1_2], but with an alpha component.
- </constant>
- <constant name="FORMAT_PVRTC1_4" value="27" enum="Format">
- Texture format used on PowerVR-supported mobile platforms, uses 4-bit color depth with no alpha. More information can be found [url=https://en.wikipedia.org/wiki/PVRTC]here[/url].
- [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
- </constant>
- <constant name="FORMAT_PVRTC1_4A" value="28" enum="Format">
- Same as [constant FORMAT_PVRTC1_4], but with an alpha component.
- </constant>
- <constant name="FORMAT_ETC" value="29" enum="Format">
+ <constant name="FORMAT_ETC" value="25" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1]Ericsson Texture Compression format 1[/url], also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel.
</constant>
- <constant name="FORMAT_ETC2_R11" value="30" enum="Format">
+ <constant name="FORMAT_ETC2_R11" value="26" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]R11_EAC[/code] variant), which provides one channel of unsigned data.
</constant>
- <constant name="FORMAT_ETC2_R11S" value="31" enum="Format">
+ <constant name="FORMAT_ETC2_R11S" value="27" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]SIGNED_R11_EAC[/code] variant), which provides one channel of signed data.
</constant>
- <constant name="FORMAT_ETC2_RG11" value="32" enum="Format">
+ <constant name="FORMAT_ETC2_RG11" value="28" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RG11_EAC[/code] variant), which provides two channels of unsigned data.
</constant>
- <constant name="FORMAT_ETC2_RG11S" value="33" enum="Format">
+ <constant name="FORMAT_ETC2_RG11S" value="29" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]SIGNED_RG11_EAC[/code] variant), which provides two channels of signed data.
</constant>
- <constant name="FORMAT_ETC2_RGB8" value="34" enum="Format">
+ <constant name="FORMAT_ETC2_RGB8" value="30" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8[/code] variant), which is a follow-up of ETC1 and compresses RGB888 data.
[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
- <constant name="FORMAT_ETC2_RGBA8" value="35" enum="Format">
+ <constant name="FORMAT_ETC2_RGBA8" value="31" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGBA8[/code]variant), which compresses RGBA8888 data with full alpha support.
[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
- <constant name="FORMAT_ETC2_RGB8A1" value="36" enum="Format">
+ <constant name="FORMAT_ETC2_RGB8A1" value="32" enum="Format">
[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_ETC2_RA_AS_RG" value="37" enum="Format">
+ <constant name="FORMAT_ETC2_RA_AS_RG" value="33" enum="Format">
</constant>
- <constant name="FORMAT_DXT5_RA_AS_RG" value="38" enum="Format">
+ <constant name="FORMAT_DXT5_RA_AS_RG" value="34" enum="Format">
</constant>
- <constant name="FORMAT_MAX" value="39" enum="Format">
+ <constant name="FORMAT_MAX" value="35" enum="Format">
Represents the size of the [enum Format] enum.
</constant>
<constant name="INTERPOLATE_NEAREST" value="0" enum="Interpolation">
@@ -614,16 +617,13 @@
<constant name="COMPRESS_S3TC" value="0" enum="CompressMode">
Use S3TC compression.
</constant>
- <constant name="COMPRESS_PVRTC1_4" value="1" enum="CompressMode">
- Use PVRTC1 4-bpp compression.
- </constant>
- <constant name="COMPRESS_ETC" value="2" enum="CompressMode">
+ <constant name="COMPRESS_ETC" value="1" enum="CompressMode">
Use ETC compression.
</constant>
- <constant name="COMPRESS_ETC2" value="3" enum="CompressMode">
+ <constant name="COMPRESS_ETC2" value="2" enum="CompressMode">
Use ETC2 compression.
</constant>
- <constant name="COMPRESS_BPTC" value="4" enum="CompressMode">
+ <constant name="COMPRESS_BPTC" value="3" enum="CompressMode">
Use BPTC compression.
</constant>
<constant name="USED_CHANNELS_L" value="0" enum="UsedChannels">
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index af7178db95..aecb4fc4b6 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImageTexture" inherits="Texture2D" version="4.0">
+<class name="ImageTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Texture2D] based on an [Image].
</brief_description>
@@ -18,7 +18,7 @@
var texture = load("res://icon.png")
$Sprite2D.texture = texture
[/codeblock]
- This is because images have to be imported as a [StreamTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method.
+ This is because images have to be imported as a [CompressedTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method.
[b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image:
[codeblock]
var texture = load("res://icon.png")
@@ -28,7 +28,7 @@
[b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations.
</description>
<tutorials>
- <link title="Importing images">https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_images.html</link>
+ <link title="Importing images">$DOCS_URL/tutorials/assets_pipeline/importing_images.html</link>
</tutorials>
<methods>
<method name="create_from_image">
diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml
index ca4178f97a..b2068504eb 100644
--- a/doc/classes/ImageTexture3D.xml
+++ b/doc/classes/ImageTexture3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImageTexture3D" inherits="Texture3D" version="4.0">
+<class name="ImageTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml
index f6ebc43d13..c574e5c9c1 100644
--- a/doc/classes/ImageTextureLayered.xml
+++ b/doc/classes/ImageTextureLayered.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImageTextureLayered" inherits="TextureLayered" version="4.0">
+<class name="ImageTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml
index 75a3ec65c2..d12d5de184 100644
--- a/doc/classes/ImmediateMesh.xml
+++ b/doc/classes/ImmediateMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImmediateMesh" inherits="Mesh" version="4.0">
+<class name="ImmediateMesh" inherits="Mesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Mesh optimized for creating geometry manually.
</brief_description>
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index ab344f908c..90e7df4421 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImporterMesh" inherits="Resource" version="4.0">
+<class name="ImporterMesh" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Resource] that contains vertex array-based geometry during the import process.
</brief_description>
@@ -23,8 +23,7 @@
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<argument index="1" name="arrays" type="Array" />
<argument index="2" name="blend_shapes" type="Array" default="[]" />
- <argument index="3" name="lods" type="Dictionary" default="{
-}" />
+ <argument index="3" name="lods" type="Dictionary" default="{}" />
<argument index="4" name="material" type="Material" default="null" />
<argument index="5" name="name" type="String" default="&quot;&quot;" />
<argument index="6" name="flags" type="int" default="0" />
@@ -178,7 +177,7 @@
</method>
</methods>
<members>
- <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: []}">
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{ &quot;surfaces&quot;: [] }">
</member>
</members>
</class>
diff --git a/doc/classes/ImporterMeshInstance3D.xml b/doc/classes/ImporterMeshInstance3D.xml
index 6d572f543b..5c477d9157 100644
--- a/doc/classes/ImporterMeshInstance3D.xml
+++ b/doc/classes/ImporterMeshInstance3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImporterMeshInstance3D" inherits="Node3D" version="4.0">
+<class name="ImporterMeshInstance3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 1fded42db2..2cbcfb8d9b 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Input" inherits="Object" version="4.0">
+<class name="Input" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A singleton that deals with inputs.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Inputs documentation index">https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link>
+ <link title="Inputs documentation index">$DOCS_URL/tutorials/inputs/index.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
@@ -141,10 +141,10 @@
Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
</description>
</method>
- <method name="get_last_mouse_speed" qualifiers="const">
+ <method name="get_last_mouse_velocity">
<return type="Vector2" />
<description>
- Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion.
+ Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements.
</description>
</method>
<method name="get_magnetometer" qualifiers="const">
@@ -155,7 +155,7 @@
</description>
</method>
<method name="get_mouse_button_mask" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="MouseButton" />
<description>
Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together.
</description>
@@ -187,6 +187,7 @@
Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button.
This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed.
If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_action_just_released" qualifiers="const">
@@ -205,6 +206,13 @@
<description>
Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed.
If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
+ </description>
+ </method>
+ <method name="is_anything_pressed" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if any action, key, joypad button, or mouse button is being pressed. This will also return [code]true[/code] if any action is simulated via code by calling [method action_press].
</description>
</method>
<method name="is_joy_button_pressed" qualifiers="const">
@@ -227,6 +235,8 @@
<argument index="0" name="keycode" type="int" enum="Key" />
<description>
Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant.
+ [method is_key_pressed] is only recommended over [method is_physical_key_pressed] in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use [method is_physical_key_pressed].
+ [b]Note:[/b] Due to keyboard ghosting, [method is_key_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_mouse_button_pressed" qualifiers="const">
@@ -236,15 +246,13 @@
Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton].
</description>
</method>
- <method name="joy_connection_changed">
- <return type="void" />
- <argument index="0" name="device" type="int" />
- <argument index="1" name="connected" type="bool" />
- <argument index="2" name="name" type="String" />
- <argument index="3" name="guid" type="String" />
+ <method name="is_physical_key_pressed" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="keycode" type="int" enum="Key" />
<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.
+ Returns [code]true[/code] if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a [enum Key] constant.
+ [method is_physical_key_pressed] is recommended over [method is_key_pressed] for in-game actions, as it will make [kbd]W[/kbd]/[kbd]A[/kbd]/[kbd]S[/kbd]/[kbd]D[/kbd] layouts work regardless of the user's keyboard layout. [method is_physical_key_pressed] will also ensure that the top row number keys work on any keyboard layout. If in doubt, use [method is_physical_key_pressed].
+ [b]Note:[/b] Due to keyboard ghosting, [method is_physical_key_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="parse_input_event">
@@ -375,7 +383,8 @@
<return type="void" />
<argument index="0" name="to" type="Vector2" />
<description>
- Sets the mouse position to the specified vector.
+ Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the game window.
+ Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [code]MOUSE_MODE_CONFINED[/code] or [code]MOUSE_MODE_CONFINED_HIDDEN[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 9dc8fbeffa..cbed163f18 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEvent" inherits="Resource" version="4.0">
+<class name="InputEvent" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Generic input event.
</brief_description>
@@ -7,8 +7,8 @@
Base class of all sort of input event. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
@@ -53,6 +53,7 @@
<description>
Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_action_released" qualifiers="const">
@@ -89,6 +90,7 @@
<return type="bool" />
<description>
Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
+ [b]Note:[/b] Due to keyboard ghosting, [method is_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="xformed_by" qualifiers="const">
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index f09af1a34d..87e2b8ea20 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" version="4.0">
+<class name="InputEventAction" inherits="InputEvent" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event type for actions.
</brief_description>
@@ -7,7 +7,7 @@
Contains a generic action which can be targeted from several types of inputs. Actions can be created from the [b]Input Map[/b] tab in the [b]Project &gt; Project Settings[/b] menu. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent: Actions">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link>
+ <link title="InputEvent: Actions">$DOCS_URL/tutorials/inputs/inputevent.html#actions</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
diff --git a/doc/classes/InputEventFromWindow.xml b/doc/classes/InputEventFromWindow.xml
index 0d897b9699..adbf8ccc08 100644
--- a/doc/classes/InputEventFromWindow.xml
+++ b/doc/classes/InputEventFromWindow.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventFromWindow" inherits="InputEvent" version="4.0">
+<class name="InputEventFromWindow" inherits="InputEvent" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml
index 2d57b84cc8..85d1a405b2 100644
--- a/doc/classes/InputEventGesture.xml
+++ b/doc/classes/InputEventGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventGesture" inherits="InputEventWithModifiers" version="4.0">
+<class name="InputEventGesture" inherits="InputEventWithModifiers" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for touch control gestures.
</brief_description>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index ff82913385..5066fb29d3 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" version="4.0">
+<class name="InputEventJoypadButton" inherits="InputEvent" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event for gamepad buttons.
</brief_description>
@@ -7,7 +7,7 @@
Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see [InputEventJoypadMotion].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="JoyButton" default="0">
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 92161974ba..f03004c6d0 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" version="4.0">
+<class name="InputEventJoypadMotion" inherits="InputEvent" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event type for gamepad joysticks and other motions. For buttons, see [code]InputEventJoypadButton[/code].
</brief_description>
@@ -7,7 +7,7 @@
Stores information about joystick motions. One [InputEventJoypadMotion] represents one axis at a time.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="axis" type="int" setter="set_axis" getter="get_axis" enum="JoyAxis" default="0">
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index 9cf6872655..c3d682de9e 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" version="4.0">
+<class name="InputEventKey" inherits="InputEventWithModifiers" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event type for keyboard events.
</brief_description>
@@ -7,18 +7,18 @@
Stores key presses on the keyboard. Supports key presses, key releases and [member echo] events.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<methods>
<method name="get_keycode_with_modifiers" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="Key" />
<description>
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 type="int" enum="Key" />
<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].
diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml
index 040eee7b98..2af88149b6 100644
--- a/doc/classes/InputEventMIDI.xml
+++ b/doc/classes/InputEventMIDI.xml
@@ -1,27 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMIDI" inherits="InputEvent" version="4.0">
+<class name="InputEventMIDI" inherits="InputEvent" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Input event for MIDI inputs.
</brief_description>
<description>
+ InputEventMIDI allows receiving input events from MIDI devices such as a piano. MIDI stands for Musical Instrument Digital Interface.
+ MIDI signals can be sent over a 5-pin MIDI connector or over USB, if your device supports both be sure to check the settings in the device to see which output it's using.
+ To receive input events from MIDI devices, you need to call [method OS.open_midi_inputs]. You can check which devices are detected using [method OS.get_connected_midi_inputs].
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ OS.open_midi_inputs()
+ print(OS.get_connected_midi_inputs())
+
+ func _input(input_event):
+ if input_event is InputEventMIDI:
+ _print_midi_info(input_event)
+
+ func _print_midi_info(midi_event: InputEventMIDI):
+ print(midi_event)
+ print("Channel " + str(midi_event.channel))
+ print("Message " + str(midi_event.message))
+ print("Pitch " + str(midi_event.pitch))
+ print("Velocity " + str(midi_event.velocity))
+ print("Instrument " + str(midi_event.instrument))
+ print("Pressure " + str(midi_event.pressure))
+ print("Controller number: " + str(midi_event.controller_number))
+ print("Controller value: " + str(midi_event.controller_value))
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ OS.OpenMidiInputs();
+ GD.Print(OS.GetConnectedMidiInputs());
+ }
+
+ public override void _Input(InputEvent inputEvent)
+ {
+ if (inputEvent is InputEventMIDI midiEvent)
+ {
+ PrintMIDIInfo(midiEvent);
+ }
+ }
+
+ private void PrintMIDIInfo(InputEventMIDI midiEvent)
+ {
+ GD.Print(midiEvent);
+ GD.Print("Channel " + midiEvent.Channel);
+ GD.Print("Message " + midiEvent.Message);
+ GD.Print("Pitch " + midiEvent.Pitch);
+ GD.Print("Velocity " + midiEvent.Velocity);
+ GD.Print("Instrument " + midiEvent.Instrument);
+ GD.Print("Pressure " + midiEvent.Pressure);
+ GD.Print("Controller number: " + midiEvent.ControllerNumber);
+ GD.Print("Controller value: " + midiEvent.ControllerValue);
+ }
+ [/csharp]
+ [/codeblocks]
+ Note that Godot does not currently support MIDI output, so there is no way to emit MIDI signals from Godot. Only MIDI input works.
</description>
<tutorials>
+ <link title="MIDI Message Status Byte List">https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes</link>
+ <link title="Wikipedia General MIDI Instrument List">https://en.wikipedia.org/wiki/General_MIDI#Program_change_events</link>
+ <link title="Wikipedia Piano Key Frequencies List">https://en.wikipedia.org/wiki/Piano_key_frequencies#List</link>
</tutorials>
<members>
<member name="channel" type="int" setter="set_channel" getter="get_channel" default="0">
+ The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments.
</member>
<member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number" default="0">
+ If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value" default="0">
+ If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0">
+ The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0.
</member>
<member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0">
+ Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum @GlobalScope.MIDIMessage] enum.
+ For MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is.
+ Notes will return [code]MIDI_MESSAGE_NOTE_ON[/code] when activated, but they might not always return [code]MIDI_MESSAGE_NOTE_OFF[/code] when deactivated, therefore your code should treat the input as stopped if some period of time has passed.
+ For more information, see the MIDI message status byte list chart linked above.
</member>
<member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0">
+ The pitch index number of this MIDI signal. This value ranges from 0 to 127. On a piano, middle C is 60, and A440 is 69, see the "MIDI note" column of the piano key frequency chart on Wikipedia for more information.
</member>
<member name="pressure" type="int" setter="set_pressure" getter="get_pressure" default="0">
+ The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero.
</member>
<member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0">
+ The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice.
</member>
</members>
</class>
diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml
index ed0860a63a..2063dfda6c 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" version="4.0">
+<class name="InputEventMagnifyGesture" inherits="InputEventGesture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index b06068aff3..889329d97e 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" version="4.0">
+<class name="InputEventMouse" inherits="InputEventWithModifiers" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base input event type for mouse events.
</brief_description>
@@ -7,17 +7,19 @@
Stores general mouse events information.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="0">
The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks.
</member>
<member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)">
- The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0.
+ When received in [method Node._input] or [method Node._unhandled_input], returns the mouse's position in the root [Viewport] using the coordinate system of the root [Viewport].
+ When received in [method Control._gui_input], returns the mouse's position in the [CanvasLayer] that the [Control] is in using the coordinate system of the [CanvasLayer].
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
- The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse.
+ When received in [method Node._input] or [method Node._unhandled_input], returns the mouse's position in the [Viewport] this [Node] is in using the coordinate system of this [Viewport].
+ When received in [method Control._gui_input], returns the mouse's position in the [Control] using the local coordinate system of the [Control].
</member>
</members>
</class>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index dcfe0d6c71..67f45eddf8 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" version="4.0">
+<class name="InputEventMouseButton" inherits="InputEventMouse" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event type for mouse button events.
</brief_description>
@@ -7,7 +7,7 @@
Contains mouse click information. See [method Node._input].
</description>
<tutorials>
- <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
+ <link title="Mouse and input coordinates">$DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html</link>
</tutorials>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="MouseButton" default="0">
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 9a0156510e..7cc3de8fcb 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouseMotion" inherits="InputEventMouse" version="4.0">
+<class name="InputEventMouseMotion" inherits="InputEventMouse" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event type for mouse motion events.
</brief_description>
<description>
- Contains mouse and pen motion information. Supports relative, absolute positions and speed. See [method Node._input].
+ Contains mouse and pen motion information. Supports relative, absolute positions and velocity. See [method Node._input].
[b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
</description>
<tutorials>
- <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
+ <link title="Mouse and input coordinates">$DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<members>
@@ -19,11 +19,11 @@
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.
- </member>
<member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2(0, 0)">
Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes.
</member>
+ <member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2(0, 0)">
+ The mouse velocity in pixels per second.
+ </member>
</members>
</class>
diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml
index 2de3459df7..deb76d5d38 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" version="4.0">
+<class name="InputEventPanGesture" inherits="InputEventGesture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index 373936225b..e5cc522b21 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="InputEventFromWindow" version="4.0">
+<class name="InputEventScreenDrag" inherits="InputEventFromWindow" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event type for screen drag events. Only available on mobile devices.
</brief_description>
@@ -7,7 +7,7 @@
Contains screen drag information. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
@@ -17,10 +17,10 @@
The drag position.
</member>
<member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)">
- The drag position relative to its start position.
+ The drag position relative to the previous position (position at the last frame).
</member>
- <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2(0, 0)">
- The drag speed.
+ <member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2(0, 0)">
+ The drag velocity.
</member>
</members>
</class>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index c731044c98..fb50454917 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="InputEventFromWindow" version="4.0">
+<class name="InputEventScreenTouch" inherits="InputEventFromWindow" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Input event type for screen touch events.
(only available on mobile devices)
@@ -8,14 +8,14 @@
Stores multi-touch press/release information. Supports touch press, touch release and [member index] for multi-touch count and order.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
The touch index in the case of a multi-touch event. One index = one finger.
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
- The touch position.
+ The touch position, in screen (global) coordinates.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the touch's state is pressed. If [code]false[/code], the touch's state is released.
diff --git a/doc/classes/InputEventShortcut.xml b/doc/classes/InputEventShortcut.xml
index ea84db541c..58b44132bb 100644
--- a/doc/classes/InputEventShortcut.xml
+++ b/doc/classes/InputEventShortcut.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventShortcut" inherits="InputEvent" version="4.0">
+<class name="InputEventShortcut" inherits="InputEvent" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index 1b9212bf65..ff2e6409c9 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventWithModifiers" inherits="InputEventFromWindow" version="4.0">
+<class name="InputEventWithModifiers" inherits="InputEventFromWindow" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for keys events with modifiers.
</brief_description>
@@ -7,7 +7,7 @@
Contains keys events information with modifiers support like [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false">
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 855d5b5d71..ac5921404c 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" version="4.0">
+<class name="InputMap" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Singleton that manages [InputEventAction].
</brief_description>
@@ -7,7 +7,7 @@
Manages all [InputEventAction] which can be created/modified from the project settings menu [b]Project &gt; Project Settings &gt; Input Map[/b] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent: InputMap">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link>
+ <link title="InputEvent: InputMap">$DOCS_URL/tutorials/inputs/inputevent.html#inputmap</link>
</tutorials>
<methods>
<method name="action_add_event">
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index e67232ebac..d22028d478 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InstancePlaceholder" inherits="Node" version="4.0">
+<class name="InstancePlaceholder" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Placeholder for the root [Node] of a [PackedScene].
</brief_description>
<description>
- Turning on the option [b]Load As Placeholder[/b] for an instantiated scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
+ Turning on the option [b]Load As Placeholder[/b] for an instantiated scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game, this will not replace the node in the editor. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
The [InstancePlaceholder] does not have a transform. This causes any child nodes to be positioned relatively to the [Viewport] from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
</description>
<tutorials>
diff --git a/doc/classes/IntervalTweener.xml b/doc/classes/IntervalTweener.xml
index f2f58b4ca6..22da73df78 100644
--- a/doc/classes/IntervalTweener.xml
+++ b/doc/classes/IntervalTweener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="IntervalTweener" inherits="Tweener" version="4.0">
+<class name="IntervalTweener" inherits="Tweener" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Creates an idle interval in a [Tween] animation.
</brief_description>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index baa0faaae9..06bd64577b 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ItemList" inherits="Control" version="4.0">
+<class name="ItemList" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
</brief_description>
@@ -7,6 +7,7 @@
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 [kbd]Enter[/kbd].
Item text only supports single-line strings, newline characters (e.g. [code]\n[/code]) in the string won't produce a newline. Text wrapping is enabled in [constant ICON_MODE_TOP] mode, but column's width is adjusted to fully fit its content by default. You need to set [member fixed_column_width] greater than zero to wrap the text.
+ All [code]set_*[/code] methods allow negative item index, which makes the item accessed from the last one.
</description>
<tutorials>
</tutorials>
@@ -155,10 +156,10 @@
Returns an array with the indexes of the selected items.
</description>
</method>
- <method name="get_v_scroll">
+ <method name="get_v_scroll_bar">
<return type="VScrollBar" />
<description>
- Returns the [Object] ID associated with the list.
+ Returns the vertical scrollbar.
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
@@ -366,6 +367,7 @@
<member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height" default="false">
If [code]true[/code], the control will automatically resize the height to fit its content.
</member>
+ <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width" default="0">
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.
@@ -374,14 +376,14 @@
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="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode" default="1">
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">
The scale of icon applied after [member fixed_icon_size] and transposing takes effect.
</member>
- <member name="items_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
The number of items currently in the list.
</member>
<member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns" default="1">
@@ -393,7 +395,6 @@
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">
Whether all columns will have the same width.
If [code]true[/code], the width is equal to the largest column width of all columns.
@@ -401,7 +402,7 @@
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0">
Allows single or multiple item selection. See the [enum SelectMode] constants.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0">
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="3">
Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextParagraph.OverrunBehavior] for a description of all modes.
</member>
</members>
@@ -463,22 +464,7 @@
</constant>
</constants>
<theme_items>
- <theme_item name="bg" data_type="style" type="StyleBox">
- Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused.
- </theme_item>
- <theme_item name="bg_focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [ItemList] is being focused.
- </theme_item>
- <theme_item name="cursor" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [ItemList] is being focused.
- </theme_item>
- <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [ItemList] is not being focused.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the item's text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.63, 0.63, 0.63, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.65, 0.65, 0.65, 1)">
Default text [Color] of the item.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -487,9 +473,6 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the item's text.
- </theme_item>
<theme_item name="guide_color" data_type="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>
@@ -505,14 +488,32 @@
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the item text outline.
</theme_item>
+ <theme_item name="vseparation" data_type="constant" type="int" default="2">
+ The vertical spacing between items.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the item's text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the item's text.
+ </theme_item>
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused.
+ </theme_item>
+ <theme_item name="bg_focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [ItemList] is being focused.
+ </theme_item>
+ <theme_item name="cursor" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [ItemList] is being focused.
+ </theme_item>
+ <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [ItemList] is not being focused.
+ </theme_item>
<theme_item name="selected" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [ItemList] is not being focused.
</theme_item>
<theme_item name="selected_focus" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [ItemList] is being focused.
</theme_item>
- <theme_item name="vseparation" data_type="constant" type="int" default="2">
- The vertical spacing between items.
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/JNISingleton.xml b/doc/classes/JNISingleton.xml
index ce39e1f567..3203567720 100644
--- a/doc/classes/JNISingleton.xml
+++ b/doc/classes/JNISingleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JNISingleton" inherits="Object" version="4.0">
+<class name="JNISingleton" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Singleton that connects the engine with Android plugins to interface with native Android code.
</brief_description>
@@ -7,6 +7,6 @@
The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See [url=https://en.wikipedia.org/wiki/Java_Native_Interface]Java Native Interface - Wikipedia[/url] for more information.
</description>
<tutorials>
- <link title="Creating Android plugins">https://docs.godotengine.org/en/latest/tutorials/platform/android/android_plugin.html#doc-android-plugin</link>
+ <link title="Creating Android plugins">$DOCS_URL/tutorials/platform/android/android_plugin.html#doc-android-plugin</link>
</tutorials>
</class>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 63e6307b39..9650701c49 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="RefCounted" version="4.0">
+<class name="JSON" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper class for creating and parsing JSON data.
</brief_description>
@@ -66,7 +66,7 @@
Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.
[b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
- Use [code]indent[/code] parameter to pretty stringify the output.
+ The [code]indent[/code] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
[b]Example output:[/b]
[codeblock]
## JSON.stringify(my_dictionary)
@@ -74,18 +74,34 @@
## JSON.stringify(my_dictionary, "\t")
{
- "name": "my_dictionary",
- "version": "1.0.0",
- "entities": [
- {
- "name": "entity_0",
- "value": "value_0"
- },
- {
- "name": "entity_1",
- "value": "value_1"
- }
- ]
+ "name": "my_dictionary",
+ "version": "1.0.0",
+ "entities": [
+ {
+ "name": "entity_0",
+ "value": "value_0"
+ },
+ {
+ "name": "entity_1",
+ "value": "value_1"
+ }
+ ]
+ }
+
+ ## JSON.stringify(my_dictionary, "...")
+ {
+ ..."name": "my_dictionary",
+ ..."version": "1.0.0",
+ ..."entities": [
+ ......{
+ ........."name": "entity_0",
+ ........."value": "value_0"
+ ......},
+ ......{
+ ........."name": "entity_1",
+ ........."value": "value_1"
+ ......}
+ ...]
}
[/codeblock]
</description>
diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml
index 8f1d1581b1..cfe39d38a7 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" version="4.0">
+<class name="JSONRPC" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A helper to handle dictionaries which look like JSONRPC documents.
</brief_description>
diff --git a/doc/classes/JavaClass.xml b/doc/classes/JavaClass.xml
index b024f0ccd4..2ed5f683eb 100644
--- a/doc/classes/JavaClass.xml
+++ b/doc/classes/JavaClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaClass" inherits="RefCounted" version="4.0">
+<class name="JavaClass" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml
index f532207f03..fdfac2748b 100644
--- a/doc/classes/JavaClassWrapper.xml
+++ b/doc/classes/JavaClassWrapper.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaClassWrapper" inherits="Object" version="4.0">
+<class name="JavaClassWrapper" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index 2bb2666df4..864028f3a6 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaScript" inherits="Object" version="4.0">
+<class name="JavaScript" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Singleton that connects the engine with the browser's JavaScript context in HTML5 export.
</brief_description>
<description>
The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs.
- [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=https://docs.godotengine.org/en/latest/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information.
+ [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=$DOCS_URL/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information.
</description>
<tutorials>
- <link title="Exporting for the Web: Calling JavaScript from script">https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#calling-javascript-from-script</link>
+ <link title="Exporting for the Web: Calling JavaScript from script">$DOCS_URL/tutorials/export/exporting_for_web.html#calling-javascript-from-script</link>
</tutorials>
<methods>
<method name="create_callback">
@@ -53,5 +53,27 @@
Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage.
</description>
</method>
+ <method name="pwa_needs_update" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if a new version of the progressive web app is waiting to be activated.
+ [b]Note:[/b] Only relevant when exported as a Progressive Web App.
+ </description>
+ </method>
+ <method name="pwa_update">
+ <return type="int" enum="Error" />
+ <description>
+ Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded.
+ [b]Note:[/b] Your application will be [b]reloaded in all browser tabs[/b].
+ [b]Note:[/b] Only relevant when exported as a Progressive Web App and [method pwa_needs_update] returns [code]true[/code].
+ </description>
+ </method>
</methods>
+ <signals>
+ <signal name="pwa_update_available">
+ <description>
+ Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See [method pwa_update] to force the update to take place immediately.
+ </description>
+ </signal>
+ </signals>
</class>
diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml
index 6dd8702d5f..5c1a37266b 100644
--- a/doc/classes/JavaScriptObject.xml
+++ b/doc/classes/JavaScriptObject.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaScriptObject" inherits="RefCounted" version="4.0">
+<class name="JavaScriptObject" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A wrapper class for native JavaScript objects.
</brief_description>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index b003224ad4..f40b682f96 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" version="4.0">
+<class name="Joint2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base node for all joint constraints in 2D physics.
</brief_description>
@@ -11,6 +11,7 @@
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0">
When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint.
+ When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used.
</member>
<member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
If [code]true[/code], [member node_a] and [member node_b] can not collide.
diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml
index 4b2c1ab4cb..fef8fdf965 100644
--- a/doc/classes/Joint3D.xml
+++ b/doc/classes/Joint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Joint3D" inherits="Node3D" version="4.0">
+<class name="Joint3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all 3D joints.
</brief_description>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index 23b01a0fc9..1f3f0dbb6d 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="RefCounted" version="4.0">
+<class name="KinematicCollision2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Collision data for [method PhysicsBody2D.move_and_collide] collisions.
</brief_description>
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index 372113b281..6327d48d38 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision3D" inherits="RefCounted" version="4.0">
+<class name="KinematicCollision3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Collision data for [method PhysicsBody3D.move_and_collide] collisions.
</brief_description>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 3c349e052f..b1046dea6b 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" version="4.0">
+<class name="Label" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel].
</brief_description>
@@ -61,15 +61,15 @@
</method>
</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 [enum Align] constants.
- </member>
<member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label.AutowrapMode" default="0">
If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum AutowrapMode].
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false">
If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally.
</member>
+ <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
+ Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
+ </member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
@@ -79,11 +79,12 @@
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1">
Limits the lines of text the node shows on screen.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="2" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" />
<member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0">
Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box.
+ [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
</member>
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="4" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
@@ -102,38 +103,18 @@
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
If [code]true[/code], all the text displays as UPPERCASE.
</member>
- <member name="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 [enum VAlign] constants.
+ <member name="vertical_alignment" type="int" setter="set_vertical_alignment" getter="get_vertical_alignment" enum="VerticalAlignment" default="0">
+ Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the [enum VerticalAlignment] constants.
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
Restricts the number of characters to display. Set to -1 to disable.
+ [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
+ </member>
+ <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="Label.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
</member>
</members>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="Align">
- Align rows to the left (default).
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="Align">
- Align rows centered.
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="Align">
- Align rows to the right.
- </constant>
- <constant name="ALIGN_FILL" value="3" enum="Align">
- Expand row to fit the width.
- </constant>
- <constant name="VALIGN_TOP" value="0" enum="VAlign">
- Align the whole text to the top.
- </constant>
- <constant name="VALIGN_CENTER" value="1" enum="VAlign">
- Align the whole text to the center.
- </constant>
- <constant name="VALIGN_BOTTOM" value="2" enum="VAlign">
- Align the whole text to the bottom.
- </constant>
- <constant name="VALIGN_FILL" value="3" enum="VAlign">
- Align the whole text by spreading the rows.
- </constant>
<constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
Autowrap is disabled.
</constant>
@@ -161,11 +142,23 @@
<constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
Trims the text per word and adds an ellipsis to indicate that parts are hidden.
</constant>
+ <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
+ Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
+ </constant>
+ <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ </constant>
+ <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left.
+ </constant>
+ <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the right.
+ </constant>
</constants>
<theme_items>
- <theme_item name="font" data_type="font" type="Font">
- [Font] used for the [Label]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [Label].
</theme_item>
@@ -175,15 +168,9 @@
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
[Color] of the text's shadow effect.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [Label]'s text.
- </theme_item>
<theme_item name="line_spacing" data_type="constant" type="int" default="3">
Vertical space between lines in multiline [Label].
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Background [StyleBox] for the [Label].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
Text outline size.
</theme_item>
@@ -194,7 +181,16 @@
The vertical offset of the text's shadow.
</theme_item>
<theme_item name="shadow_outline_size" data_type="constant" type="int" default="1">
- Shadow outline size. If set to 1 or greater, the shadow will be displayed around the whole text as an outline.
+ The size of the shadow outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] used for the [Label]'s text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [Label]'s text.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Background [StyleBox] for the [Label].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index 918e8a5c8a..32bf6a67a9 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" version="4.0">
+<class name="Light2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
+ <link title="2D lights and shadows">$DOCS_URL/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<methods>
<method name="get_height" qualifiers="const">
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index dbda22d618..b7822f1bb0 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Light3D" inherits="VisualInstance3D" version="4.0">
+<class name="Light3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Provides a base class for different kinds of light nodes.
</brief_description>
@@ -7,7 +7,7 @@
Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
</description>
<tutorials>
- <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
@@ -28,14 +28,32 @@
</method>
</methods>
<members>
+ <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="40.0">
+ The distance from the camera at which the light begins to fade away (in 3D units).
+ [b]Note:[/b] Only effective for [OmniLight3D] and [SpotLight3D].
+ </member>
+ <member name="distance_fade_enabled" type="bool" setter="set_enable_distance_fade" getter="is_distance_fade_enabled" default="false">
+ If [code]true[/code], the light will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. This acts as a form of level of detail (LOD). The light will fade out over [member distance_fade_begin] + [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active lights in a scene and thus improve performance.
+ [b]Note:[/b] Only effective for [OmniLight3D] and [SpotLight3D].
+ </member>
+ <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="10.0">
+ Distance over which the light fades. The light's energy is progressively reduced over this distance and is completely invisible at the end.
+ [b]Note:[/b] Only effective for [OmniLight3D] and [SpotLight3D].
+ </member>
+ <member name="distance_fade_shadow" type="float" setter="set_distance_fade_shadow" getter="get_distance_fade_shadow" default="50.0">
+ The distance from the camera at which the light's shadow cuts off (in 3D units). Set this to a value lower than [member distance_fade_begin] + [member distance_fade_length] to further improve performance, as shadow rendering is often more expensive than light rendering itself.
+ [b]Note:[/b] Only effective for [OmniLight3D] and [SpotLight3D], and only when [member shadow_enabled] is [code]true[/code].
+ [b]Note:[/b] Due to a rendering engine limitation, shadows will be disabled instantly instead of fading smoothly according to [member distance_fade_length]. This may result in visible pop-in depending on the scene topography.
+ </member>
<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false">
If [code]true[/code], the light only appears in the editor and will not be visible at runtime.
</member>
<member name="light_angular_distance" type="float" setter="set_param" getter="get_param" default="0.0">
The light's angular size in degrees. Increasing this will make shadows softer at greater distances. Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately [code]0.5[/code].
</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 name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="2">
+ The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See [enum BakeMode].
+ [b]Note:[/b] Meshes' global illumination mode will also affect the global illumination rendering. See [member GeometryInstance3D.gi_mode].
</member>
<member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy].
@@ -68,11 +86,8 @@
<member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0">
Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolution shadow maps. A high value can impact performance, make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible.
</member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 1)">
- 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.
+ If [code]true[/code], the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using [member distance_fade_enabled] to hide the light when far away from the [Camera3D].
</member>
<member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1">
</member>
@@ -146,12 +161,14 @@
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.
+ Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights.
+ [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled).
</constant>
- <constant name="BAKE_DYNAMIC" value="1" enum="BakeMode">
+ <constant name="BAKE_STATIC" value="1" enum="BakeMode">
+ Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.
</constant>
- <constant name="BAKE_STATIC" value="2" enum="BakeMode">
+ <constant name="BAKE_DYNAMIC" value="2" enum="BakeMode">
+ Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to [constant BAKE_STATIC]. This has a greater performance cost compared to [constant BAKE_STATIC].
</constant>
</constants>
</class>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index ba795a29a1..bffb6d3e7c 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" version="4.0">
+<class name="LightOccluder2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
+ <link title="2D lights and shadows">$DOCS_URL/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<members>
<member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml
index 0cdf9f820f..ee98356962 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LightmapGI" inherits="VisualInstance3D" version="4.0">
+<class name="LightmapGI" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Computes and stores baked lightmaps for fast global illumination.
</brief_description>
<description>
+ The [LightmapGI] node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. [LightmapGI] can also provide rough reflections using spherical harmonics if [member directional] is enabled. Dynamic objects can receive indirect lighting thanks to [i]light probes[/i], which can be automatically placed by setting [member generate_probes_subdiv]. Additional lightmap probes can also be added by creating [LightmapProbe] nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a [LightmapGI] node is also slower compared to [VoxelGI].
+ [b]Procedural generation:[/b] Lightmap baking functionality is only available in the editor. This means [LightmapGI] is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use [VoxelGI] or SDFGI instead (see [member Environment.sdfgi_enabled]).
+ [b]Performance:[/b] [LightmapGI] provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml
index f678ae48d9..c2423daef0 100644
--- a/doc/classes/LightmapGIData.xml
+++ b/doc/classes/LightmapGIData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LightmapGIData" inherits="Resource" version="4.0">
+<class name="LightmapGIData" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml
index 465e645216..a5ba6294b9 100644
--- a/doc/classes/LightmapProbe.xml
+++ b/doc/classes/LightmapProbe.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LightmapProbe" inherits="Node3D" version="4.0">
+<class name="LightmapProbe" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml
index d9a9a55f6a..f9a1e2fa99 100644
--- a/doc/classes/Lightmapper.xml
+++ b/doc/classes/Lightmapper.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Lightmapper" inherits="RefCounted" version="4.0">
+<class name="Lightmapper" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml
index cfa9a4e2df..29d95244ce 100644
--- a/doc/classes/LightmapperRD.xml
+++ b/doc/classes/LightmapperRD.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LightmapperRD" inherits="Lightmapper" version="4.0">
+<class name="LightmapperRD" inherits="Lightmapper" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 4d9abbbb19..e2cc43bb75 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" version="4.0">
+<class name="Line2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A 2D line.
</brief_description>
@@ -79,10 +79,11 @@
The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors.
</member>
<member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8">
- The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round.
+ The smoothness of the rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. This is only used if a cap or joint is set as round.
+ [b]Note:[/b] The default value is tuned for lines with the default [member width]. For thin lines, this value should be reduced to a number between [code]2[/code] and [code]4[/code] to improve performance.
</member>
<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].
+ The direction difference in radians between vector points. This value is only used if [member joint_mode] is set to [constant LINE_JOINT_SHARP].
</member>
<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.
@@ -120,10 +121,10 @@
Takes the left pixels of the texture and renders it over the whole line.
</constant>
<constant name="LINE_TEXTURE_TILE" value="1" enum="LineTextureMode">
- Tiles the texture over the line. The texture must be imported with [b]Repeat[/b] enabled for it to work properly.
+ Tiles the texture over the line. [member CanvasItem.texture_repeat] of the [Line2D] node must be [constant CanvasItem.TEXTURE_REPEAT_ENABLED] or [constant CanvasItem.TEXTURE_REPEAT_MIRROR] for it to work properly.
</constant>
<constant name="LINE_TEXTURE_STRETCH" value="2" enum="LineTextureMode">
- Stretches the texture across the line. Import the texture with [b]Repeat[/b] disabled for best results.
+ Stretches the texture across the line. [member CanvasItem.texture_repeat] of the [Line2D] node must be [constant CanvasItem.TEXTURE_REPEAT_DISABLED] for best results.
</constant>
</constants>
</class>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index f79ba5a16f..136147b4b0 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LineEdit" inherits="Control" version="4.0">
+<class name="LineEdit" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control that provides single-line string editing.
</brief_description>
@@ -159,8 +159,8 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
- Text alignment as defined in the [enum Align] enum.
+ <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
+ Text alignment as defined in the [enum HorizontalAlignment] enum.
</member>
<member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false">
If [code]true[/code], the caret (text cursor) blinks.
@@ -174,7 +174,7 @@
<member name="caret_force_displayed" type="bool" setter="set_caret_force_displayed" getter="is_caret_force_displayed" default="false">
If [code]true[/code], the [LineEdit] will always show the caret, even if focus is lost.
</member>
- <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
+ <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="true">
Allow moving caret, selecting and removing the individual composite character components.
[b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
</member>
@@ -196,7 +196,10 @@
<member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length_enabled" getter="is_expand_to_text_length_enabled" default="false">
If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
+ If [code]true[/code], the [LineEdit] don't display decoration.
+ </member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
@@ -229,10 +232,7 @@
If [code]false[/code], using middle mouse button to paste clipboard will be disabled.
[b]Note:[/b] This method is only implemented on Linux.
</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="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha" default="0.6">
- Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code].
- </member>
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" />
<member name="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>
@@ -289,18 +289,6 @@
</signal>
</signals>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="Align">
- Aligns the text on the left-hand side of the [LineEdit].
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="Align">
- Centers the text in the middle of the [LineEdit].
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="Align">
- Aligns the text on the right-hand side of the [LineEdit].
- </constant>
- <constant name="ALIGN_FILL" value="3" enum="Align">
- Expand row to fit the [LineEdit]'s width.
- </constant>
<constant name="MENU_CUT" value="0" enum="MenuItems">
Cuts (copies and clears) the selected text.
</constant>
@@ -391,53 +379,59 @@
</constant>
</constants>
<theme_items>
- <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
- Color of the [LineEdit]'s caret (text cursor).
+ <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
+ Color of the [LineEdit]'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely.
</theme_item>
- <theme_item name="clear" data_type="icon" type="Texture2D">
- Texture for the clear button. See [member clear_button_enabled].
- </theme_item>
- <theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Color used as default tint for the clear button.
</theme_item>
<theme_item name="clear_button_color_pressed" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Color used for the clear button when it's pressed.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- Background used when [LineEdit] has GUI focus.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Font used for the text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default font color.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [LineEdit].
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- Font color for selected text (inside the selection rectangle).
+ <theme_item name="font_placeholder_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.6)">
+ Font color for [member placeholder_text].
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [LineEdit]'s text.
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ Font color for selected text (inside the selection rectangle).
</theme_item>
- <theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+ <theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Font color when editing is disabled.
</theme_item>
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
+ Color of the selection rectangle.
+ </theme_item>
+ <theme_item name="caret_width" data_type="constant" type="int" default="1">
+ The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size.
+ </theme_item>
<theme_item name="minimum_character_width" data_type="constant" type="int" default="4">
Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling).
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Default background for the [LineEdit].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ Font used for the text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [LineEdit]'s text.
+ </theme_item>
+ <theme_item name="clear" data_type="icon" type="Texture2D">
+ Texture for the clear button. See [member clear_button_enabled].
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ Background used when [LineEdit] has GUI focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Default background for the [LineEdit].
+ </theme_item>
<theme_item name="read_only" data_type="style" 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" data_type="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/LinkButton.xml b/doc/classes/LinkButton.xml
index 0329ed833f..ad5a5a5518 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" version="4.0">
+<class name="LinkButton" inherits="BaseButton" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Simple button used to represent a link to some resource.
</brief_description>
@@ -33,11 +33,11 @@
</method>
</methods>
<members>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
- <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="2" />
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="2" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
@@ -66,19 +66,13 @@
</constant>
</constants>
<theme_items>
- <theme_item name="focus" data_type="style" 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" data_type="font" type="Font">
- [Font] of the [LinkButton]'s text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [LinkButton].
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [LinkButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [LinkButton] is being hovered.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -87,14 +81,20 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [LinkButton] is being pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [LinkButton]'s text.
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
<theme_item name="underline_spacing" data_type="constant" type="int" default="2">
The vertical space between the baseline of text and the underline.
</theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [LinkButton]'s text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [LinkButton]'s text.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [LinkButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 1df00f556a..2cf41b750a 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" version="4.0">
+<class name="MainLoop" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Abstract base class for the game's main loop.
</brief_description>
diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml
index 2948e58f50..3f9f93a39b 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" version="4.0">
+<class name="MarginContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Simple margin container.
</brief_description>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index eb6635f03f..b66a1b9190 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="Object" version="4.0">
+<class name="Marshalls" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Data transformation (marshalling) and encoding helpers.
</brief_description>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index f77b69b1f9..c5d567c1fe 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Material" inherits="Resource" version="4.0">
+<class name="Material" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Abstract base [Resource] for coloring and shading geometry.
</brief_description>
@@ -11,6 +11,26 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
+ <method name="_can_do_next_pass" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_can_use_render_priority" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_shader_mode" qualifiers="virtual const">
+ <return type="int" enum="Shader.Mode" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_shader_rid" qualifiers="virtual const">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="inspect_native_shader_code">
<return type="void" />
<description>
@@ -22,7 +42,7 @@
Sets the [Material] to be used for the next pass. This renders the object again using a different material.
[b]Note:[/b] This 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">
+ <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority">
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 [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 41ba1fcd0f..c32f7318c0 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MenuButton" inherits="Button" version="4.0">
+<class name="MenuButton" inherits="Button" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Special button that brings up a [PopupMenu] when clicked.
</brief_description>
@@ -27,13 +27,16 @@
</method>
</methods>
<members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" />
- <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="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
+ <member name="flat" type="bool" setter="set_flat" getter="is_flat" overrides="Button" default="true" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ The number of items currently in the list.
+ </member>
<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.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<signals>
<signal name="about_to_popup">
@@ -43,25 +46,16 @@
</signal>
</signals>
<theme_items>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [MenuButton] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" 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" data_type="font" type="Font">
- [Font] of the [MenuButton]'s text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [MenuButton].
</theme_item>
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
Text [Color] used when the [MenuButton] is disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [MenuButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [MenuButton] is being hovered.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -70,21 +64,30 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [MenuButton] is being pressed.
</theme_item>
+ <theme_item name="hseparation" data_type="constant" type="int" default="3">
+ The horizontal space between [MenuButton]'s icon and text.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [MenuButton]'s text.
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [MenuButton]'s text.
</theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [MenuButton] is being hovered.
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="3">
- The horizontal space between [MenuButton]'s icon and text.
- </theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [MenuButton].
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
- </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [MenuButton] is being pressed.
</theme_item>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index c774528a39..e4116cddfe 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" version="4.0">
+<class name="Mesh" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Resource] that contains vertex array-based geometry.
</brief_description>
@@ -13,6 +13,89 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
+ <method name="_get_aabb" qualifiers="virtual const">
+ <return type="AABB" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_blend_shape_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_blend_shape_name" qualifiers="virtual const">
+ <return type="StringName" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_surface_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_blend_shape_name" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <argument index="1" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_array_index_len" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_array_len" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_arrays" qualifiers="virtual const">
+ <return type="Array" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_blend_shape_arrays" qualifiers="virtual const">
+ <return type="Array" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_format" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_lods" qualifiers="virtual const">
+ <return type="Dictionary" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_material" qualifiers="virtual const">
+ <return type="Material" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_get_primitive_type" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_surface_set_material" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <argument index="1" name="material" type="Material" />
+ <description>
+ </description>
+ </method>
<method name="create_convex_shape" qualifiers="const">
<return type="Shape3D" />
<argument index="0" name="clean" type="bool" default="true" />
@@ -206,7 +289,7 @@
<constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat">
Mesh array uses indices.
</constant>
- <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat">
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
</constant>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index 35e4451918..0042bb20d8 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="RefCounted" version="4.0">
+<class name="MeshDataTool" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper tool to access and edit [Mesh] data.
</brief_description>
@@ -114,7 +114,7 @@
<argument index="1" name="edge" type="int" />
<description>
Returns specified edge associated with given face.
- Edge argument must 2 or less because a face only has three edges.
+ Edge argument must be either 0, 1, or 2 because a face only has three edges.
</description>
</method>
<method name="get_face_meta" qualifiers="const">
@@ -137,7 +137,7 @@
<argument index="1" name="vertex" type="int" />
<description>
Returns the specified vertex of the given face.
- Vertex argument must be 2 or less because faces contain three vertices.
+ Vertex argument must be either 0, 1, or 2 because faces contain three vertices.
</description>
</method>
<method name="get_format" qualifiers="const">
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index c7b66c8ea3..96e66f850a 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshInstance2D" inherits="Node2D" version="4.0">
+<class name="MeshInstance2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node used for displaying a [Mesh] in 2D.
</brief_description>
@@ -7,7 +7,7 @@
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 title="2D meshes">https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link>
+ <link title="2D meshes">$DOCS_URL/tutorials/2d/2d_meshes.html</link>
</tutorials>
<members>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
@@ -15,7 +15,7 @@
</member>
<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.
+ [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="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.
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index b72ce46310..f368190a29 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshInstance3D" inherits="GeometryInstance3D" version="4.0">
+<class name="MeshInstance3D" inherits="GeometryInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node that instances meshes into a scenario.
</brief_description>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 9fde19588a..6b25441a16 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshLibrary" inherits="Resource" version="4.0">
+<class name="MeshLibrary" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Library of meshes.
</brief_description>
diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml
index eb0451fea6..8e2bccc79f 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="Texture2D" version="4.0">
+<class name="MeshTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Simple texture that uses a mesh to draw itself.
</brief_description>
diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml
index 5780aa00d9..b22341e0a1 100644
--- a/doc/classes/MethodTweener.xml
+++ b/doc/classes/MethodTweener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MethodTweener" inherits="Tweener" version="4.0">
+<class name="MethodTweener" inherits="Tweener" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Interpolates an abstract value and supplies it to a method called over time.
</brief_description>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 7890bbcc33..631b2ea050 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMesh" inherits="Resource" version="4.0">
+<class name="MultiMesh" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Provides high-performance mesh instancing.
</brief_description>
@@ -10,8 +10,8 @@
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
</description>
<tutorials>
- <link title="Animating thousands of fish with MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
- <link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/performance/using_multimesh.html</link>
+ <link title="Animating thousands of fish with MultiMeshInstance">$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
+ <link title="Optimization using MultiMeshes">$DOCS_URL/tutorials/performance/using_multimesh.html</link>
</tutorials>
<methods>
<method name="get_aabb" qualifiers="const">
diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml
index 328ddff0eb..daf5ef6287 100644
--- a/doc/classes/MultiMeshInstance2D.xml
+++ b/doc/classes/MultiMeshInstance2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMeshInstance2D" inherits="Node2D" version="4.0">
+<class name="MultiMeshInstance2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node that instances a [MultiMesh] in 2D.
</brief_description>
@@ -15,7 +15,7 @@
</member>
<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.
+ [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="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.
diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml
index 158579e952..52cc9cb65f 100644
--- a/doc/classes/MultiMeshInstance3D.xml
+++ b/doc/classes/MultiMeshInstance3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMeshInstance3D" inherits="GeometryInstance3D" version="4.0">
+<class name="MultiMeshInstance3D" inherits="GeometryInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node that instances a [MultiMesh].
</brief_description>
@@ -8,9 +8,9 @@
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 title="Animating thousands of fish with MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
- <link title="Using MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link>
- <link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/performance/using_multimesh.html</link>
+ <link title="Animating thousands of fish with MultiMeshInstance">$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
+ <link title="Using MultiMeshInstance">$DOCS_URL/tutorials/3d/using_multi_mesh_instance.html</link>
+ <link title="Optimization using MultiMeshes">$DOCS_URL/tutorials/performance/using_multimesh.html</link>
</tutorials>
<members>
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index e0da08f5bd..ac17886183 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="RefCounted" version="4.0">
+<class name="MultiplayerAPI" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
High-level multiplayer API.
</brief_description>
@@ -79,10 +79,8 @@
<member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false">
If [code]true[/code], the MultiplayerAPI's [member multiplayer_peer] refuses new incoming connections.
</member>
- <member name="replicator" type="MultiplayerReplicator" setter="" getter="get_replicator">
- </member>
- <member name="root_node" type="Node" setter="set_root_node" getter="get_root_node">
- The root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
+ <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;&quot;)">
+ The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene.
</member>
</members>
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 67d3161aba..4a3559b0f7 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerPeer" inherits="PacketPeer" version="4.0">
+<class name="MultiplayerPeer" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A high-level network interface to simplify multiplayer interactions.
</brief_description>
@@ -9,7 +9,7 @@
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
- <link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link>
+ <link title="High-level multiplayer">$DOCS_URL/tutorials/networking/high_level_multiplayer.html</link>
<link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link>
</tutorials>
<methods>
diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml
index 46f9b22758..c5fe04cb32 100644
--- a/doc/classes/MultiplayerPeerExtension.xml
+++ b/doc/classes/MultiplayerPeerExtension.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerPeerExtension" inherits="MultiplayerPeer" version="4.0">
+<class name="MultiplayerPeerExtension" inherits="MultiplayerPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MultiplayerReplicator.xml b/doc/classes/MultiplayerReplicator.xml
deleted file mode 100644
index 0f97cc1d0a..0000000000
--- a/doc/classes/MultiplayerReplicator.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerReplicator" inherits="Object" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="decode_state">
- <return type="int" enum="Error" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="object" type="Object" />
- <argument index="2" name="data" type="PackedByteArray" />
- <argument index="3" name="initial" type="bool" default="true" />
- <description>
- Decode the given [code]data[/code] representing a spawnable state into [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when a client receives a server spawn for a scene with [constant REPLICATION_MODE_SERVER]. See [method spawn_config].
- Tip: You may find this function useful in servers when parsing spawn requests from clients, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM].
- </description>
- </method>
- <method name="despawn">
- <return type="int" enum="Error" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="object" type="Object" />
- <argument index="2" name="peer_id" type="int" default="0" />
- <description>
- Request a despawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_despawn] for the default behavior.
- </description>
- </method>
- <method name="encode_state">
- <return type="PackedByteArray" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="object" type="Object" />
- <argument index="2" name="initial" type="bool" default="true" />
- <description>
- Encode the given [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when the server spawns scenes with [constant REPLICATION_MODE_SERVER]. See [method spawn_config].
- Tip: You may find this function useful when requesting spawns from clients to server, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM].
- </description>
- </method>
- <method name="send_despawn">
- <return type="int" enum="Error" />
- <argument index="0" name="peer_id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="data" type="Variant" default="null" />
- <argument index="3" name="path" type="NodePath" default="NodePath(&quot;&quot;)" />
- <description>
- Sends a despawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically queue for deletion the node at [code]path[/code] and emit the signal [signal despawned]. In all other cases no deletion happens, and the signal [signal despawn_requested] is emitted instead.
- </description>
- </method>
- <method name="send_spawn">
- <return type="int" enum="Error" />
- <argument index="0" name="peer_id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="data" type="Variant" default="null" />
- <argument index="3" name="path" type="NodePath" default="NodePath(&quot;&quot;)" />
- <description>
- Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal spawned]. In all other cases no instantiation happens, and the signal [signal spawn_requested] is emitted instead.
- </description>
- </method>
- <method name="send_sync">
- <return type="int" enum="Error" />
- <argument index="0" name="peer_id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="data" type="PackedByteArray" />
- <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" />
- <argument index="4" name="channel" type="int" default="0" />
- <description>
- Sends a sync request for the instances of the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). This function can only be called manually when overriding the send and receive sync functions (see [method sync_config]).
- </description>
- </method>
- <method name="spawn">
- <return type="int" enum="Error" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="object" type="Object" />
- <argument index="2" name="peer_id" type="int" default="0" />
- <description>
- Request a spawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_spawn] for the default behavior.
- </description>
- </method>
- <method name="spawn_config">
- <return type="int" enum="Error" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="spawn_mode" type="int" enum="MultiplayerReplicator.ReplicationMode" />
- <argument index="2" name="properties" type="StringName[]" default="[]" />
- <argument index="3" name="custom_send" type="Callable" />
- <argument index="4" name="custom_receive" type="Callable" />
- <description>
- Configures the MultiplayerReplicator to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the spawn/despawn proecess.
- Tip: You can use a custom property in the scene main script to return a customly optimized state representation.
- </description>
- </method>
- <method name="sync_all">
- <return type="int" enum="Error" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="peer_id" type="int" default="0" />
- <description>
- Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behaviour, or call your send custom send callable if specified in [method sync_config].
- [b]Note:[/b] The default implementation only allow syncing from server to clients.
- </description>
- </method>
- <method name="sync_config">
- <return type="int" enum="Error" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="interval" type="int" />
- <argument index="2" name="properties" type="StringName[]" default="[]" />
- <argument index="3" name="custom_send" type="Callable" />
- <argument index="4" name="custom_receive" type="Callable" />
- <description>
- Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the syncronization proecess.
- Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is higly recommended when dealing with many instances).
- </description>
- </method>
- <method name="track">
- <return type="void" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="object" type="Object" />
- <description>
- Track the given [code]object[/code] as an instance of the scene identified by [code]scene_id[/code]. This object will be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER].
- </description>
- </method>
- <method name="untrack">
- <return type="void" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="object" type="Object" />
- <description>
- Untrack the given [code]object[/code]. This object will no longer be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER].
- </description>
- </method>
- </methods>
- <signals>
- <signal name="despawn_requested">
- <argument index="0" name="id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="parent" type="Node" />
- <argument index="3" name="name" type="String" />
- <argument index="4" name="data" type="PackedByteArray" />
- <description>
- Emitted when a network despawn request has been received from a client, or for a [PackedScene] that has been configured as [constant REPLICATION_MODE_CUSTOM].
- </description>
- </signal>
- <signal name="despawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- Emitted on a client before deleting a local Node upon receiving a despawn request from the server.
- </description>
- </signal>
- <signal name="replicated_instance_added">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- Emitted when an instance of a [PackedScene] that has been configured for networking enters the [SceneTree]. See [method spawn_config].
- </description>
- </signal>
- <signal name="replicated_instance_removed">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- Emitted when an instance of a [PackedScene] that has been configured for networking leaves the [SceneTree]. See [method spawn_config].
- </description>
- </signal>
- <signal name="spawn_requested">
- <argument index="0" name="id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="parent" type="Node" />
- <argument index="3" name="name" type="String" />
- <argument index="4" name="data" type="PackedByteArray" />
- <description>
- Emitted when a network spawn request has been received from a client, or for a [PackedScene] that has been configured as [constant REPLICATION_MODE_CUSTOM].
- </description>
- </signal>
- <signal name="spawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- Emitted on a client after a new Node is instantiated locally and added to the SceneTree upon receiving a spawn request from the server.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="REPLICATION_MODE_NONE" value="0" enum="ReplicationMode">
- Used with [method spawn_config] to identify a [PackedScene] that should not be replicated.
- </constant>
- <constant name="REPLICATION_MODE_SERVER" value="1" enum="ReplicationMode">
- Used with [method spawn_config] to identify a [PackedScene] that should be automatically replicated from server to clients.
- </constant>
- <constant name="REPLICATION_MODE_CUSTOM" value="2" enum="ReplicationMode">
- Used with [method spawn_config] to identify a [PackedScene] that can be manually replicated among peers.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/MultiplayerSpawner.xml b/doc/classes/MultiplayerSpawner.xml
new file mode 100644
index 0000000000..465db85455
--- /dev/null
+++ b/doc/classes/MultiplayerSpawner.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerSpawner" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_spawn_custom" qualifiers="virtual">
+ <return type="Object" />
+ <argument index="0" name="data" type="Variant" />
+ <description>
+ </description>
+ </method>
+ <method name="spawn">
+ <return type="Node" />
+ <argument index="0" name="data" type="Variant" default="null" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="auto_spawn" type="bool" setter="set_auto_spawning" getter="is_auto_spawning" default="false">
+ </member>
+ <member name="replication" type="PackedScene[]" setter="set_spawnable_scenes" getter="get_spawnable_scenes" default="[]">
+ </member>
+ <member name="spawn_limit" type="int" setter="set_spawn_limit" getter="get_spawn_limit" default="0">
+ </member>
+ <member name="spawn_path" type="NodePath" setter="set_spawn_path" getter="get_spawn_path" default="NodePath(&quot;&quot;)">
+ </member>
+ </members>
+ <signals>
+ <signal name="despawned">
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="node" type="Node" />
+ <description>
+ </description>
+ </signal>
+ <signal name="spawned">
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="node" type="Node" />
+ <description>
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/MultiplayerSynchronizer.xml b/doc/classes/MultiplayerSynchronizer.xml
new file mode 100644
index 0000000000..e1f0948346
--- /dev/null
+++ b/doc/classes/MultiplayerSynchronizer.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerSynchronizer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="replication_interval" type="float" setter="set_replication_interval" getter="get_replication_interval" default="0.0">
+ </member>
+ <member name="resource" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config">
+ </member>
+ <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;&quot;)">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index a840cb2ec7..74f29bdc48 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="RefCounted" version="4.0">
+<class name="Mutex" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A synchronization mutex (mutual exclusion).
</brief_description>
@@ -7,7 +7,7 @@
A synchronization mutex (mutual exclusion). This is used to synchronize multiple [Thread]s, and is equivalent to a binary [Semaphore]. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks.
</description>
<tutorials>
- <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/performance/using_multiple_threads.html</link>
+ <link title="Using multiple threads">$DOCS_URL/tutorials/performance/using_multiple_threads.html</link>
</tutorials>
<methods>
<method name="lock">
diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml
index ac3e8d53d8..ccdbb617ab 100644
--- a/doc/classes/NativeExtension.xml
+++ b/doc/classes/NativeExtension.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NativeExtension" inherits="Resource" version="4.0">
+<class name="NativeExtension" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -43,7 +43,9 @@
</constant>
<constant name="INITIALIZATION_LEVEL_SCENE" value="2" enum="InitializationLevel">
</constant>
- <constant name="INITIALIZATION_LEVEL_EDITOR" value="3" enum="InitializationLevel">
+ <constant name="INITIALIZATION_LEVEL_DRIVER" value="3" enum="InitializationLevel">
+ </constant>
+ <constant name="INITIALIZATION_LEVEL_EDITOR" value="4" enum="InitializationLevel">
</constant>
</constants>
</class>
diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml
index 42246619f6..10c9e32cf2 100644
--- a/doc/classes/NativeExtensionManager.xml
+++ b/doc/classes/NativeExtensionManager.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NativeExtensionManager" inherits="Object" version="4.0">
+<class name="NativeExtensionManager" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index 068854024c..b7b23a1097 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationAgent2D" inherits="Node" version="4.0">
+<class name="NavigationAgent2D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D Agent used in navigation for collision avoidance.
</brief_description>
@@ -18,7 +18,7 @@
<method name="get_final_location">
<return type="Vector2" />
<description>
- Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way.
+ 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">
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index f429134a71..18886ac33e 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationAgent3D" inherits="Node" version="4.0">
+<class name="NavigationAgent3D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
3D Agent used in navigation for collision avoidance.
</brief_description>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index b100a20963..bcf2cfc507 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" version="4.0">
+<class name="NavigationMesh" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A mesh to approximate the walkable areas and obstacles.
</brief_description>
diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml
index ca285c030c..1cffb1a627 100644
--- a/doc/classes/NavigationMeshGenerator.xml
+++ b/doc/classes/NavigationMeshGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMeshGenerator" inherits="Object" version="4.0">
+<class name="NavigationMeshGenerator" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml
index 462532d49a..2540c56258 100644
--- a/doc/classes/NavigationObstacle2D.xml
+++ b/doc/classes/NavigationObstacle2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationObstacle2D" inherits="Node" version="4.0">
+<class name="NavigationObstacle2D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D Obstacle used in navigation for collision avoidance.
</brief_description>
@@ -8,4 +8,12 @@
</description>
<tutorials>
</tutorials>
+ <members>
+ <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true">
+ Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius.
+ </member>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ The radius of the agent. Used only if [member estimate_radius] is set to false.
+ </member>
+ </members>
</class>
diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml
index c0cb7befef..f9489db5f1 100644
--- a/doc/classes/NavigationObstacle3D.xml
+++ b/doc/classes/NavigationObstacle3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationObstacle3D" inherits="Node" version="4.0">
+<class name="NavigationObstacle3D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
3D Obstacle used in navigation for collision avoidance.
</brief_description>
@@ -8,4 +8,12 @@
</description>
<tutorials>
</tutorials>
+ <members>
+ <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true">
+ Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius.
+ </member>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ The radius of the agent. Used only if [member estimate_radius] is set to false.
+ </member>
+ </members>
</class>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 5b5b7c42ef..ee57d8f26b 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" version="4.0">
+<class name="NavigationPolygon" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node that has methods to draw outlines or use indices of vertices to create navigation polygons.
</brief_description>
@@ -28,7 +28,7 @@
var polygon = NavigationPolygon.new()
var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.vertices = vertices
- var indices = PackedInt32Array(0, 3, 1)
+ var indices = PackedInt32Array([0, 1, 2, 3])
polygon.add_polygon(indices)
$NavigationRegion2D.navpoly = polygon
[/gdscript]
@@ -36,7 +36,7 @@
var polygon = new NavigationPolygon();
var vertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) };
polygon.Vertices = vertices;
- var indices = new int[] { 0, 3, 1 };
+ var indices = new int[] { 0, 1, 2, 3 };
polygon.AddPolygon(indices);
GetNode&lt;NavigationRegion2D&gt;("NavigationRegion2D").Navpoly = polygon;
[/csharp]
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index 6c78b25744..b1165174a2 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationRegion2D" inherits="Node2D" version="4.0">
+<class name="NavigationRegion2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A region of the 2D navigation map.
</brief_description>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index f91069fa9d..e007633a1e 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationRegion3D" inherits="Node3D" version="4.0">
+<class name="NavigationRegion3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A region of the navigation map.
</brief_description>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 971d3839f2..a59666356c 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationServer2D" inherits="Object" version="4.0">
+<class name="NavigationServer2D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server interface for low-level 2D navigation access
</brief_description>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index 16eba8bba8..7d11a30647 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationServer3D" inherits="Object" version="4.0">
+<class name="NavigationServer3D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server interface for low-level 3D navigation access
</brief_description>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index 77fd9165bb..863686926a 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" version="4.0">
+<class name="NinePatchRect" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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>
@@ -35,7 +35,7 @@
<member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true">
If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="2" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" />
<member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0">
The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
@@ -68,11 +68,11 @@
</constant>
<constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode">
Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges.
- [b]Note:[/b] Only supported when using the GLES3 renderer. When using the GLES2 renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
+ [b]Note:[/b] Only supported when using the Vulkan renderer. When using the OpenGL renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
</constant>
<constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2" enum="AxisStretchMode">
Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than [constant AXIS_STRETCH_MODE_STRETCH]. The texture must be seamless for this to work without displaying artifacts between edges.
- [b]Note:[/b] Only supported when using the GLES3 renderer. When using the GLES2 renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
+ [b]Note:[/b] Only supported when using the Vulkan renderer. When using the OpenGL renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
</constant>
</constants>
</class>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 843db8c174..5291ecab08 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" version="4.0">
+<class name="Node" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all [i]scene[/i] objects.
</brief_description>
@@ -15,9 +15,10 @@
Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children.
[b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree].
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [ENetMultiplayerPeer]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos.
+ [b]Note:[/b] The [code]script[/code] property is part of the [Object] class, not [Node]. It isn't exposed like most properties but does have a setter and getter ([code]set_script()[/code] and [code]get_script()[/code]).
</description>
<tutorials>
- <link title="Nodes and scenes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/nodes_and_scenes.htmltml</link>
+ <link title="Nodes and scenes">$DOCS_URL/getting_started/step_by_step/nodes_and_scenes.html</link>
<link title="All Demos">https://github.com/godotengine/godot-demo-projects/</link>
</tutorials>
<methods>
@@ -51,7 +52,7 @@
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 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.
- [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
+ [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
</description>
</method>
<method name="_physics_process" qualifiers="virtual">
@@ -61,7 +62,7 @@
Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. [code]delta[/code] is in seconds.
It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process].
Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification].
- [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
+ [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
</description>
</method>
<method name="_process" qualifiers="virtual">
@@ -71,38 +72,38 @@
Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. [code]delta[/code] is in seconds.
It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process].
Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification].
- [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
+ [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
</description>
</method>
<method name="_ready" qualifiers="virtual">
<return type="void" />
<description>
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards.
- Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables.
+ Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]@onready[/code] annotation for variables.
Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree].
- [b]Note:[/b] [method _ready] may be called only once for each node. After removing a node from the scene tree and adding again, [code]_ready[/code] will not be called for the second time. This can be bypassed with requesting another call with [method request_ready], which may be called anywhere before adding the node again.
+ [b]Note:[/b] [method _ready] may be called only once for each node. After removing a node from the scene tree and adding it again, [code]_ready[/code] will not be called a second time. This can be bypassed by requesting another call with [method request_ready], which may be called anywhere before adding the node again.
</description>
</method>
<method name="_unhandled_input" qualifiers="virtual">
<return type="void" />
<argument index="0" name="event" type="InputEvent" />
<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.
+ Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI [Control] item. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input].
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.
- [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
+ [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
</description>
</method>
<method name="_unhandled_key_input" qualifiers="virtual">
<return type="void" />
<argument index="0" name="event" type="InputEvent" />
<description>
- Called when an [InputEventKey] or [InputEventShortcut] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
+ Called when an [InputEventKey] or [InputEventShortcut] hasn't been consumed by [method _input] or any GUI [Control] item. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
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.
- [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
+ [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
</description>
</method>
<method name="add_child">
@@ -180,16 +181,19 @@
[b]Note:[/b] It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to [method Object._init] method). In that case, the node will be duplicated without a script.
</description>
</method>
- <method name="find_node" qualifiers="const">
- <return type="Node" />
+ <method name="find_nodes" qualifiers="const">
+ <return type="Node[]" />
<argument index="0" name="mask" type="String" />
- <argument index="1" name="recursive" type="bool" default="true" />
- <argument index="2" name="owned" type="bool" default="true" />
+ <argument index="1" name="type" type="String" default="&quot;&quot;" />
+ <argument index="2" name="recursive" type="bool" default="true" />
+ <argument index="3" name="owned" type="bool" default="true" />
<description>
- Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]).
- [b]Note:[/b] It does not match against the full path, just against individual node names.
+ Finds descendants of this node whose, name matches [code]mask[/code] as in [method String.match], and/or type matches [code]type[/code] as in [method Object.is_class].
+ [code]mask[/code] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]).
+ [code]type[/code] will check equality or inheritance. It is case-sensitive, [code]"Object"[/code] will match a node whose type is [code]"Node"[/code] but not the other way around.
If [code]owned[/code] is [code]true[/code], this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
- [b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using [method get_node] instead. To avoid using [method find_node] too often, consider caching the node reference into a variable.
+ Returns an empty array, if no matching nodes are found.
+ [b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get references to other nodes. To avoid using [method find_nodes] too often, consider caching the node references into variables.
</description>
</method>
<method name="find_parent" qualifiers="const">
@@ -228,16 +232,19 @@
If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
- <method name="get_editor_description" qualifiers="const">
- <return type="String" />
- <description>
- </description>
- </method>
<method name="get_groups" qualifiers="const">
<return type="Array" />
<description>
Returns an array listing the groups that the node is a member of.
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
+ [b]Note:[/b] The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over [method get_groups], use the following snippet:
+ [codeblock]
+ # Stores the node's non-internal groups only (as an array of Strings).
+ var non_internal_groups = []
+ for group in get_groups():
+ if not group.begins_with("_"):
+ non_internal_groups.push_back(group)
+ [/codeblock]
</description>
</method>
<method name="get_index" qualifiers="const">
@@ -258,7 +265,7 @@
<return type="Node" />
<argument index="0" name="path" type="NodePath" />
<description>
- Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, 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.
+ Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, [code]null[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call &lt;method&gt; on a null instance." error.
[b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
[b]Example:[/b] Assume your current node is Character and the following tree:
[codeblock]
@@ -319,7 +326,7 @@
<method name="get_parent" qualifiers="const">
<return type="Node" />
<description>
- Returns the parent node of the current node, or a [code]null instance[/code] if the node lacks a parent.
+ Returns the parent node of the current node, or [code]null[/code] if the node lacks a parent.
</description>
</method>
<method name="get_path" qualifiers="const">
@@ -568,6 +575,8 @@
<description>
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in.
+ [b]Note:[/b] The given node will become the new parent of any child nodes that the replaced node had.
+ [b]Note:[/b] The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [method Object.free].
</description>
</method>
<method name="request_ready">
@@ -618,12 +627,6 @@
Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling.
</description>
</method>
- <method name="set_editor_description">
- <return type="void" />
- <argument index="0" name="editor_description" type="String" />
- <description>
- </description>
- </method>
<method name="set_multiplayer_authority">
<return type="void" />
<argument index="0" name="id" type="int" />
@@ -702,6 +705,9 @@
<member name="custom_multiplayer" type="MultiplayerAPI" setter="set_custom_multiplayer" getter="get_custom_multiplayer">
The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one.
</member>
+ <member name="editor_description" type="String" setter="set_editor_description" getter="get_editor_description" default="&quot;&quot;">
+ Add a custom description to a node.
+ </member>
<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree).
</member>
@@ -723,9 +729,21 @@
</member>
</members>
<signals>
+ <signal name="child_entered_tree">
+ <argument index="0" name="node" type="Node" />
+ <description>
+ Emitted when a child node enters the scene tree, either because it entered on its own or because this node entered with it.
+ </description>
+ </signal>
+ <signal name="child_exited_tree">
+ <argument index="0" name="node" type="Node" />
+ <description>
+ Emitted when a child node exits the scene tree, either because it exited on its own or because this node exited.
+ </description>
+ </signal>
<signal name="ready">
<description>
- Emitted when the node is ready.
+ Emitted when the node is ready. Comes after [method _ready] callback and follows the same rules.
</description>
</signal>
<signal name="renamed">
@@ -790,8 +808,8 @@
<constant name="NOTIFICATION_DRAG_END" value="22">
Notification received when a drag ends.
</constant>
- <constant name="NOTIFICATION_PATH_CHANGED" value="23">
- Notification received when the node's [NodePath] changed.
+ <constant name="NOTIFICATION_PATH_RENAMED" value="23">
+ Notification received when the node's name or one of its parents' name is changed. This notification is [i]not[/i] received when the node is removed from the scene tree to be added to another parent later on.
</constant>
<constant name="NOTIFICATION_INTERNAL_PROCESS" value="25">
Notification received every frame when the internal process flag is set (see [method set_process_internal]).
@@ -838,6 +856,14 @@
</constant>
<constant name="NOTIFICATION_WM_SIZE_CHANGED" value="1008">
</constant>
+ <constant name="NOTIFICATION_WM_DPI_CHANGE" value="1009">
+ </constant>
+ <constant name="NOTIFICATION_VP_MOUSE_ENTER" value="1010">
+ Notification received when the mouse enters the viewport.
+ </constant>
+ <constant name="NOTIFICATION_VP_MOUSE_EXIT" value="1011">
+ Notification received when the mouse leaves the viewport.
+ </constant>
<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.
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index ef5f9ee5c9..bb73019668 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node2D" inherits="CanvasItem" version="4.0">
+<class name="Node2D" inherits="CanvasItem" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.html</link>
<link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link>
</tutorials>
<methods>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 2ca664e2b5..4444416a06 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node3D" inherits="Node" version="4.0">
+<class name="Node3D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Most basic 3D game object, parent of all 3D-related nodes.
</brief_description>
@@ -9,7 +9,7 @@
[b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
- <link title="Introduction to 3D">https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link>
+ <link title="Introduction to 3D">$DOCS_URL/tutorials/3d/introduction_to_3d.html</link>
<link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link>
</tutorials>
<methods>
@@ -134,6 +134,20 @@
Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D].
</description>
</method>
+ <method name="property_can_revert">
+ <return type="bool" />
+ <argument index="0" name="name" type="String" />
+ <description>
+ Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value.
+ </description>
+ </method>
+ <method name="property_get_revert">
+ <return type="Variant" />
+ <argument index="0" name="name" type="String" />
+ <description>
+ Returns the default value of the Node3D property with given [code]name[/code].
+ </description>
+ </method>
<method name="rotate">
<return type="void" />
<argument index="0" name="axis" type="Vector3" />
diff --git a/doc/classes/Node3DGizmo.xml b/doc/classes/Node3DGizmo.xml
index 00298976a8..f215e3d663 100644
--- a/doc/classes/Node3DGizmo.xml
+++ b/doc/classes/Node3DGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node3DGizmo" inherits="RefCounted" version="4.0">
+<class name="Node3DGizmo" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 17c6ba38b7..3d3e139781 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NodePath" version="4.0">
+<class name="NodePath" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Pre-parsed scene tree path.
</brief_description>
@@ -25,21 +25,21 @@
<tutorials>
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
- <methods>
- <method name="NodePath" qualifiers="constructor">
+ <constructors>
+ <constructor name="NodePath">
<return type="NodePath" />
<description>
Constructs an empty [NodePath].
</description>
- </method>
- <method name="NodePath" qualifiers="constructor">
+ </constructor>
+ <constructor name="NodePath">
<return type="NodePath" />
<argument index="0" name="from" type="NodePath" />
<description>
Constructs a [NodePath] as a copy of the given [NodePath].
</description>
- </method>
- <method name="NodePath" qualifiers="constructor">
+ </constructor>
+ <constructor name="NodePath">
<return type="NodePath" />
<argument index="0" name="from" type="String" />
<description>
@@ -61,7 +61,9 @@
"/root/Level/Path2D"
[/codeblock]
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="get_as_property_path" qualifiers="const">
<return type="NodePath" />
<description>
@@ -166,27 +168,29 @@
Returns [code]true[/code] if the node path is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ </methods>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="NodePath" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="NodePath" />
<description>
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml
index 7ca4f5d363..69d238ceff 100644
--- a/doc/classes/ORMMaterial3D.xml
+++ b/doc/classes/ORMMaterial3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0">
+<class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 15cc7b9b65..bc9bfc9676 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" version="4.0">
+<class name="OS" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Operating System functions.
</brief_description>
@@ -31,12 +31,30 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
+ <method name="crash">
+ <return type="void" />
+ <argument index="0" name="message" type="String" />
+ <description>
+ Crashes the engine (or the editor if called within a [code]@tool[/code] script). This should [i]only[/i] be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GlobalScope.push_error] or [method alert]. See also [method kill].
+ </description>
+ </method>
+ <method name="create_instance">
+ <return type="int" />
+ <argument index="0" name="arguments" type="PackedStringArray" />
+ <description>
+ Creates a new instance of Godot that runs independently. The [code]arguments[/code] are used in the given order and separated by a space.
+ If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="create_process">
<return type="int" />
<argument index="0" name="path" type="String" />
<argument index="1" name="arguments" type="PackedStringArray" />
+ <argument index="2" name="open_console" type="bool" default="false" />
<description>
- Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
+ Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [code]path[/code] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
+ On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
For example, running another instance of the project:
[codeblocks]
@@ -49,7 +67,7 @@
[/codeblocks]
See [method execute] if you wish to run an external command and retrieve the results.
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
- [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
+ [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments.
</description>
</method>
<method name="delay_msec" qualifiers="const">
@@ -93,8 +111,10 @@
<argument index="1" name="arguments" type="PackedStringArray" />
<argument index="2" name="output" type="Array" default="[]" />
<argument index="3" name="read_stderr" type="bool" default="false" />
+ <argument index="4" name="open_console" type="bool" default="false" />
<description>
Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too.
+ On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails.
[b]Note:[/b] The Godot thread will pause its execution until the executed command terminates. Use [Thread] to create a separate thread that will not pause the Godot thread, or use [method create_process] to create a completely independent process.
For example, to retrieve a list of the working directory's contents:
@@ -108,7 +128,7 @@
int exitCode = OS.Execute("ls", new string[] {"-l", "/tmp"}, output);
[/csharp]
[/codeblocks]
- To execute a composite command, a platform-specific shell can be invoked. For example:
+ If you wish to access a shell built-in or execute a composite command, a platform-specific shell can be invoked. For example:
[codeblocks]
[gdscript]
var output = []
@@ -120,11 +140,14 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ [b]Note:[/b] To execute a Windows command interpreter built-in command, specify [code]cmd.exe[/code] in [code]path[/code], [code]/c[/code] as the first argument, and the desired command as the second argument.
+ [b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [code]path[/code], [code]-Command[/code] as the first argument, and the desired command as the second argument.
+ [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [code]path[/code], [code]-c[/code] as the first argument, and the desired command as the second argument.
[b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
</description>
</method>
<method name="find_keycode_from_string" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="Key" />
<argument index="0" name="string" type="String" />
<description>
Returns the keycode of the given string (e.g. "Escape").
@@ -133,7 +156,7 @@
<method name="get_cache_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
+ Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -170,7 +193,7 @@
<method name="get_config_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
+ Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -185,7 +208,7 @@
<method name="get_data_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
+ Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -201,6 +224,7 @@
<return type="String" />
<description>
Returns the path to the current engine executable.
+ [b]Note:[/b] On macOS, always use [method create_instance] instead of relying on executable path.
</description>
</method>
<method name="get_granted_permissions" qualifiers="const">
@@ -212,7 +236,7 @@
</method>
<method name="get_keycode_string" qualifiers="const">
<return type="String" />
- <argument index="0" name="code" type="int" />
+ <argument index="0" name="code" type="int" enum="Key" />
<description>
Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
@@ -236,6 +260,13 @@
This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with [code]fr_CA[/code] locale, this would return [code]fr[/code].
</description>
</method>
+ <method name="get_main_thread_id" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the ID of the main thread. See [method get_thread_caller_id].
+ [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts.
+ </description>
+ </method>
<method name="get_model_name" qualifiers="const">
<return type="String" />
<description>
@@ -246,7 +277,60 @@
<method name="get_name" qualifiers="const">
<return type="String" />
<description>
- Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"macOS"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code].
+ Returns the name of the host OS.
+ On Windows, this is [code]"Windows"[/code] or [code]"UWP"[/code] (Universal Windows Platform) if exported thereon.
+ On macOS, this is [code]"macOS"[/code].
+ On Linux-based operating systems, this is [code]"Linux"[/code].
+ On BSD-based operating systems, this is [code]"FreeBSD"[/code], [code]"NetBSD"[/code], [code]"OpenBSD"[/code], or [code]"BSD"[/code] as a fallback.
+ On Android, this is [code]"Android"[/code].
+ On iOS, this is [code]"iOS"[/code].
+ On the web, this is [code]"HTML5"[/code].
+ [b]Note:[/b] Custom builds of the engine may support additional platforms, such as consoles, yielding other return values.
+ [codeblocks]
+ [gdscript]
+ match OS.get_name():
+ "Windows", "UWP":
+ print("Windows")
+ "macOS":
+ print("macOS")
+ "Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD":
+ print("Linux/BSD")
+ "Android":
+ print("Android")
+ "iOS":
+ print("iOS")
+ "HTML5":
+ print("Web")
+ [/gdscript]
+ [csharp]
+ switch (OS.GetName())
+ {
+ case "Windows":
+ case "UWP":
+ GD.Print("Windows");
+ break;
+ case "macOS":
+ GD.Print("macOS");
+ break;
+ case "Linux":
+ case "FreeBSD":
+ case "NetBSD":
+ case "OpenBSD"
+ case "BSD":
+ GD.Print("Linux/BSD");
+ break;
+ case "Android":
+ GD.Print("Android");
+ break;
+ case "iOS":
+ GD.Print("iOS");
+ break;
+ case "HTML5":
+ GD.Print("Web");
+ break;
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_process_id" qualifiers="const">
@@ -259,7 +343,14 @@
<method name="get_processor_count" qualifiers="const">
<return type="int" />
<description>
- Returns the number of threads available on the host machine.
+ Returns the number of [i]logical[/i] CPU cores available on the host machine. On CPUs with HyperThreading enabled, this number will be greater than the number of [i]physical[/i] CPU cores.
+ </description>
+ </method>
+ <method name="get_processor_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz").
+ [b]Note:[/b] This method is only implemented on Windows, macOS, Linux and iOS. On Android, HTML5 and UWP, [method get_processor_name] returns an empty string.
</description>
</method>
<method name="get_static_memory_peak_usage" qualifiers="const">
@@ -271,7 +362,7 @@
<method name="get_static_memory_usage" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of static memory being used by the program in bytes.
+ Returns the amount of static memory being used by the program in bytes (only works in debug).
</description>
</method>
<method name="get_system_dir" qualifiers="const">
@@ -303,11 +394,13 @@
<return type="String" />
<description>
Returns the absolute directory path where user data is written ([code]user://[/code]).
- On Linux, this is [code]~/.local/share/godot/app_userdata/[project_name][/code], or [code]~/.local/share/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
+ On Windows, this is [code]%AppData%\Godot\app_userdata\[project_name][/code], or [code]%AppData%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%AppData%[/code] expands to [code]%UserProfile%\AppData\Roaming[/code].
On macOS, this is [code]~/Library/Application Support/Godot/app_userdata/[project_name][/code], or [code]~/Library/Application Support/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
- On Windows, this is [code]%APPDATA%\Godot\app_userdata\[project_name][/code], or [code]%APPDATA%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%APPDATA%[/code] expands to [code]%USERPROFILE%\AppData\Roaming[/code].
- If the project name is empty, [code]user://[/code] falls back to [code]res://[/code].
- Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user data directory.
+ On Linux and BSD, this is [code]~/.local/share/godot/app_userdata/[project_name][/code], or [code]~/.local/share/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
+ On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration.
+ On the web, this is a virtual directory managed by the browser.
+ If the project name is empty, [code][project_name][/code] falls back to [code][unnamed project][/code].
+ Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user home directory.
</description>
</method>
<method name="has_environment" qualifiers="const">
@@ -322,7 +415,7 @@
<return type="bool" />
<argument index="0" name="tag_name" type="String" />
<description>
- Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details.
+ Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details.
[b]Note:[/b] Tag names are case-sensitive.
</description>
</method>
@@ -357,7 +450,7 @@
<return type="int" enum="Error" />
<argument index="0" name="pid" type="int" />
<description>
- Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode.
+ Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash].
[b]Note:[/b] This method can also be used to kill processes that were not spawned by the game.
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
@@ -455,11 +548,11 @@
</member>
</members>
<constants>
- <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 name="VIDEO_DRIVER_VULKAN" value="0" enum="VideoDriver">
+ The Vulkan rendering backend. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available.
</constant>
- <constant name="VIDEO_DRIVER_VULKAN" value="1" enum="VideoDriver">
- The Vulkan rendering backend.
+ <constant name="VIDEO_DRIVER_OPENGL_3" value="1" enum="VideoDriver">
+ The OpenGL 3 rendering backend. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on HTML5.
</constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 5a84364b92..a57101b62d 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" version="4.0">
+<class name="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all non-built-in types.
</brief_description>
@@ -27,9 +27,11 @@
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
[b]Note:[/b] Unlike references to a [RefCounted], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [RefCounted] for data classes instead of [Object].
+ [b]Note:[/b] The [code]script[/code] property is not exposed like most properties, but it does have a setter and getter ([code]set_script()[/code] and [code]get_script()[/code]).
</description>
<tutorials>
- <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/tutorials/best_practices/node_alternatives.html</link>
+ <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link>
+ <link title="Object notifications">$DOCS_URL/tutorials/best_practices/godot_notifications.html</link>
</tutorials>
<methods>
<method name="_get" qualifiers="virtual">
@@ -350,6 +352,7 @@
<argument index="0" name="property" type="NodePath" />
<description>
Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
+ [b]Note:[/b] Even though the method takes [NodePath] argument, it doesn't support actual paths to [Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [method Node.get_node_and_resource] instead.
</description>
</method>
<method name="get_instance_id" qualifiers="const">
@@ -487,7 +490,7 @@
<argument index="0" name="property" type="String" />
<argument index="1" name="value" type="Variant" />
<description>
- Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen.
+ Assigns a new value to the given property. If the [code]property[/code] does not exist or the given value's type doesn't match, nothing will happen.
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
@@ -567,7 +570,7 @@
<description>
Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context.
Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation].
- See [url=https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url] for examples of the usage of this method.
+ See [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url] for examples of the usage of this method.
</description>
</method>
<method name="tr_n" qualifiers="const">
@@ -581,7 +584,7 @@
Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] or [code]plural_message[/code] unchanged. See [method set_message_translation].
The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
[b]Note:[/b] Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, use [method tr].
- See [url=https://docs.godotengine.org/en/latest/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url] for examples of the usage of this method.
+ See [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url] for examples of the usage of this method.
</description>
</method>
</methods>
diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml
index 69fb3002e3..7951960f31 100644
--- a/doc/classes/Occluder3D.xml
+++ b/doc/classes/Occluder3D.xml
@@ -1,15 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Occluder3D" inherits="Resource" version="4.0">
+<class name="Occluder3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Occluder shape resource for use with occlusion culling in [OccluderInstance3D].
</brief_description>
<description>
+ [Occluder3D] stores an occluder shape that can be used by the engine's occlusion culling system.
+ See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
</description>
<tutorials>
</tutorials>
- <members>
- <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()">
- </member>
- <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()">
- </member>
- </members>
+ <methods>
+ <method name="get_indices" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <description>
+ Returns the occluder shape's vertex indices.
+ </description>
+ </method>
+ <method name="get_vertices" qualifiers="const">
+ <return type="PackedVector3Array" />
+ <description>
+ Returns the occluder shape's vertex positions.
+ </description>
+ </method>
+ </methods>
</class>
diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml
index d97aa4312f..abd99dd3aa 100644
--- a/doc/classes/OccluderInstance3D.xml
+++ b/doc/classes/OccluderInstance3D.xml
@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OccluderInstance3D" inherits="Node3D" version="4.0">
+<class name="OccluderInstance3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Provides occlusion culling for 3D nodes, which improves performance in closed areas.
</brief_description>
<description>
+ Occlusion culling can improve rendering performance in closed/semi-open areas by hiding geometry that is occluded by other objects.
+ The occlusion culling system is mostly static. [OccluderInstance3D]s can be moved or hidden at run-time, but doing so will trigger a background recomputation that can take several frames. It is recommended to only move [OccluderInstance3D]s sporadically (e.g. for procedural generation purposes), rather than doing so every frame.
+ The occlusion culling system works by rendering the occluders on the CPU in parallel using [url=https://www.embree.org/]Embree[/url], drawing the result to a low-resolution buffer then using this to cull 3D nodes individually. In the 3D editor, you can preview the occlusion culling buffer by choosing [b]Perspective &gt; Debug Advanced... &gt; Occlusion Culling Buffer[/b] in the top-left corner of the 3D viewport. The occlusion culling buffer quality can be adjusted in the Project Settings.
+ [b]Baking:[/b] Select an [OccluderInstance3D] node, then use the [b]Bake Occluders[/b] button at the top of the 3D editor. Only opaque materials will be taken into account; transparent materials (alpha-blended or alpha-tested) will be ignored by the occluder generation.
+ [b]Note:[/b] Occlusion culling is only effective if [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] is [code]true[/code]. Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling.
</description>
<tutorials>
</tutorials>
@@ -11,7 +17,7 @@
<return type="bool" />
<argument index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 20.
+ Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
<method name="set_bake_mask_value">
@@ -19,14 +25,25 @@
<argument index="0" name="layer_number" type="int" />
<argument index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 20.
+ Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
</methods>
<members>
<member name="bake_mask" type="int" setter="set_bake_mask" getter="get_bake_mask" default="4294967295">
+ The visual layers to account for when baking for occluders. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member bake_mask] will be included in the generated occluder mesh. By default, all objects are taken into account for the occluder baking.
+ To improve performance and avoid artifacts, it is recommended to exclude dynamic objects, small objects and fixtures from the baking process by moving them to a separate visual layer and excluding this layer in [member bake_mask].
+ </member>
+ <member name="bake_simplification_distance" type="float" setter="set_bake_simplification_distance" getter="get_bake_simplification_distance" default="0.1">
+ The simplification distance to use for simplifying the generated occluder polygon (in 3D units). Higher values result in a less detailed occluder mesh, which improves performance but reduces culling accuracy.
+ The occluder geometry is rendered on the CPU, so it is important to keep its geometry as simple as possible. Since the buffer is rendered at a low resolution, less detailed occluder meshes generally still work well. The default value is fairly aggressive, so you may have to decrase it if you run into false negatives (objects being occluded even though they are visible by the camera). A value of [code]0.01[/code] will act conservatively, and will keep geometry [i]perceptually[/i] unaffected in the occlusion culling buffer. Depending on the scene, a value of [code]0.01[/code] may still simplify the mesh noticeably compared to disabling simplification entirely.
+ Setting this to [code]0.0[/code] disables simplification entirely, but vertices in the exact same position will still be merged. The mesh will also be re-indexed to reduce both the number of vertices and indices.
+ [b]Note:[/b] This uses the [url=https://meshoptimizer.org/]meshoptimizer[/url] library under the hood, similar to LOD generation.
</member>
<member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder">
+ The occluder resource for this [OccluderInstance3D]. You can generate an occluder resource by selecting an [OccluderInstance3D] node then using the [b]Bake Occluders[/b] button at the top of the editor.
+ You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the inspector.
+ Alternatively, you can select a primitive occluder to use: [QuadOccluder3D], [BoxOccluder3D] or [SphereOccluder3D].
</member>
</members>
</class>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index e347888414..223f5a595e 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" version="4.0">
+<class name="OccluderPolygon2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Defines a 2D polygon for LightOccluder2D.
</brief_description>
diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml
index e8d5977199..f83d31a9b5 100644
--- a/doc/classes/OmniLight3D.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OmniLight3D" inherits="Light3D" version="4.0">
+<class name="OmniLight3D" inherits="Light3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Omnidirectional light, such as a light bulb or a candle.
</brief_description>
@@ -7,7 +7,7 @@
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 title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
</tutorials>
<members>
<member name="omni_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
diff --git a/doc/classes/OptimizedTranslation.xml b/doc/classes/OptimizedTranslation.xml
index 8302a564ed..68765f9862 100644
--- a/doc/classes/OptimizedTranslation.xml
+++ b/doc/classes/OptimizedTranslation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OptimizedTranslation" inherits="Translation" version="4.0">
+<class name="OptimizedTranslation" inherits="Translation" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Optimized translation.
</brief_description>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index a3616af999..f65925f0f6 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" version="4.0">
+<class name="OptionButton" inherits="Button" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Button control that provides selectable options when pressed.
</brief_description>
@@ -39,12 +39,6 @@
Clears all the items in the [OptionButton].
</description>
</method>
- <method name="get_item_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the amount of items in the OptionButton, including separators.
- </description>
- </method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="idx" type="int" />
@@ -90,7 +84,7 @@
<method name="get_selected_id" qualifiers="const">
<return type="int" />
<description>
- Returns the ID of the selected item, or [code]0[/code] if no item is selected.
+ Returns the ID of the selected item, or [code]-1[/code] if no item is selected.
</description>
</method>
<method name="get_selected_metadata" qualifiers="const">
@@ -118,6 +112,7 @@
<argument index="0" name="idx" type="int" />
<description>
Selects an item by index and makes it the current item. This will work even if the item is disabled.
+ Passing [code]-1[/code] as the index deselects any currently selected item.
</description>
</method>
<method name="set_item_disabled">
@@ -163,12 +158,15 @@
</method>
</methods>
<members>
- <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="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ The number of items to select from.
+ </member>
<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" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<signals>
<signal name="item_focused">
@@ -185,34 +183,16 @@
</signal>
</signals>
<theme_items>
- <theme_item name="arrow" data_type="icon" type="Texture2D">
- The arrow icon to be drawn on the right end of the button.
- </theme_item>
- <theme_item name="arrow_margin" data_type="constant" type="int" default="2">
- The horizontal space between the arrow icon and the right edge of the button.
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts).
- </theme_item>
- <theme_item name="disabled_mirrored" data_type="style" type="StyleBox">
- [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts).
- </theme_item>
- <theme_item name="focus" data_type="style" 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" data_type="font" type="Font">
- [Font] of the [OptionButton]'s text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [OptionButton].
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Text [Color] used when the [OptionButton] is disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [OptionButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [OptionButton] is being hovered.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -221,27 +201,45 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [OptionButton] is being pressed.
</theme_item>
+ <theme_item name="arrow_margin" data_type="constant" type="int" default="4">
+ The horizontal space between the arrow icon and the right edge of the button.
+ </theme_item>
+ <theme_item name="hseparation" data_type="constant" type="int" default="2">
+ The horizontal space between [OptionButton]'s icon and text.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [OptionButton]'s text.
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [OptionButton]'s text.
</theme_item>
+ <theme_item name="arrow" data_type="icon" type="Texture2D">
+ The arrow icon to be drawn on the right end of the button.
+ </theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="disabled_mirrored" data_type="style" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts).
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [OptionButton] is being hovered (for left-to-right layouts).
</theme_item>
<theme_item name="hover_mirrored" data_type="style" type="StyleBox">
[StyleBox] used when the [OptionButton] is being hovered (for right-to-left layouts).
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="2">
- The horizontal space between [OptionButton]'s icon and text.
- </theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [OptionButton] (for left-to-right layouts).
</theme_item>
<theme_item name="normal_mirrored" data_type="style" type="StyleBox">
Default [StyleBox] for the [OptionButton] (for right-to-left layouts).
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
- </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts).
</theme_item>
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index 28508c85e0..3b84128123 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PCKPacker" inherits="RefCounted" version="4.0">
+<class name="PCKPacker" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Creates packages that can be loaded into a running project.
</brief_description>
@@ -43,8 +43,8 @@
<method name="pck_start">
<return type="int" enum="Error" />
<argument index="0" name="pck_name" type="String" />
- <argument index="1" name="alignment" type="int" default="0" />
- <argument index="2" name="key" type="String" default="&quot;&quot;" />
+ <argument index="1" name="alignment" type="int" default="32" />
+ <argument index="2" name="key" type="String" default="&quot;0000000000000000000000000000000000000000000000000000000000000000&quot;" />
<argument index="3" name="encrypt_directory" type="bool" default="false" />
<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).
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 39733baf40..be51b1dcf8 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedByteArray" version="4.0">
+<class name="PackedByteArray" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of bytes.
</brief_description>
@@ -8,27 +8,29 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="PackedByteArray" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedByteArray">
<return type="PackedByteArray" />
<description>
Constructs an empty [PackedByteArray].
</description>
- </method>
- <method name="PackedByteArray" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedByteArray">
<return type="PackedByteArray" />
<argument index="0" name="from" type="PackedByteArray" />
<description>
Constructs a [PackedByteArray] as a copy of the given [PackedByteArray].
</description>
- </method>
- <method name="PackedByteArray" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedByteArray">
<return type="PackedByteArray" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="int" />
@@ -323,40 +325,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedByteArray" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedByteArray" />
- <argument index="0" name="right" type="PackedByteArray" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedByteArray" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="int" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="int" />
@@ -364,7 +332,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -395,21 +363,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedByteArray" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedByteArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedByteArray].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedByteArray" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
- 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.
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_float32_array" qualifiers="const">
@@ -445,4 +415,40 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedByteArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedByteArray" />
+ <argument index="0" name="right" type="PackedByteArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedByteArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 00e670646d..f98c5c37e4 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedColorArray" version="4.0">
+<class name="PackedColorArray" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of [Color]s.
</brief_description>
@@ -8,27 +8,29 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="PackedColorArray" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedColorArray">
<return type="PackedColorArray" />
<description>
Constructs an empty [PackedColorArray].
</description>
- </method>
- <method name="PackedColorArray" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedColorArray">
<return type="PackedColorArray" />
<argument index="0" name="from" type="PackedColorArray" />
<description>
Constructs a [PackedColorArray] as a copy of the given [PackedColorArray].
</description>
- </method>
- <method name="PackedColorArray" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedColorArray">
<return type="PackedColorArray" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="Color" />
@@ -86,40 +88,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedColorArray" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedColorArray" />
- <argument index="0" name="right" type="PackedColorArray" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedColorArray" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="Color" />
@@ -127,7 +95,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -158,20 +126,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedColorArray" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedColorArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedColorArray].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedColorArray" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -180,4 +151,40 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedColorArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedColorArray" />
+ <argument index="0" name="right" type="PackedColorArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedColorArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Color" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index 2454e565e6..cba7269ccf 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" version="4.0">
+<class name="PackedDataContainer" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
index 131a6be4e2..84d411ff65 100644
--- a/doc/classes/PackedDataContainerRef.xml
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainerRef" inherits="RefCounted" version="4.0">
+<class name="PackedDataContainerRef" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Reference-counted version of [PackedDataContainer].
</brief_description>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 2ee2ac44df..393af5f6c4 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedFloat32Array" version="4.0">
+<class name="PackedFloat32Array" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of 32-bit floating-point values.
</brief_description>
@@ -9,27 +9,29 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="PackedFloat32Array" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedFloat32Array">
<return type="PackedFloat32Array" />
<description>
Constructs an empty [PackedFloat32Array].
</description>
- </method>
- <method name="PackedFloat32Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedFloat32Array">
<return type="PackedFloat32Array" />
<argument index="0" name="from" type="PackedFloat32Array" />
<description>
Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array].
</description>
- </method>
- <method name="PackedFloat32Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedFloat32Array">
<return type="PackedFloat32Array" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="float" />
@@ -87,40 +89,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedFloat32Array" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedFloat32Array" />
- <argument index="0" name="right" type="PackedFloat32Array" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedFloat32Array" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="float" />
@@ -128,7 +96,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -159,20 +127,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedFloat32Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedFloat32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat32Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedFloat32Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -183,4 +154,40 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedFloat32Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedFloat32Array" />
+ <argument index="0" name="right" type="PackedFloat32Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedFloat32Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 7414bc72fc..5a80d7b2e9 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedFloat64Array" version="4.0">
+<class name="PackedFloat64Array" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of 64-bit floating-point values.
</brief_description>
@@ -9,27 +9,29 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="PackedFloat64Array" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedFloat64Array">
<return type="PackedFloat64Array" />
<description>
Constructs an empty [PackedFloat64Array].
</description>
- </method>
- <method name="PackedFloat64Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedFloat64Array">
<return type="PackedFloat64Array" />
<argument index="0" name="from" type="PackedFloat64Array" />
<description>
Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array].
</description>
- </method>
- <method name="PackedFloat64Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedFloat64Array">
<return type="PackedFloat64Array" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="float" />
@@ -87,40 +89,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedFloat64Array" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedFloat64Array" />
- <argument index="0" name="right" type="PackedFloat64Array" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedFloat64Array" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="float" />
@@ -128,7 +96,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -159,20 +127,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedFloat64Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedFloat64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat64Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedFloat64Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -183,4 +154,40 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedFloat64Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedFloat64Array" />
+ <argument index="0" name="right" type="PackedFloat64Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedFloat64Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 8ecf4a70ae..17085a9626 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedInt32Array" version="4.0">
+<class name="PackedInt32Array" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of 32-bit integers.
</brief_description>
@@ -9,27 +9,29 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="PackedInt32Array" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedInt32Array">
<return type="PackedInt32Array" />
<description>
Constructs an empty [PackedInt32Array].
</description>
- </method>
- <method name="PackedInt32Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedInt32Array">
<return type="PackedInt32Array" />
<argument index="0" name="from" type="PackedInt32Array" />
<description>
Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array].
</description>
- </method>
- <method name="PackedInt32Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedInt32Array">
<return type="PackedInt32Array" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="int" />
@@ -87,40 +89,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedInt32Array" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedInt32Array" />
- <argument index="0" name="right" type="PackedInt32Array" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedInt32Array" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="int" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="int" />
@@ -128,7 +96,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -159,20 +127,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the array size.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedInt32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt32Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedInt32Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -183,4 +154,40 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedInt32Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="right" type="PackedInt32Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedInt32Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index b82ce79009..066bc05f54 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedInt64Array" version="4.0">
+<class name="PackedInt64Array" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of 64-bit integers.
</brief_description>
@@ -9,27 +9,29 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="PackedInt64Array" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedInt64Array">
<return type="PackedInt64Array" />
<description>
Constructs an empty [PackedInt64Array].
</description>
- </method>
- <method name="PackedInt64Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedInt64Array">
<return type="PackedInt64Array" />
<argument index="0" name="from" type="PackedInt64Array" />
<description>
Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array].
</description>
- </method>
- <method name="PackedInt64Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedInt64Array">
<return type="PackedInt64Array" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="int" />
@@ -87,40 +89,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedInt64Array" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedInt64Array" />
- <argument index="0" name="right" type="PackedInt64Array" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedInt64Array" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="int" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="int" />
@@ -128,7 +96,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -159,20 +127,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the array size.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedInt64Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedInt64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt64Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedInt64Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -183,4 +154,40 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedInt64Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedInt64Array" />
+ <argument index="0" name="right" type="PackedInt64Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedInt64Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 618123855f..821fc1ae95 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedScene" inherits="Resource" version="4.0">
+<class name="PackedScene" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An abstraction of a serialized scene.
</brief_description>
<description>
A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself.
- Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [code]owner[/code] property on [Node]).
+ Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [member Node.owner] property).
[b]Note:[/b] The node doesn't need to own itself.
[b]Example of loading a saved scene:[/b]
[codeblocks]
@@ -22,7 +22,7 @@
AddChild(scene);
[/csharp]
[/codeblocks]
- [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidDynamicBody2D[/code] ([code]body[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
+ [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidDynamicBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
[codeblocks]
[gdscript]
# Create the objects.
@@ -82,7 +82,7 @@
Returns [code]true[/code] if the scene file has nodes.
</description>
</method>
- <method name="get_state">
+ <method name="get_state" qualifiers="const">
<return type="SceneState" />
<description>
Returns the [code]SceneState[/code] representing the scene file contents.
@@ -104,7 +104,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;: PackedInt32Array(),&quot;editable_instances&quot;: [],&quot;names&quot;: PackedStringArray(),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [],&quot;nodes&quot;: PackedInt32Array(),&quot;variants&quot;: [],&quot;version&quot;: 2}">
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{ &quot;conn_count&quot;: 0, &quot;conns&quot;: PackedInt32Array(), &quot;editable_instances&quot;: [], &quot;names&quot;: PackedStringArray(), &quot;node_count&quot;: 0, &quot;node_paths&quot;: [], &quot;nodes&quot;: PackedInt32Array(), &quot;variants&quot;: [], &quot;version&quot;: 2 }">
A dictionary representation of the scene contents.
Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
</member>
@@ -121,5 +121,9 @@
If passed to [method instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
[b]Note:[/b] Only available in editor builds.
</constant>
+ <constant name="GEN_EDIT_STATE_MAIN_INHERITED" value="3" enum="GenEditState">
+ It's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one.
+ [b]Note:[/b] Only available in editor builds.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 353bbfb827..3cf43ecb28 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedStringArray" version="4.0">
+<class name="PackedStringArray" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of [String]s.
</brief_description>
@@ -9,27 +9,29 @@
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
- <methods>
- <method name="PackedStringArray" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedStringArray">
<return type="PackedStringArray" />
<description>
Constructs an empty [PackedStringArray].
</description>
- </method>
- <method name="PackedStringArray" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedStringArray">
<return type="PackedStringArray" />
<argument index="0" name="from" type="PackedStringArray" />
<description>
Constructs a [PackedStringArray] as a copy of the given [PackedStringArray].
</description>
- </method>
- <method name="PackedStringArray" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedStringArray">
<return type="PackedStringArray" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="String" />
@@ -87,40 +89,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedStringArray" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedStringArray" />
- <argument index="0" name="right" type="PackedStringArray" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedStringArray" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="String" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="String" />
@@ -128,7 +96,7 @@
Appends a string element at end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -159,20 +127,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedStringArray" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedStringArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedStringArray].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedStringArray" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -181,4 +152,40 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedStringArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedStringArray" />
+ <argument index="0" name="right" type="PackedStringArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedStringArray" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="String" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 7b7df221e7..9abc366702 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedVector2Array" version="4.0">
+<class name="PackedVector2Array" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of [Vector2]s.
</brief_description>
@@ -9,27 +9,29 @@
<tutorials>
<link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link>
</tutorials>
- <methods>
- <method name="PackedVector2Array" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedVector2Array">
<return type="PackedVector2Array" />
<description>
Constructs an empty [PackedVector2Array].
</description>
- </method>
- <method name="PackedVector2Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedVector2Array">
<return type="PackedVector2Array" />
<argument index="0" name="from" type="PackedVector2Array" />
<description>
Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array].
</description>
- </method>
- <method name="PackedVector2Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedVector2Array">
<return type="PackedVector2Array" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="Vector2" />
@@ -87,46 +89,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedVector2Array" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="PackedVector2Array" />
- <argument index="0" name="right" type="Transform2D" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedVector2Array" />
- <argument index="0" name="right" type="PackedVector2Array" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedVector2Array" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="Vector2" />
@@ -134,7 +96,7 @@
Inserts a [Vector2] at the end.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -165,20 +127,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedVector2Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector2Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedVector2Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -187,4 +152,46 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedVector2Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="right" type="Transform2D" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="right" type="PackedVector2Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedVector2Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Vector2" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index efbf2169fd..ff9fc6a757 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedVector3Array" version="4.0">
+<class name="PackedVector3Array" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A packed [Array] of [Vector3]s.
</brief_description>
@@ -8,27 +8,29 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="PackedVector3Array" qualifiers="constructor">
+ <constructors>
+ <constructor name="PackedVector3Array">
<return type="PackedVector3Array" />
<description>
Constructs an empty [PackedVector3Array].
</description>
- </method>
- <method name="PackedVector3Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedVector3Array">
<return type="PackedVector3Array" />
<argument index="0" name="from" type="PackedVector3Array" />
<description>
Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array].
</description>
- </method>
- <method name="PackedVector3Array" qualifiers="constructor">
+ </constructor>
+ <constructor name="PackedVector3Array">
<return type="PackedVector3Array" />
<argument index="0" name="from" type="Array" />
<description>
Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="append">
<return type="bool" />
<argument index="0" name="value" type="Vector3" />
@@ -86,46 +88,6 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedVector3Array" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="PackedVector3Array" />
- <argument index="0" name="right" type="Transform3D" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="PackedVector3Array" />
- <argument index="0" name="right" type="PackedVector3Array" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="PackedVector3Array" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="push_back">
<return type="bool" />
<argument index="0" name="value" type="Vector3" />
@@ -133,7 +95,7 @@
Inserts a [Vector3] at the end.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
@@ -164,20 +126,23 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedVector3Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedVector3Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector3Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedVector3Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
@@ -186,4 +151,46 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedVector3Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="PackedVector3Array" />
+ <argument index="0" name="right" type="Transform3D" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedVector3Array" />
+ <argument index="0" name="right" type="PackedVector3Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="PackedVector3Array" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Vector3" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index 7c02ccc250..40fa90e4da 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="RefCounted" version="4.0">
+<class name="PacketPeer" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Abstraction and base class for packet-based protocols.
</brief_description>
diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml
index 4d1c83afe7..ee45c42498 100644
--- a/doc/classes/PacketPeerDTLS.xml
+++ b/doc/classes/PacketPeerDTLS.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerDTLS" inherits="PacketPeer" version="4.0">
+<class name="PacketPeerDTLS" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
DTLS packet peer.
</brief_description>
diff --git a/doc/classes/PacketPeerExtension.xml b/doc/classes/PacketPeerExtension.xml
index f6b925eb30..7cf5ef3504 100644
--- a/doc/classes/PacketPeerExtension.xml
+++ b/doc/classes/PacketPeerExtension.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerExtension" inherits="PacketPeer" version="4.0">
+<class name="PacketPeerExtension" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml
index 1c5bec297c..7e6b79abec 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" version="4.0">
+<class name="PacketPeerStream" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 31640eb3d8..580bf60518 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" version="4.0">
+<class name="PacketPeerUDP" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
UDP packet peer.
</brief_description>
@@ -107,36 +107,36 @@
<description>
Waits for a packet to arrive on the bound address. See [method bind].
[b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this:
- [codeblocks]
- [gdscript]
- socket = PacketPeerUDP.new()
- # Server
- socket.set_dest_address("127.0.0.1", 789)
- socket.put_packet("Time to stop".to_ascii())
+ [codeblocks]
+ [gdscript]
+ socket = PacketPeerUDP.new()
+ # Server
+ socket.set_dest_address("127.0.0.1", 789)
+ socket.put_packet("Time to stop".to_ascii())
- # Client
- while socket.wait() == OK:
- var data = socket.get_packet().get_string_from_ascii()
- if data == "Time to stop":
- return
- [/gdscript]
- [csharp]
- var socket = new PacketPeerUDP();
- // Server
- socket.SetDestAddress("127.0.0.1", 789);
- socket.PutPacket("Time to stop".ToAscii());
+ # Client
+ while socket.wait() == OK:
+ var data = socket.get_packet().get_string_from_ascii()
+ if data == "Time to stop":
+ return
+ [/gdscript]
+ [csharp]
+ var socket = new PacketPeerUDP();
+ // Server
+ socket.SetDestAddress("127.0.0.1", 789);
+ socket.PutPacket("Time to stop".ToAscii());
- // Client
- while (socket.Wait() == OK)
- {
- string data = socket.GetPacket().GetStringFromASCII();
- if (data == "Time to stop")
- {
- return;
- }
- }
- [/csharp]
- [/codeblocks]
+ // Client
+ while (socket.Wait() == OK)
+ {
+ string data = socket.GetPacket().GetStringFromASCII();
+ if (data == "Time to stop")
+ {
+ return;
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
index 21ac7dfac1..da69431276 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" version="4.0">
+<class name="Panel" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Provides an opaque background for [Control] children.
</brief_description>
@@ -11,16 +11,6 @@
<link title="2D Finite State Machine Demo">https://godotengine.org/asset-library/asset/516</link>
<link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link>
</tutorials>
- <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" data_type="style" type="StyleBox">
The style of this [Panel].
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
index 95d038e2af..1bb26045d9 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" version="4.0">
+<class name="PanelContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Panel container type.
</brief_description>
@@ -10,7 +10,7 @@
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<members>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="0" />
</members>
<theme_items>
<theme_item name="panel" data_type="style" type="StyleBox">
diff --git a/doc/classes/PanoramaSkyMaterial.xml b/doc/classes/PanoramaSkyMaterial.xml
index 6707c03fac..21c7f29585 100644
--- a/doc/classes/PanoramaSkyMaterial.xml
+++ b/doc/classes/PanoramaSkyMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PanoramaSkyMaterial" inherits="Material" version="4.0">
+<class name="PanoramaSkyMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Material] used with [Sky] to draw a background texture.
</brief_description>
@@ -11,6 +11,9 @@
<tutorials>
</tutorials>
<members>
+ <member name="filter" type="bool" setter="set_filtering_enabled" getter="is_filtering_enabled" default="true">
+ A boolean value to determine if the background texture should be filtered or not.
+ </member>
<member name="panorama" type="Texture2D" setter="set_panorama" getter="get_panorama">
[Texture2D] to be applied to the [PanoramaSkyMaterial].
</member>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index 5670660d01..aef4c180b4 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" version="4.0">
+<class name="ParallaxBackground" inherits="CanvasLayer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node used to create a parallax scrolling background.
</brief_description>
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<members>
- <member name="layer" type="int" setter="set_layer" getter="get_layer" override="true" default="-100" />
+ <member name="layer" type="int" setter="set_layer" getter="get_layer" overrides="CanvasLayer" default="-100" />
<member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2(0, 0)">
The base position offset for all [ParallaxLayer] children.
</member>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 459518ab1c..7e7c2d11ec 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" version="4.0">
+<class name="ParallaxLayer" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 3b583f5c89..e05853e816 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParticlesMaterial" inherits="Material" version="4.0">
+<class name="ParticlesMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Particle properties for [GPUParticles3D] and [GPUParticles2D] nodes.
</brief_description>
<description>
ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [GPUParticles3D] and [GPUParticles2D] emitter nodes.
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.
+ Particle animation is available only in [GPUParticles2D]. To use it, attach a [CanvasItemMaterial], with [member CanvasItemMaterial.particles_animation] enabled, to the particles node.
</description>
<tutorials>
</tutorials>
@@ -15,14 +15,14 @@
<return type="float" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
- Return the maximum value range for the given prameter.
+ Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
- Return the minimum value range for the given parameter.
+ Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_param_texture" qualifiers="const">
@@ -83,13 +83,13 @@
Minimum angle.
</member>
<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].
+ Each particle's angular velocity (rotation speed) will vary along this [CurveTexture] over its lifetime.
</member>
<member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum angular velocity.
+ Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum angular velocity.
+ Minimum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation offset will vary along this [CurveTexture].
@@ -104,7 +104,8 @@
Each particle's animation speed will vary along this [CurveTexture].
</member>
<member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum particle animation speed.
+ Maximum particle animation speed. Animation speed of [code]1[/code] means that the particles will make full [code]0[/code] to [code]1[/code] offset cycle during lifetime, [code]2[/code] means [code]2[/code] cycles etc.
+ With animation speed greater than [code]1[/code], remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat.
</member>
<member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
Minimum particle animation speed.
@@ -113,7 +114,7 @@
True if the interaction with particle attractors is enabled.
</member>
<member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
- Collision bouncyness.
+ Collision bounciness.
</member>
<member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false">
True if collisions are enabled for this particle system.
@@ -127,8 +128,11 @@
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
</member>
+ <member name="color_initial_ramp" type="Texture2D" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
+ Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ </member>
<member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp">
- Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]).
+ Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]).
</member>
<member name="damping_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Damping will vary along this [CurveTexture].
@@ -195,7 +199,7 @@
Minimum initial velocity.
</member>
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
- Particle lifetime randomness ratio.
+ Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between [code]1.0[/code] and a random number less than one. For example a random ratio of [code]0.4[/code] would scale the original lifetime between [code]0.4-1.0[/code] of its original value.
</member>
<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].
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
index 297fe69986..383d9cd804 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" version="4.0">
+<class name="Path2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Contains a [Curve2D] path for [PathFollow2D] nodes to follow.
</brief_description>
diff --git a/doc/classes/Path3D.xml b/doc/classes/Path3D.xml
index ce5774acab..a1af722dcd 100644
--- a/doc/classes/Path3D.xml
+++ b/doc/classes/Path3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Path3D" inherits="Node3D" version="4.0">
+<class name="Path3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Contains a [Curve3D] path for [PathFollow3D] nodes to follow.
</brief_description>
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index 98106fd580..ae4a4b2886 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" version="4.0">
+<class name="PathFollow2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Point sampler for a [Path2D].
</brief_description>
diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml
index 781e861203..f9fab07be5 100644
--- a/doc/classes/PathFollow3D.xml
+++ b/doc/classes/PathFollow3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PathFollow3D" inherits="Node3D" version="4.0">
+<class name="PathFollow3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Point sampler for a [Path3D].
</brief_description>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index 6e905eace6..3b8e481519 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" version="4.0">
+<class name="Performance" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Exposes performance-related data.
</brief_description>
diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml
index 339739b267..738568ed03 100644
--- a/doc/classes/PhysicalBone2D.xml
+++ b/doc/classes/PhysicalBone2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicalBone2D" inherits="RigidDynamicBody2D" version="4.0">
+<class name="PhysicalBone2D" inherits="RigidDynamicBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A 2D node that can be used for physically aware bones in 2D.
</brief_description>
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
index 710e96239b..7e8cc91766 100644
--- a/doc/classes/PhysicalBone3D.xml
+++ b/doc/classes/PhysicalBone3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicalBone3D" inherits="PhysicsBody3D" version="4.0">
+<class name="PhysicalBone3D" inherits="PhysicsBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -7,6 +7,13 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_integrate_forces" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="state" type="PhysicsDirectBodyState3D" />
+ <description>
+ Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body.
+ </description>
+ </method>
<method name="apply_central_impulse">
<return type="void" />
<argument index="0" name="impulse" type="Vector3" />
@@ -37,8 +44,15 @@
</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 name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.0">
+ Damps the body's rotation. By default, the body will use the [b]Default Angular Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value.
+ See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
+ </member>
+ <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="PhysicalBone3D.DampMode" default="0">
+ Defines how [member angular_damp] is applied. See [enum DampMode] for possible values.
+ </member>
+ <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
+ The PhysicalBone3D's rotational velocity in [i]radians[/i] per second.
</member>
<member name="body_offset" type="Transform3D" setter="set_body_offset" getter="get_body_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
Sets the body's transform.
@@ -49,6 +63,9 @@
<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 awakened by an external force.
</member>
+ <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" default="1.0">
The body's friction, from [code]0[/code] (frictionless) to [code]1[/code] (max friction).
</member>
@@ -64,14 +81,27 @@
<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 name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.0">
+ Damps the body's movement. By default, the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value.
+ See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
+ </member>
+ <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="PhysicalBone3D.DampMode" default="0">
+ Defines how [member linear_damp] is applied. See [enum DampMode] for possible values.
+ </member>
+ <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
+ The body's linear velocity in units per second. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
The body's mass.
</member>
</members>
<constants>
+ <constant name="DAMP_MODE_COMBINE" value="0" enum="DampMode">
+ In this mode, the body's damping value is added to any value set in areas or the default value.
+ </constant>
+ <constant name="DAMP_MODE_REPLACE" value="1" enum="DampMode">
+ In this mode, the body's damping value replaces any value set in areas or the default value.
+ </constant>
<constant name="JOINT_TYPE_NONE" value="0" enum="JointType">
</constant>
<constant name="JOINT_TYPE_PIN" value="1" enum="JointType">
diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
index b90f52a70d..3e85074e41 100644
--- a/doc/classes/PhysicalSkyMaterial.xml
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicalSkyMaterial" inherits="Material" version="4.0">
+<class name="PhysicalSkyMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
[Sky] [Material] used for a physically based sky.
</brief_description>
@@ -17,14 +17,14 @@
<member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1">
Sets the exposure of the sky. Higher exposure values make the entire sky brighter.
</member>
- <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(1, 1, 1, 1)">
+ <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(0.1, 0.07, 0.034, 1)">
Modulates the [Color] on the bottom half of the sky to represent the ground.
</member>
<member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005">
Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon.
</member>
- <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.36, 0.56, 0.82, 1)">
- Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets.
+ <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.69, 0.729, 0.812, 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's passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards.
@@ -35,14 +35,14 @@
<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 name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color(0.3, 0.405, 0.6, 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.
+ Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere.
</member>
</members>
</class>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index e108ab6298..9cebd68d76 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" version="4.0">
+<class name="PhysicsBody2D" inherits="CollisionObject2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all objects affected by physics in 2D space.
</brief_description>
@@ -7,7 +7,7 @@
PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="add_collision_exception_with">
@@ -25,12 +25,12 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision2D" />
- <argument index="0" name="linear_velocity" type="Vector2" />
+ <argument index="0" name="distance" type="Vector2" />
<argument index="1" name="test_only" type="bool" default="false" />
<argument index="2" name="safe_margin" type="float" default="0.08" />
<description>
- Moves the body along the vector [code]linear_velocity[/code]. 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.
- The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
+ Moves the body along the vector [code]distance[/code]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
+ Returns a [KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion.
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
</description>
@@ -45,18 +45,18 @@
<method name="test_move">
<return type="bool" />
<argument index="0" name="from" type="Transform2D" />
- <argument index="1" name="linear_velocity" type="Vector2" />
+ <argument index="1" name="distance" type="Vector2" />
<argument index="2" name="collision" type="KinematicCollision2D" default="null" />
<argument index="3" name="safe_margin" type="float" default="0.08" />
<description>
- Checks for collisions without moving the body. 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.
- Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would occur.
- [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one).
+ Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
+ Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]distance[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
+ [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
</description>
</method>
</methods>
<members>
- <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" />
+ <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" overrides="CollisionObject2D" default="false" />
</members>
</class>
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index 8718c0caa2..843f813997 100644
--- a/doc/classes/PhysicsBody3D.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsBody3D" inherits="CollisionObject3D" version="4.0">
+<class name="PhysicsBody3D" inherits="CollisionObject3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all objects affected by physics in 3D space.
</brief_description>
@@ -7,7 +7,7 @@
PhysicsBody3D is an abstract base class for implementing a physics body. All *Body types inherit from it.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="add_collision_exception_with">
@@ -32,13 +32,13 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision3D" />
- <argument index="0" name="linear_velocity" type="Vector3" />
+ <argument index="0" name="distance" type="Vector3" />
<argument index="1" name="test_only" type="bool" default="false" />
<argument index="2" name="safe_margin" type="float" default="0.001" />
<argument index="3" name="max_collisions" type="int" default="1" />
<description>
- Moves the body along the vector [code]linear_velocity[/code]. 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.
- The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
+ Moves the body along the vector [code]distance[/code]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
+ The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision when stopped, or when touching another body along the motion.
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
[code]max_collisions[/code] allows to retrieve more than one collision result.
@@ -62,14 +62,14 @@
<method name="test_move">
<return type="bool" />
<argument index="0" name="from" type="Transform3D" />
- <argument index="1" name="linear_velocity" type="Vector3" />
+ <argument index="1" name="distance" type="Vector3" />
<argument index="2" name="collision" type="KinematicCollision3D" default="null" />
<argument index="3" name="safe_margin" type="float" default="0.001" />
<argument index="4" name="max_collisions" type="int" default="1" />
<description>
- Checks for collisions without moving the body. 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.
- Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would occur.
- [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one).
+ Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
+ Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]distance[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
+ [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
[code]max_collisions[/code] allows to retrieve more than one collision result.
</description>
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index aa189f17f4..783b0488d8 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectBodyState2D" inherits="Object" version="4.0">
+<class name="PhysicsDirectBodyState2D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Direct access object to a physics body in the [PhysicsServer2D].
</brief_description>
@@ -7,30 +7,40 @@
Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody2D._integrate_forces].
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
- <method name="add_central_force">
+ <method name="add_constant_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
+ <argument index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a constant directional force without affecting rotation.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="float" />
<description>
- Adds a constant rotational force.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = 0[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
@@ -38,6 +48,17 @@
<argument index="0" name="impulse" type="Vector2" />
<description>
Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -45,14 +66,38 @@
<argument index="0" name="impulse" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="float" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="impulse" type="float" />
<description>
- Applies a rotational impulse to the body.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ </description>
+ </method>
+ <method name="get_constant_force" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="get_constant_torque" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
</description>
</method>
<method name="get_contact_collider" qualifiers="const">
@@ -144,13 +189,32 @@
Calls the built-in force integration code.
</description>
</method>
+ <method name="set_constant_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="float" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </description>
+ </method>
</methods>
<members>
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity">
- The body's rotational velocity.
+ The body's rotational velocity in [i]radians[/i] per second.
</member>
<member name="center_of_mass" type="Vector2" setter="" getter="get_center_of_mass">
- The body's center of mass.
+ The body's center of mass position relative to the body's center in the global coordinate system.
+ </member>
+ <member name="center_of_mass_local" type="Vector2" setter="" getter="get_center_of_mass_local">
+ The body's center of mass position in the body's local coordinate system.
</member>
<member name="inverse_inertia" type="float" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
@@ -159,7 +223,7 @@
The inverse of the mass of the body.
</member>
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity">
- The body's linear velocity.
+ The body's linear velocity in pixels per second.
</member>
<member name="sleeping" type="bool" setter="set_sleep_state" getter="is_sleeping">
If [code]true[/code], this body is currently sleeping (not active).
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index 9bc5dbd6b9..16c53b0727 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectBodyState3D" inherits="Object" version="4.0">
+<class name="PhysicsDirectBodyState3D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Direct access object to a physics body in the [PhysicsServer3D].
</brief_description>
@@ -7,39 +7,58 @@
Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody3D._integrate_forces].
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
- <method name="add_central_force">
+ <method name="add_constant_central_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Adds a constant directional force without affecting rotation.
- This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code].
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="Vector3" />
<description>
- Adds a constant rotational force without affecting position.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = Vector3(0, 0, 0)[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
<return type="void" />
<argument index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Applies a single directional impulse without affecting rotation.
- This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code].
+ Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -47,14 +66,38 @@
<argument index="0" name="impulse" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="Vector3" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="impulse" type="Vector3" />
<description>
- Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ </description>
+ </method>
+ <method name="get_constant_force" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="get_constant_torque" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
</description>
</method>
<method name="get_contact_collider" qualifiers="const">
@@ -153,13 +196,32 @@
Calls the built-in force integration code.
</description>
</method>
+ <method name="set_constant_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="Vector3" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </description>
+ </method>
</methods>
<members>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity">
- The body's rotational velocity.
+ The body's rotational velocity in [i]radians[/i] per second.
</member>
<member name="center_of_mass" type="Vector3" setter="" getter="get_center_of_mass">
- The body's center of mass.
+ The body's center of mass position relative to the body's center in the global coordinate system.
+ </member>
+ <member name="center_of_mass_local" type="Vector3" setter="" getter="get_center_of_mass_local">
+ The body's center of mass position in the body's local coordinate system.
</member>
<member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
@@ -168,7 +230,7 @@
The inverse of the mass of the body.
</member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity">
- The body's linear velocity.
+ The body's linear velocity in units per second.
</member>
<member name="principal_inertia_axes" type="Basis" setter="" getter="get_principal_inertia_axes">
</member>
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index 887b382267..0b95243fe6 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectSpaceState2D" inherits="Object" version="4.0">
+<class name="PhysicsDirectSpaceState2D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Direct access object to a space in the [PhysicsServer2D].
</brief_description>
@@ -7,13 +7,13 @@
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 title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="cast_motion">
<return type="Array" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<description>
Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object.
Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned.
@@ -22,7 +22,7 @@
</method>
<method name="collide_shape">
<return type="Array" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<argument index="1" name="max_results" type="int" default="32" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
@@ -31,7 +31,7 @@
</method>
<method name="get_rest_info">
<return type="Dictionary" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead.
[b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields:
@@ -45,68 +45,38 @@
</method>
<method name="intersect_point">
<return type="Array" />
- <argument index="0" name="point" type="Vector2" />
+ <argument index="0" name="parameters" type="PhysicsPointQueryParameters2D" />
<argument index="1" name="max_results" type="int" default="32" />
- <argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="4294967295" />
- <argument index="4" name="collide_with_bodies" type="bool" default="true" />
- <argument index="5" name="collide_with_areas" type="bool" default="false" />
<description>
- Checks whether a point is inside any solid shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
+ Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters2D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- 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 detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
- [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
- </description>
- </method>
- <method name="intersect_point_on_canvas">
- <return type="Array" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="canvas_instance_id" type="int" />
- <argument index="2" name="max_results" type="int" default="32" />
- <argument index="3" name="exclude" type="Array" default="[]" />
- <argument index="4" name="collision_mask" type="int" default="4294967295" />
- <argument index="5" name="collide_with_bodies" type="bool" default="true" />
- <argument index="6" name="collide_with_areas" type="bool" default="false" />
- <description>
- Checks whether a point is inside any solid shape, in a specific canvas layer given by [code]canvas_instance_id[/code]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
- [code]collider[/code]: The colliding object.
- [code]collider_id[/code]: The colliding object's ID.
- [code]rid[/code]: The intersecting object's [RID].
- [code]shape[/code]: The shape index of the colliding shape.
- 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 detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
+ The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time.
[b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
</description>
</method>
<method name="intersect_ray">
<return type="Dictionary" />
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
- <argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="4294967295" />
- <argument index="4" name="collide_with_bodies" type="bool" default="true" />
- <argument index="5" name="collide_with_areas" type="bool" default="false" />
+ <argument index="0" name="parameters" type="PhysicsRayQueryParameters2D" />
<description>
- Intersects a ray in a given space. The returned object is a dictionary with the following fields:
+ Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters2D]. The returned object is a dictionary with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
- [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]normal[/code]: The object's surface normal at the intersection point, or [code]Vector2(0, 0)[/code] if the ray starts inside the shape and [member PhysicsRayQueryParameters2D.hit_from_inside] is [code]true[/code].
[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 detect (all layers by default), 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" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<argument index="1" name="max_results" type="int" default="32" />
<description>
- 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:
+ Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
[code]rid[/code]: The intersecting object's [RID].
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 8c37072f29..048baed345 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectSpaceState3D" inherits="Object" version="4.0">
+<class name="PhysicsDirectSpaceState3D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Direct access object to a space in the [PhysicsServer3D].
</brief_description>
@@ -7,14 +7,13 @@
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 title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="cast_motion">
<return type="Array" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" />
- <argument index="1" name="motion" type="Vector3" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<description>
Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object.
Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned.
@@ -23,16 +22,17 @@
</method>
<method name="collide_shape">
<return type="Array" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<argument index="1" name="max_results" type="int" default="32" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in [PhysicsShapeQueryParameters3D] object, second one is in the collided shape from the physics space.
+ [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object.
</description>
</method>
<method name="get_rest_info">
<return type="Dictionary" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
[code]collider_id[/code]: The colliding object's ID.
@@ -42,31 +42,39 @@
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
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.
+ </description>
+ </method>
+ <method name="intersect_point">
+ <return type="Array" />
+ <argument index="0" name="parameters" type="PhysicsPointQueryParameters3D" />
+ <argument index="1" name="max_results" type="int" default="32" />
+ <description>
+ Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters3D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time.
</description>
</method>
<method name="intersect_ray">
<return type="Dictionary" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
- <argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="4294967295" />
- <argument index="4" name="collide_with_bodies" type="bool" default="true" />
- <argument index="5" name="collide_with_areas" type="bool" default="false" />
+ <argument index="0" name="parameters" type="PhysicsRayQueryParameters3D" />
<description>
- Intersects a ray in a given space. The returned object is a dictionary with the following fields:
+ Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters3D]. The returned object is a dictionary with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
- [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]normal[/code]: The object's surface normal at the intersection point, or [code]Vector3(0, 0, 0)[/code] if the ray starts inside the shape and [member PhysicsRayQueryParameters3D.hit_from_inside] is [code]true[/code].
[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 detect (all layers by default), 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" />
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" />
+ <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<argument index="1" name="max_results" type="int" default="32" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
@@ -75,6 +83,7 @@
[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.
+ [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object.
</description>
</method>
</methods>
diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml
index b557b083c7..ab3770faaf 100644
--- a/doc/classes/PhysicsMaterial.xml
+++ b/doc/classes/PhysicsMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsMaterial" inherits="Resource" version="4.0">
+<class name="PhysicsMaterial" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A material for physics properties.
</brief_description>
diff --git a/doc/classes/PhysicsPointQueryParameters2D.xml b/doc/classes/PhysicsPointQueryParameters2D.xml
new file mode 100644
index 0000000000..c1005f02a3
--- /dev/null
+++ b/doc/classes/PhysicsPointQueryParameters2D.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsPointQueryParameters2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Parameters to be sent to a 2D point physics query.
+ </brief_description>
+ <description>
+ This class contains the position and other parameters to be used for [method PhysicsDirectSpaceState2D.intersect_point].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="canvas_instance_id" type="int" setter="set_canvas_instance_id" getter="get_canvas_instance_id" default="0">
+ If different from [code]0[/code], restricts the query to a specific canvas layer specified by its instance id. See [method Object.get_instance_id].
+ </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], 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_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ </member>
+ <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
+ The list of objects or object [RID]s that will be excluded from collisions.
+ </member>
+ <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
+ The position being queried for, in global coordinates.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PhysicsPointQueryParameters3D.xml b/doc/classes/PhysicsPointQueryParameters3D.xml
new file mode 100644
index 0000000000..bedf05ce99
--- /dev/null
+++ b/doc/classes/PhysicsPointQueryParameters3D.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsPointQueryParameters3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Parameters to be sent to a 3D point physics query.
+ </brief_description>
+ <description>
+ This class contains the position and other parameters to be used for [method PhysicsDirectSpaceState3D.intersect_point].
+ </description>
+ <tutorials>
+ </tutorials>
+ <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="4294967295">
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ </member>
+ <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
+ The list of objects or object [RID]s that will be excluded from collisions.
+ </member>
+ <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
+ The position being queried for, in global coordinates.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PhysicsRayQueryParameters2D.xml b/doc/classes/PhysicsRayQueryParameters2D.xml
new file mode 100644
index 0000000000..36933ef9a2
--- /dev/null
+++ b/doc/classes/PhysicsRayQueryParameters2D.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsRayQueryParameters2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Parameters to be sent to a 2D ray physics query.
+ </brief_description>
+ <description>
+ This class contains the ray position and other parameters to be used for [method PhysicsDirectSpaceState2D.intersect_ray].
+ </description>
+ <tutorials>
+ </tutorials>
+ <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_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ </member>
+ <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
+ The list of objects or object [RID]s that will be excluded from collisions.
+ </member>
+ <member name="from" type="Vector2" setter="set_from" getter="get_from" default="Vector2(0, 0)">
+ The starting point of the ray being queried for, in global coordinates.
+ </member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the query will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector2(0, 0)[/code]. Does not affect concave polygon shapes.
+ </member>
+ <member name="to" type="Vector2" setter="set_to" getter="get_to" default="Vector2(0, 0)">
+ The ending point of the ray being queried for, in global coordinates.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PhysicsRayQueryParameters3D.xml b/doc/classes/PhysicsRayQueryParameters3D.xml
new file mode 100644
index 0000000000..4244ec785f
--- /dev/null
+++ b/doc/classes/PhysicsRayQueryParameters3D.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsRayQueryParameters3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Parameters to be sent to a 3D ray physics query.
+ </brief_description>
+ <description>
+ This class contains the ray position and other parameters to be used for [method PhysicsDirectSpaceState3D.intersect_ray].
+ </description>
+ <tutorials>
+ </tutorials>
+ <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="4294967295">
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ </member>
+ <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
+ The list of objects or object [RID]s that will be excluded from collisions.
+ </member>
+ <member name="from" type="Vector3" setter="set_from" getter="get_from" default="Vector3(0, 0, 0)">
+ The starting point of the ray being queried for, in global coordinates.
+ </member>
+ <member name="hit_back_faces" type="bool" setter="set_hit_back_faces" getter="is_hit_back_faces_enabled" default="true">
+ If [code]true[/code], the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes.
+ </member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the query will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector3(0, 0, 0)[/code]. Does not affect concave polygon shapes or heightmap shapes.
+ </member>
+ <member name="to" type="Vector3" setter="set_to" getter="get_to" default="Vector3(0, 0, 0)">
+ The ending point of the ray being queried for, in global coordinates.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index d55feff829..1413a3ec11 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsServer2D" inherits="Object" version="4.0">
+<class name="PhysicsServer2D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server interface for low-level 2D physics access.
</brief_description>
@@ -98,13 +98,6 @@
Returns the space assigned to the area.
</description>
</method>
- <method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode" />
- <argument index="0" name="area" type="RID" />
- <description>
- Returns the space override mode for the area.
- </description>
- </method>
<method name="area_get_transform" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="area" type="RID" />
@@ -123,8 +116,7 @@
<method name="area_set_area_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
</description>
</method>
@@ -147,8 +139,7 @@
<method name="area_set_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
@@ -209,14 +200,6 @@
Assigns a space to the area.
</description>
</method>
- <method name="area_set_space_override_mode">
- <return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode" />
- <description>
- Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes.
- </description>
- </method>
<method name="area_set_transform">
<return type="void" />
<argument index="0" name="area" type="RID" />
@@ -225,28 +208,39 @@
Sets the transform matrix for an area.
</description>
</method>
- <method name="body_add_central_force">
+ <method name="body_add_collision_exception">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector2" />
+ <argument index="1" name="excepted_body" type="RID" />
<description>
+ Adds a body to the list of bodies exempt from collisions.
</description>
</method>
- <method name="body_add_collision_exception">
+ <method name="body_add_constant_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <argument index="1" name="force" type="Vector2" />
<description>
- Adds a body to the list of bodies exempt from collisions.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector2(0, 0))[/code].
+ This is equivalent to using [method body_add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="body_add_force">
+ <method name="body_add_constant_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="force" type="Vector2" />
<argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector2(0, 0))[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_add_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="float" />
+ <description>
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]body_set_constant_torque(body, 0)[/code].
</description>
</method>
<method name="body_add_shape">
@@ -259,11 +253,13 @@
Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
- <method name="body_add_torque">
+ <method name="body_apply_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="float" />
+ <argument index="1" name="force" type="Vector2" />
<description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method body_apply_force] at the body's center of mass.
</description>
</method>
<method name="body_apply_central_impulse">
@@ -271,6 +267,19 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="Vector2" />
<description>
+ Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method body_apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="body_apply_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector2" />
+ <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_impulse">
@@ -279,7 +288,17 @@
<argument index="1" name="impulse" type="Vector2" />
<argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_apply_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="float" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="body_apply_torque_impulse">
@@ -287,6 +306,8 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="float" />
<description>
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="body_attach_canvas_instance_id">
@@ -337,6 +358,22 @@
Returns the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_get_constant_force" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_get_constant_torque" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
+ </description>
+ </method>
<method name="body_get_continuous_collision_detection_mode" qualifiers="const">
<return type="int" enum="PhysicsServer2D.CCDMode" />
<argument index="0" name="body" type="RID" />
@@ -348,7 +385,7 @@
<return type="PhysicsDirectBodyState2D" />
<argument index="0" name="body" type="RID" />
<description>
- Returns the [PhysicsDirectBodyState2D] of the body.
+ Returns the [PhysicsDirectBodyState2D] of the body. Returns [code]null[/code] if the body is destroyed or removed from the physics space.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
@@ -472,6 +509,24 @@
Sets the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_set_constant_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector2" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="float" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
+ </description>
+ </method>
<method name="body_set_continuous_collision_detection_mode">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -728,13 +783,6 @@
Activates or deactivates the 2D physics engine.
</description>
</method>
- <method name="set_collision_iterations">
- <return type="void" />
- <argument index="0" name="iterations" type="int" />
- <description>
- Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code].
- </description>
- </method>
<method name="shape_get_data" qualifiers="const">
<return type="Variant" />
<argument index="0" name="shape" type="RID" />
@@ -813,23 +861,29 @@
Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
</constant>
<constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1" enum="SpaceParameter">
- Constant to set/get the maximum distance a shape can be from another before they are considered separated.
+ Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded.
</constant>
- <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
</constant>
- <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_DEFAULT_BIAS" value="3" enum="SpaceParameter">
+ Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision.
+ </constant>
+ <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="5" enum="SpaceParameter">
Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="6" enum="SpaceParameter">
Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
</constant>
- <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
+ <constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="8" enum="SpaceParameter">
+ Constant to set/get the number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance.
+ </constant>
<constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
@@ -857,28 +911,37 @@
<constant name="SHAPE_CUSTOM" value="8" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
- <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_OVERRIDE_MODE" value="0" enum="AreaParameter">
+ Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY" value="1" enum="AreaParameter">
Constant to set/get gravity strength in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_VECTOR" value="2" enum="AreaParameter">
Constant to set/get gravity vector/center in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="3" enum="AreaParameter">
Constant to set/get whether the gravity vector of an area is a direction, or a center point.
</constant>
- <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="4" enum="AreaParameter">
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">
+ <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="5" enum="AreaParameter">
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.
+ <constant name="AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE" value="6" enum="AreaParameter">
+ Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_LINEAR_DAMP" value="7" enum="AreaParameter">
+ Constant to set/get the linear damping factor of an area.
+ </constant>
+ <constant name="AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE" value="8" enum="AreaParameter">
+ Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
</constant>
- <constant name="AREA_PARAM_ANGULAR_DAMP" value="6" enum="AreaParameter">
- Constant to set/get the angular dampening factor of an area.
+ <constant name="AREA_PARAM_ANGULAR_DAMP" value="9" enum="AreaParameter">
+ Constant to set/get the angular damping factor of an area.
</constant>
- <constant name="AREA_PARAM_PRIORITY" value="7" enum="AreaParameter">
+ <constant name="AREA_PARAM_PRIORITY" value="10" enum="AreaParameter">
Constant to set/get the priority (order of processing) of an area.
</constant>
<constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0" enum="AreaSpaceOverrideMode">
@@ -921,20 +984,32 @@
Constant to set/get a body's inertia.
</constant>
<constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter">
- Constant to set/get a body's center of mass.
+ Constant to set/get a body's center of mass position in the body's local coordinate system.
</constant>
<constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter">
+ <constant name="BODY_PARAM_LINEAR_DAMP_MODE" value="6" enum="BodyParameter">
+ Constant to set/get a body's linear dampening mode. See [enum BodyDampMode] for possible values.
+ </constant>
+ <constant name="BODY_PARAM_ANGULAR_DAMP_MODE" value="7" enum="BodyParameter">
+ Constant to set/get a body's angular dampening mode. See [enum BodyDampMode] for possible values.
+ </constant>
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="8" enum="BodyParameter">
Constant to set/get a body's linear dampening factor.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="9" enum="BodyParameter">
Constant to set/get a body's angular dampening factor.
</constant>
- <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter">
+ <constant name="BODY_PARAM_MAX" value="10" enum="BodyParameter">
Represents the size of the [enum BodyParameter] enum.
</constant>
+ <constant name="BODY_DAMP_MODE_COMBINE" value="0" enum="BodyDampMode">
+ The body's damping value is added to any value set in areas or the default value.
+ </constant>
+ <constant name="BODY_DAMP_MODE_REPLACE" value="1" enum="BodyDampMode">
+ The body's damping value replaces any value set in areas or the default value.
+ </constant>
<constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState">
Constant to set/get the current transform matrix of the body.
</constant>
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 0e32d1defa..7a9a0ac7c5 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsServer3D" inherits="Object" version="4.0">
+<class name="PhysicsServer3D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server interface for low-level physics access.
</brief_description>
@@ -85,13 +85,6 @@
Returns the space assigned to the area.
</description>
</method>
- <method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode" />
- <argument index="0" name="area" type="RID" />
- <description>
- Returns the space override mode for the area.
- </description>
- </method>
<method name="area_get_transform" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="area" type="RID" />
@@ -110,8 +103,7 @@
<method name="area_set_area_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
</description>
</method>
@@ -134,8 +126,7 @@
<method name="area_set_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
@@ -203,14 +194,6 @@
Assigns a space to the area.
</description>
</method>
- <method name="area_set_space_override_mode">
- <return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode" />
- <description>
- Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants.
- </description>
- </method>
<method name="area_set_transform">
<return type="void" />
<argument index="0" name="area" type="RID" />
@@ -219,27 +202,39 @@
Sets the transform matrix for an area.
</description>
</method>
- <method name="body_add_central_force">
+ <method name="body_add_collision_exception">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <argument index="1" name="excepted_body" type="RID" />
<description>
+ Adds a body to the list of bodies exempt from collisions.
</description>
</method>
- <method name="body_add_collision_exception">
+ <method name="body_add_constant_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <argument index="1" name="force" type="Vector3" />
<description>
- Adds a body to the list of bodies exempt from collisions.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector3(0, 0, 0))[/code].
+ This is equivalent to using [method body_add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="body_add_force">
+ <method name="body_add_constant_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="force" type="Vector3" />
<argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector3(0, 0, 0))[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_add_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="Vector3" />
+ <description>
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]body_set_constant_torque(body, Vector3(0, 0, 0))[/code].
</description>
</method>
<method name="body_add_shape">
@@ -252,11 +247,13 @@
Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
- <method name="body_add_torque">
+ <method name="body_apply_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <argument index="1" name="force" type="Vector3" />
<description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method body_apply_force] at the body's center of mass.
</description>
</method>
<method name="body_apply_central_impulse">
@@ -264,6 +261,19 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="Vector3" />
<description>
+ Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method body_apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="body_apply_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector3" />
+ <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_impulse">
@@ -272,7 +282,17 @@
<argument index="1" name="impulse" type="Vector3" />
<argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code].
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_apply_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="Vector3" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="body_apply_torque_impulse">
@@ -280,7 +300,8 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="Vector3" />
<description>
- Gives the body a push to rotate it.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="body_attach_object_instance_id">
@@ -315,14 +336,29 @@
<argument index="0" name="body" type="RID" />
<description>
Returns the physics layer or layers a body can collide with.
--
+ </description>
+ </method>
+ <method name="body_get_constant_force" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_get_constant_torque" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
</description>
</method>
<method name="body_get_direct_state">
<return type="PhysicsDirectBodyState3D" />
<argument index="0" name="body" type="RID" />
<description>
- Returns the [PhysicsDirectBodyState3D] of the body.
+ Returns the [PhysicsDirectBodyState3D] of the body. Returns [code]null[/code] if the body is destroyed or removed from the physics space.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
@@ -469,6 +505,24 @@
Sets the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_set_constant_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector3" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="Vector3" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
+ </description>
+ </method>
<method name="body_set_enable_continuous_collision_detection">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -863,14 +917,6 @@
Activates or deactivates the 3D physics engine.
</description>
</method>
- <method name="set_collision_iterations">
- <return type="void" />
- <argument index="0" name="iterations" type="int" />
- <description>
- Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code].
- [b]Note:[/b] Only has an effect when using the default GodotPhysics engine, not the Bullet physics engine.
- </description>
- </method>
<method name="shape_get_data" qualifiers="const">
<return type="Variant" />
<argument index="0" name="shape" type="RID" />
@@ -1169,16 +1215,16 @@
Maximum acceleration for the motor at the axes.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT" value="0" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is linear motion possible within the given limits.
+ If set, linear motion is possible within the given limits.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT" value="1" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is rotational motion possible.
+ If set, rotational motion is possible.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_MOTOR" value="4" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is a rotational motor across these axes.
+ If set, there is a rotational motor across these axes.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is a linear motor on this axis that targets a specific velocity.
+ If set, there is a linear motor on this axis that targets a specific velocity.
</constant>
<constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
The [Shape3D] is a [WorldBoundaryShape3D].
@@ -1213,40 +1259,49 @@
<constant name="SHAPE_CUSTOM" value="10" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
- <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_OVERRIDE_MODE" value="0" enum="AreaParameter">
+ Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY" value="1" enum="AreaParameter">
Constant to set/get gravity strength in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_VECTOR" value="2" enum="AreaParameter">
Constant to set/get gravity vector/center in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="3" enum="AreaParameter">
Constant to set/get whether the gravity vector of an area is a direction, or a center point.
</constant>
- <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="4" enum="AreaParameter">
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">
+ <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="5" enum="AreaParameter">
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.
+ <constant name="AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE" value="6" enum="AreaParameter">
+ Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_LINEAR_DAMP" value="7" enum="AreaParameter">
+ Constant to set/get the linear damping factor of an area.
+ </constant>
+ <constant name="AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE" value="8" enum="AreaParameter">
+ Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
</constant>
- <constant name="AREA_PARAM_ANGULAR_DAMP" value="6" enum="AreaParameter">
- Constant to set/get the angular dampening factor of an area.
+ <constant name="AREA_PARAM_ANGULAR_DAMP" value="9" enum="AreaParameter">
+ Constant to set/get the angular damping factor of an area.
</constant>
- <constant name="AREA_PARAM_PRIORITY" value="7" enum="AreaParameter">
+ <constant name="AREA_PARAM_PRIORITY" value="10" enum="AreaParameter">
Constant to set/get the priority (order of processing) of an area.
</constant>
- <constant name="AREA_PARAM_WIND_FORCE_MAGNITUDE" value="8" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_FORCE_MAGNITUDE" value="11" enum="AreaParameter">
Constant to set/get the magnitude of area-specific wind force.
</constant>
- <constant name="AREA_PARAM_WIND_SOURCE" value="9" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_SOURCE" value="12" enum="AreaParameter">
Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows.
</constant>
- <constant name="AREA_PARAM_WIND_DIRECTION" value="10" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_DIRECTION" value="13" enum="AreaParameter">
Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows.
</constant>
- <constant name="AREA_PARAM_WIND_ATTENUATION_FACTOR" value="11" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_ATTENUATION_FACTOR" value="14" enum="AreaParameter">
Constant to set/get the exponential rate at which wind force decreases with distance from its origin.
</constant>
<constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0" enum="AreaSpaceOverrideMode">
@@ -1289,20 +1344,32 @@
Constant to set/get a body's inertia.
</constant>
<constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter">
- Constant to set/get a body's center of mass.
+ Constant to set/get a body's center of mass position in the body's local coordinate system.
</constant>
<constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter">
+ <constant name="BODY_PARAM_LINEAR_DAMP_MODE" value="6" enum="BodyParameter">
+ Constant to set/get a body's linear dampening mode. See [enum BodyDampMode] for possible values.
+ </constant>
+ <constant name="BODY_PARAM_ANGULAR_DAMP_MODE" value="7" enum="BodyParameter">
+ Constant to set/get a body's angular dampening mode. See [enum BodyDampMode] for possible values.
+ </constant>
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="8" enum="BodyParameter">
Constant to set/get a body's linear dampening factor.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="9" enum="BodyParameter">
Constant to set/get a body's angular dampening factor.
</constant>
- <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter">
+ <constant name="BODY_PARAM_MAX" value="10" enum="BodyParameter">
Represents the size of the [enum BodyParameter] enum.
</constant>
+ <constant name="BODY_DAMP_MODE_COMBINE" value="0" enum="BodyDampMode">
+ The body's damping value is added to any value set in areas or the default value.
+ </constant>
+ <constant name="BODY_DAMP_MODE_REPLACE" value="1" enum="BodyDampMode">
+ The body's damping value replaces any value set in areas or the default value.
+ </constant>
<constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState">
Constant to set/get the current transform matrix of the body.
</constant>
@@ -1337,24 +1404,25 @@
Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
</constant>
<constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1" enum="SpaceParameter">
- Constant to set/get the maximum distance a shape can be from another before they are considered separated.
+ Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded.
</constant>
- <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
</constant>
- <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_DEFAULT_BIAS" value="3" enum="SpaceParameter">
+ Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision.
+ </constant>
+ <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="5" enum="SpaceParameter">
Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="6" enum="SpaceParameter">
Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
</constant>
- <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO" value="6" enum="SpaceParameter">
- </constant>
- <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter">
- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
+ <constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="7" enum="SpaceParameter">
+ Constant to set/get the number of solver iterations for contacts and constraints. The greater the amount of iterations, the more accurate the collisions and constraints will be. However, a greater amount of iterations requires more CPU power, which can decrease performance.
</constant>
<constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis">
</constant>
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 6035b662ea..3fbb0c0ed0 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters2D" inherits="RefCounted" version="4.0">
+<class name="PhysicsShapeQueryParameters2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Parameters to be sent to a 2D shape physics query.
</brief_description>
<description>
- This class contains the shape and other parameters for 2D intersection/collision queries.
+ This class contains the shape and other parameters for [PhysicsDirectSpaceState2D] intersection/collision queries.
</description>
<tutorials>
</tutorials>
@@ -16,7 +16,7 @@
If [code]true[/code], the query will take [PhysicsBody2D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index 1a289ff9d0..64100f847b 100644
--- a/doc/classes/PhysicsShapeQueryParameters3D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters3D" inherits="RefCounted" version="4.0">
+<class name="PhysicsShapeQueryParameters3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Parameters to be sent to a 3D shape physics query.
</brief_description>
<description>
- This class contains the shape and other parameters for 3D intersection/collision queries.
+ This class contains the shape and other parameters for [PhysicsDirectSpaceState3D] intersection/collision queries.
</description>
<tutorials>
</tutorials>
@@ -16,7 +16,7 @@
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="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
@@ -24,6 +24,9 @@
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
The collision margin for the shape.
</member>
+ <member name="motion" type="Vector3" setter="set_motion" getter="get_motion" default="Vector3(0, 0, 0)">
+ The motion of the shape being queried for.
+ </member>
<member name="shape" type="Resource" setter="set_shape" getter="get_shape">
The [Shape3D] that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over [member shape_rid].
</member>
diff --git a/doc/classes/PhysicsTestMotionParameters2D.xml b/doc/classes/PhysicsTestMotionParameters2D.xml
index 46c1827b97..c22a49edf7 100644
--- a/doc/classes/PhysicsTestMotionParameters2D.xml
+++ b/doc/classes/PhysicsTestMotionParameters2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsTestMotionParameters2D" inherits="RefCounted" version="4.0">
+<class name="PhysicsTestMotionParameters2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Parameters to be sent to a 2D body motion test.
</brief_description>
diff --git a/doc/classes/PhysicsTestMotionParameters3D.xml b/doc/classes/PhysicsTestMotionParameters3D.xml
index d66aee3ae6..4ff07de7aa 100644
--- a/doc/classes/PhysicsTestMotionParameters3D.xml
+++ b/doc/classes/PhysicsTestMotionParameters3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsTestMotionParameters3D" inherits="RefCounted" version="4.0">
+<class name="PhysicsTestMotionParameters3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Parameters to be sent to a 3D body motion test.
</brief_description>
diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index 355365cf25..f3e4554756 100644
--- a/doc/classes/PhysicsTestMotionResult2D.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsTestMotionResult2D" inherits="RefCounted" version="4.0">
+<class name="PhysicsTestMotionResult2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Result from a 2D body motion test.
</brief_description>
@@ -12,55 +12,55 @@
<method name="get_collider" qualifiers="const">
<return type="Object" />
<description>
- Returns the colliding body's attached [Object], if a collision occured.
+ Returns the colliding body's attached [Object], if a collision occurred.
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
<description>
- Returns the unique instance ID of the colliding body's attached [Object], if a collision occured. See [method Object.get_instance_id].
+ Returns the unique instance ID of the colliding body's attached [Object], if a collision occurred. See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
<description>
- Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occured.
+ Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occurred.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<description>
- Returns the colliding body's shape index, if a collision occured. See [CollisionObject2D].
+ Returns the colliding body's shape index, if a collision occurred. See [CollisionObject2D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the colliding body's velocity, if a collision occured.
+ Returns the colliding body's velocity, if a collision occurred.
</description>
</method>
<method name="get_collision_depth" qualifiers="const">
<return type="float" />
<description>
- Returns the length of overlap along the collision normal, if a collision occured.
+ Returns the length of overlap along the collision normal, if a collision occurred.
</description>
</method>
<method name="get_collision_local_shape" qualifiers="const">
<return type="int" />
<description>
- Returns the moving object's colliding shape, if a collision occured.
+ Returns the moving object's colliding shape, if a collision occurred.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the colliding body's shape's normal at the point of collision, if a collision occured.
+ Returns the colliding body's shape's normal at the point of collision, if a collision occurred.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the point of collision in global coordinates, if a collision occured.
+ Returns the point of collision in global coordinates, if a collision occurred.
</description>
</method>
<method name="get_collision_safe_fraction" qualifiers="const">
@@ -72,7 +72,7 @@
<method name="get_collision_unsafe_fraction" qualifiers="const">
<return type="float" />
<description>
- Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
+ Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code].
</description>
</method>
<method name="get_remainder" qualifiers="const">
diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml
index 282c140568..e347a350c2 100644
--- a/doc/classes/PhysicsTestMotionResult3D.xml
+++ b/doc/classes/PhysicsTestMotionResult3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsTestMotionResult3D" inherits="RefCounted" version="4.0">
+<class name="PhysicsTestMotionResult3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Result from a 3D body motion test.
</brief_description>
@@ -13,35 +13,35 @@
<return type="Object" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured. See [method Object.get_instance_id].
+ Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occured. See [CollisionObject3D].
+ Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See [CollisionObject3D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_count" qualifiers="const">
@@ -54,28 +54,28 @@
<return type="float" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occured.
+ Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_local_shape" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occured.
+ Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occured.
+ Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_safe_fraction" qualifiers="const">
@@ -87,7 +87,7 @@
<method name="get_collision_unsafe_fraction" qualifiers="const">
<return type="float" />
<description>
- Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
+ Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code].
</description>
</method>
<method name="get_remainder" qualifiers="const">
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
index d5890fe912..61399cf7b1 100644
--- a/doc/classes/PinJoint2D.xml
+++ b/doc/classes/PinJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint2D" inherits="Joint2D" version="4.0">
+<class name="PinJoint2D" inherits="Joint2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Pin joint for 2D shapes.
</brief_description>
diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml
index 84b60c0d8c..013a18b92c 100644
--- a/doc/classes/PinJoint3D.xml
+++ b/doc/classes/PinJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint3D" inherits="Joint3D" version="4.0">
+<class name="PinJoint3D" inherits="Joint3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Pin joint for 3D PhysicsBodies.
</brief_description>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index f7a68e6a24..f037b0bf1e 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" version="4.0">
+<class name="Plane" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plane in hessian form.
</brief_description>
@@ -7,23 +7,23 @@
Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
</tutorials>
- <methods>
- <method name="Plane" qualifiers="constructor">
+ <constructors>
+ <constructor name="Plane">
<return type="Plane" />
<description>
Constructs a default-initialized [Plane] with all components set to [code]0[/code].
</description>
- </method>
- <method name="Plane" qualifiers="constructor">
+ </constructor>
+ <constructor name="Plane">
<return type="Plane" />
<argument index="0" name="from" type="Plane" />
<description>
Constructs a [Plane] as a copy of the given [Plane].
</description>
- </method>
- <method name="Plane" qualifiers="constructor">
+ </constructor>
+ <constructor name="Plane">
<return type="Plane" />
<argument index="0" name="a" type="float" />
<argument index="1" name="b" type="float" />
@@ -32,31 +32,31 @@
<description>
Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin.
</description>
- </method>
- <method name="Plane" qualifiers="constructor">
+ </constructor>
+ <constructor name="Plane">
<return type="Plane" />
<argument index="0" name="normal" type="Vector3" />
- <argument index="1" name="point" type="Vector3" />
<description>
- Creates a plane from the normal vector and a point in the plane.
+ Creates a plane from the normal vector. The plane will intersect the origin.
</description>
- </method>
- <method name="Plane" qualifiers="constructor">
+ </constructor>
+ <constructor name="Plane">
<return type="Plane" />
<argument index="0" name="normal" type="Vector3" />
<argument index="1" name="d" type="float" />
<description>
- Creates a plane from the normal vector and the plane's distance to the origin.
+ Creates a plane from the normal vector and the plane's distance from the origin.
</description>
- </method>
- <method name="Plane" qualifiers="constructor">
+ </constructor>
+ <constructor name="Plane">
<return type="Plane" />
<argument index="0" name="normal" type="Vector3" />
+ <argument index="1" name="point" type="Vector3" />
<description>
- Creates a plane from the normal vector. The plane will intersect the origin.
+ Creates a plane from the normal vector and a point on the plane.
</description>
- </method>
- <method name="Plane" qualifiers="constructor">
+ </constructor>
+ <constructor name="Plane">
<return type="Plane" />
<argument index="0" name="point1" type="Vector3" />
<argument index="1" name="point2" type="Vector3" />
@@ -64,7 +64,9 @@
<description>
Creates a plane from the three points, given in clockwise order.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="center" qualifiers="const">
<return type="Vector3" />
<description>
@@ -130,38 +132,6 @@
Returns a copy of the plane, normalized.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Plane" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Plane" />
- <description>
- </description>
- </method>
- <method name="operator unary+" qualifiers="operator">
- <return type="Plane" />
- <description>
- </description>
- </method>
- <method name="operator unary-" qualifiers="operator">
- <return type="Plane" />
- <description>
- </description>
- </method>
<method name="project" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="point" type="Vector3" />
@@ -200,4 +170,44 @@
A plane that extends in the X and Y axes (normal vector points +Z).
</constant>
</constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Plane" />
+ <description>
+ Returns [code]true[/code] if the planes are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Plane" />
+ <description>
+ Returns [code]true[/code] if the planes are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator unary+">
+ <return type="Plane" />
+ <description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Plane" />
+ <description>
+ Returns the negative value of the [Plane]. This is the same as writing [code]Plane(-p.normal, -p.d)[/code]. This operation flips the direction of the normal vector and also flips the distance value, resulting in a Plane that is in the same place, but facing the opposite direction.
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index ff0385dbdb..6b3a7ed548 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" version="4.0">
+<class name="PlaneMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class representing a planar [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/PointLight2D.xml b/doc/classes/PointLight2D.xml
index ec809ed0a8..89cabbd428 100644
--- a/doc/classes/PointLight2D.xml
+++ b/doc/classes/PointLight2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PointLight2D" inherits="Light2D" version="4.0">
+<class name="PointLight2D" inherits="Light2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PointMesh.xml b/doc/classes/PointMesh.xml
index 7d1fa6ac35..6fdb269f1b 100644
--- a/doc/classes/PointMesh.xml
+++ b/doc/classes/PointMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PointMesh" inherits="PrimitiveMesh" version="4.0">
+<class name="PointMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Mesh with a single Point primitive.
</brief_description>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index cbffd9e554..5f75ac6c50 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" version="4.0">
+<class name="Polygon2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A 2D polygon.
</brief_description>
diff --git a/doc/classes/PolygonOccluder3D.xml b/doc/classes/PolygonOccluder3D.xml
new file mode 100644
index 0000000000..716c6aaf54
--- /dev/null
+++ b/doc/classes/PolygonOccluder3D.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PolygonOccluder3D" inherits="Occluder3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Flat 2D polygon shape for use with occlusion culling in [OccluderInstance3D].
+ </brief_description>
+ <description>
+ [PolygonOccluder3D] stores a polygon shape that can be used by the engine's occlusion culling system. When an [OccluderInstance3D] with a [PolygonOccluder3D] is selected in the editor, an editor will appear at the top of the 3D viewport so you can add/remove points. All points must be placed on the same 2D plane, which means it is not possible to create arbitrary 3D shapes with a single [PolygonOccluder3D]. To use arbitrary 3D shapes as occluders, use [ArrayOccluder3D] or [OccluderInstance3D]'s baking feature instead.
+ See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
+ The polygon to use for occlusion culling. The polygon can be convex or concave, but it should have as few points as possible to maximize performance.
+ The polygon must [i]not[/i] have intersecting lines. Otherwise, triangulation will fail (with an error message printed).
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index 945849e4df..dbe9978ef5 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" version="4.0">
+<class name="PolygonPathFinder" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index a47f72b2b6..3fcf0a9b8f 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -1,27 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Popup" inherits="Window" version="4.0">
+<class name="Popup" inherits="Window" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Base container control for popups and dialogs.
+ Popup is a base window container for popup-like subwindows.
</brief_description>
<description>
- Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
+ Popup is a base window container for popup-like subwindows. It's a modal by default (see [member popup_window]) and has helpers for custom popup behavior.
</description>
<tutorials>
</tutorials>
<members>
- <member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
- <member name="close_on_parent_focus" type="bool" setter="set_close_on_parent_focus" getter="get_close_on_parent_focus" default="true">
- If [code]true[/code], the [Popup] will close when its parent is focused.
- </member>
- <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" />
+ <member name="borderless" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
+ <member name="popup_window" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
+ <member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />
+ <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible" overrides="Window" default="false" />
+ <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" overrides="Window" default="true" />
</members>
<signals>
<signal name="popup_hide">
<description>
- Emitted when a popup is hidden.
+ Emitted when the popup is hidden.
</description>
</signal>
</signals>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 2208c12e56..4bcfc3c726 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupMenu" inherits="Popup" version="4.0">
+<class name="PopupMenu" inherits="Popup" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
PopupMenu displays a list of options.
</brief_description>
<description>
- [PopupMenu] is a [Control] that displays a list of options. They are popular in toolbars or context menus.
+ [PopupMenu] is a modal window used to display a list of options. They are popular in toolbars or context menus.
The size of a [PopupMenu] can be limited by using [member Window.max_size]. If the height of the list of items is larger than the maximum height of the [PopupMenu], a [ScrollContainer] within the popup will allow the user to scroll the contents.
If no maximum size is set, or if it is set to 0, the [PopupMenu] height will be limited by its parent rect.
+ All [code]set_*[/code] methods allow negative item index, which makes the item accessed from the last one.
</description>
<tutorials>
</tutorials>
@@ -15,7 +16,7 @@
<return type="void" />
<argument index="0" name="label" type="String" />
<argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" default="0" />
+ <argument index="2" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new checkable item with text [code]label[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -38,7 +39,7 @@
<argument index="0" name="texture" type="Texture2D" />
<argument index="1" name="label" type="String" />
<argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" default="0" />
+ <argument index="3" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new checkable item with text [code]label[/code] and icon [code]texture[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -62,7 +63,7 @@
<argument index="0" name="texture" type="Texture2D" />
<argument index="1" name="label" type="String" />
<argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" default="0" />
+ <argument index="3" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new item with text [code]label[/code] and icon [code]texture[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -73,7 +74,7 @@
<argument index="0" name="texture" type="Texture2D" />
<argument index="1" name="label" type="String" />
<argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" default="0" />
+ <argument index="3" name="accel" type="int" enum="Key" default="0" />
<description>
Same as [method add_icon_check_item], but uses a radio check button.
</description>
@@ -103,10 +104,11 @@
<return type="void" />
<argument index="0" name="label" type="String" />
<argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" default="0" />
+ <argument index="2" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new item with text [code]label[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
+ [b]Note:[/b] The provided [code]id[/code] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the [code]index[/code] arguments in e.g. [method set_item_checked].
</description>
</method>
<method name="add_multistate_item">
@@ -115,7 +117,7 @@
<argument index="1" name="max_states" type="int" />
<argument index="2" name="default_state" type="int" default="0" />
<argument index="3" name="id" type="int" default="-1" />
- <argument index="4" name="accel" type="int" default="0" />
+ <argument index="4" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new multistate item with text [code]label[/code].
Contrarily to normal binary items, multistate items can have more than two states, as defined by [code]max_states[/code]. Each press or activate of the item will increase the state by one. The default value is defined by [code]default_state[/code].
@@ -126,7 +128,7 @@
<return type="void" />
<argument index="0" name="label" type="String" />
<argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" default="0" />
+ <argument index="2" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new radio check button with text [code]label[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -181,7 +183,7 @@
</method>
<method name="clear_item_opentype_features">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Removes all OpenType features form the item's text.
</description>
@@ -193,56 +195,50 @@
</description>
</method>
<method name="get_item_accelerator" qualifiers="const">
- <return type="int" />
- <argument index="0" name="idx" type="int" />
- <description>
- Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
- </description>
- </method>
- <method name="get_item_count" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="Key" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the number of items in the [PopupMenu].
+ Returns the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the icon of the item at index [code]idx[/code].
+ Returns the icon of the item at the given [code]index[/code].
</description>
</method>
<method name="get_item_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the id of the item at index [code]idx[/code]. [code]id[/code] can be manually assigned, while index can not.
+ Returns the id of the item at the given [code]index[/code]. [code]id[/code] can be manually assigned, while index can not.
</description>
</method>
<method name="get_item_index" qualifiers="const">
<return type="int" />
<argument index="0" name="id" type="int" />
<description>
- Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually.
+ Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine and can not be set manually.
</description>
</method>
<method name="get_item_language" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns item's text language code.
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
<method name="get_item_opentype_feature" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="tag" type="String" />
<description>
Returns OpenType feature [code]tag[/code] of the item's text.
@@ -250,160 +246,175 @@
</method>
<method name="get_item_shortcut" qualifiers="const">
<return type="Shortcut" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the [Shortcut] associated with the specified [code]idx[/code] item.
+ Returns the [Shortcut] associated with the item at the given [code]index[/code].
</description>
</method>
<method name="get_item_submenu" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the submenu name of the item at index [code]idx[/code]. See [method add_submenu_item] for more info on how to add a submenu.
+ Returns the submenu name of the item at the given [code]index[/code]. See [method add_submenu_item] for more info on how to add a submenu.
</description>
</method>
<method name="get_item_text" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the text of the item at index [code]idx[/code].
+ Returns the text of the item at the given [code]index[/code].
</description>
</method>
<method name="get_item_text_direction" qualifiers="const">
<return type="int" enum="Control.TextDirection" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns item's text base writing direction.
</description>
</method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the tooltip associated with the specified index index [code]idx[/code].
+ Returns the tooltip associated with the item at the given [code]index[/code].
</description>
</method>
<method name="is_item_checkable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is checkable in some way, i.e. if it has a checkbox or radio button.
+ Returns [code]true[/code] if the item at the given [code]index[/code] is checkable in some way, i.e. if it has a checkbox or radio button.
[b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="is_item_checked" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is checked.
+ Returns [code]true[/code] if the item at the given [code]index[/code] is checked.
</description>
</method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. When it is disabled it can't be selected, or its action invoked.
+ Returns [code]true[/code] if the item at the given [code]index[/code] is disabled. When it is disabled it can't be selected, or its action invoked.
See [method set_item_disabled] for more info on how to disable an item.
</description>
</method>
<method name="is_item_radio_checkable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] has radio button-style checkability.
+ Returns [code]true[/code] if the item at the given [code]index[/code] has radio button-style checkability.
[b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
</description>
</method>
<method name="is_item_separator" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns [code]true[/code] if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator.
</description>
</method>
<method name="is_item_shortcut_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns [code]true[/code] if the specified item's shortcut is disabled.
</description>
</method>
<method name="remove_item">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Removes the item at index [code]idx[/code] from the menu.
+ Removes the item at the given [code]index[/code] from the menu.
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
</description>
</method>
+ <method name="scroll_to_item">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Moves the scroll view to make the item at the given [code]index[/code] visible.
+ </description>
+ </method>
+ <method name="set_current_index">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Sets the currently focused item as the given [code]index[/code].
+ </description>
+ </method>
<method name="set_item_accelerator">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="accel" type="int" />
+ <argument index="0" name="index" type="int" />
+ <argument index="1" name="accel" type="int" enum="Key" />
<description>
- Sets the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ Sets the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
<method name="set_item_as_checkable">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
- Sets whether the item at index [code]idx[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
+ Sets whether the item at the given [code]index[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="set_item_as_radio_checkable">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
- Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text.
+ Sets the type of the item at the given [code]index[/code] to radio button. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_as_separator">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
- Mark the item at index [code]idx[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text.
+ Mark the item at the given [code]index[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_checked">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="checked" type="bool" />
<description>
- Sets the checkstate status of the item at index [code]idx[/code].
+ Sets the checkstate status of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_disabled">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="disabled" type="bool" />
<description>
- Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked.
+ Enables/disables the item at the given [code]index[/code]. When it is disabled, it can't be selected and its action can't be invoked.
</description>
</method>
<method name="set_item_icon">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="icon" type="Texture2D" />
<description>
- Replaces the [Texture2D] icon of the specified [code]idx[/code].
+ Replaces the [Texture2D] icon of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_id">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="id" type="int" />
<description>
- Sets the [code]id[/code] of the item at index [code]idx[/code].
+ Sets the [code]id[/code] of the item at the given [code]index[/code].
+ The [code]id[/code] is used in [signal id_pressed] and [signal id_focused] signals.
</description>
</method>
<method name="set_item_language">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="language" type="String" />
<description>
Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
@@ -411,7 +422,7 @@
</method>
<method name="set_item_metadata">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="metadata" type="Variant" />
<description>
Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
@@ -419,7 +430,7 @@
</method>
<method name="set_item_multistate">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="state" type="int" />
<description>
Sets the state of a multistate item. See [method add_multistate_item] for details.
@@ -427,7 +438,7 @@
</method>
<method name="set_item_opentype_feature">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="tag" type="String" />
<argument index="2" name="value" type="int" />
<description>
@@ -436,40 +447,40 @@
</method>
<method name="set_item_shortcut">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="shortcut" type="Shortcut" />
<argument index="2" name="global" type="bool" default="false" />
<description>
- Sets a [Shortcut] for the specified item [code]idx[/code].
+ Sets a [Shortcut] for the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_shortcut_disabled">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="disabled" type="bool" />
<description>
- Disables the [Shortcut] of the specified index [code]idx[/code].
+ Disables the [Shortcut] of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_submenu">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="submenu" type="String" />
<description>
- Sets the submenu of the item at index [code]idx[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked.
+ Sets the submenu of the item at the given [code]index[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked.
</description>
</method>
<method name="set_item_text">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="text" type="String" />
<description>
- Sets the text of the item at index [code]idx[/code].
+ Sets the text of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_text_direction">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="direction" type="int" enum="Control.TextDirection" />
<description>
Sets item's text base writing direction.
@@ -477,22 +488,22 @@
</method>
<method name="set_item_tooltip">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="tooltip" type="String" />
<description>
- Sets the [String] tooltip of the item at the specified index [code]idx[/code].
+ Sets the [String] tooltip of the item at the given [code]index[/code].
</description>
</method>
<method name="toggle_item_checked">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Toggles the check state of the item of the specified index [code]idx[/code].
+ Toggles the check state of the item at the given [code]index[/code].
</description>
</method>
<method name="toggle_item_multistate">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Cycle to the next state of a multistate item. See [method add_multistate_item] for details.
</description>
@@ -511,6 +522,9 @@
<member name="hide_on_state_item_selection" type="bool" setter="set_hide_on_state_item_selection" getter="is_hide_on_state_item_selection" default="false">
If [code]true[/code], hides the [PopupMenu] when a state item is selected.
</member>
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ The number of items currently in the list.
+ </member>
<member name="submenu_popup_delay" type="float" setter="set_submenu_popup_delay" getter="get_submenu_popup_delay" default="0.3">
Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item.
</member>
@@ -536,36 +550,24 @@
</signal>
</signals>
<theme_items>
- <theme_item name="checked" data_type="icon" type="Texture2D">
- [Texture2D] icon for the checked checkbox items.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] used for the menu items.
- </theme_item>
<theme_item name="font_accelerator_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)">
The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
</theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The default text [Color] for menu items' names.
</theme_item>
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)">
[Color] used for disabled menu items' text.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] used for the hovered text.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the menu item.
</theme_item>
- <theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] used for labeled separators' text. See [method add_separator].
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the menu items.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- [StyleBox] displayed when the [PopupMenu] item is hovered.
- </theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The horizontal space between the item's name and the shortcut text/submenu arrow.
</theme_item>
@@ -573,20 +575,20 @@
</theme_item>
<theme_item name="item_start_padding" data_type="constant" type="int" default="2">
</theme_item>
- <theme_item name="labeled_separator_left" data_type="style" type="StyleBox">
- [StyleBox] for the left side of labeled separator. See [method add_separator].
- </theme_item>
- <theme_item name="labeled_separator_right" data_type="style" type="StyleBox">
- [StyleBox] for the right side of labeled separator. See [method add_separator].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the item text outline.
</theme_item>
- <theme_item name="panel" data_type="style" type="StyleBox">
- Default [StyleBox] of the [PopupMenu] items.
+ <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ The vertical space between each menu item.
</theme_item>
- <theme_item name="panel_disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [PopupMenu] item is disabled.
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] used for the menu items.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the menu items.
+ </theme_item>
+ <theme_item name="checked" data_type="icon" type="Texture2D">
+ [Texture2D] icon for the checked checkbox items.
</theme_item>
<theme_item name="radio_checked" data_type="icon" type="Texture2D">
[Texture2D] icon for the checked radio button items.
@@ -594,9 +596,6 @@
<theme_item name="radio_unchecked" data_type="icon" type="Texture2D">
[Texture2D] icon for the unchecked radio button items.
</theme_item>
- <theme_item name="separator" data_type="style" type="StyleBox">
- [StyleBox] used for the separators. See [method add_separator].
- </theme_item>
<theme_item name="submenu" data_type="icon" type="Texture2D">
[Texture2D] icon for the submenu arrow (for left-to-right layouts).
</theme_item>
@@ -606,8 +605,23 @@
<theme_item name="unchecked" data_type="icon" type="Texture2D">
[Texture2D] icon for the unchecked checkbox items.
</theme_item>
- <theme_item name="vseparation" data_type="constant" type="int" default="4">
- The vertical space between each menu item.
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ [StyleBox] displayed when the [PopupMenu] item is hovered.
+ </theme_item>
+ <theme_item name="labeled_separator_left" data_type="style" type="StyleBox">
+ [StyleBox] for the left side of labeled separator. See [method add_separator].
+ </theme_item>
+ <theme_item name="labeled_separator_right" data_type="style" type="StyleBox">
+ [StyleBox] for the right side of labeled separator. See [method add_separator].
+ </theme_item>
+ <theme_item name="panel" data_type="style" type="StyleBox">
+ Default [StyleBox] of the [PopupMenu] items.
+ </theme_item>
+ <theme_item name="panel_disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [PopupMenu] item is disabled.
+ </theme_item>
+ <theme_item name="separator" data_type="style" type="StyleBox">
+ [StyleBox] used for the separators. See [method add_separator].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
index 71753ffcc6..d850cf20b8 100644
--- a/doc/classes/PopupPanel.xml
+++ b/doc/classes/PopupPanel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupPanel" inherits="Popup" version="4.0">
+<class name="PopupPanel" inherits="Popup" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class for displaying popups with a panel background.
</brief_description>
diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml
index 03d94b5db9..881ec028de 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" version="4.0">
+<class name="Position2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Generic 2D position hint for editing.
</brief_description>
diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml
index 22dc261520..d91e0fbfdf 100644
--- a/doc/classes/Position3D.xml
+++ b/doc/classes/Position3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position3D" inherits="Node3D" version="4.0">
+<class name="Position3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Generic 3D position hint for editing.
</brief_description>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 6d63f56f1c..329d81342b 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" version="4.0">
+<class name="PrimitiveMesh" inherits="Mesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
@@ -9,6 +9,11 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_create_mesh_array" qualifiers="virtual const">
+ <return type="Array" />
+ <description>
+ </description>
+ </method>
<method name="get_mesh_arrays" qualifiers="const">
<return type="Array" />
<description>
@@ -34,7 +39,7 @@
</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.
- This gives the same result as using [constant BaseMaterial3D.CULL_BACK] in [member BaseMaterial3D.cull_mode].
+ This gives the same result as using [constant BaseMaterial3D.CULL_FRONT] in [member BaseMaterial3D.cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The current [Material] of the primitive mesh.
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
index e369bfe1b2..10c2b11a9a 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" version="4.0">
+<class name="PrismMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class representing a prism-shaped [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml
index e3db74894b..2b15508119 100644
--- a/doc/classes/ProceduralSkyMaterial.xml
+++ b/doc/classes/ProceduralSkyMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProceduralSkyMaterial" inherits="Material" version="4.0">
+<class name="ProceduralSkyMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Material] used with [Sky] to generate a background based on user input parameters.
</brief_description>
@@ -11,7 +11,7 @@
<tutorials>
</tutorials>
<members>
- <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.12, 0.12, 0.13, 1)">
+ <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.2, 0.169, 0.133, 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">
@@ -20,25 +20,25 @@
<member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0">
Amount of energy contribution from the ground.
</member>
- <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.37, 0.33, 0.31, 1)">
+ <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 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">
+ <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.15">
How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
</member>
<member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0">
Amount of energy contribution from the sky.
</member>
- <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.55, 0.69, 0.81, 1)">
+ <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)">
Color of the sky at the horizon. Blends with [member sky_top_color].
</member>
- <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color(0.35, 0.46, 0.71, 1)">
+ <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color(0.385, 0.454, 0.55, 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">
+ <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="30.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">
+ <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.15">
How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max].
</member>
</members>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 88132967a0..60b66a2493 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" version="4.0">
+<class name="ProgressBar" inherits="Range" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
General-purpose progress bar.
</brief_description>
@@ -12,20 +12,11 @@
<member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" default="true">
If [code]true[/code], the fill percentage is displayed on the bar.
</member>
- <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.01" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.01" />
</members>
<theme_items>
- <theme_item name="bg" data_type="style" type="StyleBox">
- The style of the background.
- </theme_item>
- <theme_item name="fg" data_type="style" type="StyleBox">
- The style of the progress (i.e. the part that fills the bar).
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Font used to draw the fill percentage if [member percent_visible] is [code]true[/code].
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The color of the text.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -34,11 +25,20 @@
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The color of the text's shadow.
</theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ Font used to draw the fill percentage if [member percent_visible] is [code]true[/code].
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code].
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ The style of the background.
+ </theme_item>
+ <theme_item name="fg" data_type="style" type="StyleBox">
+ The style of the progress (i.e. the part that fills the bar).
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index e67ccf9efd..068b2c7757 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProjectSettings" inherits="Object" version="4.0">
+<class name="ProjectSettings" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Contains global variables accessible from everywhere.
</brief_description>
<description>
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
- [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
- [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
+ [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=$DOCS_URL/tutorials/export/feature_tags.html]feature tags[/url].
+ [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=$DOCS_URL/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
@@ -87,7 +87,7 @@
<return type="String" />
<argument index="0" name="path" type="String" />
<description>
- Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path].
+ Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path].
[b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project:
[codeblock]
var path = ""
@@ -188,6 +188,7 @@
ProjectSettings.SetSetting("application/config/name", "Example");
[/csharp]
[/codeblocks]
+ This can also be used to erase custom project settings. To do this change the setting value to [code]null[/code].
</description>
</method>
</methods>
@@ -196,13 +197,17 @@
Background color for the boot splash.
</member>
<member name="application/boot_splash/fullsize" type="bool" setter="" getter="" default="true">
- If [code]true[/code], scale the boot splash image to the full window length when engine starts. If [code]false[/code], the engine will leave it at the default pixel size.
+ If [code]true[/code], scale the boot splash image to the full window size (preserving the aspect ratio) when the engine starts. If [code]false[/code], the engine will leave it at the default pixel size.
</member>
<member name="application/boot_splash/image" type="String" setter="" getter="" default="&quot;&quot;">
- Path to an image used as the boot splash.
+ Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead.
+ [b]Note:[/b] Only effective if [member application/boot_splash/show_image] is [code]true[/code].
+ </member>
+ <member name="application/boot_splash/show_image" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], displays the image specified in [member application/boot_splash/image] when the engine starts. If [code]false[/code], only displays the plain color specified in [member application/boot_splash/bg_color].
</member>
<member name="application/boot_splash/use_filter" type="bool" setter="" getter="" default="true">
- If [code]true[/code], applies linear filtering when scaling the image (recommended for high resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art).
+ If [code]true[/code], applies linear filtering when scaling the image (recommended for high-resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art).
</member>
<member name="application/config/custom_user_dir_name" type="String" setter="" getter="" default="&quot;&quot;">
This user directory is used for storing persistent data ([code]user://[/code] filesystem). If left empty, [code]user://[/code] resolves to a project-specific folder in Godot's own configuration folder (see [method OS.get_user_data_dir]). If a custom directory name is defined, this name will be used instead and appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]).
@@ -219,7 +224,10 @@
</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. The window title will be set to match the project name automatically on startup.
- [b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information.
+ [b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information.
+ </member>
+ <member name="application/config/name_localized" type="Dictionary" setter="" getter="" default="{}">
+ Translations of the project's name. This setting is used by OS tools to translate application name on Android, iOS and macOS.
</member>
<member name="application/config/project_settings_override" type="String" setter="" getter="" default="&quot;&quot;">
Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. See "Overriding" in the [ProjectSettings] class description at the top for more information.
@@ -289,7 +297,9 @@
Safer override for [member audio/driver/mix_rate] in the Web platform. Here [code]0[/code] means "let the browser choose" (since some browsers do not like forcing the mix rate).
</member>
<member name="audio/driver/output_latency" type="int" setter="" getter="" default="15">
- Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
+ Specifies the preferred output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
+ Audio output latency may be constrained by the host operating system and audio hardware drivers. If the host can not provide the specified audio output latency then Godot will attempt to use the nearest latency allowed by the host. As such you should always use [method AudioServer.get_output_latency] to determine the actual audio output latency.
+ [b]Note:[/b] This setting is ignored on all versions of Windows prior to Windows 10.
</member>
<member name="audio/driver/output_latency.web" type="int" setter="" getter="" default="50">
Safer override for [member audio/driver/output_latency] in the Web platform, to avoid audio issues especially on mobile devices.
@@ -324,9 +334,6 @@
<member name="debug/file_logging/max_log_files" type="int" setter="" getter="" default="5">
Specifies the maximum amount of log files allowed (used for rotation).
</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.
- </member>
<member name="debug/gdscript/warnings/assert_always_false" type="bool" setter="" getter="" default="true">
</member>
<member name="debug/gdscript/warnings/assert_always_true" type="bool" setter="" getter="" default="true">
@@ -352,6 +359,8 @@
<member name="debug/gdscript/warnings/incompatible_ternary" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when a ternary operator may emit values with incompatible types.
</member>
+ <member name="debug/gdscript/warnings/int_assigned_to_enum" type="bool" setter="" getter="" default="true">
+ </member>
<member name="debug/gdscript/warnings/integer_division" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when dividing an integer by another integer (the decimal part will be discarded).
</member>
@@ -366,6 +375,9 @@
<member name="debug/gdscript/warnings/return_value_discarded" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum.
</member>
+ <member name="debug/gdscript/warnings/shadowed_global_identifier" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], enables warnings when defining a local or subclass member variable, signal, or enum that would have the same name as a built-in function or global class name, which possibly shadow it.
+ </member>
<member name="debug/gdscript/warnings/shadowed_variable" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable).
</member>
@@ -423,8 +435,9 @@
</member>
<member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0">
Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging.
- If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
+ If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. See also [member physics/common/physics_ticks_per_second].
This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions.
+ [b]Note:[/b] This property is only read when the project starts. To change the rendering FPS cap at runtime, set [member Engine.target_fps] instead.
</member>
<member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack allowed for debugging GDScript.
@@ -470,15 +483,16 @@
<member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2(10, 10)">
Position offset for tooltips, relative to the mouse cursor's hotspot.
</member>
- <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false">
- If [code]true[/code], allows HiDPI display on Windows, macOS, and the HTML5 platform. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
+ <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], allows HiDPI display on Windows, macOS, Android, iOS and HTML5. If [code]false[/code], the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]multiple resolutions[/url] instead of disabling this setting.
+ [b]Note:[/b] This setting has no effect on Linux as DPI-awareness fallbacks are not supported there.
</member>
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
</member>
<member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0">
The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values.
- [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/width] and [member display/window/size/height] accordingly.
+ [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/viewport_width] and [member display/window/size/viewport_height] accordingly.
</member>
<member name="display/window/ios/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.
@@ -493,24 +507,26 @@
</member>
<member name="display/window/size/fullscreen" type="bool" setter="" getter="" default="false">
Sets the main window to full screen when the project starts. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
[b]Note:[/b] This setting is ignored on iOS, Android, and HTML5.
</member>
- <member name="display/window/size/height" type="int" setter="" getter="" default="600">
- Sets the game's main viewport height. 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/size/resizable" type="bool" setter="" getter="" default="true">
Allows the window to be resizable by default.
[b]Note:[/b] This setting is ignored on iOS and Android.
</member>
- <member name="display/window/size/test_height" type="int" setter="" getter="" default="0">
- If greater than zero, overrides the window height when running the game. Useful for testing stretch modes.
+ <member name="display/window/size/viewport_height" type="int" setter="" getter="" default="600">
+ Sets the game's main viewport height. On desktop platforms, this is also the initial window height.
</member>
- <member name="display/window/size/test_width" type="int" setter="" getter="" default="0">
- If greater than zero, overrides the window width when running the game. Useful for testing stretch modes.
+ <member name="display/window/size/viewport_width" type="int" setter="" getter="" default="1024">
+ Sets the game's main viewport width. On desktop platforms, this is also the initial window width.
</member>
- <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 name="display/window/size/window_height_override" type="int" setter="" getter="" default="0">
+ On desktop platforms, sets the game's initial window height.
+ [b]Note:[/b] By default, or when set to 0, the initial window height is the [member display/window/size/viewport_height]. This setting is ignored on iOS, Android, and HTML5.
+ </member>
+ <member name="display/window/size/window_width_override" type="int" setter="" getter="" default="0">
+ On desktop platforms, sets the game's initial window width.
+ [b]Note:[/b] By default, or when set to 0, the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and HTML5.
</member>
<member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1">
Sets the VSync mode for the main game window.
@@ -551,8 +567,16 @@
<member name="gui/theme/custom_font" type="String" setter="" getter="" default="&quot;&quot;">
Path to a custom [Font] resource to use as default for all GUI elements of the project.
</member>
- <member name="gui/theme/use_hidpi" type="bool" setter="" getter="" default="false">
- If [code]true[/code], makes sure the theme used works with HiDPI.
+ <member name="gui/theme/default_font_antialiased" type="bool" setter="" getter="" default="true">
+ If set to [code]true[/code], default font uses 8-bit anitialiased glyph rendering. See [member FontData.antialiased].
+ </member>
+ <member name="gui/theme/default_font_hinting" type="int" setter="" getter="" default="1">
+ Default font hinting mode. See [member FontData.hinting].
+ </member>
+ <member name="gui/theme/default_font_subpixel_positioning" type="int" setter="" getter="" default="1">
+ Default font glyph sub-pixel positioning mode. See [member FontData.subpixel_positioning].
+ </member>
+ <member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0">
</member>
<member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000">
Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds).
@@ -1315,14 +1339,14 @@
</member>
<member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false">
</member>
- <member name="mono/project/auto_update_project" type="bool" setter="" getter="" default="true">
+ <member name="mono/runtime/unhandled_exception_policy" type="int" setter="" getter="" default="0">
+ The policy to use for unhandled Mono (C#) exceptions. The default "Terminate Application" exits the project as soon as an unhandled exception is thrown. "Log Error" logs an error message to the console instead, and will not interrupt the project execution when an unhandled exception is thrown.
+ [b]Note:[/b] The unhandled exception policy is always set to "Log Error" in the editor, which also includes C# [code]tool[/code] scripts running within the editor as well as editor plugin code.
</member>
- <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0">
- </member>
- <member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="10">
+ <member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="1">
Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size].
</member>
- <member name="navigation/2d/default_edge_connection_margin" type="int" setter="" getter="" default="5">
+ <member name="navigation/2d/default_edge_connection_margin" type="int" setter="" getter="" default="1">
Default edge connection margin for 2D navigation maps. See [method NavigationServer2D.map_set_edge_connection_margin].
</member>
<member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.3">
@@ -1402,8 +1426,8 @@
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/run_on_thread" type="bool" setter="" getter="" default="false">
- Sets whether 2D 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.
+ <member name="physics/2d/run_on_separate_thread" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], the 2D physics server runs on a separate thread, making better use of multi-core CPUs. If [code]false[/code], the 2D physics server runs on the main thread. Running the physics server on a separate thread can increase performance, but restricts API access to only physics process.
</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].
@@ -1411,6 +1435,26 @@
<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/solver/contact_max_allowed_penetration" type="float" setter="" getter="" default="0.3">
+ Maximum distance a shape can penetrate another shape before it is considered a collision. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION].
+ </member>
+ <member name="physics/2d/solver/contact_max_separation" type="float" setter="" getter="" default="1.5">
+ Maximum distance a shape can be from another before they are considered separated and the contact is discarded. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_MAX_SEPARATION].
+ </member>
+ <member name="physics/2d/solver/contact_recycle_radius" type="float" setter="" getter="" default="1.0">
+ Maximum distance a pair of bodies has to move before their collision status has to be recalculated. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_RECYCLE_RADIUS].
+ </member>
+ <member name="physics/2d/solver/default_constraint_bias" type="float" setter="" getter="" default="0.2">
+ Default solver bias for all physics constraints. Defines how much bodies react to enforce constraints. See [constant PhysicsServer2D.SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS].
+ Individual constraints can have a specific bias value (see [member Joint2D.bias]).
+ </member>
+ <member name="physics/2d/solver/default_contact_bias" type="float" setter="" getter="" default="0.8">
+ Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_DEFAULT_BIAS].
+ Individual shapes can have a specific bias value (see [member Shape2D.custom_solver_bias]).
+ </member>
+ <member name="physics/2d/solver/solver_iterations" type="int" setter="" getter="" default="16">
+ Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS].
+ </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>
@@ -1452,16 +1496,35 @@
</member>
<member name="physics/3d/physics_engine" type="String" setter="" getter="" default="&quot;DEFAULT&quot;">
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.
+ "DEFAULT" and "GodotPhysics3D" are the same, as there is currently no alternative 3D physics server implemented.
</member>
- <member name="physics/3d/run_on_thread" type="bool" setter="" getter="" default="false">
- Sets whether 3D 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.
+ <member name="physics/3d/run_on_separate_thread" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], the 3D physics server runs on a separate thread, making better use of multi-core CPUs. If [code]false[/code], the 3D physics server runs on the main thread. Running the physics server on a separate thread can increase performance, but restricts API access to only physics process.
</member>
<member name="physics/3d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626">
+ Threshold angular velocity under which a 3D physics body will be considered inactive. See [constant PhysicsServer3D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD].
</member>
<member name="physics/3d/sleep_threshold_linear" type="float" setter="" getter="" default="0.1">
+ Threshold linear velocity under which a 3D physics body will be considered inactive. See [constant PhysicsServer3D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD].
+ </member>
+ <member name="physics/3d/solver/contact_max_allowed_penetration" type="float" setter="" getter="" default="0.01">
+ Maximum distance a shape can penetrate another shape before it is considered a collision. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION].
+ </member>
+ <member name="physics/3d/solver/contact_max_separation" type="float" setter="" getter="" default="0.05">
+ Maximum distance a shape can be from another before they are considered separated and the contact is discarded. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_MAX_SEPARATION].
+ </member>
+ <member name="physics/3d/solver/contact_recycle_radius" type="float" setter="" getter="" default="0.01">
+ Maximum distance a pair of bodies has to move before their collision status has to be recalculated. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_RECYCLE_RADIUS].
+ </member>
+ <member name="physics/3d/solver/default_contact_bias" type="float" setter="" getter="" default="0.8">
+ Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_DEFAULT_BIAS].
+ Individual shapes can have a specific bias value (see [member Shape3D.custom_solver_bias]).
+ </member>
+ <member name="physics/3d/solver/solver_iterations" type="int" setter="" getter="" default="16">
+ Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS].
</member>
<member name="physics/3d/time_before_sleep" type="float" setter="" getter="" default="0.5">
+ Time (in seconds) of inactivity before which a 3D physics body will put to sleep. See [constant PhysicsServer3D.SPACE_PARAM_BODY_TIME_TO_SLEEP].
</member>
<member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true">
Enables [member Viewport.physics_object_picking] on the root viewport.
@@ -1472,8 +1535,21 @@
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
</member>
<member name="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60">
- The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run.
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. See also [member debug/settings/fps/force_fps].
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead.
+ [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics/common/physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS.
+ </member>
+ <member name="rendering/2d/opengl/batching_send_null" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="rendering/2d/opengl/batching_stream" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="rendering/2d/opengl/legacy_orphan_buffers" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="rendering/2d/opengl/legacy_stream" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="rendering/2d/options/ninepatch_mode" type="int" setter="" getter="" default="1">
+ </member>
+ <member name="rendering/2d/options/use_software_skinning" type="bool" setter="" getter="" default="true">
</member>
<member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1">
</member>
@@ -1485,12 +1561,8 @@
</member>
<member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/3d/viewport/scale" type="float" setter="" getter="" default="1.0">
- Scales the 3D render buffer based on the viewport size and displays the result with linear filtering. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
- [b]Note:[/b] This property is only read when the project starts. To change the 3D rendering resolution scale at runtime, set [member Viewport.scale_3d] instead.
- </member>
<member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0">
- Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also [member rendering/3d/viewport/scale] for supersampling, which provides higher quality but is much more expensive.
+ Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d [member rendering/scaling_3d/mode] for supersampling, which provides higher quality but is much more expensive.
</member>
<member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0">
Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
@@ -1504,6 +1576,32 @@
</member>
<member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18">
</member>
+ <member name="rendering/batching/debug/diagnose_frame" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/batching/debug/flash_batching" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/batching/lights/max_join_items" type="int" setter="" getter="" default="32">
+ </member>
+ <member name="rendering/batching/lights/scissor_area_threshold" type="float" setter="" getter="" default="1.0">
+ </member>
+ <member name="rendering/batching/options/single_rect_fallback" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/batching/options/use_batching" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/batching/options/use_batching_in_editor" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/batching/parameters/batch_buffer_size" type="int" setter="" getter="" default="16384">
+ </member>
+ <member name="rendering/batching/parameters/colored_vertex_format_threshold" type="float" setter="" getter="" default="0.25">
+ </member>
+ <member name="rendering/batching/parameters/item_reordering_lookahead" type="int" setter="" getter="" default="4">
+ </member>
+ <member name="rendering/batching/parameters/max_join_item_commands" type="int" setter="" getter="" default="16">
+ </member>
+ <member name="rendering/batching/precision/uv_contract" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/batching/precision/uv_contract_amount" type="int" setter="" getter="" default="100">
+ </member>
<member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="1">
Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother.
</member>
@@ -1513,14 +1611,13 @@
<member name="rendering/camera/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false">
If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples.
</member>
- <member name="rendering/driver/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default="&quot;PowerVR,Mali,Adreno,Apple&quot;">
- Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this.
- </member>
<member name="rendering/driver/depth_prepass/enable" type="bool" setter="" getter="" default="true">
- If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used.
+ If [code]true[/code], performs a previous depth pass before rendering 3D materials. This increases performance significantly in scenes with high overdraw, when complex materials and lighting are used. However, in scenes with few occluded surfaces, the depth prepass may reduce performance. If your game is viewed from a fixed angle that makes it easy to avoid overdraw (such as top-down or side-scrolling perspective), consider disabling the depth prepass to improve performance. This setting can be changed at run-time to optimize performance depending on the scene currently being viewed.
+ [b]Note:[/b] Only supported when using the Vulkan Clustered backend (not Vulkan Mobile or OpenGL). When using Vulkan Mobile or OpenGL, there is no depth prepass performed.
</member>
- <member name="rendering/driver/driver_name" type="String" setter="" getter="" default="&quot;Vulkan&quot;">
- The video driver to use (currently only "Vulkan" is implemented).
+ <member name="rendering/driver/driver_name" type="String" setter="" getter="" default="&quot;vulkan&quot;">
+ The video driver to use.
+ [b]Note:[/b] OpenGL support is currently incomplete. Only basic 2D rendering is supported, and single-window mode is required for correct operation.
[b]Note:[/b] 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.
@@ -1532,7 +1629,7 @@
Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color].
</member>
<member name="rendering/environment/defaults/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
- [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.
+ [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, you do not need to set this property.
</member>
<member name="rendering/environment/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.
@@ -1567,6 +1664,24 @@
<member name="rendering/environment/ssao/quality" type="int" setter="" getter="" default="2">
Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssao/adaptive_target] setting.
</member>
+ <member name="rendering/environment/ssil/adaptive_target" type="float" setter="" getter="" default="0.5">
+ Quality target to use when [member rendering/environment/ssil/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene.
+ </member>
+ <member name="rendering/environment/ssil/blur_passes" type="int" setter="" getter="" default="4">
+ Number of blur passes to use when computing screen-space indirect lighting. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail.
+ </member>
+ <member name="rendering/environment/ssil/fadeout_from" type="float" setter="" getter="" default="50.0">
+ Distance at which the screen-space indirect lighting effect starts to fade out. Use this hide screen-space indirect lighting at great distances.
+ </member>
+ <member name="rendering/environment/ssil/fadeout_to" type="float" setter="" getter="" default="300.0">
+ Distance at which the screen-space indirect lighting is fully faded out. Use this hide screen-space indirect lighting at great distances.
+ </member>
+ <member name="rendering/environment/ssil/half_size" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], screen-space indirect lighting will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details and may result in some objects appearing to glow at their edges.
+ </member>
+ <member name="rendering/environment/ssil/quality" type="int" setter="" getter="" default="2">
+ Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssil/adaptive_target] setting.
+ </member>
<member name="rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01">
Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth.
</member>
@@ -1585,15 +1700,21 @@
<member name="rendering/environment/volumetric_fog/volume_size" type="int" setter="" getter="" default="64">
Base size used to determine size of froxel buffer in the camera X-axis and Y-axis. The final size is scaled by the aspect ratio of the screen, so actual values may differ from what is set. Set a larger size for more detailed fog, set a smaller size for better performance.
</member>
+ <member name="rendering/gles2/compatibility/disable_half_float" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/gles2/compatibility/enable_high_float.Android" type="bool" setter="" getter="" default="false">
+ </member>
<member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting.
+ [b]Note:[/b] This property is only read when the project starts. To set half-resolution GI at run-time, call [method RenderingServer.gi_set_use_half_resolution] instead.
</member>
- <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4">
+ <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="5">
</member>
<member name="rendering/global_illumination/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2">
</member>
<member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1">
</member>
- <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="1">
+ <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="0">
</member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
</member>
@@ -1632,12 +1753,19 @@
<member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600">
</member>
<member name="rendering/mesh_lod/lod_change/threshold_pixels" type="float" setter="" getter="" default="1.0">
+ The automatic LOD bias to use for meshes rendered within the [ReflectionProbe]. Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member rendering/mesh_lod/lod_change/threshold_pixels] to improve performance at the cost of geometry detail.
+ [b]Note:[/b] [member rendering/mesh_lod/lod_change/threshold_pixels] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
+ [b]Note:[/b] This property is only read when the project starts. To adjust the automatic LOD threshold at runtime, set [member Viewport.mesh_lod_threshold] on the root [Viewport].
</member>
<member name="rendering/occlusion_culling/bvh_build_quality" type="int" setter="" getter="" default="2">
+ The [url=https://en.wikipedia.org/wiki/Bounding_volume_hierarchy]BVH[/url] quality to use when rendering the occlusion culling buffer. Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage.
</member>
<member name="rendering/occlusion_culling/occlusion_rays_per_thread" type="int" setter="" getter="" default="512">
+ Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage. The occlusion culling buffer's pixel count is roughly equal to [code]occlusion_rays_per_thread * number_of_logical_cpu_cores[/code], so it will depend on the system's CPU. Therefore, CPUs with fewer cores will use a lower resolution to attempt keeping performance costs even across devices.
</member>
<member name="rendering/occlusion_culling/use_occlusion_culling" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D in the root viewport. In custom viewports, [member Viewport.use_occlusion_culling] must be set to [code]true[/code] instead.
+ [b]Note:[/b] Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling.
</member>
<member name="rendering/reflections/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.
@@ -1651,10 +1779,10 @@
<member name="rendering/reflections/sky_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/reflections/sky_reflections/ggx_samples" type="int" setter="" getter="" default="1024">
+ <member name="rendering/reflections/sky_reflections/ggx_samples" type="int" setter="" getter="" default="32">
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/reflections/sky_reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128">
+ <member name="rendering/reflections/sky_reflections/ggx_samples.mobile" type="int" setter="" getter="" default="16">
Lower-end override for [member rendering/reflections/sky_reflections/ggx_samples] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/reflections/sky_reflections/roughness_layers" type="int" setter="" getter="" default="8">
@@ -1666,6 +1794,18 @@
<member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
+ <member name="rendering/scaling_3d/fsr_mipmap_bias" type="float" setter="" getter="" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
+ </member>
+ <member name="rendering/scaling_3d/fsr_sharpness" type="float" setter="" getter="" default="0.2">
+ Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
+ </member>
+ <member name="rendering/scaling_3d/mode" type="int" setter="" getter="" default="0">
+ Sets the scaling 3D mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
+ </member>
+ <member name="rendering/scaling_3d/scale" type="float" setter="" getter="" default="1.0">
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [member rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ </member>
<member name="rendering/shader_compiler/shader_cache/compress" type="bool" setter="" getter="" default="true">
</member>
<member name="rendering/shader_compiler/shader_cache/enabled" type="bool" setter="" getter="" default="true">
@@ -1676,12 +1816,6 @@
</member>
<member name="rendering/shader_compiler/shader_cache/use_zstd_compression" type="bool" setter="" getter="" default="true">
</member>
- <member name="rendering/shading/overrides/force_blinn_over_ggx" type="bool" setter="" getter="" default="false">
- If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model.
- </member>
- <member name="rendering/shading/overrides/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true">
- Lower-end override for [member rendering/shading/overrides/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support.
- </member>
<member name="rendering/shading/overrides/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>
@@ -1702,7 +1836,7 @@
<member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="3">
+ <member name="rendering/shadows/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.
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
@@ -1730,7 +1864,7 @@
<member name="rendering/shadows/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="3">
+ <member name="rendering/shadows/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.
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
@@ -1768,10 +1902,6 @@
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer.
[b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
</member>
- <member name="rendering/textures/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false">
- If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS.
- [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
- </member>
<member name="rendering/textures/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
[b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
@@ -1788,8 +1918,23 @@
</member>
<member name="rendering/vulkan/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64">
</member>
- <member name="rendering/xr/enabled" type="bool" setter="" getter="" default="false">
- If [code]true[/code], XR support is enabled in Godot, this ensures required shaders are compiled.
+ <member name="xr/openxr/default_action_map" type="String" setter="" getter="" default="&quot;res://default_action_map.tres&quot;">
+ Action map configuration to load by default.
+ </member>
+ <member name="xr/openxr/enabled" type="bool" setter="" getter="" default="false">
+ If [code]true[/code] Godot will setup and initialise OpenXR on startup.
+ </member>
+ <member name="xr/openxr/form_factor" type="int" setter="" getter="" default="&quot;0&quot;">
+ Specify whether OpenXR should be configured for an HMD or a hand held device.
+ </member>
+ <member name="xr/openxr/reference_space" type="int" setter="" getter="" default="&quot;1&quot;">
+ Specify the default reference space.
+ </member>
+ <member name="xr/openxr/view_configuration" type="int" setter="" getter="" default="&quot;1&quot;">
+ Specify the view configuration with which to configure OpenXR settting up either Mono or Stereo rendering.
+ </member>
+ <member name="xr/shaders/enabled" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], Godot will compile shaders required for XR.
</member>
</members>
</class>
diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml
index 71f56690d5..e0fbeec7c1 100644
--- a/doc/classes/PropertyTweener.xml
+++ b/doc/classes/PropertyTweener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PropertyTweener" inherits="Tweener" version="4.0">
+<class name="PropertyTweener" inherits="Tweener" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Interpolates an [Object]'s property over time.
</brief_description>
diff --git a/doc/classes/ProximityGroup3D.xml b/doc/classes/ProximityGroup3D.xml
deleted file mode 100644
index 15735bd6f6..0000000000
--- a/doc/classes/ProximityGroup3D.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProximityGroup3D" inherits="Node3D" version="4.0">
- <brief_description>
- General-purpose proximity detection node.
- </brief_description>
- <description>
- General-purpose proximity detection node.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="broadcast">
- <return type="void" />
- <argument index="0" name="method" type="String" />
- <argument index="1" name="parameters" type="Variant" />
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup3D.DispatchMode" default="0">
- </member>
- <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3(1, 1, 1)">
- </member>
- <member name="group_name" type="String" setter="set_group_name" getter="get_group_name" default="&quot;&quot;">
- </member>
- </members>
- <signals>
- <signal name="broadcast">
- <argument index="0" name="method" type="String" />
- <argument index="1" name="parameters" type="Array" />
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MODE_PROXY" value="0" enum="DispatchMode">
- </constant>
- <constant name="MODE_SIGNAL" value="1" enum="DispatchMode">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml
index 09a9efaa7a..778e3f3f69 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="Texture2D" version="4.0">
+<class name="ProxyTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index da7e74537a..d641ebaa1f 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" version="4.0">
+<class name="QuadMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class representing a square mesh.
</brief_description>
diff --git a/doc/classes/QuadOccluder3D.xml b/doc/classes/QuadOccluder3D.xml
new file mode 100644
index 0000000000..0f75136e13
--- /dev/null
+++ b/doc/classes/QuadOccluder3D.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="QuadOccluder3D" inherits="Occluder3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Flat plane shape for use with occlusion culling in [OccluderInstance3D].
+ </brief_description>
+ <description>
+ [QuadOccluder3D] stores a flat plane shape that can be used by the engine's occlusion culling system. See also [PolygonOccluder3D] if you need to customize the quad's shape.
+ See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)">
+ The quad's size in 3D units.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 9c948ca21a..c94b649b58 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Quaternion" version="4.0">
+<class name="Quaternion" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Quaternion.
</brief_description>
@@ -9,52 +9,52 @@
Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
</description>
<tutorials>
- <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
+ <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- <method name="Quaternion" qualifiers="constructor">
+ <constructors>
+ <constructor name="Quaternion">
<return type="Quaternion" />
<description>
Constructs a default-initialized quaternion with all components set to [code]0[/code].
</description>
- </method>
- <method name="Quaternion" qualifiers="constructor">
+ </constructor>
+ <constructor name="Quaternion">
<return type="Quaternion" />
<argument index="0" name="from" type="Quaternion" />
<description>
Constructs a [Quaternion] as a copy of the given [Quaternion].
</description>
- </method>
- <method name="Quaternion" qualifiers="constructor">
+ </constructor>
+ <constructor name="Quaternion">
<return type="Quaternion" />
<argument index="0" name="arc_from" type="Vector3" />
<argument index="1" name="arc_to" type="Vector3" />
<description>
</description>
- </method>
- <method name="Quaternion" qualifiers="constructor">
+ </constructor>
+ <constructor name="Quaternion">
<return type="Quaternion" />
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="angle" type="float" />
<description>
Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
</description>
- </method>
- <method name="Quaternion" qualifiers="constructor">
+ </constructor>
+ <constructor name="Quaternion">
<return type="Quaternion" />
<argument index="0" name="euler_yxz" type="Vector3" />
<description>
</description>
- </method>
- <method name="Quaternion" qualifiers="constructor">
+ </constructor>
+ <constructor name="Quaternion">
<return type="Quaternion" />
<argument index="0" name="from" type="Basis" />
<description>
Constructs a quaternion from the given [Basis].
</description>
- </method>
- <method name="Quaternion" qualifiers="constructor">
+ </constructor>
+ <constructor name="Quaternion">
<return type="Quaternion" />
<argument index="0" name="x" type="float" />
<argument index="1" name="y" type="float" />
@@ -63,7 +63,9 @@
<description>
Constructs a quaternion defined by the given values.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="angle_to" qualifiers="const">
<return type="float" />
<argument index="0" name="to" type="Quaternion" />
@@ -142,131 +144,148 @@
Returns a copy of the quaternion, normalized to unit length.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
+ <method name="slerp" qualifiers="const">
+ <return type="Quaternion" />
+ <argument index="0" name="to" type="Quaternion" />
+ <argument index="1" name="weight" type="float" />
<description>
+ Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code].
+ [b]Note:[/b] Both quaternions must be normalized.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Quaternion" />
+ <method name="slerpni" qualifiers="const">
+ <return type="Quaternion" />
+ <argument index="0" name="to" type="Quaternion" />
+ <argument index="1" name="weight" type="float" />
<description>
+ Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees.
</description>
</method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ </methods>
+ <members>
+ <member name="w" type="float" setter="" getter="" default="1.0">
+ W component of the quaternion (real part).
+ Quaternion components should usually not be manipulated directly.
+ </member>
+ <member name="x" type="float" setter="" getter="" default="0.0">
+ X component of the quaternion (imaginary [code]i[/code] axis part).
+ Quaternion components should usually not be manipulated directly.
+ </member>
+ <member name="y" type="float" setter="" getter="" default="0.0">
+ Y component of the quaternion (imaginary [code]j[/code] axis part).
+ Quaternion components should usually not be manipulated directly.
+ </member>
+ <member name="z" type="float" setter="" getter="" default="0.0">
+ Z component of the quaternion (imaginary [code]k[/code] axis part).
+ Quaternion components should usually not be manipulated directly.
+ </member>
+ </members>
+ <constants>
+ <constant name="IDENTITY" value="Quaternion(0, 0, 0, 1)">
+ The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change.
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
<description>
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Quaternion" />
+ <description>
+ Returns [code]true[/code] if the quaternions are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Composes these two quaternions by multiplying them together. This has the effect of rotating the second quaternion (the child) by the first quaternion (the parent).
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Rotates (multiplies) the [Vector3] by the given [Quaternion].
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
- </method>
- <method name="operator +" qualifiers="operator">
+ </operator>
+ <operator name="operator +">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.
</description>
- </method>
- <method name="operator -" qualifiers="operator">
+ </operator>
+ <operator name="operator -">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="Quaternion" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="Quaternion" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Returns [code]true[/code] if the quaternions are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
- </method>
- <method name="operator []" qualifiers="operator">
+ </operator>
+ <operator name="operator []">
<return type="float" />
<argument index="0" name="index" type="int" />
<description>
+ Access quaternion components using their index. [code]q[0][/code] is equivalent to [code]q.x[/code], [code]q[1][/code] is equivalent to [code]q.y[/code], [code]q[2][/code] is equivalent to [code]q.z[/code], and [code]q[3][/code] is equivalent to [code]q.w[/code].
</description>
- </method>
- <method name="operator unary+" qualifiers="operator">
- <return type="Quaternion" />
- <description>
- </description>
- </method>
- <method name="operator unary-" qualifiers="operator">
- <return type="Quaternion" />
- <description>
- </description>
- </method>
- <method name="slerp" qualifiers="const">
+ </operator>
+ <operator name="operator unary+">
<return type="Quaternion" />
- <argument index="0" name="to" type="Quaternion" />
- <argument index="1" name="weight" type="float" />
<description>
- Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code].
- [b]Note:[/b] Both quaternions must be normalized.
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
- </method>
- <method name="slerpni" qualifiers="const">
+ </operator>
+ <operator name="operator unary-">
<return type="Quaternion" />
- <argument index="0" name="to" type="Quaternion" />
- <argument index="1" name="weight" type="float" />
<description>
- Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees.
+ Returns the negative value of the [Quaternion]. This is the same as writing [code]Quaternion(-q.x, -q.y, -q.z, -q.w)[/code]. This operation results in a quaternion that represents the same rotation.
</description>
- </method>
- </methods>
- <members>
- <member name="w" type="float" setter="" getter="" default="1.0">
- W component of the quaternion (real part).
- Quaternion components should usually not be manipulated directly.
- </member>
- <member name="x" type="float" setter="" getter="" default="0.0">
- X component of the quaternion (imaginary [code]i[/code] axis part).
- Quaternion components should usually not be manipulated directly.
- </member>
- <member name="y" type="float" setter="" getter="" default="0.0">
- Y component of the quaternion (imaginary [code]j[/code] axis part).
- Quaternion components should usually not be manipulated directly.
- </member>
- <member name="z" type="float" setter="" getter="" default="0.0">
- Z component of the quaternion (imaginary [code]k[/code] axis part).
- Quaternion components should usually not be manipulated directly.
- </member>
- </members>
- <constants>
- <constant name="IDENTITY" value="Quaternion(0, 0, 0, 1)">
- The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change.
- </constant>
- </constants>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/RDAttachmentFormat.xml b/doc/classes/RDAttachmentFormat.xml
index 0dea57b4ce..0d5316f29f 100644
--- a/doc/classes/RDAttachmentFormat.xml
+++ b/doc/classes/RDAttachmentFormat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDAttachmentFormat" inherits="RefCounted" version="4.0">
+<class name="RDAttachmentFormat" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDFramebufferPass.xml b/doc/classes/RDFramebufferPass.xml
index 4469a5d447..bf39afd3aa 100644
--- a/doc/classes/RDFramebufferPass.xml
+++ b/doc/classes/RDFramebufferPass.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDFramebufferPass" inherits="RefCounted" version="4.0">
+<class name="RDFramebufferPass" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Framebuffer pass attachment description.
</brief_description>
<description>
This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments.
- Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.
+ Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml
index 6c740fb672..70f03fb1f3 100644
--- a/doc/classes/RDPipelineColorBlendState.xml
+++ b/doc/classes/RDPipelineColorBlendState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineColorBlendState" inherits="RefCounted" version="4.0">
+<class name="RDPipelineColorBlendState" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml
index c81da31367..b0caca64ee 100644
--- a/doc/classes/RDPipelineColorBlendStateAttachment.xml
+++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineColorBlendStateAttachment" inherits="RefCounted" version="4.0">
+<class name="RDPipelineColorBlendStateAttachment" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineDepthStencilState.xml b/doc/classes/RDPipelineDepthStencilState.xml
index 678b576dea..1f2a40b83c 100644
--- a/doc/classes/RDPipelineDepthStencilState.xml
+++ b/doc/classes/RDPipelineDepthStencilState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineDepthStencilState" inherits="RefCounted" version="4.0">
+<class name="RDPipelineDepthStencilState" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml
index fc9b617956..62725137f8 100644
--- a/doc/classes/RDPipelineMultisampleState.xml
+++ b/doc/classes/RDPipelineMultisampleState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineMultisampleState" inherits="RefCounted" version="4.0">
+<class name="RDPipelineMultisampleState" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml
index 54a6923f87..39a64c730a 100644
--- a/doc/classes/RDPipelineRasterizationState.xml
+++ b/doc/classes/RDPipelineRasterizationState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineRasterizationState" inherits="RefCounted" version="4.0">
+<class name="RDPipelineRasterizationState" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineSpecializationConstant.xml b/doc/classes/RDPipelineSpecializationConstant.xml
index 301a860f26..1528b9fcc1 100644
--- a/doc/classes/RDPipelineSpecializationConstant.xml
+++ b/doc/classes/RDPipelineSpecializationConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineSpecializationConstant" inherits="RefCounted" version="4.0">
+<class name="RDPipelineSpecializationConstant" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDSamplerState.xml b/doc/classes/RDSamplerState.xml
index 259bf159a3..a5cfc227d1 100644
--- a/doc/classes/RDSamplerState.xml
+++ b/doc/classes/RDSamplerState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDSamplerState" inherits="RefCounted" version="4.0">
+<class name="RDSamplerState" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml
index c46ab55b57..e719337f22 100644
--- a/doc/classes/RDShaderFile.xml
+++ b/doc/classes/RDShaderFile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDShaderFile" inherits="Resource" version="4.0">
+<class name="RDShaderFile" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDShaderSPIRV.xml b/doc/classes/RDShaderSPIRV.xml
index 434b09b188..4453d7eb27 100644
--- a/doc/classes/RDShaderSPIRV.xml
+++ b/doc/classes/RDShaderSPIRV.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDShaderSPIRV" inherits="Resource" version="4.0">
+<class name="RDShaderSPIRV" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml
index 4788bca7f4..4c3c21bcb9 100644
--- a/doc/classes/RDShaderSource.xml
+++ b/doc/classes/RDShaderSource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDShaderSource" inherits="RefCounted" version="4.0">
+<class name="RDShaderSource" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml
index e4a6df199f..fe2f6d7b1c 100644
--- a/doc/classes/RDTextureFormat.xml
+++ b/doc/classes/RDTextureFormat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDTextureFormat" inherits="RefCounted" version="4.0">
+<class name="RDTextureFormat" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDTextureView.xml b/doc/classes/RDTextureView.xml
index 441d1f4079..6f7406d2aa 100644
--- a/doc/classes/RDTextureView.xml
+++ b/doc/classes/RDTextureView.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDTextureView" inherits="RefCounted" version="4.0">
+<class name="RDTextureView" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -7,7 +7,7 @@
<tutorials>
</tutorials>
<members>
- <member name="format_override" type="int" setter="set_format_override" getter="get_format_override" enum="RenderingDevice.DataFormat" default="226">
+ <member name="format_override" type="int" setter="set_format_override" getter="get_format_override" enum="RenderingDevice.DataFormat" default="218">
</member>
<member name="swizzle_a" type="int" setter="set_swizzle_a" getter="get_swizzle_a" enum="RenderingDevice.TextureSwizzle" default="6">
</member>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
index 4de90aa3dc..29664d7c40 100644
--- a/doc/classes/RDUniform.xml
+++ b/doc/classes/RDUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDUniform" inherits="RefCounted" version="4.0">
+<class name="RDUniform" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml
index 17a55260c7..747f1f93ba 100644
--- a/doc/classes/RDVertexAttribute.xml
+++ b/doc/classes/RDVertexAttribute.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDVertexAttribute" inherits="RefCounted" version="4.0">
+<class name="RDVertexAttribute" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -7,7 +7,7 @@
<tutorials>
</tutorials>
<members>
- <member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="226">
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="218">
</member>
<member name="frequency" type="int" setter="set_frequency" getter="get_frequency" enum="RenderingDevice.VertexFrequency" default="0">
</member>
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
index b4ba74f7e5..6888c1f56c 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RID" version="4.0">
+<class name="RID" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Handle for a [Resource]'s unique ID.
</brief_description>
@@ -8,71 +8,81 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="RID" qualifiers="constructor">
+ <constructors>
+ <constructor name="RID">
<return type="RID" />
<description>
Constructs an empty [RID] with the invalid ID [code]0[/code].
</description>
- </method>
- <method name="RID" qualifiers="constructor">
+ </constructor>
+ <constructor name="RID">
<return type="RID" />
<argument index="0" name="from" type="RID" />
<description>
Constructs a [RID] as a copy of the given [RID].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="get_id" qualifiers="const">
<return type="int" />
<description>
Returns the ID of the referenced resource.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ <method name="is_valid" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if [RID] is valid.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ </methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index c011755df1..28151e858e 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="RefCounted" version="4.0">
+<class name="RandomNumberGenerator" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A class for generating pseudo-random numbers.
</brief_description>
@@ -16,7 +16,7 @@
[b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</description>
<tutorials>
- <link title="Random number generation">https://docs.godotengine.org/en/latest/tutorials/math/random_number_generation.html</link>
+ <link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
</tutorials>
<methods>
<method name="randf">
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index 2926f93c8a..c150198eb1 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" version="4.0">
+<class name="Range" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Abstract base class for range-based controls.
</brief_description>
@@ -9,6 +9,12 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_value_changed" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="" type="float" />
+ <description>
+ </description>
+ </method>
<method name="share">
<return type="void" />
<argument index="0" name="with" type="Node" />
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index 592c074a77..2a7d3502df 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" version="4.0">
+<class name="RayCast2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
@@ -11,14 +11,14 @@
RayCast2D 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 title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="add_exception">
<return type="void" />
- <argument index="0" name="node" type="Object" />
+ <argument index="0" name="node" type="CollisionObject2D" />
<description>
- Adds a collision exception so the ray does not report collisions with the specified node.
+ Adds a collision exception so the ray does not report collisions with the specified [CollisionObject2D] node.
</description>
</method>
<method name="add_exception_rid">
@@ -63,7 +63,7 @@
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the normal of the intersecting object's shape at the collision point.
+ Returns the normal of the intersecting object's shape at the collision point, or [code]Vector2(0, 0)[/code] if the ray starts inside the shape and [member hit_from_inside] is [code]true[/code].
</description>
</method>
<method name="get_collision_point" qualifiers="const">
@@ -81,9 +81,9 @@
</method>
<method name="remove_exception">
<return type="void" />
- <argument index="0" name="node" type="Object" />
+ <argument index="0" name="node" type="CollisionObject2D" />
<description>
- Removes a collision exception so the ray does report collisions with the specified node.
+ Removes a collision exception so the ray does report collisions with the specified [CollisionObject2D] node.
</description>
</method>
<method name="remove_exception_rid">
@@ -110,7 +110,7 @@
If [code]true[/code], collision with [PhysicsBody2D]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. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
If [code]true[/code], collisions will be reported.
@@ -118,6 +118,9 @@
<member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
If [code]true[/code], the parent node will be excluded from collision detection.
</member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the ray will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector2(0, 0)[/code]. Does not affect concave polygon shapes.
+ </member>
<member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index c7253e81c4..65437daa79 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayCast3D" inherits="Node3D" version="4.0">
+<class name="RayCast3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
@@ -11,15 +11,15 @@
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 title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="add_exception">
<return type="void" />
- <argument index="0" name="node" type="Object" />
+ <argument index="0" name="node" type="CollisionObject3D" />
<description>
- Adds a collision exception so the ray does not report collisions with the specified node.
+ Adds a collision exception so the ray does not report collisions with the specified [CollisionObject3D] node.
</description>
</method>
<method name="add_exception_rid">
@@ -38,8 +38,7 @@
<method name="force_raycast_update">
<return type="void" />
<description>
- Updates the collision information for the ray.
- Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
+ Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
[b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work.
</description>
</method>
@@ -65,7 +64,7 @@
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3" />
<description>
- Returns the normal of the intersecting object's shape at the collision point.
+ Returns the normal of the intersecting object's shape at the collision point, or [code]Vector3(0, 0, 0)[/code] if the ray starts inside the shape and [member hit_from_inside] is [code]true[/code].
</description>
</method>
<method name="get_collision_point" qualifiers="const">
@@ -83,9 +82,9 @@
</method>
<method name="remove_exception">
<return type="void" />
- <argument index="0" name="node" type="Object" />
+ <argument index="0" name="node" type="CollisionObject3D" />
<description>
- Removes a collision exception so the ray does report collisions with the specified node.
+ Removes a collision exception so the ray does report collisions with the specified [CollisionObject3D] node.
</description>
</method>
<method name="remove_exception_rid">
@@ -112,13 +111,13 @@
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. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color(0, 0, 0, 1)">
The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [RayCast3D] is colliding with something.
If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used.
</member>
- <member name="debug_shape_thickness" type="float" setter="set_debug_shape_thickness" getter="get_debug_shape_thickness" default="2.0">
+ <member name="debug_shape_thickness" type="int" setter="set_debug_shape_thickness" getter="get_debug_shape_thickness" default="2">
If set to [code]1[/code], a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the [RayCast3D]. Requires [b]Visible Collision Shapes[/b] to be enabled in the [b]Debug[/b] menu for the debug shape to be visible at run-time.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
@@ -127,6 +126,9 @@
<member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
If [code]true[/code], collisions will be ignored for this RayCast3D's immediate parent.
</member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the ray will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector3(0, 0, 0)[/code]. Does not affect shapes with no volume like concave polygon or heightmap.
+ </member>
<member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, -1, 0)">
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index a6bb81b589..a975382bfa 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Rect2" version="4.0">
+<class name="Rect2" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D axis-aligned bounding box using floating point coordinates.
</brief_description>
@@ -7,42 +7,43 @@
[Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
It uses floating-point coordinates. If you need integer coordinates, use [Rect2i] instead.
The 3D counterpart to [Rect2] is [AABB].
+ Negative values for [member size] are not supported and will not work for most methods. Use [method abs] to get a Rect2 with a positive size.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
</tutorials>
- <methods>
- <method name="Rect2" qualifiers="constructor">
+ <constructors>
+ <constructor name="Rect2">
<return type="Rect2" />
<description>
Constructs a default-initialized [Rect2] with default (zero) values of [member position] and [member size].
</description>
- </method>
- <method name="Rect2" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2">
<return type="Rect2" />
<argument index="0" name="from" type="Rect2" />
<description>
Constructs a [Rect2] as a copy of the given [Rect2].
</description>
- </method>
- <method name="Rect2" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2">
<return type="Rect2" />
<argument index="0" name="from" type="Rect2i" />
<description>
Constructs a [Rect2] from a [Rect2i].
</description>
- </method>
- <method name="Rect2" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2">
<return type="Rect2" />
<argument index="0" name="position" type="Vector2" />
<argument index="1" name="size" type="Vector2" />
<description>
Constructs a [Rect2] by position and size.
</description>
- </method>
- <method name="Rect2" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2">
<return type="Rect2" />
<argument index="0" name="x" type="float" />
<argument index="1" name="y" type="float" />
@@ -51,7 +52,9 @@
<description>
Constructs a [Rect2] by x, y, width, and height.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="abs" qualifiers="const">
<return type="Rect2" />
<description>
@@ -69,13 +72,28 @@
<return type="Rect2" />
<argument index="0" name="to" type="Vector2" />
<description>
- Returns this [Rect2] expanded to include a given point.
+ Returns a copy of this [Rect2] expanded to include a given point.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ # position (-3, 2), size (1, 1)
+ var rect = Rect2(Vector2(-3, 2), Vector2(1, 1))
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1)
+ var rect2 = rect.expand(Vector2(0, -1))
+ [/gdscript]
+ [csharp]
+ # position (-3, 2), size (1, 1)
+ var rect = new Rect2(new Vector2(-3, 2), new Vector2(1, 1));
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1)
+ var rect2 = rect.Expand(new Vector2(0, -1));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_area" qualifiers="const">
<return type="float" />
<description>
- Returns the area of the [Rect2].
+ Returns the area of the [Rect2]. See also [method has_no_area].
</description>
</method>
<method name="get_center" qualifiers="const">
@@ -112,14 +130,16 @@
<method name="has_no_area" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the [Rect2] is flat or empty.
+ Returns [code]true[/code] if the [Rect2] is flat or empty, [code]false[/code] otherwise. See also [method get_area].
+ [b]Note:[/b] If the [Rect2] has a negative size and is not flat or empty, [method has_no_area] will return [code]true[/code].
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="point" type="Vector2" />
<description>
- Returns [code]true[/code] if the [Rect2] contains a point.
+ Returns [code]true[/code] if the [Rect2] contains a point. By convention, the right and bottom edges of the [Rect2] are considered exclusive, so points on these edges are [b]not[/b] included.
+ [b]Note:[/b] This method is not reliable for [Rect2] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points.
</description>
</method>
<method name="intersection" qualifiers="const">
@@ -153,45 +173,52 @@
Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code].
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ </methods>
+ <members>
+ <member name="end" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
+ Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
+ </member>
+ <member name="position" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
+ Beginning corner. Typically has values lower than [member end].
+ </member>
+ <member name="size" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
+ Size from [member position] to [member end]. Typically, all components are positive.
+ If the size is negative, you can use [method abs] to fix it.
+ </member>
+ </members>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="Rect2" />
<description>
+ Returns [code]true[/code] if the rectangles are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Rect2" />
<argument index="0" name="right" type="Transform2D" />
<description>
+ Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Rect2" />
<description>
+ Returns [code]true[/code] if the rectangles are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
- </method>
- </methods>
- <members>
- <member name="end" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
- Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
- </member>
- <member name="position" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
- Beginning corner. Typically has values lower than [member end].
- </member>
- <member name="size" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
- Size from [member position] to [member end]. Typically, all components are positive.
- If the size is negative, you can use [method abs] to fix it.
- </member>
- </members>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index 0ba013cade..49fdd8e7e8 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -1,46 +1,47 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Rect2i" version="4.0">
+<class name="Rect2i" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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. If you need floating-point coordinates, use [Rect2] instead.
+ Negative values for [member size] are not supported and will not work for most methods. Use [method abs] to get a Rect2i with a positive size.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
</tutorials>
- <methods>
- <method name="Rect2i" qualifiers="constructor">
+ <constructors>
+ <constructor name="Rect2i">
<return type="Rect2i" />
<description>
Constructs a default-initialized [Rect2i] with default (zero) values of [member position] and [member size].
</description>
- </method>
- <method name="Rect2i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2i">
<return type="Rect2i" />
<argument index="0" name="from" type="Rect2i" />
<description>
Constructs a [Rect2i] as a copy of the given [Rect2i].
</description>
- </method>
- <method name="Rect2i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2i">
<return type="Rect2i" />
<argument index="0" name="from" type="Rect2" />
<description>
Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated.
</description>
- </method>
- <method name="Rect2i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2i">
<return type="Rect2i" />
<argument index="0" name="position" type="Vector2i" />
<argument index="1" name="size" type="Vector2i" />
<description>
Constructs a [Rect2i] by position and size.
</description>
- </method>
- <method name="Rect2i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Rect2i">
<return type="Rect2i" />
<argument index="0" name="x" type="int" />
<argument index="1" name="y" type="int" />
@@ -49,7 +50,9 @@
<description>
Constructs a [Rect2i] by x, y, width, and height.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="abs" qualifiers="const">
<return type="Rect2i" />
<description>
@@ -67,13 +70,27 @@
<return type="Rect2i" />
<argument index="0" name="to" type="Vector2i" />
<description>
- Returns this [Rect2i] expanded to include a given point.
+ Returns a copy of this [Rect2i] expanded so that the borders align with the given point.
+ [codeblocks]
+ [gdscript]
+ # position (-3, 2), size (1, 1)
+ var rect = Rect2i(Vector2i(-3, 2), Vector2i(1, 1))
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1)
+ var rect2 = rect.expand(Vector2i(0, -1))
+ [/gdscript]
+ [csharp]
+ # position (-3, 2), size (1, 1)
+ var rect = new Rect2i(new Vector2i(-3, 2), new Vector2i(1, 1));
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1)
+ var rect2 = rect.Expand(new Vector2i(0, -1));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_area" qualifiers="const">
<return type="int" />
<description>
- Returns the area of the [Rect2i].
+ Returns the area of the [Rect2i]. See also [method has_no_area].
</description>
</method>
<method name="get_center" qualifiers="const">
@@ -111,14 +128,16 @@
<method name="has_no_area" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the [Rect2i] is flat or empty.
+ Returns [code]true[/code] if the [Rect2i] is flat or empty, [code]false[/code] otherwise. See also [method get_area].
+ [b]Note:[/b] If the [Rect2i] has a negative size and is not flat or empty, [method has_no_area] will return [code]true[/code].
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="point" type="Vector2i" />
<description>
- Returns [code]true[/code] if the [Rect2i] contains a point.
+ Returns [code]true[/code] if the [Rect2i] contains a point. By convention, the right and bottom edges of the [Rect2i] are considered exclusive, so points on these edges are [b]not[/b] included.
+ [b]Note:[/b] This method is not reliable for [Rect2i] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points.
</description>
</method>
<method name="intersection" qualifiers="const">
@@ -134,7 +153,6 @@
<argument index="0" name="b" type="Rect2i" />
<description>
Returns [code]true[/code] if the [Rect2i] overlaps with [code]b[/code] (i.e. they have at least one point in common).
- 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="merge" qualifiers="const">
@@ -144,39 +162,43 @@
Returns a larger [Rect2i] that contains this [Rect2i] and [code]b[/code].
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ </methods>
+ <members>
+ <member name="end" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
+ Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
+ </member>
+ <member name="position" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
+ Beginning corner. Typically has values lower than [member end].
+ </member>
+ <member name="size" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
+ Size from [member position] to [member end]. Typically, all components are positive.
+ If the size is negative, you can use [method abs] to fix it.
+ </member>
+ </members>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="Rect2i" />
<description>
+ Returns [code]true[/code] if the rectangles are not equal.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Rect2i" />
<description>
+ Returns [code]true[/code] if the rectangles are equal.
</description>
- </method>
- </methods>
- <members>
- <member name="end" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
- Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
- </member>
- <member name="position" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
- Beginning corner. Typically has values lower than [member end].
- </member>
- <member name="size" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
- Size from [member position] to [member end]. Typically, all components are positive.
- If the size is negative, you can use [method abs] to fix it.
- </member>
- </members>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index add8da181a..cc3da8a789 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" version="4.0">
+<class name="RectangleShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Rectangle shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml
index de314fbcb7..3daf3534b0 100644
--- a/doc/classes/RefCounted.xml
+++ b/doc/classes/RefCounted.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RefCounted" inherits="Object" version="4.0">
+<class name="RefCounted" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for reference-counted objects.
</brief_description>
@@ -10,7 +10,7 @@
[b]Note:[/b] In C#, reference-counted objects will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free reference-counted objects that are no longer in use. This means that unused ones will linger on for a while before being removed.
</description>
<tutorials>
- <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/tutorials/best_practices/node_alternatives.html</link>
+ <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link>
</tutorials>
<methods>
<method name="init_ref">
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index 1db6879b45..00c8385117 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" version="4.0">
+<class name="ReferenceRect" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Reference frame for GUI.
</brief_description>
@@ -16,7 +16,7 @@
Sets the border width of the [ReferenceRect]. The border grows both inwards and outwards with respect to the rectangle box.
</member>
<member name="editor_only" type="bool" setter="set_editor_only" getter="get_editor_only" default="true">
- If set to [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game.
+ If [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in the running project.
</member>
</members>
</class>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 7f2bd118d6..debbfd8d5d 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -1,33 +1,39 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ReflectionProbe" inherits="VisualInstance3D" version="4.0">
+<class name="ReflectionProbe" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Captures its surroundings to create reflections.
+ Captures its surroundings to create fast, accurate reflections from a given point.
</brief_description>
<description>
Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
- The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [VoxelGI]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
+ The [ReflectionProbe] is used to create high-quality reflections at a low performance cost (when [member update_mode] is [constant UPDATE_ONCE]). [ReflectionProbe]s can be blended together and with the rest of the scene smoothly. [ReflectionProbe]s can also be combined with [VoxelGI], SDFGI ([member Environment.sdfgi_enabled]) and screen-space reflections ([member Environment.ss_reflections_enabled]) to get more accurate reflections in specific areas. [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 as-is.
+ [b]Note:[/b] Unlike [VoxelGI] and SDFGI, [ReflectionProbe]s only source their environment from a [WorldEnvironment] node. If you specify an [Environment] resource within a [Camera3D] node, it will be ignored by the [ReflectionProbe]. This can lead to incorrect lighting within the [ReflectionProbe].
</description>
<tutorials>
- <link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link>
+ <link title="Reflection probes">$DOCS_URL/tutorials/3d/reflection_probes.html</link>
</tutorials>
<members>
<member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color(0, 0, 0, 1)">
+ The custom ambient color to use within the [ReflectionProbe]'s [member extents]. Only effective if [member ambient_mode] is [constant AMBIENT_COLOR].
</member>
<member name="ambient_color_energy" type="float" setter="set_ambient_color_energy" getter="get_ambient_color_energy" default="1.0">
+ The custom ambient color energy to use within the [ReflectionProbe]'s [member extents]. Only effective if [member ambient_mode] is [constant AMBIENT_COLOR].
</member>
<member name="ambient_mode" type="int" setter="set_ambient_mode" getter="get_ambient_mode" enum="ReflectionProbe.AmbientMode" default="1">
+ The ambient color to use within the [ReflectionProbe]'s [member extents]. The ambient color will smoothly blend with other [ReflectionProbe]s and the rest of the scene (outside the [ReflectionProbe]'s [member extents]).
</member>
<member name="box_projection" type="bool" setter="set_enable_box_projection" getter="is_box_projection_enabled" default="false">
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.
+ [b]Note:[/b] To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the [ReflectionProbe] node.
</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.
+ 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. To improve performance, it is best to only include large objects which are likely to take up a lot of space in the reflection.
</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(10, 10, 10)">
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.
+ [b]Note:[/b] To better fit areas that are not aligned to the grid, you can rotate the [ReflectionProbe] node.
</member>
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0">
Defines the reflection intensity. Intensity modulates the strength of the reflection.
@@ -35,30 +41,36 @@
<member name="interior" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false">
If [code]true[/code], reflections will ignore sky contribution.
</member>
- <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
- </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.
+ The maximum distance away from the [ReflectionProbe] an object can be before it is culled. Decrease this to improve performance, especially when using the [constant UPDATE_ALWAYS] [member update_mode].
+ [b]Note:[/b] The maximum reflection distance is always at least equal to the [member extents]. This means that decreasing [member max_distance] will not always cull objects from reflections, especially if the reflection probe's [member extents] are already large.
+ </member>
+ <member name="mesh_lod_threshold" type="float" setter="set_mesh_lod_threshold" getter="get_mesh_lod_threshold" default="1.0">
+ The automatic LOD bias to use for meshes rendered within the [ReflectionProbe] (this is analog to [member Viewport.mesh_lod_threshold]). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member mesh_lod_threshold] to improve performance at the cost of geometry detail, especially when using the [constant UPDATE_ALWAYS] [member update_mode].
+ [b]Note:[/b] [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
</member>
<member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3(0, 0, 0)">
- Sets the origin offset to be used when this reflection probe is in box project mode.
+ Sets the origin offset to be used when this [ReflectionProbe] is in [member box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the amount of objects that "get in the way" of the reflection.
</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].
+ Sets how frequently the [ReflectionProbe] 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.
+ Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than [constant UPDATE_ALWAYS], but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a [ReflectionProbe] update by moving the [ReflectionProbe] slightly in any direction.
</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.
+ Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with [constant UPDATE_ALWAYS] at most per scene. For all other use cases, use [constant UPDATE_ONCE].
</constant>
<constant name="AMBIENT_DISABLED" value="0" enum="AmbientMode">
+ Do not apply any ambient lighting inside the [ReflectionProbe]'s [member extents].
</constant>
<constant name="AMBIENT_ENVIRONMENT" value="1" enum="AmbientMode">
+ Apply automatically-sourced environment lighting inside the [ReflectionProbe]'s [member extents].
</constant>
<constant name="AMBIENT_COLOR" value="2" enum="AmbientMode">
+ Apply custom ambient lighting inside the [ReflectionProbe]'s [member extents]. See [member ambient_color] and [member ambient_color_energy].
</constant>
</constants>
</class>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
index c9be26a985..20fa41a3f0 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" version="4.0">
+<class name="RemoteTransform2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
RemoteTransform2D pushes its own [Transform2D] to another [CanvasItem] derived Node in the scene.
</brief_description>
diff --git a/doc/classes/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml
index de727e719d..ae2d0e3d88 100644
--- a/doc/classes/RemoteTransform3D.xml
+++ b/doc/classes/RemoteTransform3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RemoteTransform3D" inherits="Node3D" version="4.0">
+<class name="RemoteTransform3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node in the scene.
</brief_description>
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 442dcc7d18..0d121a29d2 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RenderingDevice" inherits="Object" version="4.0">
+<class name="RenderingDevice" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -305,7 +305,7 @@
<description>
</description>
</method>
- <method name="free">
+ <method name="free_rid">
<return type="void" />
<argument index="0" name="rid" type="RID" />
<description>
@@ -560,7 +560,8 @@
<argument index="1" name="with_texture" type="RID" />
<argument index="2" name="layer" type="int" />
<argument index="3" name="mipmap" type="int" />
- <argument index="4" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" />
+ <argument index="4" name="mipmaps" type="int" default="1" />
+ <argument index="5" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" />
<description>
</description>
</method>
@@ -654,6 +655,24 @@
</constant>
<constant name="BARRIER_MASK_NO_BARRIER" value="8">
</constant>
+ <constant name="DEVICE_TYPE_OTHER" value="0" enum="DeviceType">
+ Rendering device type does not match any of the other enum values or is unknown.
+ </constant>
+ <constant name="DEVICE_TYPE_INTEGRATED_GPU" value="1" enum="DeviceType">
+ Rendering device is an integrated GPU, which is typically [i](but not always)[/i] slower than dedicated GPUs ([constant DEVICE_TYPE_DISCRETE_GPU]). On Android and iOS, the rendering device type is always considered to be [constant DEVICE_TYPE_INTEGRATED_GPU].
+ </constant>
+ <constant name="DEVICE_TYPE_DISCRETE_GPU" value="2" enum="DeviceType">
+ Rendering device is a dedicated GPU, which is typically [i](but not always)[/i] faster than integrated GPUs ([constant DEVICE_TYPE_INTEGRATED_GPU]).
+ </constant>
+ <constant name="DEVICE_TYPE_VIRTUAL_GPU" value="3" enum="DeviceType">
+ Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to [constant DEVICE_TYPE_INTEGRATED_GPU]. Virtual machine GPU passthrough (such as VFIO) will not report the device type as [constant DEVICE_TYPE_VIRTUAL_GPU]. Instead, the host GPU's device type will be reported as if the GPU was not emulated.
+ </constant>
+ <constant name="DEVICE_TYPE_CPU" value="4" enum="DeviceType">
+ Rendering device is provided by software emulation (such as Lavapipe or [url=https://github.com/google/swiftshader]SwiftShader[/url]). This is the slowest kind of rendering device available; it's typically much slower than [constant DEVICE_TYPE_INTEGRATED_GPU].
+ </constant>
+ <constant name="DEVICE_TYPE_MAX" value="5" enum="DeviceType">
+ Represents the size of the [enum DeviceType] enum.
+ </constant>
<constant name="DRIVER_RESOURCE_VULKAN_DEVICE" value="0" enum="DriverResource">
</constant>
<constant name="DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE" value="1" enum="DriverResource">
@@ -1116,23 +1135,7 @@
</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 name="DATA_FORMAT_MAX" value="218" enum="DataFormat">
</constant>
<constant name="TEXTURE_TYPE_1D" value="0" enum="TextureType">
</constant>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 86e66a5738..50990b5320 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RenderingServer" inherits="Object" version="4.0">
+<class name="RenderingServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server for anything visible.
</brief_description>
@@ -15,7 +15,7 @@
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 title="Optimization using Servers">https://docs.godotengine.org/en/latest/tutorials/performance/using_servers.html</link>
+ <link title="Optimization using Servers">$DOCS_URL/tutorials/performance/using_servers.html</link>
</tutorials>
<methods>
<method name="bake_render_uv2">
@@ -994,6 +994,8 @@
<argument index="8" name="hdr_bleed_threshold" type="float" />
<argument index="9" name="hdr_bleed_scale" type="float" />
<argument index="10" name="hdr_luminance_cap" type="float" />
+ <argument index="11" name="glow_map_strength" type="float" />
+ <argument index="12" name="glow_map" type="RID" />
<description>
</description>
</method>
@@ -1001,7 +1003,7 @@
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
- <argument index="2" name="cascades" type="int" enum="RenderingServer.EnvironmentSDFGICascades" />
+ <argument index="2" name="cascades" type="int" />
<argument index="3" name="min_cell_size" type="float" />
<argument index="4" name="y_scale" type="int" enum="RenderingServer.EnvironmentSDFGIYScale" />
<argument index="5" name="use_occlusion" type="bool" />
@@ -1068,7 +1070,7 @@
<argument index="8" name="light_affect" type="float" />
<argument index="9" name="ao_channel_affect" type="float" />
<description>
- Sets the variables to be used with the "screen space ambient occlusion" post-process effect. See [Environment] for more details.
+ Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssao_quality">
@@ -1080,6 +1082,19 @@
<argument index="4" name="fadeout_from" type="float" />
<argument index="5" name="fadeout_to" type="float" />
<description>
+ Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.
+ </description>
+ </method>
+ <method name="environment_set_ssil_quality">
+ <return type="void" />
+ <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSILQuality" />
+ <argument index="1" name="half_size" type="bool" />
+ <argument index="2" name="adaptive_target" type="float" />
+ <argument index="3" name="blur_passes" type="int" />
+ <argument index="4" name="fadeout_from" type="float" />
+ <argument index="5" name="fadeout_to" type="float" />
+ <description>
+ Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssr">
@@ -1232,6 +1247,13 @@
[b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
+ <method name="get_video_adapter_type" qualifiers="const">
+ <return type="int" enum="RenderingDevice.DeviceType" />
+ <description>
+ Returns the type of the video adapter. Since dedicated graphics cards from a given generation will [i]usually[/i] be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings.
+ [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [constant RenderingDevice.DEVICE_TYPE_OTHER].
+ </description>
+ </method>
<method name="get_video_adapter_vendor" qualifiers="const">
<return type="String" />
<description>
@@ -1245,6 +1267,13 @@
Returns the id of a white texture. Creates one if none exists.
</description>
</method>
+ <method name="gi_set_use_half_resolution">
+ <return type="void" />
+ <argument index="0" name="half_resolution" type="bool" />
+ <description>
+ If [code]half_resolution[/code] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].
+ </description>
+ </method>
<method name="global_variable_add">
<return type="void" />
<argument index="0" name="name" type="StringName" />
@@ -1307,7 +1336,7 @@
<return type="bool" />
<argument index="0" name="feature" type="String" />
<description>
- Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code] and [code]pvrtc[/code].
+ Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], and [code]etc2[/code].
</description>
</method>
<method name="instance_attach_object_instance_id">
@@ -1396,6 +1425,14 @@
<description>
</description>
</method>
+ <method name="instance_geometry_set_material_overlay">
+ <return type="void" />
+ <argument index="0" name="instance" type="RID" />
+ <argument index="1" name="material" type="RID" />
+ <description>
+ Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_overlay].
+ </description>
+ </method>
<method name="instance_geometry_set_material_override">
<return type="void" />
<argument index="0" name="instance" type="RID" />
@@ -1418,6 +1455,9 @@
<argument index="1" name="transparency" type="float" />
<description>
Sets the transparency for the given geometry instance. Equivalent to [member GeometryInstance3D.transparency].
+ A transparency of [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [code]transparency[/code] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering.
+ In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in.
+ [b]Note:[/b] [code]transparency[/code] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are.
</description>
</method>
<method name="instance_geometry_set_visibility_range">
@@ -1610,6 +1650,17 @@
Sets the cull mask for this Light3D. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask].
</description>
</method>
+ <method name="light_set_distance_fade">
+ <return type="void" />
+ <argument index="0" name="decal" type="RID" />
+ <argument index="1" name="enabled" type="bool" />
+ <argument index="2" name="begin" type="float" />
+ <argument index="3" name="shadow" type="float" />
+ <argument index="4" name="length" type="float" />
+ <description>
+ Sets the distance fade for this Light3D. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to [member Light3D.distance_fade_enabled], [member Light3D.distance_fade_begin], [member Light3D.distance_fade_shadow], and [member Light3D.distance_fade_length].
+ </description>
+ </method>
<method name="light_set_max_sdfgi_cascade">
<return type="void" />
<argument index="0" name="light" type="RID" />
@@ -1658,14 +1709,6 @@
If [code]true[/code], light will cast shadows. Equivalent to [member Light3D.shadow_enabled].
</description>
</method>
- <method name="light_set_shadow_color">
- <return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="color" type="Color" />
- <description>
- Sets the color of the shadow cast by the light. Equivalent to [member Light3D.shadow_color].
- </description>
- </method>
<method name="lightmap_create">
<return type="RID" />
<description>
@@ -1803,8 +1846,7 @@
<argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType" />
<argument index="2" name="arrays" type="Array" />
<argument index="3" name="blend_shapes" type="Array" default="[]" />
- <argument index="4" name="lods" type="Dictionary" default="{
-}" />
+ <argument index="4" name="lods" type="Dictionary" default="{}" />
<argument index="5" name="compress_format" type="int" default="0" />
<description>
</description>
@@ -2535,19 +2577,19 @@
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_lod_threshold">
+ <method name="reflection_probe_set_max_distance">
<return type="void" />
<argument index="0" name="probe" type="RID" />
- <argument index="1" name="pixels" type="float" />
+ <argument index="1" name="distance" type="float" />
<description>
+ Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance].
</description>
</method>
- <method name="reflection_probe_set_max_distance">
+ <method name="reflection_probe_set_mesh_lod_threshold">
<return type="void" />
<argument index="0" name="probe" type="RID" />
- <argument index="1" name="distance" type="float" />
+ <argument index="1" name="pixels" type="float" />
<description>
- Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance].
</description>
</method>
<method name="reflection_probe_set_origin_offset">
@@ -2575,12 +2617,9 @@
</method>
<method name="request_frame_drawn_callback">
<return type="void" />
- <argument index="0" name="where" type="Object" />
- <argument index="1" name="method" type="StringName" />
- <argument index="2" name="userdata" type="Variant" />
+ <argument index="0" name="callable" type="Callable" />
<description>
- Schedules a callback to the corresponding named [code]method[/code] on [code]where[/code] after a frame has been drawn.
- The callback method must use only 1 argument which will be called with [code]userdata[/code].
+ Schedules a callback to the given callable after a frame has been drawn.
</description>
</method>
<method name="scenario_create">
@@ -2664,8 +2703,10 @@
<return type="RID" />
<argument index="0" name="shader" type="RID" />
<argument index="1" name="param" type="StringName" />
+ <argument index="2" name="index" type="int" default="0" />
<description>
Returns a default texture from a shader searched by name.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
<method name="shader_get_param_default" qualifiers="const">
@@ -2687,8 +2728,10 @@
<argument index="0" name="shader" type="RID" />
<argument index="1" name="param" type="StringName" />
<argument index="2" name="texture" type="RID" />
+ <argument index="3" name="index" type="int" default="0" />
<description>
Sets a shader's default texture. Overwrites the texture given by name.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
<method name="shadows_quality_set">
@@ -3099,6 +3142,22 @@
If [code]true[/code], rendering of a viewport's environment is disabled.
</description>
</method>
+ <method name="viewport_set_fsr_mipmap_bias">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="mipmap_bias" type="float" />
+ <description>
+ Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
+ </description>
+ </method>
+ <method name="viewport_set_fsr_sharpness">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="sharpness" type="float" />
+ <description>
+ Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
+ </description>
+ </method>
<method name="viewport_set_global_canvas_transform">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3150,12 +3209,21 @@
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
</description>
</method>
- <method name="viewport_set_scale_3d">
+ <method name="viewport_set_scaling_3d_mode">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="scaling_3d_mode" type="int" enum="RenderingServer.ViewportScaling3DMode" />
+ <description>
+ Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
+ </description>
+ </method>
+ <method name="viewport_set_scaling_3d_scale">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="scale" type="float" />
<description>
- Sets the scale at which we render 3D contents.
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [enum ViewportScaling3DMode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [enum ViewportMSAA] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
</description>
</method>
<method name="viewport_set_scenario">
@@ -3564,7 +3632,7 @@
<constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat">
Flag used to mark an index array.
</constant>
- <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat">
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
</constant>
@@ -3697,9 +3765,9 @@
</constant>
<constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode">
</constant>
- <constant name="LIGHT_BAKE_DYNAMIC" value="1" enum="LightBakeMode">
+ <constant name="LIGHT_BAKE_STATIC" value="1" enum="LightBakeMode">
</constant>
- <constant name="LIGHT_BAKE_STATIC" value="2" enum="LightBakeMode">
+ <constant name="LIGHT_BAKE_DYNAMIC" value="2" enum="LightBakeMode">
</constant>
<constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode">
Use a dual paraboloid shadow map for omni lights.
@@ -3843,6 +3911,14 @@
<constant name="FOG_VOLUME_SHAPE_WORLD" value="2" enum="FogVolumeShape">
[FogVolume] will have no shape, will cover the whole world and will not be culled.
</constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_BILINEAR" value="0" enum="ViewportScaling3DMode">
+ Enables bilinear scaling on 3D viewports. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_FSR" value="1" enum="ViewportScaling3DMode">
+ Enables FSR upscaling on 3D viewports. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear supersampling will be used instead. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_MAX" value="2" enum="ViewportScaling3DMode">
+ </constant>
<constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode">
Do not update the viewport.
</constant>
@@ -3967,28 +4043,31 @@
<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_PSSM_SPLITS" value="13" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SSIL" value="13" enum="ViewportDebugDraw">
+ Draws the screen space indirect lighting 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.ssil_enabled] set in your [WorldEnvironment].
+ </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="14" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="15" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="15" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="16" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="16" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="17" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="18" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="18" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="19" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="20" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="21" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="22" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="23" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="24" enum="ViewportDebugDraw">
</constant>
<constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode">
</constant>
@@ -4070,40 +4149,53 @@
<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 name="ENV_SSR_ROUGHNESS_QUALITY_DISABLED" value="0" enum="EnvironmentSSRRoughnessQuality">
+ Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option.
</constant>
- <constant name="ENV_SSR_ROUGNESS_QUALITY_LOW" value="1" enum="EnvironmentSSRRoughnessQuality">
+ <constant name="ENV_SSR_ROUGHNESS_QUALITY_LOW" value="1" enum="EnvironmentSSRRoughnessQuality">
+ Low quality of roughness filter for screen-space reflections.
</constant>
- <constant name="ENV_SSR_ROUGNESS_QUALITY_MEDIUM" value="2" enum="EnvironmentSSRRoughnessQuality">
+ <constant name="ENV_SSR_ROUGHNESS_QUALITY_MEDIUM" value="2" enum="EnvironmentSSRRoughnessQuality">
+ Medium quality of roughness filter for screen-space reflections.
</constant>
- <constant name="ENV_SSR_ROUGNESS_QUALITY_HIGH" value="3" enum="EnvironmentSSRRoughnessQuality">
+ <constant name="ENV_SSR_ROUGHNESS_QUALITY_HIGH" value="3" enum="EnvironmentSSRRoughnessQuality">
+ High quality of roughness filter for screen-space reflections. This is the slowest option.
</constant>
<constant name="ENV_SSAO_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSAOQuality">
- Lowest quality of screen space ambient occlusion.
+ Lowest quality of screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_LOW" value="1" enum="EnvironmentSSAOQuality">
- Low quality screen space ambient occlusion.
+ Low quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_MEDIUM" value="2" enum="EnvironmentSSAOQuality">
- Medium quality screen space ambient occlusion.
+ Medium quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_HIGH" value="3" enum="EnvironmentSSAOQuality">
- High quality screen space ambient occlusion.
+ High quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_ULTRA" value="4" enum="EnvironmentSSAOQuality">
- Highest quality screen space ambient occlusion. Uses the adaptive setting which can be dynamically adjusted to smoothly balance performance and visual quality.
+ Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSILQuality">
+ Lowest quality of screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_LOW" value="1" enum="EnvironmentSSILQuality">
+ Low quality screen-space indirect lighting.
</constant>
- <constant name="ENV_SDFGI_CASCADES_4" value="0" enum="EnvironmentSDFGICascades">
+ <constant name="ENV_SSIL_QUALITY_MEDIUM" value="2" enum="EnvironmentSSILQuality">
+ High quality screen-space indirect lighting.
</constant>
- <constant name="ENV_SDFGI_CASCADES_6" value="1" enum="EnvironmentSDFGICascades">
+ <constant name="ENV_SSIL_QUALITY_HIGH" value="3" enum="EnvironmentSSILQuality">
+ High quality screen-space indirect lighting.
</constant>
- <constant name="ENV_SDFGI_CASCADES_8" value="2" enum="EnvironmentSDFGICascades">
+ <constant name="ENV_SSIL_QUALITY_ULTRA" value="4" enum="EnvironmentSSILQuality">
+ Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
</constant>
- <constant name="ENV_SDFGI_Y_SCALE_DISABLED" value="0" enum="EnvironmentSDFGIYScale">
+ <constant name="ENV_SDFGI_Y_SCALE_50_PERCENT" value="0" enum="EnvironmentSDFGIYScale">
</constant>
<constant name="ENV_SDFGI_Y_SCALE_75_PERCENT" value="1" enum="EnvironmentSDFGIYScale">
</constant>
- <constant name="ENV_SDFGI_Y_SCALE_50_PERCENT" value="2" enum="EnvironmentSDFGIYScale">
+ <constant name="ENV_SDFGI_Y_SCALE_100_PERCENT" value="2" enum="EnvironmentSDFGIYScale">
</constant>
<constant name="ENV_SDFGI_RAY_COUNT_4" value="0" enum="EnvironmentSDFGIRayCount">
</constant>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 327183893b..b08b1540ab 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="RefCounted" version="4.0">
+<class name="Resource" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all resources.
</brief_description>
@@ -8,10 +8,15 @@
[b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed.
</description>
<tutorials>
- <link title="Resources">https://docs.godotengine.org/en/latest/tutorials/scripting/resources.html</link>
- <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/tutorials/best_practices/node_alternatives.html</link>
+ <link title="Resources">$DOCS_URL/tutorials/scripting/resources.html</link>
+ <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link>
</tutorials>
<methods>
+ <method name="_get_rid" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="duplicate" qualifiers="const">
<return type="Resource" />
<argument index="0" name="subresources" type="bool" default="false" />
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 0c2bb26c02..36b64f5a86 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="RefCounted" version="4.0">
+<class name="ResourceFormatLoader" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 on 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.
+ [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 on 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].ctex[/code] ([CompressedTexture2D]) first, so they can be loaded with better efficiency on the graphics card.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index 8d48de9378..c156814a1d 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="RefCounted" version="4.0">
+<class name="ResourceFormatSaver" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Saves a specific resource type to a file.
</brief_description>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index 9f551ad1d2..3e7eef66fe 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="RefCounted" version="4.0">
+<class name="ResourceImporter" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for the implementation of core resource importers.
</brief_description>
@@ -7,7 +7,7 @@
This is the base class for the resource importers implemented in core. To implement your own resource importers using editor plugins, see [EditorImportPlugin].
</description>
<tutorials>
- <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
+ <link title="Import plugins">$DOCS_URL/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<constants>
<constant name="IMPORT_ORDER_DEFAULT" value="0" enum="ImportOrder">
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 81e825194b..1ffb0dba5c 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" version="4.0">
+<class name="ResourceLoader" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Singleton used to load resource files.
</brief_description>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 565578cb22..63db131cec 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" version="4.0">
+<class name="ResourcePreloader" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Resource Preloader Node.
</brief_description>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index 39f166db2e..a029fb9acf 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" version="4.0">
+<class name="ResourceSaver" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Singleton for saving Godot-specific resource types.
</brief_description>
@@ -21,15 +21,18 @@
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<argument index="1" name="resource" type="Resource" />
- <argument index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0" />
+ <argument index="2" name="flags" type="int" default="0" />
<description>
Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object.
- The [code]flags[/code] bitmask can be specified to customize the save behavior.
+ The [code]flags[/code] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags.
Returns [constant OK] on success.
</description>
</method>
</methods>
<constants>
+ <constant name="FLAG_NONE" value="0" enum="SaverFlags">
+ No resource saving option.
+ </constant>
<constant name="FLAG_RELATIVE_PATHS" value="1" enum="SaverFlags">
Save the resource with a path relative to the scene which uses it.
</constant>
diff --git a/doc/classes/ResourceUID.xml b/doc/classes/ResourceUID.xml
index 9e3d647ccf..f91c39b512 100644
--- a/doc/classes/ResourceUID.xml
+++ b/doc/classes/ResourceUID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceUID" inherits="Object" version="4.0">
+<class name="ResourceUID" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -14,7 +14,7 @@
<description>
</description>
</method>
- <method name="create_id" qualifiers="const">
+ <method name="create_id">
<return type="int" />
<description>
</description>
diff --git a/doc/classes/RibbonTrailMesh.xml b/doc/classes/RibbonTrailMesh.xml
index c2e9c14bab..336e9d7f43 100644
--- a/doc/classes/RibbonTrailMesh.xml
+++ b/doc/classes/RibbonTrailMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RibbonTrailMesh" inherits="PrimitiveMesh" version="4.0">
+<class name="RibbonTrailMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 62323722f7..2256839378 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RichTextEffect" inherits="Resource" version="4.0">
+<class name="RichTextEffect" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A custom effect for use with [RichTextLabel].
</brief_description>
@@ -19,7 +19,7 @@
[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 title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/ui/bbcode_in_richtextlabel.html</link>
+ <link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
<link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 0fd25615ba..d5e134fc60 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" version="4.0">
+<class name="RichTextLabel" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Label that displays rich text.
</brief_description>
@@ -11,7 +11,7 @@
[b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property.
</description>
<tutorials>
- <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/ui/bbcode_in_richtextlabel.html</link>
+ <link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
<link title="GUI Rich Text/BBcode Demo">https://godotengine.org/asset-library/asset/132</link>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
@@ -22,7 +22,7 @@
<argument index="1" name="width" type="int" default="0" />
<argument index="2" name="height" type="int" default="0" />
<argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image.
If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
@@ -49,24 +49,58 @@
Clears the tag stack and sets [member text] to an empty string.
</description>
</method>
+ <method name="get_character_line">
+ <return type="int" />
+ <argument index="0" name="character" type="int" />
+ <description>
+ Returns the line number of the character position provided.
+ </description>
+ </method>
+ <method name="get_character_paragraph">
+ <return type="int" />
+ <argument index="0" name="character" type="int" />
+ <description>
+ Returns the paragraph number of the character position provided.
+ </description>
+ </method>
<method name="get_content_height" qualifiers="const">
<return type="int" />
<description>
Returns the height of the content.
</description>
</method>
+ <method name="get_content_width" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the width of the content.
+ </description>
+ </method>
<method name="get_line_count" qualifiers="const">
<return type="int" />
<description>
Returns the total number of lines in the text. Wrapped text is counted as multiple lines.
</description>
</method>
+ <method name="get_line_offset">
+ <return type="float" />
+ <argument index="0" name="line" type="int" />
+ <description>
+ Returns the vertical offset of the line found at the provided index.
+ </description>
+ </method>
<method name="get_paragraph_count" qualifiers="const">
<return type="int" />
<description>
Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.
</description>
</method>
+ <method name="get_paragraph_offset">
+ <return type="float" />
+ <argument index="0" name="paragraph" type="int" />
+ <description>
+ Returns the vertical offset of the paragraph found at the provided index.
+ </description>
+ </method>
<method name="get_parsed_text" qualifiers="const">
<return type="String" />
<description>
@@ -97,7 +131,7 @@
Returns the total number of characters from text tags. Does not include BBCodes.
</description>
</method>
- <method name="get_v_scroll">
+ <method name="get_v_scroll_bar">
<return type="VScrollBar" />
<description>
Returns the vertical scrollbar.
@@ -279,7 +313,7 @@
</method>
<method name="push_paragraph">
<return type="void" />
- <argument index="0" name="align" type="int" enum="RichTextLabel.Align" />
+ <argument index="0" name="alignment" type="int" enum="HorizontalAlignment" />
<argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
<argument index="2" name="language" type="String" default="&quot;&quot;" />
<argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0" />
@@ -296,7 +330,7 @@
<method name="push_table">
<return type="void" />
<argument index="0" name="columns" type="int" />
- <argument index="1" name="inline_align" type="int" enum="InlineAlign" default="0" />
+ <argument index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
<description>
Adds a [code][table=columns,inline_align][/code] tag to the tag stack.
</description>
@@ -372,9 +406,13 @@
</method>
</methods>
<members>
+ <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="RichTextLabel.AutowrapMode" default="3">
+ If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum AutowrapMode].
+ </member>
<member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false">
If [code]true[/code], the label uses BBCode formatting.
</member>
+ <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<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].
@@ -399,7 +437,6 @@
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. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line].
</member>
@@ -420,7 +457,7 @@
</member>
<member name="text" type="String" setter="set_text" getter="get_text" 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] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [code]text[/code] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
+ [b]Note:[/b] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [code]text[/code] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using [code]push_*[/code] methods. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
</member>
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
@@ -429,6 +466,9 @@
The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed.
[b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
</member>
+ <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="RichTextLabel.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
+ </member>
</members>
<signals>
<signal name="meta_clicked">
@@ -451,17 +491,17 @@
</signal>
</signals>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="Align">
- Makes text left aligned.
+ <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
+ Autowrap is disabled.
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="Align">
- Makes text centered.
+ <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
</constant>
- <constant name="ALIGN_RIGHT" value="2" enum="Align">
- Makes text right aligned.
+ <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by soft-breaking between words.
</constant>
- <constant name="ALIGN_FILL" value="3" enum="Align">
- Makes text fill width.
+ <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
+ Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
</constant>
<constant name="LIST_NUMBERS" value="0" enum="ListType">
Each list item has a number marker.
@@ -527,26 +567,26 @@
</constant>
<constant name="ITEM_CUSTOMFX" value="25" enum="ItemType">
</constant>
+ <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
+ Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
+ </constant>
+ <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ </constant>
+ <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left.
+ </constant>
+ <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the right.
+ </constant>
</constants>
<theme_items>
- <theme_item name="bold_font" data_type="font" type="Font">
- The font used for bold text.
- </theme_item>
- <theme_item name="bold_font_size" data_type="font_size" type="int">
- The font size used for bold text.
- </theme_item>
- <theme_item name="bold_italics_font" data_type="font" type="Font">
- The font used for bold italics text.
- </theme_item>
- <theme_item name="bold_italics_font_size" data_type="font_size" type="int">
- The font size used for bold italics text.
- </theme_item>
<theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The default text color.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- The background The background used when the [RichTextLabel] is focused.
- </theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The default tint of text outline.
</theme_item>
@@ -556,59 +596,74 @@
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
The color of the font's shadow.
</theme_item>
- <theme_item name="italics_font" data_type="font" type="Font">
- The font used for italics text.
- </theme_item>
- <theme_item name="italics_font_size" data_type="font_size" type="int">
- The font size used for italics text.
- </theme_item>
- <theme_item name="line_separation" data_type="constant" type="int" default="0">
- The vertical space between lines.
- </theme_item>
- <theme_item name="mono_font" data_type="font" type="Font">
- The font used for monospace text.
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.1, 0.1, 1, 0.8)">
+ The color of the selection box.
</theme_item>
- <theme_item name="mono_font_size" data_type="font_size" type="int">
- The font size used for monospace text.
+ <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The default cell border color.
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- The normal background for the [RichTextLabel].
+ <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The default background color for even rows.
</theme_item>
- <theme_item name="normal_font" data_type="font" type="Font">
- The default text font.
+ <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The default background color for odd rows.
</theme_item>
- <theme_item name="normal_font_size" data_type="font_size" type="int">
- The default text font size.
+ <theme_item name="line_separation" data_type="constant" type="int" default="0">
+ The vertical space between lines.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="selection_color" data_type="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" data_type="constant" 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" data_type="constant" type="int" default="1">
The horizontal offset of the font's shadow.
</theme_item>
<theme_item name="shadow_offset_y" data_type="constant" type="int" default="1">
The vertical offset of the font's shadow.
</theme_item>
- <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
- The default cell border color.
- </theme_item>
- <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
- The default background color for even rows.
+ <theme_item name="shadow_outline_size" data_type="constant" type="int" default="1">
+ The size of the shadow outline.
</theme_item>
<theme_item name="table_hseparation" data_type="constant" type="int" default="3">
The horizontal separation of elements in a table.
</theme_item>
- <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
- The default background color for odd rows.
- </theme_item>
<theme_item name="table_vseparation" data_type="constant" type="int" default="3">
The vertical separation of elements in a table.
</theme_item>
+ <theme_item name="bold_font" data_type="font" type="Font">
+ The font used for bold text.
+ </theme_item>
+ <theme_item name="bold_italics_font" data_type="font" type="Font">
+ The font used for bold italics text.
+ </theme_item>
+ <theme_item name="italics_font" data_type="font" type="Font">
+ The font used for italics text.
+ </theme_item>
+ <theme_item name="mono_font" data_type="font" type="Font">
+ The font used for monospace text.
+ </theme_item>
+ <theme_item name="normal_font" data_type="font" type="Font">
+ The default text font.
+ </theme_item>
+ <theme_item name="bold_font_size" data_type="font_size" type="int">
+ The font size used for bold text.
+ </theme_item>
+ <theme_item name="bold_italics_font_size" data_type="font_size" type="int">
+ The font size used for bold italics text.
+ </theme_item>
+ <theme_item name="italics_font_size" data_type="font_size" type="int">
+ The font size used for italics text.
+ </theme_item>
+ <theme_item name="mono_font_size" data_type="font_size" type="int">
+ The font size used for monospace text.
+ </theme_item>
+ <theme_item name="normal_font_size" data_type="font_size" type="int">
+ The default text font size.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The background used when the [RichTextLabel] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ The normal background for the [RichTextLabel].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml
index f503884192..087156989e 100644
--- a/doc/classes/RigidDynamicBody2D.xml
+++ b/doc/classes/RigidDynamicBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidDynamicBody2D" inherits="PhysicsBody2D" version="4.0">
+<class name="RigidDynamicBody2D" inherits="PhysicsBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
@@ -22,26 +22,36 @@
Allows you to read and safely modify the simulation state for the object. Use this instead of [method Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default, it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body.
</description>
</method>
- <method name="add_central_force">
+ <method name="add_constant_central_force">
<return type="void" />
<argument index="0" name="force" type="Vector2" />
<description>
- Adds a constant directional force without affecting rotation.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="float" />
<description>
- Adds a constant rotational force.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = 0[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
@@ -49,6 +59,17 @@
<argument index="0" name="impulse" type="Vector2" default="Vector2(0, 0)" />
<description>
Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -56,14 +77,24 @@
<argument index="0" name="impulse" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="float" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="torque" type="float" />
<description>
- Applies a rotational impulse to the body.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
@@ -82,18 +113,15 @@
</method>
</methods>
<members>
- <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
- Damps the body's [member angular_velocity]. If [code]-1[/code], the body will use the [b]Default Angular Damp[/b] defined in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b].
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.0">
+ Damps the body's rotation. By default, the body will use the [b]Default Angular Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] or any value override set by an [Area2D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping.
</member>
- <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0">
- The body's rotational velocity.
- </member>
- <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force" default="Vector2(0, 0)">
- The body's total applied force.
+ <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="RigidDynamicBody2D.DampMode" default="0">
+ Defines how [member angular_damp] is applied. See [enum DampMode] for possible values.
</member>
- <member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque" default="0.0">
- The body's total applied torque.
+ <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0">
+ The body's rotational velocity in [i]radians[/i] per second.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
@@ -105,6 +133,14 @@
<member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody2D.CenterOfMassMode" default="0">
Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
</member>
+ <member name="constant_force" type="Vector2" setter="set_constant_force" getter="get_constant_force" default="Vector2(0, 0)">
+ The body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </member>
+ <member name="constant_torque" type="float" setter="set_constant_torque" getter="get_constant_torque" default="0.0">
+ The body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the body will emit signals when it collides with another RigidDynamicBody2D. See also [member contacts_reported].
</member>
@@ -135,12 +171,15 @@
The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
If set to [code]0[/code], inertia is automatically computed (default value).
</member>
- <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0">
- Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b].
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.0">
+ Damps the body's movement. By default, the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] or any value override set by an [Area2D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping.
</member>
+ <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="RigidDynamicBody2D.DampMode" default="0">
+ Defines how [member linear_damp] is applied. See [enum DampMode] for possible values.
+ </member>
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)">
- The body's linear velocity.
+ The body's linear velocity in pixels per second. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="lock_rotation" type="bool" setter="set_lock_rotation_enabled" getter="is_lock_rotation_enabled" default="false">
If [code]true[/code], the body cannot rotate. Gravity and forces only apply linear movement.
@@ -153,7 +192,7 @@
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
- If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
+ If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods.
</member>
</members>
<signals>
@@ -180,8 +219,8 @@
Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -193,8 +232,8 @@
Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="sleeping_state_changed">
@@ -217,6 +256,12 @@
<constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode">
In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
</constant>
+ <constant name="DAMP_MODE_COMBINE" value="0" enum="DampMode">
+ In this mode, the body's damping value is added to any value set in areas or the default value.
+ </constant>
+ <constant name="DAMP_MODE_REPLACE" value="1" enum="DampMode">
+ In this mode, the body's damping value replaces any value set in areas or the default value.
+ </constant>
<constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode">
Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
</constant>
diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidDynamicBody3D.xml
index 6c8d190704..285176b8b0 100644
--- a/doc/classes/RigidDynamicBody3D.xml
+++ b/doc/classes/RigidDynamicBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidDynamicBody3D" inherits="PhysicsBody3D" version="4.0">
+<class name="RigidDynamicBody3D" inherits="PhysicsBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
@@ -10,7 +10,7 @@
If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator].
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
@@ -22,28 +22,36 @@
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body.
</description>
</method>
- <method name="add_central_force">
+ <method name="add_constant_central_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" />
<description>
- Adds a constant directional force (i.e. acceleration) without affecting rotation.
- This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code].
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- 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.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="Vector3" />
<description>
- Adds a constant rotational force (i.e. a motor) without affecting position.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = Vector3(0, 0, 0)[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
@@ -51,7 +59,17 @@
<argument index="0" name="impulse" type="Vector3" />
<description>
Applies a directional impulse without affecting rotation.
- This is equivalent to [code]apply_impulse(Vector3(0,0,0), impulse)[/code].
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -59,14 +77,24 @@
<argument index="0" name="impulse" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="Vector3" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="impulse" type="Vector3" />
<description>
- Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
@@ -91,12 +119,15 @@
</method>
</methods>
<members>
- <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
- Damps RigidDynamicBody3D's rotational forces.
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.0">
+ Damps the body's rotation. By default, the body will use the [b]Default Angular Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
+ <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="RigidDynamicBody3D.DampMode" default="0">
+ Defines how [member angular_damp] is applied. See [enum DampMode] for possible values.
+ </member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
- RigidDynamicBody3D's rotational velocity.
+ The RigidDynamicBody3D's rotational velocity in [i]radians[/i] per second.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
@@ -108,6 +139,14 @@
<member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody3D.CenterOfMassMode" default="0">
Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
</member>
+ <member name="constant_force" type="Vector3" setter="set_constant_force" getter="get_constant_force" default="Vector3(0, 0, 0)">
+ The body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </member>
+ <member name="constant_torque" type="Vector3" setter="set_constant_torque" getter="get_constant_torque" default="Vector3(0, 0, 0)">
+ The body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. See also [member contacts_reported].
</member>
@@ -138,12 +177,15 @@
The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
If set to [code]Vector3.ZERO[/code], inertia is automatically computed (default value).
</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.
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.0">
+ Damps the body's movement. By default, the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
</member>
+ <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="RigidDynamicBody3D.DampMode" default="0">
+ Defines how [member linear_damp] is applied. See [enum DampMode] for possible values.
+ </member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
- The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
+ The body's linear velocity in units per second. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="lock_rotation" type="bool" setter="set_lock_rotation_enabled" getter="is_lock_rotation_enabled" default="false">
If [code]true[/code], the body cannot rotate. Gravity and forces only apply linear movement.
@@ -156,7 +198,7 @@
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
- If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
+ If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods.
</member>
</members>
<signals>
@@ -183,9 +225,8 @@
Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
[code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
- [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
+ [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -197,9 +238,8 @@
Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
[code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
- [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
+ [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="sleeping_state_changed">
@@ -222,5 +262,11 @@
<constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode">
In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
</constant>
+ <constant name="DAMP_MODE_COMBINE" value="0" enum="DampMode">
+ In this mode, the body's damping value is added to any value set in areas or the default value.
+ </constant>
+ <constant name="DAMP_MODE_REPLACE" value="1" enum="DampMode">
+ In this mode, the body's damping value replaces any value set in areas or the default value.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml
index 5db13de44f..88b8f2cd03 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="VisualInstance3D" version="4.0">
+<class name="RootMotionView" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Editor-only helper for setting up root motion in [AnimationTree].
</brief_description>
@@ -8,7 +8,7 @@
[b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain [Node] in the running project. This means a script attached to a [RootMotionView] node [i]must[/i] have [code]extends Node[/code] instead of [code]extends RootMotionView[/code]. Additionally, it must not be a [code]@tool[/code] script.
</description>
<tutorials>
- <link title="Using AnimationTree - Root motion">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#root-motion</link>
+ <link title="Using AnimationTree - Root motion">$DOCS_URL/tutorials/animation/animation_tree.html#root-motion</link>
</tutorials>
<members>
<member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path">
diff --git a/doc/classes/SceneReplicationConfig.xml b/doc/classes/SceneReplicationConfig.xml
new file mode 100644
index 0000000000..aade8ac3be
--- /dev/null
+++ b/doc/classes/SceneReplicationConfig.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SceneReplicationConfig" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_property">
+ <return type="void" />
+ <argument index="0" name="path" type="NodePath" />
+ <argument index="1" name="index" type="int" default="-1" />
+ <description>
+ </description>
+ </method>
+ <method name="get_properties" qualifiers="const">
+ <return type="NodePath[]" />
+ <description>
+ </description>
+ </method>
+ <method name="property_get_index" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="path" type="NodePath" />
+ <description>
+ </description>
+ </method>
+ <method name="property_get_spawn">
+ <return type="bool" />
+ <argument index="0" name="path" type="NodePath" />
+ <description>
+ </description>
+ </method>
+ <method name="property_get_sync">
+ <return type="bool" />
+ <argument index="0" name="path" type="NodePath" />
+ <description>
+ </description>
+ </method>
+ <method name="property_set_spawn">
+ <return type="void" />
+ <argument index="0" name="path" type="NodePath" />
+ <argument index="1" name="enabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="property_set_sync">
+ <return type="void" />
+ <argument index="0" name="path" type="NodePath" />
+ <argument index="1" name="enabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_property">
+ <return type="void" />
+ <argument index="0" name="path" type="NodePath" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index 1c3bac9270..d226577a95 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="RefCounted" version="4.0">
+<class name="SceneState" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A script interface to a scene file's data.
</brief_description>
@@ -59,6 +59,13 @@
Returns the path to the node that owns the method connected to the signal at [code]idx[/code], relative to the root node.
</description>
</method>
+ <method name="get_connection_unbinds" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="idx" type="int" />
+ <description>
+ Returns the number of unbound parameters for the signal at [code]idx[/code].
+ </description>
+ </method>
<method name="get_node_count" qualifiers="const">
<return type="int" />
<description>
@@ -168,5 +175,9 @@
If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
[b]Note:[/b] Only available in editor builds.
</constant>
+ <constant name="GEN_EDIT_STATE_MAIN_INHERITED" value="3" enum="GenEditState">
+ If passed to [method PackedScene.instantiate], it's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one.
+ [b]Note:[/b] Only available in editor builds.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 6d0ec44b69..f3dfc727b0 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" version="4.0">
+<class name="SceneTree" inherits="MainLoop" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Manages the game loop via a hierarchy of nodes.
</brief_description>
@@ -9,8 +9,8 @@
[SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop.
</description>
<tutorials>
- <link title="SceneTree">https://docs.godotengine.org/en/latest/tutorials/scripting/scene_tree.html</link>
- <link title="Multiple resolutions">https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html</link>
+ <link title="SceneTree">$DOCS_URL/tutorials/scripting/scene_tree.html</link>
+ <link title="Multiple resolutions">$DOCS_URL/tutorials/rendering/multiple_resolutions.html</link>
</tutorials>
<methods>
<method name="call_group" qualifiers="vararg">
@@ -232,13 +232,6 @@
</member>
</members>
<signals>
- <signal name="files_dropped">
- <argument index="0" name="files" type="PackedStringArray" />
- <argument index="1" name="screen" type="int" />
- <description>
- 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="node_added">
<argument index="0" name="node" type="Node" />
<description>
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index b0509a322e..427608ead3 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="RefCounted" version="4.0">
+<class name="SceneTreeTimer" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
One-shot timer.
</brief_description>
@@ -22,12 +22,13 @@
}
[/csharp]
[/codeblocks]
+ The timer will be automatically freed after its time elapses.
</description>
<tutorials>
</tutorials>
<members>
<member name="time_left" type="float" setter="set_time_left" getter="get_time_left">
- The time remaining.
+ The time remaining (in seconds).
</member>
</members>
<signals>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 7c59e87848..cd8841c8c5 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Script" inherits="Resource" version="4.0">
+<class name="Script" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A class stored as a resource.
</brief_description>
<description>
A class stored as a resource. A script extends the functionality of all objects that instance it.
+ This is the base class for all scripts and should not be used directly. Trying to create a new script with this class will result in an error.
The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
- <link title="Scripting documentation index">https://docs.godotengine.org/en/latest/tutorials/scripting/index.html</link>
+ <link title="Scripting documentation index">$DOCS_URL/tutorials/scripting/index.html</link>
</tutorials>
<methods>
<method name="can_instantiate" qualifiers="const">
diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index 349adb9111..e21fac2d32 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScriptCreateDialog" inherits="ConfirmationDialog" version="4.0">
+<class name="ScriptCreateDialog" inherits="ConfirmationDialog" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
The Editor's popup dialog for creating new [Script] files.
</brief_description>
@@ -39,8 +39,8 @@
</method>
</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="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Attach Node Script&quot;" />
+ <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Attach Node Script&quot;" />
</members>
<signals>
<signal name="script_created">
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index faad8f8cae..92488b2392 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScriptEditor" inherits="PanelContainer" version="4.0">
+<class name="ScriptEditor" inherits="PanelContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Godot editor's script editor.
</brief_description>
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index 88adeaf12f..3bed1127ee 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScriptEditorBase" inherits="VBoxContainer" version="4.0">
+<class name="ScriptEditorBase" inherits="VBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base editor for editing scripts in the [ScriptEditor].
</brief_description>
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index 1f1415bebe..266787c9c8 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" version="4.0">
+<class name="ScrollBar" inherits="Range" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for scroll bars.
</brief_description>
@@ -12,8 +12,8 @@
<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" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.0" />
</members>
<signals>
<signal name="scrolling">
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 976c32c243..95255ed79f 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScrollContainer" inherits="Container" version="4.0">
+<class name="ScrollContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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.
+ ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.minimum_size] of the Control relative to the ScrollContainer.
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>
@@ -16,47 +16,47 @@
<argument index="0" name="control" type="Control" />
<description>
Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus].
+ [b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.process_frame]:
+ [codeblock]
+ add_child(child_node)
+ await get_tree().process_frame
+ ensure_control_visible(child_node)
+ [/codeblock]
</description>
</method>
- <method name="get_h_scrollbar">
+ <method name="get_h_scroll_bar">
<return type="HScrollBar" />
<description>
Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer].
- [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the horizontal scrollbar, use [member scroll_horizontal_enabled]. If you want to only hide it instead, use [member scroll_horizontal_visible].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member horizontal_scroll_mode].
</description>
</method>
- <method name="get_v_scrollbar">
+ <method name="get_v_scroll_bar">
<return type="VScrollBar" />
<description>
Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer].
- [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the vertical scrollbar, use [member scroll_vertical_enabled]. If you want to only hide it instead, use [member scroll_vertical_visible].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member vertical_scroll_mode].
</description>
</method>
</methods>
<members>
+ <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<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="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" enum="ScrollContainer.ScrollMode" default="1">
+ Controls whether horizontal scrollbar can be used and when it should be visible. See [enum ScrollMode] for options.
+ </member>
<member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0">
</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_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" default="true">
- If [code]true[/code], enables horizontal scrolling.
- </member>
- <member name="scroll_horizontal_visible" type="bool" setter="set_h_scroll_visible" getter="is_h_scroll_visible" default="true">
- If [code]false[/code], hides the horizontal scrollbar.
- </member>
<member name="scroll_vertical" type="int" setter="set_v_scroll" getter="get_v_scroll" default="0">
The current vertical scroll value.
</member>
- <member name="scroll_vertical_enabled" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled" default="true">
- If [code]true[/code], enables vertical scrolling.
- </member>
- <member name="scroll_vertical_visible" type="bool" setter="set_v_scroll_visible" getter="is_v_scroll_visible" default="true">
- If [code]false[/code], hides the vertical scrollbar.
+ <member name="vertical_scroll_mode" type="int" setter="set_vertical_scroll_mode" getter="get_vertical_scroll_mode" enum="ScrollContainer.ScrollMode" default="1">
+ Controls whether vertical scrollbar can be used and when it should be visible. See [enum ScrollMode] for options.
</member>
</members>
<signals>
@@ -71,6 +71,20 @@
</description>
</signal>
</signals>
+ <constants>
+ <constant name="SCROLL_MODE_DISABLED" value="0" enum="ScrollMode">
+ Scrolling disabled, scrollbar will be invisible.
+ </constant>
+ <constant name="SCROLL_MODE_AUTO" value="1" enum="ScrollMode">
+ Scrolling enabled, scrollbar will be visible only if necessary, i.e. container's content is bigger than the container.
+ </constant>
+ <constant name="SCROLL_MODE_SHOW_ALWAYS" value="2" enum="ScrollMode">
+ Scrolling enabled, scrollbar will be always visible.
+ </constant>
+ <constant name="SCROLL_MODE_SHOW_NEVER" value="3" enum="ScrollMode">
+ Scrolling enabled, scrollbar will be hidden.
+ </constant>
+ </constants>
<theme_items>
<theme_item name="bg" data_type="style" type="StyleBox">
The background [StyleBox] of the [ScrollContainer].
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
index 799884257f..8109886262 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" version="4.0">
+<class name="SegmentShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Segment shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index 9ff9cc0c87..6b2007363e 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="RefCounted" version="4.0">
+<class name="Semaphore" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A synchronization semaphore.
</brief_description>
@@ -7,7 +7,7 @@
A synchronization semaphore which can be used to synchronize multiple [Thread]s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see [Mutex].
</description>
<tutorials>
- <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/performance/using_multiple_threads.html</link>
+ <link title="Using multiple threads">$DOCS_URL/tutorials/performance/using_multiple_threads.html</link>
</tutorials>
<methods>
<method name="post">
diff --git a/doc/classes/SeparationRayShape2D.xml b/doc/classes/SeparationRayShape2D.xml
index ccb7a12882..3e7a2857bf 100644
--- a/doc/classes/SeparationRayShape2D.xml
+++ b/doc/classes/SeparationRayShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SeparationRayShape2D" inherits="Shape2D" version="4.0">
+<class name="SeparationRayShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Separation ray shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/SeparationRayShape3D.xml b/doc/classes/SeparationRayShape3D.xml
index 877e8545eb..028c3ba511 100644
--- a/doc/classes/SeparationRayShape3D.xml
+++ b/doc/classes/SeparationRayShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SeparationRayShape3D" inherits="Shape3D" version="4.0">
+<class name="SeparationRayShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Separation ray shape for 3D collisions.
</brief_description>
diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml
index 80310e912f..641422b1eb 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" version="4.0">
+<class name="Separator" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for separators.
</brief_description>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 99e38e969d..10deaf1c41 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shader" inherits="Resource" version="4.0">
+<class name="Shader" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A custom shader program.
</brief_description>
@@ -7,15 +7,17 @@
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 title="Shaders documentation index">https://docs.godotengine.org/en/latest/tutorials/shaders/index.html</link>
+ <link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link>
</tutorials>
<methods>
<method name="get_default_texture_param" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="param" type="StringName" />
+ <argument index="1" name="index" type="int" default="0" />
<description>
Returns the texture that is set as default for the specified parameter.
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
<method name="get_mode" qualifiers="const">
@@ -36,9 +38,11 @@
<return type="void" />
<argument index="0" name="param" type="StringName" />
<argument index="1" name="texture" type="Texture2D" />
+ <argument index="2" name="index" type="int" default="0" />
<description>
Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial].
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
</methods>
diff --git a/doc/classes/ShaderGlobalsOverride.xml b/doc/classes/ShaderGlobalsOverride.xml
index babda1707e..4c49d104bb 100644
--- a/doc/classes/ShaderGlobalsOverride.xml
+++ b/doc/classes/ShaderGlobalsOverride.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ShaderGlobalsOverride" inherits="Node" version="4.0">
+<class name="ShaderGlobalsOverride" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index d5fc3fd210..672b660c34 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" version="4.0">
+<class name="ShaderMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A material that uses a custom [Shader] program.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Shaders documentation index">https://docs.godotengine.org/en/latest/tutorials/shaders/index.html</link>
+ <link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link>
</tutorials>
<methods>
<method name="get_shader_param" qualifiers="const">
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index 04f91d19da..03ff3cc188 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" version="4.0">
+<class name="Shape2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all 2D shapes.
</brief_description>
@@ -7,7 +7,7 @@
Base class for all 2D shapes. All 2D shape types inherit from this.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="collide">
@@ -65,7 +65,8 @@
</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.
+ The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved.
+ When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_contact_bias] is used.
</member>
</members>
</class>
diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml
index 96f8833486..129810943e 100644
--- a/doc/classes/Shape3D.xml
+++ b/doc/classes/Shape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shape3D" inherits="Resource" version="4.0">
+<class name="Shape3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all 3D shape resources.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="get_debug_mesh">
@@ -18,6 +18,10 @@
</method>
</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. Defines how much bodies react to enforce contact separation when this shape is involved.
+ When set to [code]0[/code], the default value from [member ProjectSettings.physics/3d/solver/default_contact_bias] is used.
+ </member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
The collision margin for the shape. Used in Bullet Physics only.
Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp.
diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml
new file mode 100644
index 0000000000..5fcb60dd09
--- /dev/null
+++ b/doc/classes/ShapeCast2D.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShapeCast2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Node for physics collision sweep and immediate overlap queries. Similar to the [RayCast2D] node.
+ </brief_description>
+ <description>
+ Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
+ Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity.
+ The node can detect multiple collision objects, but usually the first detected collision
+ [b]Note:[/b] shape casting is more computationally expensive compared to ray casting.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_exception">
+ <return type="void" />
+ <argument index="0" name="node" type="CollisionObject2D" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [CollisionObject2D] node.
+ </description>
+ </method>
+ <method name="add_exception_rid">
+ <return type="void" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="clear_exceptions">
+ <return type="void" />
+ <description>
+ Removes all collision exceptions for this shape.
+ </description>
+ </method>
+ <method name="force_shapecast_update">
+ <return type="void" />
+ <description>
+ Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the shape or its parent has changed state.
+ [b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
+ </description>
+ </method>
+ <method name="get_closest_collision_safe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by [member target_position].
+ </description>
+ </method>
+ <method name="get_closest_collision_unsafe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by [member target_position].
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the shape ID of one of the multiple collisions at [code]index[/code] that the shape intersects, or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collision_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by [method get_collider], [method get_collider_shape], [method get_collision_point], and [method get_collision_normal] methods.
+ </description>
+ </method>
+ <method name="get_collision_mask_value" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the normal containing one of the multiple collisions at [code]index[/code] of the intersecting object.
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the collision point containing one of the multiple collisions at [code]index[/code] at which the shape intersects the object.
+ [b]Note:[/b] this point is in the [b]global[/b] coordinate system.
+ </description>
+ </method>
+ <method name="is_colliding" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether any object is intersecting with the shape's vector (considering the vector length).
+ </description>
+ </method>
+ <method name="remove_exception">
+ <return type="void" />
+ <argument index="0" name="node" type="CollisionObject2D" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [CollisionObject2D] node.
+ </description>
+ </method>
+ <method name="remove_exception_rid">
+ <return type="void" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="set_collision_mask_value">
+ <return type="void" />
+ <argument index="0" name="layer_number" type="int" />
+ <argument index="1" name="value" type="bool" />
+ <description>
+ Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
+ If [code]true[/code], collision with [Area2D]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 [PhysicsBody2D]s will be reported.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
+ The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected.
+ </member>
+ <member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
+ A complete collision information. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ If [code]true[/code], collisions will be reported.
+ </member>
+ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
+ If [code]true[/code], the parent node will be excluded from collision detection.
+ </member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision.
+ </member>
+ <member name="max_results" type="int" setter="set_max_results" getter="get_max_results" default="32">
+ The number of intersections can be limited with this parameter, to reduce the processing time.
+ </member>
+ <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
+ Any [Shape2D] derived shape used for collision queries.
+ </member>
+ <member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
+ The shape's destination point, relative to this node's [code]position[/code].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml
index f95d069069..46524a1d74 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" version="4.0">
+<class name="Shortcut" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A shortcut for binding input.
</brief_description>
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
index f78266a20c..1b67900607 100644
--- a/doc/classes/Signal.xml
+++ b/doc/classes/Signal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Signal" version="4.0">
+<class name="Signal" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class representing a signal defined in an object.
</brief_description>
@@ -7,28 +7,30 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="Signal" qualifiers="constructor">
+ <constructors>
+ <constructor name="Signal">
<return type="Signal" />
<description>
Constructs a null [Signal] with no object nor signal name bound.
</description>
- </method>
- <method name="Signal" qualifiers="constructor">
+ </constructor>
+ <constructor name="Signal">
<return type="Signal" />
<argument index="0" name="from" type="Signal" />
<description>
Constructs a [Signal] as a copy of the given [Signal].
</description>
- </method>
- <method name="Signal" qualifiers="constructor">
+ </constructor>
+ <constructor name="Signal">
<return type="Signal" />
<argument index="0" name="object" type="Object" />
<argument index="1" name="signal" type="StringName" />
<description>
Creates a new [Signal] with the name [code]signal[/code] in the specified [code]object[/code].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="connect">
<return type="int" />
<argument index="0" name="callable" type="Callable" />
@@ -93,27 +95,29 @@
<description>
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ </methods>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="Signal" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Signal" />
<description>
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 7aa06985bf..7867e5afa3 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Skeleton2D" inherits="Node2D" version="4.0">
+<class name="Skeleton2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Skeleton for 2D characters and animated objects.
</brief_description>
@@ -8,7 +8,7 @@
To setup different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. They can be applied by creating the desired number of modifications, which can be done by increasing [member SkeletonModificationStack2D.modification_count].
</description>
<tutorials>
- <link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
+ <link title="2D skeletons">$DOCS_URL/tutorials/animation/2d_skeletons.html</link>
</tutorials>
<methods>
<method name="execute_modifications">
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index e804e7bf24..80a36acacc 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Skeleton3D" inherits="Node3D" version="4.0">
+<class name="Skeleton3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Skeleton for characters and animated objects.
</brief_description>
@@ -297,7 +297,7 @@
<argument index="3" name="persistent" type="bool" default="false" />
<description>
Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
[b]Note:[/b] The pose transform needs to be a global pose! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose.
</description>
</method>
@@ -309,7 +309,7 @@
<argument index="3" name="persistent" type="bool" default="false" />
<description>
Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
[b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose.
</description>
</method>
diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml
index 6673e0657c..0545469e4c 100644
--- a/doc/classes/SkeletonIK3D.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonIK3D" inherits="Node" version="4.0">
+<class name="SkeletonIK3D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml
index 815b97a271..8ce9bf5731 100644
--- a/doc/classes/SkeletonModification2D.xml
+++ b/doc/classes/SkeletonModification2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2D" inherits="Resource" version="4.0">
+<class name="SkeletonModification2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that operates on [Bone2D] nodes in a [Skeleton2D].
</brief_description>
diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml
index 6cbc24f100..a613787a3e 100644
--- a/doc/classes/SkeletonModification2DCCDIK.xml
+++ b/doc/classes/SkeletonModification2DCCDIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DCCDIK" inherits="SkeletonModification2D" version="4.0">
+<class name="SkeletonModification2DCCDIK" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D.
</brief_description>
diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml
index 82b99d20bd..883d4aa04b 100644
--- a/doc/classes/SkeletonModification2DFABRIK.xml
+++ b/doc/classes/SkeletonModification2DFABRIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DFABRIK" inherits="SkeletonModification2D" version="4.0">
+<class name="SkeletonModification2DFABRIK" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses FABRIK to manipulate a series of [Bone2D] nodes to reach a target.
</brief_description>
diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml
index 13dfbc0633..9948239eb8 100644
--- a/doc/classes/SkeletonModification2DJiggle.xml
+++ b/doc/classes/SkeletonModification2DJiggle.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DJiggle" inherits="SkeletonModification2D" version="4.0">
+<class name="SkeletonModification2DJiggle" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that jiggles [Bone2D] nodes as they move towards a target.
</brief_description>
diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml
index 90b727e194..802801fbef 100644
--- a/doc/classes/SkeletonModification2DLookAt.xml
+++ b/doc/classes/SkeletonModification2DLookAt.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DLookAt" inherits="SkeletonModification2D" version="4.0">
+<class name="SkeletonModification2DLookAt" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that rotates a [Bone2D] node to look at a target.
</brief_description>
diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml
index 44572f2c67..9fb7b6d215 100644
--- a/doc/classes/SkeletonModification2DPhysicalBones.xml
+++ b/doc/classes/SkeletonModification2DPhysicalBones.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DPhysicalBones" inherits="SkeletonModification2D" version="4.0">
+<class name="SkeletonModification2DPhysicalBones" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that applies the transforms of [PhysicalBone2D] nodes to [Bone2D] nodes.
</brief_description>
diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml
index 35ab52ea99..f66f88d6b5 100644
--- a/doc/classes/SkeletonModification2DStackHolder.xml
+++ b/doc/classes/SkeletonModification2DStackHolder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DStackHolder" inherits="SkeletonModification2D" version="4.0">
+<class name="SkeletonModification2DStackHolder" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that holds and executes a [SkeletonModificationStack2D].
</brief_description>
diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml
index b7a2faedbb..956e94dce8 100644
--- a/doc/classes/SkeletonModification2DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" version="4.0">
+<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that rotates two bones using the law of cosigns to reach the target.
</brief_description>
diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml
index c544473163..b21c9a2be9 100644
--- a/doc/classes/SkeletonModification3D.xml
+++ b/doc/classes/SkeletonModification3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3D" inherits="Resource" version="4.0">
+<class name="SkeletonModification3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that operates on bones in a [Skeleton3D].
</brief_description>
@@ -60,7 +60,7 @@
When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D].
</member>
<member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0">
- The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes.
+ The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes.
</member>
</members>
</class>
diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml
index 55777ab0f4..6f5409ed4d 100644
--- a/doc/classes/SkeletonModification3DCCDIK.xml
+++ b/doc/classes/SkeletonModification3DCCDIK.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DCCDIK" inherits="SkeletonModification3D" version="4.0">
+<class name="SkeletonModification3DCCDIK" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses CCDIK to manipulate a series of bones to reach a target.
</brief_description>
<description>
- This [SkeletonModification3D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to maniuplate a chain of bones in a Skeleton so it reaches a defined target.
+ This [SkeletonModification3D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to manipulate a chain of bones in a Skeleton so it reaches a defined target.
CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers.
[b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK.
CCDIK also fully supports angle constraints, allowing for more control over how a solution is met.
diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml
index 1c69ad7b3f..41f78fab41 100644
--- a/doc/classes/SkeletonModification3DFABRIK.xml
+++ b/doc/classes/SkeletonModification3DFABRIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DFABRIK" inherits="SkeletonModification3D" version="4.0">
+<class name="SkeletonModification3DFABRIK" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses FABRIK to manipulate a series of bones to reach a target.
</brief_description>
@@ -24,7 +24,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indiciates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
</description>
</method>
<method name="get_fabrik_joint_bone_index" qualifiers="const">
@@ -66,7 +66,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean indiciating whether the FABRIK joint uses the target's [Basis] for its rotation.
+ Returns a boolean indicating whether the FABRIK joint uses the target's [Basis] for its rotation.
[b]Note:[/b] This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones.
</description>
</method>
diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml
index 3c724229bd..697de4a580 100644
--- a/doc/classes/SkeletonModification3DJiggle.xml
+++ b/doc/classes/SkeletonModification3DJiggle.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DJiggle" inherits="SkeletonModification3D" version="4.0">
+<class name="SkeletonModification3DJiggle" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that jiggles bones as they move towards a target.
</brief_description>
@@ -56,7 +56,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification.
+ Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification.
</description>
</method>
<method name="get_jiggle_joint_roll" qualifiers="const">
@@ -77,7 +77,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not.
+ Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not.
</description>
</method>
<method name="get_use_colliders" qualifiers="const">
diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml
index 9b34644757..90330c4cf0 100644
--- a/doc/classes/SkeletonModification3DLookAt.xml
+++ b/doc/classes/SkeletonModification3DLookAt.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" version="4.0">
+<class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that rotates a bone to look at a target.
</brief_description>
diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml
index eeaa509ed7..d5ed770fc0 100644
--- a/doc/classes/SkeletonModification3DStackHolder.xml
+++ b/doc/classes/SkeletonModification3DStackHolder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DStackHolder" inherits="SkeletonModification3D" version="4.0">
+<class name="SkeletonModification3DStackHolder" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that holds and executes a [SkeletonModificationStack3D].
</brief_description>
diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml
index 80f8ba4e5b..0576591e2e 100644
--- a/doc/classes/SkeletonModification3DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DTwoBoneIK" inherits="SkeletonModification3D" version="4.0">
+<class name="SkeletonModification3DTwoBoneIK" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that moves two bones to reach the target.
</brief_description>
<description>
- This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three verticies of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones.
+ This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones.
TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification3DFABRIK], but gives similar, natural looking results.
A [Node3D]-based node can be used to define the pole, or bend direction, allowing control over which direction the joint takes when bending to reach the target when the target is within reach.
</description>
diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml
index 9b96c9e6d5..9ddb8856ce 100644
--- a/doc/classes/SkeletonModificationStack2D.xml
+++ b/doc/classes/SkeletonModificationStack2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModificationStack2D" inherits="Resource" version="4.0">
+<class name="SkeletonModificationStack2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that holds a stack of [SkeletonModification2D]s.
</brief_description>
diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml
index 4035e39410..fc952f6864 100644
--- a/doc/classes/SkeletonModificationStack3D.xml
+++ b/doc/classes/SkeletonModificationStack3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModificationStack3D" inherits="Resource" version="4.0">
+<class name="SkeletonModificationStack3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that holds a stack of [SkeletonModification3D]s.
</brief_description>
@@ -43,7 +43,7 @@
<method name="get_is_setup" qualifiers="const">
<return type="bool" />
<description>
- Returns a boolean that indiciates whether the modification stack is setup and can execute.
+ Returns a boolean that indicates whether the modification stack is setup and can execute.
</description>
</method>
<method name="get_modification" qualifiers="const">
diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml
index d24963a887..af1af7bad2 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" version="4.0">
+<class name="Skin" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -14,6 +14,13 @@
<description>
</description>
</method>
+ <method name="add_named_bind">
+ <return type="void" />
+ <argument index="0" name="name" type="String" />
+ <argument index="1" name="pose" type="Transform3D" />
+ <description>
+ </description>
+ </method>
<method name="clear_binds">
<return type="void" />
<description>
diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml
index f8bbc27363..46bf6a9217 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="RefCounted" version="4.0">
+<class name="SkinReference" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index 79a9bd4b31..e14e57a1c4 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sky" inherits="Resource" version="4.0">
+<class name="Sky" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Background that uses a [Material] to draw a sky.
</brief_description>
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index 21a45645b8..03f20b0aab 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" version="4.0">
+<class name="Slider" inherits="Range" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for GUI sliders.
</brief_description>
@@ -13,11 +13,11 @@
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable" default="true">
If [code]true[/code], the value can be changed using the mouse wheel.
</member>
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
<member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" default="0">
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
</member>
@@ -25,4 +25,17 @@
If [code]true[/code], the slider will display ticks for minimum and maximum values.
</member>
</members>
+ <signals>
+ <signal name="drag_ended">
+ <argument index="0" name="value_changed" type="bool" />
+ <description>
+ Emitted when dragging stops. If [code]value_changed[/code] is true, [member Range.value] is different from the value when you started the dragging.
+ </description>
+ </signal>
+ <signal name="drag_started">
+ <description>
+ Emitted when dragging is started.
+ </description>
+ </signal>
+ </signals>
</class>
diff --git a/doc/classes/SliderJoint3D.xml b/doc/classes/SliderJoint3D.xml
index dc9760b667..d62cf8aac4 100644
--- a/doc/classes/SliderJoint3D.xml
+++ b/doc/classes/SliderJoint3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SliderJoint3D" inherits="Joint3D" version="4.0">
+<class name="SliderJoint3D" inherits="Joint3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Slider between two PhysicsBodies in 3D.
</brief_description>
diff --git a/doc/classes/SoftDynamicBody3D.xml b/doc/classes/SoftDynamicBody3D.xml
index f999f77e78..86552f30f6 100644
--- a/doc/classes/SoftDynamicBody3D.xml
+++ b/doc/classes/SoftDynamicBody3D.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SoftDynamicBody3D" inherits="MeshInstance3D" version="4.0">
+<class name="SoftDynamicBody3D" inherits="MeshInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A soft mesh physics body.
</brief_description>
<description>
A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials.
+ [b]Note:[/b] There are many known bugs in [SoftDynamicBody3D]. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies).
</description>
<tutorials>
- <link title="SoftBody">https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html</link>
+ <link title="SoftBody">$DOCS_URL/tutorials/physics/soft_body.html</link>
</tutorials>
<methods>
<method name="add_collision_exception_with">
@@ -92,11 +93,11 @@
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this SoftDynamicBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this SoftDynamicBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
</member>
diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml
index 674b583e3d..d0549d6b52 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" version="4.0">
+<class name="SphereMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class representing a spherical [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/SphereOccluder3D.xml b/doc/classes/SphereOccluder3D.xml
new file mode 100644
index 0000000000..1e84102191
--- /dev/null
+++ b/doc/classes/SphereOccluder3D.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SphereOccluder3D" inherits="Occluder3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Spherical shape for use with occlusion culling in [OccluderInstance3D].
+ </brief_description>
+ <description>
+ [SphereOccluder3D] stores a sphere shape that can be used by the engine's occlusion culling system.
+ See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ The sphere's radius in 3D units.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml
index 5f0f5c1052..b5e9c9069b 100644
--- a/doc/classes/SphereShape3D.xml
+++ b/doc/classes/SphereShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SphereShape3D" inherits="Shape3D" version="4.0">
+<class name="SphereShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Sphere shape for 3D collisions.
</brief_description>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 615f5e3586..5e3eb0c9f8 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" version="4.0">
+<class name="SpinBox" inherits="Range" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Numerical input text field.
</brief_description>
@@ -12,14 +12,14 @@
add_child(spin_box)
var line_edit = spin_box.get_line_edit()
line_edit.context_menu_enabled = false
- spin_box.align = LineEdit.ALIGN_RIGHT
+ spin_box.horizontal_alignment = LineEdit.HORIZONTAL_ALIGNMENT_RIGHT
[/gdscript]
[csharp]
var spinBox = new SpinBox();
AddChild(spinBox);
var lineEdit = spinBox.GetLineEdit();
lineEdit.ContextMenuEnabled = false;
- spinBox.Align = LineEdit.AlignEnum.Right;
+ spinBox.AlignHorizontal = LineEdit.HorizontalAlignEnum.Right;
[/csharp]
[/codeblocks]
The above code will create a [SpinBox], disable context menu on it and set the text alignment to right.
@@ -44,8 +44,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
- Sets the text alignment of the [SpinBox].
+ <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
</member>
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the [SpinBox] will be editable. Otherwise, it will be read only.
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
index be49a99988..b2fcd46731 100644
--- a/doc/classes/SplitContainer.xml
+++ b/doc/classes/SplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SplitContainer" inherits="Container" version="4.0">
+<class name="SplitContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Container for splitting and adjusting.
</brief_description>
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index 8c10ec36a8..62cb55daec 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpotLight3D" inherits="Light3D" version="4.0">
+<class name="SpotLight3D" inherits="Light3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A spotlight, such as a reflector spotlight or a lantern.
</brief_description>
@@ -7,11 +7,11 @@
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 title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<members>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.03" />
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.03" />
<member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0">
The spotlight's angle in degrees.
</member>
diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml
index 2cd8fa71cf..d89b8f4549 100644
--- a/doc/classes/SpringArm3D.xml
+++ b/doc/classes/SpringArm3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpringArm3D" inherits="Node3D" version="4.0">
+<class name="SpringArm3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A helper node, mostly used in 3rd person cameras.
</brief_description>
@@ -41,7 +41,7 @@
</methods>
<members>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The layers against which the collision check shall be done. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.01">
When the collision check is made, a candidate length for the SpringArm3D is given.
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index b9d13a1287..2edc13a12b 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite2D" inherits="Node2D" version="4.0">
+<class name="Sprite2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
General-purpose sprite node.
</brief_description>
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index 5a7fd537e0..22437027c5 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite3D" inherits="SpriteBase3D" version="4.0">
+<class name="Sprite3D" inherits="SpriteBase3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D sprite node in a 3D world.
</brief_description>
@@ -36,5 +36,10 @@
Emitted when the [member frame] changes.
</description>
</signal>
+ <signal name="texture_changed">
+ <description>
+ Emitted when the [member texture] changes.
+ </description>
+ </signal>
</signals>
</class>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index b723c9f4d4..405fff0ce8 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="GeometryInstance3D" version="4.0">
+<class name="SpriteBase3D" inherits="GeometryInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D sprite node in 3D environment.
</brief_description>
@@ -60,14 +60,12 @@
If [code]true[/code], texture is flipped vertically.
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
- A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
+ A color value used to [i]multiply[/i] the texture's colors. Can be used for mood-coloring or to simulate the color of light.
+ [b]Note:[/b] If a [member GeometryInstance3D.material_override] is defined on the [SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the color defined in [member modulate] will be ignored. For a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] must be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
</member>
- <member name="opacity" type="float" setter="set_opacity" getter="get_opacity" default="1.0">
- The objects' visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible.
- </member>
<member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01">
The size of one pixel's width on the sprite to scale it in 3D.
</member>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index 660afb5a89..b0d1e1efcf 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" version="4.0">
+<class name="SpriteFrames" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Sprite frame library for AnimatedSprite2D.
+ Sprite frame library for AnimatedSprite2D and AnimatedSprite3D.
</brief_description>
<description>
- Sprite frame library for [AnimatedSprite2D]. Contains frames and animation data for playback.
+ Sprite frame library for an [AnimatedSprite2D] or [AnimatedSprite3D] node. Contains frames and animation data for playback.
[b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps.
</description>
<tutorials>
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
index 43ba95e345..2305a9d325 100644
--- a/doc/classes/StandardMaterial3D.xml
+++ b/doc/classes/StandardMaterial3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StandardMaterial3D" inherits="BaseMaterial3D" version="4.0">
+<class name="StandardMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
- <link title="Standard Material 3D">https://docs.godotengine.org/en/latest/tutorials/3d/standard_material_3d.html</link>
+ <link title="Standard Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
</class>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index 0a90f430e6..e6e3559ae0 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" version="4.0">
+<class name="StaticBody2D" inherits="PhysicsBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body for 2D physics which is static or moves only by script. Useful for floor and walls.
</brief_description>
diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml
index d1ef8cd321..a29f5fc147 100644
--- a/doc/classes/StaticBody3D.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StaticBody3D" inherits="PhysicsBody3D" version="4.0">
+<class name="StaticBody3D" inherits="PhysicsBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body for 3D physics which is static or moves only by script. Useful for floor and walls.
</brief_description>
diff --git a/doc/classes/StreamCubemap.xml b/doc/classes/StreamCubemap.xml
deleted file mode 100644
index 2e7ee8e6db..0000000000
--- a/doc/classes/StreamCubemap.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamCubemap" inherits="StreamTextureLayered" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/doc/classes/StreamCubemapArray.xml b/doc/classes/StreamCubemapArray.xml
deleted file mode 100644
index 326226b5ab..0000000000
--- a/doc/classes/StreamCubemapArray.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamCubemapArray" inherits="StreamTextureLayered" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 805f056289..bd69867001 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="RefCounted" version="4.0">
+<class name="StreamPeer" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Abstraction and base class for stream-based protocols.
</brief_description>
@@ -70,7 +70,7 @@
<return type="String" />
<argument index="0" name="bytes" type="int" default="-1" />
<description>
- Gets a string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string].
+ Gets an ASCII string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string].
</description>
</method>
<method name="get_u16">
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index 989864760f..de725aef5b 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerBuffer" inherits="StreamPeer" version="4.0">
+<class name="StreamPeerBuffer" inherits="StreamPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Data buffer stream peer.
</brief_description>
<description>
+ Data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, [File] can be used directly.
+ A [StreamPeerBuffer] object keeps an internal cursor which is the offset in bytes to the start of the buffer. Get and put operations are performed at the cursor position and will move the cursor accordingly.
</description>
<tutorials>
</tutorials>
@@ -10,38 +13,45 @@
<method name="clear">
<return type="void" />
<description>
+ Clears the [member data_array] and resets the cursor.
</description>
</method>
<method name="duplicate" qualifiers="const">
<return type="StreamPeerBuffer" />
<description>
+ Returns a new [StreamPeerBuffer] with the same [member data_array] content.
</description>
</method>
<method name="get_position" qualifiers="const">
<return type="int" />
<description>
+ Returns the current cursor position.
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="int" />
<description>
+ Returns the size of [member data_array].
</description>
</method>
<method name="resize">
<return type="void" />
<argument index="0" name="size" type="int" />
<description>
+ Resizes the [member data_array]. This [i]doesn't[/i] update the cursor.
</description>
</method>
<method name="seek">
<return type="void" />
<argument index="0" name="position" type="int" />
<description>
+ Moves the cursor to the specified position. [code]position[/code] must be a valid index of [member data_array].
</description>
</method>
</methods>
<members>
<member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray()">
+ The underlying data buffer. Setting this value resets the cursor.
</member>
</members>
</class>
diff --git a/doc/classes/StreamPeerExtension.xml b/doc/classes/StreamPeerExtension.xml
index ceb9486a33..a3a08c530c 100644
--- a/doc/classes/StreamPeerExtension.xml
+++ b/doc/classes/StreamPeerExtension.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerExtension" inherits="StreamPeer" version="4.0">
+<class name="StreamPeerExtension" inherits="StreamPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 50389f912d..3aede347a0 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" version="4.0">
+<class name="StreamPeerSSL" inherits="StreamPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
SSL stream peer.
</brief_description>
@@ -8,7 +8,7 @@
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
- <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
+ <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="accept_stream">
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index 6b700593a2..a1f1f1be79 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" version="4.0">
+<class name="StreamPeerTCP" inherits="StreamPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
TCP stream peer.
</brief_description>
diff --git a/doc/classes/StreamTexture2DArray.xml b/doc/classes/StreamTexture2DArray.xml
deleted file mode 100644
index 7ecd3734f7..0000000000
--- a/doc/classes/StreamTexture2DArray.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTexture2DArray" inherits="StreamTextureLayered" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index abb68e0d05..d85e521f08 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" version="4.0">
+<class name="String" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Built-in string class.
</brief_description>
@@ -7,36 +7,38 @@
This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference-counted and use a copy-on-write approach, so passing them around is cheap in resources.
</description>
<tutorials>
- <link title="GDScript format strings">https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_format_string.html</link>
+ <link title="GDScript format strings">$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html</link>
</tutorials>
- <methods>
- <method name="String" qualifiers="constructor">
+ <constructors>
+ <constructor name="String">
<return type="String" />
<description>
Constructs an empty [String] ([code]""[/code]).
</description>
- </method>
- <method name="String" qualifiers="constructor">
+ </constructor>
+ <constructor name="String">
<return type="String" />
<argument index="0" name="from" type="String" />
<description>
Constructs a [String] as a copy of the given [String].
</description>
- </method>
- <method name="String" qualifiers="constructor">
+ </constructor>
+ <constructor name="String">
<return type="String" />
<argument index="0" name="from" type="NodePath" />
<description>
Constructs a new String from the given [NodePath].
</description>
- </method>
- <method name="String" qualifiers="constructor">
+ </constructor>
+ <constructor name="String">
<return type="String" />
<argument index="0" name="from" type="StringName" />
<description>
Constructs a new String from the given [StringName].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="begins_with" qualifiers="const">
<return type="bool" />
<argument index="0" name="text" type="String" />
@@ -47,7 +49,10 @@
<method name="bigrams" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns the bigrams (pairs of consecutive letters) of this string.
+ Returns an array containing the bigrams (pairs of consecutive letters) of this string.
+ [codeblock]
+ print("Bigrams".bigrams()) # Prints "[Bi, ig, gr, ra, am, ms]"
+ [/codeblock]
</description>
</method>
<method name="bin_to_int" qualifiers="const">
@@ -99,6 +104,18 @@
<return type="String" />
<argument index="0" name="char" type="int" />
<description>
+ Directly converts an decimal integer to a unicode character. Tables of these characters can be found in various locations, for example [url=https://unicodelookup.com/]here.[/url]
+ [codeblock]
+ print(String.chr(65)) # Prints "A"
+ print(String.chr(129302)) # Prints "🤖" (robot face emoji)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="contains" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="what" type="String" />
+ <description>
+ Returns [code]true[/code] if the string contains the given string.
</description>
</method>
<method name="count" qualifiers="const">
@@ -122,7 +139,7 @@
<method name="dedent" qualifiers="const">
<return type="String" />
<description>
- Returns a copy of the string with indentation (leading tabs and spaces) removed.
+ Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation.
</description>
</method>
<method name="ends_with" qualifiers="const">
@@ -200,10 +217,40 @@
If the string is a valid file path, returns the filename.
</description>
</method>
+ <method name="get_slice" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="delimiter" type="String" />
+ <argument index="1" name="slice" type="int" />
+ <description>
+ Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist.
+ This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
+ Example:
+ [codeblock]
+ print("i/am/example/string".get_slice("/", 2)) # Prints 'example'.
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_slice_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="delimiter" type="String" />
+ <description>
+ Splits a string using a [code]delimiter[/code] and returns a number of slices.
+ </description>
+ </method>
+ <method name="get_slicec" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="delimiter" type="int" />
+ <argument index="1" name="slice" type="int" />
+ <description>
+ Splits a string using a Unicode character with code [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist.
+ This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
+ </description>
+ </method>
<method name="hash" qualifiers="const">
<return type="int" />
<description>
- Hashes the string and returns a 32-bit integer.
+ Returns the 32-bit hash value representing the string's contents.
+ [b]Note:[/b] [String]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] imply the strings are equal, because different strings can have identical hash values due to hash collisions.
</description>
</method>
<method name="hex_to_int" qualifiers="const">
@@ -226,6 +273,17 @@
<return type="String" />
<argument index="0" name="size" type="int" />
<description>
+ Converts an integer representing a number of bytes into a human-readable form.
+ Note that this output is in [url=https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes]IEC prefix format[/url], and includes [code]B[/code], [code]KiB[/code], [code]MiB[/code], [code]GiB[/code], [code]TiB[/code], [code]PiB[/code], and [code]EiB[/code].
+ </description>
+ </method>
+ <method name="indent" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="prefix" type="String" />
+ <description>
+ Returns a copy of the string with lines indented with [code]prefix[/code].
+ For example, the string can be indented with two tabs using [code]"\t\t"[/code], or four spaces using [code]" "[/code]. The prefix can be any string so it can also be used to comment out strings with e.g. [code]"# "[/code]. See also [method dedent] to remove indentation.
+ [b]Note:[/b] Empty lines are kept empty.
</description>
</method>
<method name="insert" qualifiers="const">
@@ -261,7 +319,7 @@
Returns [code]true[/code] if this string is a subsequence of the given string.
</description>
</method>
- <method name="is_subsequence_ofi" qualifiers="const">
+ <method name="is_subsequence_ofn" qualifiers="const">
<return type="bool" />
<argument index="0" name="text" type="String" />
<description>
@@ -278,7 +336,14 @@
<method name="is_valid_float" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if this string contains a valid float.
+ Returns [code]true[/code] if this string contains a valid float. This is inclusive of integers, and also supports exponents:
+ [codeblock]
+ print("1.7".is_valid_float()) # Prints "true"
+ print("24".is_valid_float()) # Prints "true"
+ print("7e3".is_valid_float()) # Prints "true"
+ print("24".is_valid_float()) # Prints "true"
+ print("Hello".is_valid_float()) # Prints "false"
+ [/codeblock]
</description>
</method>
<method name="is_valid_hex_number" qualifiers="const">
@@ -298,12 +363,24 @@
<return type="bool" />
<description>
Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]) and the first character may not be a digit.
+ [codeblock]
+ print("good_ident_1".is_valid_identifier()) # Prints "true"
+ print("1st_bad_ident".is_valid_identifier()) # Prints "false"
+ print("bad_ident_#2".is_valid_identifier()) # Prints "false"
+ [/codeblock]
</description>
</method>
<method name="is_valid_int" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if this string contains a valid integer.
+ [codeblock]
+ print("7".is_valid_int()) # Prints "true"
+ print("14.6".is_valid_int()) # Prints "false"
+ print("L".is_valid_int()) # Prints "false"
+ print("+3".is_valid_int()) # Prints "true"
+ print("-12".is_valid_int()) # Prints "true"
+ [/codeblock]
</description>
</method>
<method name="is_valid_ip_address" qualifiers="const">
@@ -316,7 +393,7 @@
<return type="String" />
<argument index="0" name="parts" type="PackedStringArray" />
<description>
- Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
+ Returns a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
Example:
[codeblocks]
[gdscript]
@@ -372,14 +449,14 @@
<return type="bool" />
<argument index="0" name="expr" type="String" />
<description>
- Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]).
+ Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). An empty string or empty expression always evaluates to [code]false[/code].
</description>
</method>
<method name="matchn" qualifiers="const">
<return type="bool" />
<argument index="0" name="expr" type="String" />
<description>
- Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]).
+ Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). An empty string or empty expression always evaluates to [code]false[/code].
</description>
</method>
<method name="md5_buffer" qualifiers="const">
@@ -443,82 +520,6 @@
<description>
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="String" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="StringName" />
- <description>
- </description>
- </method>
- <method name="operator %" qualifiers="operator">
- <return type="String" />
- <argument index="0" name="right" type="Variant" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="String" />
- <argument index="0" name="right" type="String" />
- <description>
- </description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="String" />
- <description>
- </description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="String" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="String" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="StringName" />
- <description>
- </description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="String" />
- <description>
- </description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="String" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="String" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="pad_decimals" qualifiers="const">
<return type="String" />
<argument index="0" name="digits" type="int" />
@@ -659,7 +660,13 @@
<return type="float" />
<argument index="0" name="text" type="String" />
<description>
- Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
+ Returns the similarity index ([url=https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient]Sorensen-Dice coefficient[/url]) this string compared to another. 1.0 means totally similar and 0.0 means totally dissimilar.
+ [codeblock]
+ print("ABC123".similarity("ABC123")) # Prints "1"
+ print("ABC123".similarity("XYZ456")) # Prints "0"
+ print("ABC123".similarity("123ABC")) # Prints "0.8"
+ print("ABC123".similarity("abc123")) # Prints "0.4"
+ [/codeblock]
</description>
</method>
<method name="simplify_path" qualifiers="const">
@@ -676,6 +683,7 @@
<description>
Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length.
If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of [code]0[/code] means that all items are split.
+ If you need only one element from the array at a specific index, [method get_slice] is a more performant option.
Example:
[codeblocks]
[gdscript]
@@ -735,13 +743,24 @@
<method name="to_float" qualifiers="const">
<return type="float" />
<description>
- Converts a string containing a decimal number into a [code]float[/code].
+ Converts a string containing a decimal number into a [code]float[/code]. The method will stop on the first non-number character except the first [code].[/code] (decimal point), and [code]e[/code] which is used for exponential.
+ [codeblock]
+ print("12.3".to_float()) # 12.3
+ print("1.2.3".to_float()) # 1.2
+ print("12ab3".to_float()) # 12
+ print("1e3".to_float()) # 1000
+ [/codeblock]
</description>
</method>
<method name="to_int" qualifiers="const">
<return type="int" />
<description>
- Converts a string containing an integer number into an [code]int[/code].
+ Converts a string containing an integer number into an [code]int[/code]. The method will remove any non-number character and stop if it encounters a [code].[/code].
+ [codeblock]
+ print("123".to_int()) # 123
+ print("a1b2c3".to_int()) # 123
+ print("1.2.3".to_int()) # 1
+ [/codeblock]
</description>
</method>
<method name="to_lower" qualifiers="const">
@@ -843,4 +862,82 @@
</description>
</method>
</methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator %">
+ <return type="String" />
+ <argument index="0" name="right" type="Variant" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="String" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="String" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index 113195d91c..c19fce9944 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StringName" version="4.0">
+<class name="StringName" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An optimized string type for unique names.
</brief_description>
@@ -8,60 +8,86 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="StringName" qualifiers="constructor">
+ <constructors>
+ <constructor name="StringName">
<return type="StringName" />
<description>
Constructs an empty [StringName].
</description>
- </method>
- <method name="StringName" qualifiers="constructor">
+ </constructor>
+ <constructor name="StringName">
<return type="StringName" />
<argument index="0" name="from" type="StringName" />
<description>
Constructs a [StringName] as a copy of the given [StringName].
</description>
- </method>
- <method name="StringName" qualifiers="constructor">
+ </constructor>
+ <constructor name="StringName">
<return type="StringName" />
<argument index="0" name="from" type="String" />
<description>
Creates a new [StringName] from the given [String].
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </constructor>
+ </constructors>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="String" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="StringName" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="String" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="StringName" />
<description>
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 6bcd485656..bc2333f26a 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" version="4.0">
+<class name="StyleBox" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for drawing stylized boxes for the UI.
</brief_description>
@@ -10,6 +10,37 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_draw" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="to_canvas_item" type="RID" />
+ <argument index="1" name="rect" type="Rect2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_center_size" qualifiers="virtual const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_draw_rect" qualifiers="virtual const">
+ <return type="Rect2" />
+ <argument index="0" name="rect" type="Rect2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_style_margin" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="side" type="int" enum="Side" />
+ <description>
+ </description>
+ </method>
+ <method name="_test_mask" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="point" type="Vector2" />
+ <argument index="1" name="rect" type="Rect2" />
+ <description>
+ </description>
+ </method>
<method name="draw" qualifiers="const">
<return type="void" />
<argument index="0" name="canvas_item" type="RID" />
diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml
index 91a9f37f53..936000ee15 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" version="4.0">
+<class name="StyleBoxEmpty" inherits="StyleBox" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Empty stylebox (does not display anything).
</brief_description>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 7bd68aa583..20430f3205 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxFlat" inherits="StyleBox" version="4.0">
+<class name="StyleBoxFlat" inherits="StyleBox" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Customizable [StyleBox] with a given set of parameters (no texture required).
</brief_description>
diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml
index f2f8679b3e..1e8b5e7b61 100644
--- a/doc/classes/StyleBoxLine.xml
+++ b/doc/classes/StyleBoxLine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxLine" inherits="StyleBox" version="4.0">
+<class name="StyleBoxLine" inherits="StyleBox" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
[StyleBox] that displays a single line.
</brief_description>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 92939dfbf5..8c324d4e37 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" version="4.0">
+<class name="StyleBoxTexture" inherits="StyleBox" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Texture-based nine-patch [StyleBox].
</brief_description>
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
index c2a76b587f..b62c294f2c 100644
--- a/doc/classes/SubViewport.xml
+++ b/doc/classes/SubViewport.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SubViewport" inherits="Viewport" version="4.0">
+<class name="SubViewport" inherits="Viewport" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Creates a sub-view into the screen.
</brief_description>
<description>
+ [SubViewport] is a [Viewport] that isn't a [Window], i.e. it doesn't draw anything by itself. To display something, [SubViewport]'s [member size] must be non-zero and it should be either put inside a [SubViewportContainer] or assigned to a [ViewportTexture].
</description>
<tutorials>
- <link title="Using Viewports">https://docs.godotengine.org/en/latest/tutorials/rendering/viewports.html</link>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="Using Viewports">$DOCS_URL/tutorials/rendering/viewports.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
<link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
diff --git a/doc/classes/SubViewportContainer.xml b/doc/classes/SubViewportContainer.xml
index 9a4985c98c..77aa7e3ff4 100644
--- a/doc/classes/SubViewportContainer.xml
+++ b/doc/classes/SubViewportContainer.xml
@@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SubViewportContainer" inherits="Container" version="4.0">
+<class name="SubViewportContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control for holding [SubViewport]s.
</brief_description>
<description>
- A [Container] node that holds a [SubViewport], automatically setting its size.
- [b]Note:[/b] Changing a SubViewportContainer's [member Control.rect_scale] will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container).
+ A [Container] node that holds a [SubViewport]. It uses the [SubViewport]'s size as minimum size, unless [member stretch] is enabled.
+ [b]Note:[/b] Changing a SubViewportContainer's [member Control.scale] will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container).
+ [b]Note:[/b] The SubViewportContainer forwards mouse-enter and mouse-exit notifications to its sub-viewports.
</description>
<tutorials>
</tutorials>
<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.
+ If [code]true[/code], the sub-viewport will be automatically resized 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.
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 6a4ec08ec3..43d34d3890 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="RefCounted" version="4.0">
+<class name="SurfaceTool" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper tool to create geometry.
</brief_description>
@@ -11,14 +11,14 @@
st.begin(Mesh.PRIMITIVE_TRIANGLES)
st.set_color(Color(1, 0, 0))
st.set_uv(Vector2(0, 0))
- st.set_vertex(Vector3(0, 0, 0))
+ st.add_vertex(Vector3(0, 0, 0))
[/gdscript]
[csharp]
var st = new SurfaceTool();
st.Begin(Mesh.PrimitiveType.Triangles);
st.SetColor(new Color(1, 0, 0));
st.SetUv(new Vector2(0, 0));
- st.SetVertex(new Vector3(0, 0, 0));
+ st.AddVertex(new Vector3(0, 0, 0));
[/csharp]
[/codeblocks]
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 set_uv] or [method set_color], then the last values would be used.
diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml
index 9bb8aabb1f..70cbd83371 100644
--- a/doc/classes/SyntaxHighlighter.xml
+++ b/doc/classes/SyntaxHighlighter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SyntaxHighlighter" inherits="Resource" version="4.0">
+<class name="SyntaxHighlighter" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base Syntax highlighter resource for [TextEdit].
</brief_description>
diff --git a/doc/classes/TCPServer.xml b/doc/classes/TCPServer.xml
index 4fbaf9412f..06fe4de9e2 100644
--- a/doc/classes/TCPServer.xml
+++ b/doc/classes/TCPServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TCPServer" inherits="RefCounted" version="4.0">
+<class name="TCPServer" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A TCP server.
</brief_description>
diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml
index 612f8fb740..698de783c0 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TabBar" inherits="Control" version="4.0">
+<class name="TabBar" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Tab bar control.
</brief_description>
@@ -43,23 +43,11 @@
Returns the previously active tab index.
</description>
</method>
- <method name="get_select_with_rmb" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if select with right mouse button is enabled.
- </description>
- </method>
- <method name="get_tab_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the number of tabs.
- </description>
- </method>
- <method name="get_tab_disabled" qualifiers="const">
- <return type="bool" />
+ <method name="get_tab_button_icon" qualifiers="const">
+ <return type="Texture2D" />
<argument index="0" name="tab_idx" type="int" />
<description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
+ Returns the [Texture2D] for the right button of the tab at index [code]tab_idx[/code] or [code]null[/code] if the button has no [Texture2D].
</description>
</method>
<method name="get_tab_icon" qualifiers="const">
@@ -69,6 +57,13 @@
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_idx_at_point" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="point" type="Vector2" />
+ <description>
+ Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
+ </description>
+ </method>
<method name="get_tab_language" qualifiers="const">
<return type="String" />
<argument index="0" name="tab_idx" type="int" />
@@ -111,10 +106,18 @@
Returns the title of the tab at index [code]tab_idx[/code].
</description>
</method>
- <method name="get_tabs_rearrange_group" qualifiers="const">
- <return type="int" />
+ <method name="is_tab_disabled" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="tab_idx" type="int" />
+ <description>
+ Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
+ </description>
+ </method>
+ <method name="is_tab_hidden" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="tab_idx" type="int" />
<description>
- Returns the [TabBar]'s rearrange group ID.
+ Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden.
</description>
</method>
<method name="move_tab">
@@ -132,11 +135,12 @@
Removes the tab at index [code]tab_idx[/code].
</description>
</method>
- <method name="set_select_with_rmb">
+ <method name="set_tab_button_icon">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <argument index="0" name="tab_idx" type="int" />
+ <argument index="1" name="icon" type="Texture2D" />
<description>
- If [code]true[/code], enables selecting a tab with the right mouse button.
+ Sets an [code]icon[/code] for the button of the tab at index [code]tab_idx[/code] (located to the right, before the close button), making it visible and clickable (See [signal tab_button_pressed]). Giving it a [code]null[/code] value will hide the button.
</description>
</method>
<method name="set_tab_disabled">
@@ -147,6 +151,14 @@
If [code]disabled[/code] is [code]true[/code], disables the tab at index [code]tab_idx[/code], making it non-interactable.
</description>
</method>
+ <method name="set_tab_hidden">
+ <return type="void" />
+ <argument index="0" name="tab_idx" type="int" />
+ <argument index="1" name="hidden" type="bool" />
+ <description>
+ If [code]hidden[/code] is [code]true[/code], hides the tab at index [code]tab_idx[/code], making it disappear from the tab area.
+ </description>
+ </method>
<method name="set_tab_icon">
<return type="void" />
<argument index="0" name="tab_idx" type="int" />
@@ -188,13 +200,6 @@
Sets a [code]title[/code] for the tab at index [code]tab_idx[/code].
</description>
</method>
- <method name="set_tabs_rearrange_group">
- <return type="void" />
- <argument index="0" name="group_id" type="int" />
- <description>
- Defines the rearrange group ID. Choose for each [TabBar] the same value to dragging tabs between [TabBar]. Enable drag with [member drag_to_rearrange_enabled].
- </description>
- </method>
</methods>
<members>
<member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true">
@@ -206,15 +211,31 @@
<member name="drag_to_rearrange_enabled" type="bool" setter="set_drag_to_rearrange_enabled" getter="get_drag_to_rearrange_enabled" default="false">
If [code]true[/code], tabs can be rearranged with mouse drag.
</member>
+ <member name="max_tab_width" type="int" setter="set_max_tab_width" getter="get_max_tab_width" default="0">
+ Sets the maximum width which all tabs should be limited to. Unlimited if set to [code]0[/code].
+ </member>
+ <member name="scroll_to_selected" type="bool" setter="set_scroll_to_selected" getter="get_scroll_to_selected" default="true">
+ If [code]true[/code], the tab offset will be changed to keep the the currently selected tab visible.
+ </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 can be used to navigate the scroll view.
</member>
- <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabBar.TabAlign" default="1">
- The alignment of all tabs. See [enum TabAlign] for details.
+ <member name="select_with_rmb" type="bool" setter="set_select_with_rmb" getter="get_select_with_rmb" default="false">
+ If [code]true[/code], enables selecting a tab with the right mouse button.
+ </member>
+ <member name="tab_alignment" type="int" setter="set_tab_alignment" getter="get_tab_alignment" enum="TabBar.AlignmentMode" default="1">
+ Sets the position at which tabs will be placed. See [enum AlignmentMode] for details.
</member>
<member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="TabBar.CloseButtonDisplayPolicy" default="0">
Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details.
</member>
+ <member name="tab_count" type="int" setter="set_tab_count" getter="get_tab_count" default="0">
+ The number of tabs currently in the bar.
+ </member>
+ <member name="tabs_rearrange_group" type="int" setter="set_tabs_rearrange_group" getter="get_tabs_rearrange_group" default="-1">
+ [TabBar]s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with [member drag_to_rearrange_enabled].
+ Setting this to [code]-1[/code] will disable rearranging between [TabBar]s.
+ </member>
</members>
<signals>
<signal name="active_tab_rearranged">
@@ -223,6 +244,12 @@
Emitted when the active tab is rearranged via mouse drag. See [member drag_to_rearrange_enabled].
</description>
</signal>
+ <signal name="tab_button_pressed">
+ <argument index="0" name="tab" type="int" />
+ <description>
+ Emitted when a tab's right button is pressed. See [method set_tab_button_icon].
+ </description>
+ </signal>
<signal name="tab_changed">
<argument index="0" name="tab" type="int" />
<description>
@@ -239,7 +266,7 @@
<argument index="0" name="tab" type="int" />
<description>
Emitted when a tab's close button is pressed.
- [b]Note:[/b] Tabs are not removed automatically once the close button is pressed, this behaviour needs to be programmed manually. For example:
+ [b]Note:[/b] Tabs are not removed automatically once the close button is pressed, this behavior needs to be programmed manually. For example:
[codeblocks]
[gdscript]
$TabBar.tab_close_pressed.connect($TabBar.remove_tab)
@@ -259,22 +286,28 @@
<signal name="tab_rmb_clicked">
<argument index="0" name="tab" type="int" />
<description>
- Emitted when a tab is right-clicked.
+ Emitted when a tab is right-clicked. [member select_with_rmb] must be enabled.
+ </description>
+ </signal>
+ <signal name="tab_selected">
+ <argument index="0" name="tab" type="int" />
+ <description>
+ Emitted when a tab is selected via click or script, even if it is the current tab.
</description>
</signal>
</signals>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="TabAlign">
- Align the tabs to the left.
+ <constant name="ALIGNMENT_LEFT" value="0" enum="AlignmentMode">
+ Places tabs to the left.
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="TabAlign">
- Align the tabs to the center.
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
+ Places tabs in the middle.
</constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TabAlign">
- Align the tabs to the right.
+ <constant name="ALIGNMENT_RIGHT" value="2" enum="AlignmentMode">
+ Places tabs to the right.
</constant>
- <constant name="ALIGN_MAX" value="3" enum="TabAlign">
- Represents the size of the [enum TabAlign] enum.
+ <constant name="ALIGNMENT_MAX" value="3" enum="AlignmentMode">
+ Represents the size of the [enum AlignmentMode] enum.
</constant>
<constant name="CLOSE_BUTTON_SHOW_NEVER" value="0" enum="CloseButtonDisplayPolicy">
Never show the close buttons.
@@ -290,41 +323,38 @@
</constant>
</constants>
<theme_items>
- <theme_item name="close" data_type="icon" type="Texture2D">
- The icon for the close button (see [member tab_close_display_policy]).
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
+ Font color of disabled tabs.
</theme_item>
- <theme_item name="close_bg_highlight" data_type="style" type="StyleBox">
- Background of the close button when it's being hovered with the cursor.
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ The tint of text outline of the tab name.
</theme_item>
- <theme_item name="close_bg_pressed" data_type="style" type="StyleBox">
- Background of the close button when it's being pressed.
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
+ Font color of the currently selected tab.
</theme_item>
- <theme_item name="decrement" data_type="icon" 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 name="font_unselected_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
+ Font color of the other, unselected tabs.
</theme_item>
- <theme_item name="decrement_highlight" data_type="icon" 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 name="hseparation" data_type="constant" type="int" default="4">
+ The horizontal separation between the elements inside tabs.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the tab text outline.
</theme_item>
<theme_item name="font" data_type="font" type="Font">
The font used to draw tab names.
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
- Font color of disabled tabs.
- </theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The tint of text outline of the tab name.
- </theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
- Font color of the currently selected tab.
- </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the tab names.
</theme_item>
- <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
- Font color of the other, unselected tabs.
+ <theme_item name="close" data_type="icon" type="Texture2D">
+ The icon for the close button (see [member tab_close_display_policy]).
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="4">
- The horizontal separation between the elements inside tabs.
+ <theme_item name="decrement" data_type="icon" 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" data_type="icon" 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="increment" data_type="icon" 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.
@@ -332,8 +362,11 @@
<theme_item name="increment_highlight" data_type="icon" 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="outline_size" data_type="constant" type="int" default="0">
- The size of the tab text outline.
+ <theme_item name="button_highlight" data_type="style" type="StyleBox">
+ Background of the tab and close buttons when they're being hovered with the cursor.
+ </theme_item>
+ <theme_item name="button_pressed" data_type="style" type="StyleBox">
+ Background of the tab and close buttons when it's being pressed.
</theme_item>
<theme_item name="tab_disabled" data_type="style" type="StyleBox">
The style of disabled tabs.
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 1f32bba5a1..bdc73ee3c4 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TabContainer" inherits="Container" version="4.0">
+<class name="TabContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Tabbed container.
</brief_description>
<description>
- Sets the active tab's [code]visible[/code] property to the value [code]true[/code]. Sets all other children's to [code]false[/code].
+ Arranges [Control] children into a tabbed view, creating a tab for each one. The active tab's corresponding [Control] has its [code]visible[/code] property set to [code]true[/code], and all other children's to [code]false[/code].
Ignores non-[Control] children.
+ [b]Note:[/b] The drawing of the clickable tabs themselves is handled by this node. Adding [TabBar]s as children is not needed.
</description>
<tutorials>
</tutorials>
@@ -42,20 +43,6 @@
Returns the number of tabs.
</description>
</method>
- <method name="get_tab_disabled" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="tab_idx" type="int" />
- <description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
- </description>
- </method>
- <method name="get_tab_hidden" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="tab_idx" type="int" />
- <description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden.
- </description>
- </method>
<method name="get_tab_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="tab_idx" type="int" />
@@ -70,6 +57,13 @@
Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
</description>
</method>
+ <method name="get_tab_idx_from_control" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="control" type="Control" />
+ <description>
+ Returns the index of the tab tied to the given [code]control[/code]. The control must be a child of the [TabContainer].
+ </description>
+ </method>
<method name="get_tab_title" qualifiers="const">
<return type="String" />
<argument index="0" name="tab_idx" type="int" />
@@ -77,17 +71,25 @@
Returns the title of the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
</description>
</method>
- <method name="get_tabs_rearrange_group" qualifiers="const">
- <return type="int" />
+ <method name="is_tab_disabled" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="tab_idx" type="int" />
+ <description>
+ Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
+ </description>
+ </method>
+ <method name="is_tab_hidden" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="tab_idx" type="int" />
<description>
- Returns the [TabContainer] rearrange group id.
+ Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden.
</description>
</method>
<method name="set_popup">
<return type="void" />
<argument index="0" name="popup" type="Node" />
<description>
- If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer]. Clicking it will expand the [Popup] node.
+ If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer] (setting it to [code]null[/code] will make it go away). Clicking it will expand the [Popup] node.
</description>
</method>
<method name="set_tab_disabled">
@@ -119,14 +121,7 @@
<argument index="0" name="tab_idx" type="int" />
<argument index="1" name="title" type="String" />
<description>
- Sets a title for the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node.
- </description>
- </method>
- <method name="set_tabs_rearrange_group">
- <return type="void" />
- <argument index="0" name="group_id" type="int" />
- <description>
- Defines rearrange group id, choose for each [TabContainer] the same value to enable tab drag between [TabContainer]. Enable drag with [member drag_to_rearrange_enabled].
+ Sets a custom title for the tab at index [code]tab_idx[/code] (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
</description>
</method>
</methods>
@@ -134,14 +129,21 @@
<member name="all_tabs_in_front" type="bool" setter="set_all_tabs_in_front" getter="is_all_tabs_in_front" default="false">
If [code]true[/code], all tabs are drawn in front of the panel. If [code]false[/code], inactive tabs are drawn behind the panel.
</member>
+ <member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true">
+ If [code]true[/code], tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible.
+ </member>
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0">
The current tab index. When set, this index's [Control] node's [code]visible[/code] property is set to [code]true[/code] and all others are set to [code]false[/code].
</member>
<member name="drag_to_rearrange_enabled" type="bool" setter="set_drag_to_rearrange_enabled" getter="get_drag_to_rearrange_enabled" default="false">
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 [enum TabAlign] constants for details.
+ <member name="tab_alignment" type="int" setter="set_tab_alignment" getter="get_tab_alignment" enum="TabBar.AlignmentMode" default="1">
+ Sets the position at which tabs will be placed. See [enum TabBar.AlignmentMode] for details.
+ </member>
+ <member name="tabs_rearrange_group" type="int" setter="set_tabs_rearrange_group" getter="get_tabs_rearrange_group" default="-1">
+ [TabContainer]s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with [member drag_to_rearrange_enabled].
+ Setting this to [code]-1[/code] will disable rearranging between [TabContainer]s.
</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.
@@ -169,45 +171,41 @@
</description>
</signal>
</signals>
- <constants>
- <constant name="ALIGN_LEFT" value="0" enum="TabAlign">
- Align the tabs to the left.
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="TabAlign">
- Align the tabs to the center.
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TabAlign">
- Align the tabs to the right.
- </constant>
- </constants>
<theme_items>
- <theme_item name="decrement" data_type="icon" 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" data_type="icon" 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" data_type="font" type="Font">
- The font used to draw tab names.
- </theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Font color of disabled tabs.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the tab name.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Font color of the currently selected tab.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the tab names.
- </theme_item>
- <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+ <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
Font color of the other, unselected tabs.
</theme_item>
<theme_item name="icon_separation" data_type="constant" type="int" default="4">
Space between tab's name and its icon.
</theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the tab text outline.
+ </theme_item>
+ <theme_item name="side_margin" data_type="constant" type="int" default="8">
+ The space at the left or right edges of the tab bar, accordingly with the current [member tab_alignment].
+ The margin is ignored with [code]ALIGNMENT_RIGHT[/code] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [code]ALIGNMENT_CENTER[/code].
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ The font used to draw tab names.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the tab names.
+ </theme_item>
+ <theme_item name="decrement" data_type="icon" 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" data_type="icon" 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="increment" data_type="icon" 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>
@@ -220,15 +218,9 @@
<theme_item name="menu_highlight" data_type="icon" 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="outline_size" data_type="constant" type="int" default="0">
- The size of the tab text outline.
- </theme_item>
<theme_item name="panel" data_type="style" type="StyleBox">
The style for the background fill.
</theme_item>
- <theme_item name="side_margin" data_type="constant" type="int" default="8">
- The space at the left and right edges of the tab bar.
- </theme_item>
<theme_item name="tab_disabled" data_type="style" type="StyleBox">
The style of disabled tabs.
</theme_item>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b8e2f7f03c..a4edaa79c7 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" version="4.0">
+<class name="TextEdit" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Multiline text editing control.
</brief_description>
@@ -201,7 +201,7 @@
<method name="get_last_full_visible_line" qualifiers="const">
<return type="int" />
<description>
- Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index.
+ Returns the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index.
</description>
</method>
<method name="get_last_full_visible_line_wrap_index" qualifiers="const">
@@ -233,8 +233,9 @@
<method name="get_line_column_at_pos" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="position" type="Vector2i" />
+ <argument index="1" name="allow_out_of_bounds" type="bool" default="true" />
<description>
- Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line.
+ Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If [code]allow_out_of_bounds[/code] is [code]false[/code] and the position is not over the text, both vector values will be set to [code]-1[/code].
</description>
</method>
<method name="get_line_count" qualifiers="const">
@@ -361,6 +362,24 @@
Returns OpenType feature [code]tag[/code].
</description>
</method>
+ <method name="get_pos_at_line_column" qualifiers="const">
+ <return type="Vector2i" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" />
+ <description>
+ Returns the local position for the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] of the returned vector equal [code]-1[/code], the position is outside of the viewable area of the control.
+ [b]Note:[/b] The Y position corresponds to the bottom side of the line. Use [method get_rect_at_line_column] to get the top side position.
+ </description>
+ </method>
+ <method name="get_rect_at_line_column" qualifiers="const">
+ <return type="Rect2i" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" />
+ <description>
+ Returns the local position and size for the grapheme at the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] position of the returned rect equal [code]-1[/code], the position is outside of the viewable area of the control.
+ [b]Note:[/b] The Y position of the returned rect corresponds to the top side of the line, unlike [method get_pos_at_line_column] which returns the bottom side.
+ </description>
+ </method>
<method name="get_saved_version" qualifiers="const">
<return type="int" />
<description>
@@ -453,6 +472,14 @@
Returns the number of visible lines, including wrapped text.
</description>
</method>
+ <method name="get_visible_line_count_in_range" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="from_line" type="int" />
+ <argument index="1" name="to_line" type="int" />
+ <description>
+ Returns the total number of visible + wrapped lines between the two lines.
+ </description>
+ </method>
<method name="get_word_at_pos" qualifiers="const">
<return type="String" />
<argument index="0" name="position" type="Vector2" />
@@ -559,6 +586,13 @@
Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).
</description>
</method>
+ <method name="is_mouse_over_selection" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="edges" type="bool" />
+ <description>
+ Returns whether the mouse is over selection. If [code]edges[/code] is [code]true[/code], the edges are considered part of the selection.
+ </description>
+ </method>
<method name="is_overtype_mode_enabled" qualifiers="const">
<return type="bool" />
<description>
@@ -695,8 +729,7 @@
<method name="set_gutter_custom_draw">
<return type="void" />
<argument index="0" name="column" type="int" />
- <argument index="1" name="object" type="Object" />
- <argument index="2" name="callback" type="StringName" />
+ <argument index="1" name="draw_callback" type="Callable" />
<description>
Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code].
</description>
@@ -873,11 +906,9 @@
</method>
<method name="set_tooltip_request_func">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="callback" type="StringName" />
- <argument index="2" name="data" type="Variant" />
+ <argument index="0" name="callback" type="Callable" />
<description>
- Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String, data: Variant[/code]
+ Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String[/code]
</description>
</method>
<method name="swap_lines">
@@ -908,7 +939,7 @@
<member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65">
Duration (in seconds) of a caret's blinking cycle.
</member>
- <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
+ <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="true">
Allow moving caret, selecting and removing the individual composite character components.
[b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
</member>
@@ -937,7 +968,7 @@
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]false[/code], existing text cannot be modified and new text cannot be added.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false">
If [code]true[/code], all occurrences of the selected text will be highlighted.
</member>
@@ -957,10 +988,13 @@
<member name="minimap_width" type="int" setter="set_minimap_width" getter="get_minimap_width" default="80">
The width, in pixels, of the minimap.
</member>
- <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" />
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" />
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
</member>
+ <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default="&quot;&quot;">
+ Text shown when the [TextEdit] is empty. It is [b]not[/b] the [TextEdit]'s default value (see [member text]).
+ </member>
<member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
</member>
@@ -1188,53 +1222,53 @@
<theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
[Color] of the text behind the caret when using a block caret.
</theme_item>
- <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
- [Color] of the caret.
+ <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ [Color] of the caret. This can be set to a fully transparent color to hide the caret entirely.
</theme_item>
<theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
Background [Color] of the line containing the caret.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- Sets the [StyleBox] when in focus.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Sets the default [Font].
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Sets the font [Color].
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [TextEdit].
</theme_item>
- <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+ <theme_item name="font_placeholder_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.6)">
+ Font color for [member placeholder_text].
+ </theme_item>
+ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member editable] is disabled.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Sets default font size.
+ <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
+ [Color] of the border around text that matches the search query.
+ </theme_item>
+ <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
+ [Color] behind the text that matches the search query.
+ </theme_item>
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
+ Sets the highlight [Color] of text selections.
+ </theme_item>
+ <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 0.25)">
+ Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
+ </theme_item>
+ <theme_item name="caret_width" data_type="constant" type="int" default="1">
+ The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. If set to [code]0[/code] or lower, the caret width is automatically set to 1 pixel and multiplied by the display scaling factor.
</theme_item>
<theme_item name="line_spacing" data_type="constant" type="int" default="4">
Sets the spacing between the lines.
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Sets the [StyleBox] of this [TextEdit].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="read_only" data_type="style" type="StyleBox">
- Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled.
- </theme_item>
- <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
- [Color] of the border around text that matches the search query.
- </theme_item>
- <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
- [Color] behind the text that matches the search query.
+ <theme_item name="font" data_type="font" type="Font">
+ Sets the default [Font].
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
- Sets the highlight [Color] of text selections.
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Sets default font size.
</theme_item>
<theme_item name="space" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for space text characters.
@@ -1242,8 +1276,14 @@
<theme_item name="tab" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for tab text characters.
</theme_item>
- <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
- Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ Sets the [StyleBox] when in focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Sets the [StyleBox] of this [TextEdit].
+ </theme_item>
+ <theme_item name="read_only" data_type="style" type="StyleBox">
+ Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index 598d0fb859..5359937db5 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextLine" inherits="RefCounted" version="4.0">
+<class name="TextLine" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Holds a line of text.
</brief_description>
@@ -13,7 +13,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<argument index="3" name="length" type="int" default="1" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -24,9 +24,9 @@
<argument index="0" name="text" type="String" />
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
<argument index="4" name="language" type="String" default="&quot;&quot;" />
+ <argument index="5" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it.
</description>
@@ -122,7 +122,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
@@ -144,8 +144,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="HAlign" default="0">
- Text horizontal alignment.
+ <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
</member>
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index 5bd6b0572c..964e2c771f 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextParagraph" inherits="RefCounted" version="4.0">
+<class name="TextParagraph" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Holds a paragraph of text.
</brief_description>
@@ -13,7 +13,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<argument index="3" name="length" type="int" default="1" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -24,9 +24,9 @@
<argument index="0" name="text" type="String" />
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
<argument index="4" name="language" type="String" default="&quot;&quot;" />
+ <argument index="5" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it.
</description>
@@ -113,7 +113,7 @@
<method name="get_dropcap_rid" qualifiers="const">
<return type="RID" />
<description>
- Return drop cap text buffer RID.
+ Returns drop cap text buffer RID.
</description>
</method>
<method name="get_dropcap_size" qualifiers="const">
@@ -240,7 +240,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
@@ -259,8 +259,7 @@
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
<argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
<argument index="5" name="language" type="String" default="&quot;&quot;" />
<description>
Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
@@ -275,9 +274,12 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="HAlign" default="0">
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="HorizontalAlignment" default="0">
Paragraph horizontal alignment.
</member>
+ <member name="custom_punctuation" type="String" setter="set_custom_punctuation" getter="get_custom_punctuation" default="&quot;&quot;">
+ Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
+ </member>
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
</member>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 3e32afe370..020c30b9cd 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextServer" inherits="RefCounted" version="4.0">
+<class name="TextServer" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Interface for the fonts and complex text layouts.
</brief_description>
@@ -21,8 +21,8 @@
<argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method free_rid] method.
- [b]Note:[/b] Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
- [b]Note:[/b] Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
+ [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
<method name="draw_hex_code_box" qualifiers="const">
@@ -112,6 +112,13 @@
Returns the font descent (number of pixels below the baseline).
</description>
</method>
+ <method name="font_get_embolden" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font embolden strength.
+ </description>
+ </method>
<method name="font_get_fixed_size" qualifiers="const">
<return type="int" />
<argument index="0" name="font_rid" type="RID" />
@@ -244,7 +251,7 @@
<return type="int" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Return the width of the range around the shape between the minimum and maximum representable signed distance.
+ Returns the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
<method name="font_get_msdf_size" qualifiers="const">
@@ -254,6 +261,20 @@
Returns source font size used to generate MSDF textures.
</description>
</method>
+ <method name="font_get_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font family name.
+ </description>
+ </method>
+ <method name="font_get_opentype_feature_overrides" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font OpenType feature set override.
+ </description>
+ </method>
<method name="font_get_oversampling" qualifiers="const">
<return type="float" />
<argument index="0" name="font_rid" type="RID" />
@@ -288,7 +309,7 @@
<return type="Array" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
<method name="font_get_spacing" qualifiers="const">
@@ -300,6 +321,27 @@
Returns extra spacing added between glyphs in pixels.
</description>
</method>
+ <method name="font_get_style" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font style flags, see [enum FontStyle].
+ </description>
+ </method>
+ <method name="font_get_style_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font style name.
+ </description>
+ </method>
+ <method name="font_get_subpixel_positioning" qualifiers="const">
+ <return type="int" enum="TextServer.SubpixelPositioning" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font sub-pixel glyph positioning mode.
+ </description>
+ </method>
<method name="font_get_supported_chars" qualifiers="const">
<return type="String" />
<argument index="0" name="font_rid" type="RID" />
@@ -333,6 +375,13 @@
Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
+ <method name="font_get_transform" qualifiers="const">
+ <return type="Transform2D" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns 2D transform applied to the font outlines.
+ </description>
+ </method>
<method name="font_get_underline_position" qualifiers="const">
<return type="float" />
<argument index="0" name="font_rid" type="RID" />
@@ -361,7 +410,7 @@
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="char" type="int" />
<description>
- Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
<method name="font_is_antialiased" qualifiers="const">
@@ -375,7 +424,7 @@
<return type="bool" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
+ Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="font_is_language_supported" qualifiers="const">
@@ -507,6 +556,14 @@
Sets the font descent (number of pixels below the baseline).
</description>
</method>
+ <method name="font_set_embolden">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="strength" type="float" />
+ <description>
+ Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ </description>
+ </method>
<method name="font_set_fixed_size">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -520,7 +577,7 @@
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="force_autohinter" type="bool" />
<description>
- If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
<method name="font_set_global_oversampling">
@@ -528,7 +585,7 @@
<argument index="0" name="oversampling" type="float" />
<description>
Sets oversampling factor, shared by all font in the TextServer.
- [b]Note:[/b] This value can be automaticaly changed by display server.
+ [b]Note:[/b] This value can be automatically changed by display server.
</description>
</method>
<method name="font_set_glyph_advance">
@@ -585,7 +642,7 @@
<method name="font_set_hinting">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="_hinting" type="int" enum="TextServer.Hinting" />
+ <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" />
<description>
Sets font hinting mode. Used by dynamic fonts only.
</description>
@@ -634,6 +691,22 @@
[b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
</description>
</method>
+ <method name="font_set_name">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="name" type="String" />
+ <description>
+ Sets the font family name.
+ </description>
+ </method>
+ <method name="font_set_opentype_feature_overrides">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="overrides" type="Dictionary" />
+ <description>
+ Sets font OpenType feature set override.
+ </description>
+ </method>
<method name="font_set_oversampling">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -670,6 +743,30 @@
Sets extra spacing added between glyphs in pixels.
</description>
</method>
+ <method name="font_set_style">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="style" type="int" />
+ <description>
+ Sets the font style flags, see [enum FontStyle].
+ </description>
+ </method>
+ <method name="font_set_style_name">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="name" type="String" />
+ <description>
+ Sets the font style name.
+ </description>
+ </method>
+ <method name="font_set_subpixel_positioning">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
+ <description>
+ Sets font sub-pixel glyph positioning mode.
+ </description>
+ </method>
<method name="font_set_texture_image">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -690,6 +787,15 @@
Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
+ <method name="font_set_transform">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="transform" type="Transform2D" />
+ <description>
+ Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
+ For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
+ </description>
+ </method>
<method name="font_set_underline_position">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -836,12 +942,38 @@
[b]Note:[/b] This function is used by during project export, to include TextServer database.
</description>
</method>
+ <method name="shaped_get_span_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].
+ </description>
+ </method>
+ <method name="shaped_get_span_meta" qualifiers="const">
+ <return type="Variant" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="index" type="int" />
+ <description>
+ Returns text span metadata.
+ </description>
+ </method>
+ <method name="shaped_set_span_update_font">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="index" type="int" />
+ <argument index="2" name="fonts" type="Array" />
+ <argument index="3" name="size" type="int" />
+ <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
+ <description>
+ Changes text span font, font size and OpenType features, without changing the text.
+ </description>
+ </method>
<method name="shaped_text_add_object">
<return type="bool" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<argument index="4" name="length" type="int" default="1" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -853,9 +985,9 @@
<argument index="1" name="text" type="String" />
<argument index="2" name="fonts" type="Array" />
<argument index="3" name="size" type="int" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
<argument index="5" name="language" type="String" default="&quot;&quot;" />
+ <argument index="6" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it to the text buffer.
</description>
@@ -917,6 +1049,13 @@
Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
</description>
</method>
+ <method name="shaped_text_get_custom_punctuation" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
+ </description>
+ </method>
<method name="shaped_text_get_descent" qualifiers="const">
<return type="float" />
<argument index="0" name="shaped" type="RID" />
@@ -976,6 +1115,21 @@
Returns text glyphs in the visual order.
</description>
</method>
+ <method name="shaped_text_get_grapheme_bounds" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="pos" type="int" />
+ <description>
+ Returns composite character's bounds as offsets from the start of the line.
+ </description>
+ </method>
+ <method name="shaped_text_get_inferred_direction" qualifiers="const">
+ <return type="int" enum="TextServer.Direction" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns direction of the text, inferred by the BiDi algorithm.
+ </description>
+ </method>
<method name="shaped_text_get_line_breaks" qualifiers="const">
<return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
@@ -1153,7 +1307,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
@@ -1167,13 +1321,21 @@
Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
+ <method name="shaped_text_set_custom_punctuation">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="punct" type="String" />
+ <description>
+ Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
+ </description>
+ </method>
<method name="shaped_text_set_direction">
<return type="void" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="direction" type="int" enum="TextServer.Direction" default="0" />
<description>
Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
- [b]Note:[/b] Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
+ [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
<method name="shaped_text_set_orientation">
@@ -1182,7 +1344,7 @@
<argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Sets desired text orientation.
- [b]Note:[/b] Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
<method name="shaped_text_set_preserve_control">
@@ -1233,6 +1395,26 @@
Aligns shaped text to the given tab-stops.
</description>
</method>
+ <method name="string_to_lower" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <description>
+ Returns the string converted to lowercase.
+ [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
+ [b]Note:[/b] The result may be longer or shorter than the original.
+ </description>
+ </method>
+ <method name="string_to_upper" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <description>
+ Returns the string converted to uppercase.
+ [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
+ [b]Note:[/b] The result may be longer or shorter than the original.
+ </description>
+ </method>
<method name="strip_diacritics" qualifiers="const">
<return type="String" />
<argument index="0" name="string" type="String" />
@@ -1316,7 +1498,7 @@
<constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag">
</constant>
<constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag">
- Grapheme is supprted by the font, and can be drawn.
+ Grapheme is supported by the font, and can be drawn.
</constant>
<constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag">
Grapheme is part of right-to-left or bottom-to-top run.
@@ -1357,6 +1539,21 @@
<constant name="HINTING_NORMAL" value="2" enum="Hinting">
Use the default font hinting mode (crisper but less smooth).
</constant>
+ <constant name="SUBPIXEL_POSITIONING_DISABLED" value="0" enum="SubpixelPositioning">
+ Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
+ </constant>
+ <constant name="SUBPIXEL_POSITIONING_AUTO" value="1" enum="SubpixelPositioning">
+ Glyph horizontal position is rounded based on font size.
+ - To one quarter of the pixel size if font size is smaller or equal to [code]16[/code].
+ - To one half of the pixel size if font size is smaller or equal to [code]20[/code].
+ - To the whole pixel size for larger fonts.
+ </constant>
+ <constant name="SUBPIXEL_POSITIONING_ONE_HALF" value="2" enum="SubpixelPositioning">
+ Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
+ </constant>
+ <constant name="SUBPIXEL_POSITIONING_ONE_QUARTER" value="3" enum="SubpixelPositioning">
+ Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
+ </constant>
<constant name="FEATURE_BIDI_LAYOUT" value="1" enum="Feature">
TextServer supports bidirectional layouts.
</constant>
@@ -1378,7 +1575,10 @@
<constant name="FEATURE_FONT_VARIABLE" value="64" enum="Feature">
TextServer supports variable fonts.
</constant>
- <constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature">
+ <constant name="FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION" value="128" enum="Feature">
+ TextServer supports locale dependent and context sensitive case conversion.
+ </constant>
+ <constant name="FEATURE_USE_SUPPORT_DATA" value="256" enum="Feature">
TextServer require external data file for some features.
</constant>
<constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag">
@@ -1402,5 +1602,14 @@
<constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
Spacing at the bottom of the line.
</constant>
+ <constant name="FONT_BOLD" value="1" enum="FontStyle">
+ Font is bold.
+ </constant>
+ <constant name="FONT_ITALIC" value="2" enum="FontStyle">
+ Font is italic or oblique.
+ </constant>
+ <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle">
+ Font have fixed-width characters.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 99382d5463..5ffd80bf63 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextServerExtension" inherits="TextServer" version="4.0">
+<class name="TextServerExtension" inherits="TextServer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for TextServer custom implementations (plugins).
</brief_description>
@@ -112,6 +112,13 @@
Returns the font descent (number of pixels below the baseline).
</description>
</method>
+ <method name="_font_get_embolden" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font embolden strength.
+ </description>
+ </method>
<method name="_font_get_fixed_size" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="font_rid" type="RID" />
@@ -202,7 +209,7 @@
</description>
</method>
<method name="_font_get_hinting" qualifiers="virtual const">
- <return type="int" />
+ <return type="int" enum="TextServer.Hinting" />
<argument index="0" name="font_rid" type="RID" />
<description>
Returns the font hinting mode. Used by dynamic fonts only.
@@ -254,6 +261,20 @@
Returns source font size used to generate MSDF textures.
</description>
</method>
+ <method name="_font_get_name" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font family name.
+ </description>
+ </method>
+ <method name="_font_get_opentype_feature_overrides" qualifiers="virtual const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font OpenType feature set override.
+ </description>
+ </method>
<method name="_font_get_oversampling" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="font_rid" type="RID" />
@@ -300,6 +321,27 @@
Returns extra spacing added between glyphs in pixels.
</description>
</method>
+ <method name="_font_get_style" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font style flags, see [enum TextServer.FontStyle].
+ </description>
+ </method>
+ <method name="_font_get_style_name" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font style name.
+ </description>
+ </method>
+ <method name="_font_get_subpixel_positioning" qualifiers="virtual const">
+ <return type="int" enum="TextServer.SubpixelPositioning" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font sub-pixel glyph positioning mode.
+ </description>
+ </method>
<method name="_font_get_supported_chars" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="font_rid" type="RID" />
@@ -333,6 +375,13 @@
Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
+ <method name="_font_get_transform" qualifiers="virtual const">
+ <return type="Transform2D" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Retruns 2D transform applied to the font outlines.
+ </description>
+ </method>
<method name="_font_get_underline_position" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="font_rid" type="RID" />
@@ -375,7 +424,7 @@
<return type="bool" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
+ Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="_font_is_language_supported" qualifiers="virtual const">
@@ -516,12 +565,20 @@
Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
</description>
</method>
+ <method name="_font_set_embolden" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="strength" type="float" />
+ <description>
+ Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ </description>
+ </method>
<method name="_font_set_fixed_size" qualifiers="virtual">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="fixed_size" type="int" />
<description>
- If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
<method name="_font_set_force_autohinter" qualifiers="virtual">
@@ -529,6 +586,7 @@
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="force_autohinter" type="bool" />
<description>
+ If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
<method name="_font_set_global_oversampling" qualifiers="virtual">
@@ -536,7 +594,7 @@
<argument index="0" name="oversampling" type="float" />
<description>
Sets oversampling factor, shared by all font in the TextServer.
- [b]Note:[/b] This value can be automaticaly changed by display server.
+ [b]Note:[/b] This value can be automatically changed by display server.
</description>
</method>
<method name="_font_set_glyph_advance" qualifiers="virtual">
@@ -641,6 +699,22 @@
If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
</description>
</method>
+ <method name="_font_set_name" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="name" type="String" />
+ <description>
+ Sets the font family name.
+ </description>
+ </method>
+ <method name="_font_set_opentype_feature_overrides" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="overrides" type="Dictionary" />
+ <description>
+ Sets font OpenType feature set override.
+ </description>
+ </method>
<method name="_font_set_oversampling" qualifiers="virtual">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -677,6 +751,30 @@
Sets extra spacing added between glyphs in pixels.
</description>
</method>
+ <method name="_font_set_style" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="style" type="int" />
+ <description>
+ Sets the font style flags, see [enum TextServer.FontStyle].
+ </description>
+ </method>
+ <method name="_font_set_style_name" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="name_style" type="String" />
+ <description>
+ Sets the font style name.
+ </description>
+ </method>
+ <method name="_font_set_subpixel_positioning" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
+ <description>
+ Sets font sub-pixel glyph positioning mode.
+ </description>
+ </method>
<method name="_font_set_texture_image" qualifiers="virtual">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -697,6 +795,15 @@
Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
+ <method name="_font_set_transform" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="transform" type="Transform2D" />
+ <description>
+ Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
+ For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
+ </description>
+ </method>
<method name="_font_set_underline_position" qualifiers="virtual">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -843,12 +950,38 @@
[b]Note:[/b] This function is used by during project export, to include TextServer database.
</description>
</method>
+ <method name="_shaped_get_span_count" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns number of text spans added using [method _shaped_text_add_string] or [method _shaped_text_add_object].
+ </description>
+ </method>
+ <method name="_shaped_get_span_meta" qualifiers="virtual const">
+ <return type="Variant" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="index" type="int" />
+ <description>
+ Returns text span metadata.
+ </description>
+ </method>
+ <method name="_shaped_set_span_update_font" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="index" type="int" />
+ <argument index="2" name="fonts" type="Array" />
+ <argument index="3" name="size" type="int" />
+ <argument index="4" name="opentype_features" type="Dictionary" />
+ <description>
+ Changes text span font, font size and OpenType features, without changing the text.
+ </description>
+ </method>
<method name="_shaped_text_add_object" qualifiers="virtual">
<return type="bool" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" />
<argument index="4" name="length" type="int" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -862,6 +995,7 @@
<argument index="3" name="size" type="int" />
<argument index="4" name="opentype_features" type="Dictionary" />
<argument index="5" name="language" type="String" />
+ <argument index="6" name="meta" type="Variant" />
<description>
Adds text span and font to draw it to the text buffer.
</description>
@@ -924,6 +1058,13 @@
Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
</description>
</method>
+ <method name="_shaped_text_get_custom_punctuation" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
+ </description>
+ </method>
<method name="_shaped_text_get_descent" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="shaped" type="RID" />
@@ -933,7 +1074,7 @@
</description>
</method>
<method name="_shaped_text_get_direction" qualifiers="virtual const">
- <return type="int" />
+ <return type="int" enum="TextServer.Direction" />
<argument index="0" name="shaped" type="RID" />
<description>
Returns direction of the text.
@@ -956,9 +1097,8 @@
</description>
</method>
<method name="_shaped_text_get_ellipsis_glyphs" qualifiers="virtual const">
- <return type="void" />
+ <return type="Glyph*" />
<argument index="0" name="shaped" type="RID" />
- <argument index="1" name="r_glyphs" type="void*" />
<description>
Returns array of the glyphs in the ellipsis.
</description>
@@ -978,13 +1118,27 @@
</description>
</method>
<method name="_shaped_text_get_glyphs" qualifiers="virtual const">
- <return type="void" />
+ <return type="Glyph*" />
<argument index="0" name="shaped" type="RID" />
- <argument index="1" name="r_glyphs" type="void*" />
<description>
Copies text glyphs in the visual order, into preallocated array of the size returned by [method _shaped_text_get_glyph_count].
</description>
</method>
+ <method name="_shaped_text_get_grapheme_bounds" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="pos" type="int" />
+ <description>
+ Returns composite character's bounds as offsets from the start of the line.
+ </description>
+ </method>
+ <method name="_shaped_text_get_inferred_direction" qualifiers="virtual const">
+ <return type="int" enum="TextServer.Direction" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns direction of the text, inferred by the BiDi algorithm.
+ </description>
+ </method>
<method name="_shaped_text_get_line_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
@@ -1022,7 +1176,7 @@
</description>
</method>
<method name="_shaped_text_get_orientation" qualifiers="virtual const">
- <return type="int" />
+ <return type="int" enum="TextServer.Orientation" />
<argument index="0" name="shaped" type="RID" />
<description>
Returns text orientation.
@@ -1162,7 +1316,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" />
<description>
Sets new size and alignment of embedded object.
</description>
@@ -1176,6 +1330,14 @@
Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
+ <method name="_shaped_text_set_custom_punctuation" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="punct" type="String" />
+ <description>
+ Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
+ </description>
+ </method>
<method name="_shaped_text_set_direction" qualifiers="virtual">
<return type="void" />
<argument index="0" name="shaped" type="RID" />
@@ -1219,9 +1381,8 @@
</description>
</method>
<method name="_shaped_text_sort_logical" qualifiers="virtual">
- <return type="void" />
+ <return type="Glyph*" />
<argument index="0" name="shaped" type="RID" />
- <argument index="1" name="r_glyphs" type="void*" />
<description>
Copies text glyphs in the logical order, into preallocated array of the size returned by [method _shaped_text_get_glyph_count].
</description>
@@ -1257,6 +1418,22 @@
Updates justification opportunities (spaces, kashidas, etc.).
</description>
</method>
+ <method name="_string_to_lower" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Returns the string converted to lowercase. Casing is locale dependent and context sensitive. The result may be longer or shorter than the original.
+ </description>
+ </method>
+ <method name="_string_to_upper" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Returns the string converted to uppercase. Casing is locale dependent and context sensitive. The result may be longer or shorter than the original.
+ </description>
+ </method>
<method name="_tag_to_name" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="tag" type="int" />
diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml
index d6a1cde945..7eff19038c 100644
--- a/doc/classes/TextServerManager.xml
+++ b/doc/classes/TextServerManager.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextServerManager" inherits="Object" version="4.0">
+<class name="TextServerManager" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Manager for the font and complex text layout servers.
</brief_description>
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index 3387de30b7..df6e0433dc 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture" inherits="Resource" version="4.0">
+<class name="Texture" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index b77365e2df..1bbebe085e 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture2D" inherits="Texture" version="4.0">
+<class name="Texture2D" inherits="Texture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Texture for 2D and 3D.
</brief_description>
@@ -12,6 +12,58 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_draw" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="to_canvas_item" type="RID" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="modulate" type="Color" />
+ <argument index="3" name="transpose" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_draw_rect" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="to_canvas_item" type="RID" />
+ <argument index="1" name="rect" type="Rect2" />
+ <argument index="2" name="tile" type="bool" />
+ <argument index="3" name="modulate" type="Color" />
+ <argument index="4" name="transpose" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_draw_rect_region" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="tp_canvas_item" type="RID" />
+ <argument index="1" name="rect" type="Rect2" />
+ <argument index="2" name="src_rect" type="Rect2" />
+ <argument index="3" name="modulate" type="Color" />
+ <argument index="4" name="transpose" type="bool" />
+ <argument index="5" name="clip_uv" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_height" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_width" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_has_alpha" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_pixel_opaque" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="x" type="int" />
+ <argument index="1" name="y" type="int" />
+ <description>
+ </description>
+ </method>
<method name="draw" qualifiers="const">
<return type="void" />
<argument index="0" name="canvas_item" type="RID" />
diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml
index bbadbc29a1..6f059b5fbf 100644
--- a/doc/classes/Texture2DArray.xml
+++ b/doc/classes/Texture2DArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture2DArray" inherits="ImageTextureLayered" version="4.0">
+<class name="Texture2DArray" inherits="ImageTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml
index 51cd377648..4968f46fe8 100644
--- a/doc/classes/Texture3D.xml
+++ b/doc/classes/Texture3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture3D" inherits="Texture" version="4.0">
+<class name="Texture3D" inherits="Texture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -7,6 +7,36 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_get_data" qualifiers="virtual const">
+ <return type="Image[]" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_depth" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_format" qualifiers="virtual const">
+ <return type="int" enum="Image.Format" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_height" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_width" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_has_mipmaps" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
<method name="get_data" qualifiers="const">
<return type="Image[]" />
<description>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 2be27617ab..043eeb9a80 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" version="4.0">
+<class name="TextureButton" inherits="BaseButton" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Texture-based button. Supports Pressed, Hover, Disabled and Focused states.
</brief_description>
@@ -12,17 +12,17 @@
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<members>
- <member name="expand" type="bool" setter="set_expand" getter="get_expand" default="false">
- 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="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false">
If [code]true[/code], texture is flipped horizontally.
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false">
If [code]true[/code], texture is flipped vertically.
</member>
- <member name="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 [enum StretchMode] constants. See the constants to learn more.
+ <member name="ignore_texture_size" type="bool" setter="set_ignore_texture_size" getter="get_ignore_texture_size" default="false">
+ If [code]true[/code], the size of the texture won't be considered for minimum size calculation, so the [TextureButton] can be shrunk down past the texture size.
+ </member>
+ <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="2">
+ Controls the texture's behavior when you resize the node's bounding rectangle. See the [enum StretchMode] constants for available options.
</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.
@@ -31,7 +31,7 @@
Texture to display when the node is disabled. See [member BaseButton.disabled].
</member>
<member name="texture_focused" type="Texture2D" setter="set_focused_texture" getter="get_focused_texture">
- Texture to display when the node has mouse or keyboard focus.
+ Texture to display when the node has mouse or keyboard focus. [member texture_focused] is displayed [i]over[/i] the base texture, so a partially transparent texture should be used to ensure the base texture remains visible. A texture that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a fully transparent texture of any size. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</member>
<member name="texture_hover" type="Texture2D" setter="set_hover_texture" getter="get_hover_texture">
Texture to display when the mouse hovers the node.
diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml
index dd8c709049..3445329f32 100644
--- a/doc/classes/TextureLayered.xml
+++ b/doc/classes/TextureLayered.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureLayered" inherits="Texture" version="4.0">
+<class name="TextureLayered" inherits="Texture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for 3D texture types.
</brief_description>
@@ -9,6 +9,42 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_get_format" qualifiers="virtual const">
+ <return type="int" enum="Image.Format" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_height" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_layer_data" qualifiers="virtual const">
+ <return type="Image" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_layered_type" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_layers" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_width" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_has_mipmaps" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format" />
<description>
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index ee47557b39..a97e3a0cdc 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureProgressBar" inherits="Range" version="4.0">
+<class name="TextureProgressBar" inherits="Range" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Texture-based progress bar. Useful for loading screens and life or stamina bars.
</brief_description>
@@ -27,7 +27,7 @@
<member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0">
The fill direction. See [enum FillMode] for possible values.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
<member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" default="false">
If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member fill_mode], this setting will enable stretching.
</member>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 4f18f43ddf..348b4a5837 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" version="4.0">
+<class name="TextureRect" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control for drawing textures.
</brief_description>
@@ -10,16 +10,16 @@
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<members>
- <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false">
- If [code]true[/code], the texture scales to fit its bounding rectangle.
- </member>
<member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false">
If [code]true[/code], texture is flipped horizontally.
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false">
If [code]true[/code], texture is flipped vertically.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
+ <member name="ignore_texture_size" type="bool" setter="set_ignore_texture_size" getter="get_ignore_texture_size" default="false">
+ If [code]true[/code], the size of the texture won't be considered for minimum size calculation, so the [TextureRect] can be shrunk down past the texture size. Useful for preventing [TextureRect]s from breaking GUI layout regardless of their texture size.
+ </member>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
<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>
@@ -28,28 +28,25 @@
</member>
</members>
<constants>
- <constant name="STRETCH_SCALE_ON_EXPAND" value="0" enum="StretchMode">
- Scale to fit the node's bounding rectangle, only if [code]expand[/code] is [code]true[/code]. Default [code]stretch_mode[/code], for backwards compatibility. Until you set [code]expand[/code] to [code]true[/code], the texture will behave like [constant STRETCH_KEEP].
- </constant>
- <constant name="STRETCH_SCALE" value="1" enum="StretchMode">
+ <constant name="STRETCH_SCALE" value="0" enum="StretchMode">
Scale to fit the node's bounding rectangle.
</constant>
- <constant name="STRETCH_TILE" value="2" enum="StretchMode">
+ <constant name="STRETCH_TILE" value="1" enum="StretchMode">
Tile inside the node's bounding rectangle.
</constant>
- <constant name="STRETCH_KEEP" value="3" enum="StretchMode">
+ <constant name="STRETCH_KEEP" value="2" enum="StretchMode">
The texture keeps its original size and stays in the bounding rectangle's top-left corner.
</constant>
- <constant name="STRETCH_KEEP_CENTERED" value="4" enum="StretchMode">
+ <constant name="STRETCH_KEEP_CENTERED" value="3" enum="StretchMode">
The texture keeps its original size and stays centered in the node's bounding rectangle.
</constant>
- <constant name="STRETCH_KEEP_ASPECT" value="5" enum="StretchMode">
+ <constant name="STRETCH_KEEP_ASPECT" value="4" enum="StretchMode">
Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.
</constant>
- <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="6" enum="StretchMode">
+ <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="5" enum="StretchMode">
Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio.
</constant>
- <constant name="STRETCH_KEEP_ASPECT_COVERED" value="7" enum="StretchMode">
+ <constant name="STRETCH_KEEP_ASPECT_COVERED" value="6" enum="StretchMode">
Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
</constant>
</constants>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 52a419ce0f..5270da9588 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -1,20 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Theme" inherits="Resource" version="4.0">
+<class name="Theme" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Theme for controls.
+ Theme resource for styling/skinning [Control]s and [Window]s.
</brief_description>
<description>
- A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any [Control]; the Control and its children will automatically use it.
- Theme resources can alternatively be loaded by writing them in a [code].theme[/code] file, see the documentation for more information.
+ A theme resource is used for styling/skinning [Control] and [Window] nodes. While individual controls can be styled using their local theme overrides (see [method Control.add_theme_color_override]), theme resources allow you to store and apply the same settings between all controls sharing the same type (e.g. style all [Button]s the same). One theme resource can be used for the entire project, but you can also set a separate theme resource to a branch of control nodes. A theme resources assigned to a control node applies to the control itself, as well as all of its direct and indirect children (as long as a chain of controls is uninterrupted).
+ Use [member ProjectSettings.gui/theme/custom] to set up a project-scope theme that will be available to every control in your project.
+ Use [member Control.theme] of any control node to set up a theme that will be available to that control and all of its direct and indirect children.
</description>
<tutorials>
- <link title="GUI skinning">https://docs.godotengine.org/en/latest/tutorials/ui/gui_skinning.html</link>
+ <link title="GUI skinning">$DOCS_URL/tutorials/ui/gui_skinning.html</link>
+ <link title="Using the theme editor">$DOCS_URL/tutorials/ui/gui_using_theme_editor.html</link>
</tutorials>
<methods>
+ <method name="add_type">
+ <return type="void" />
+ <argument index="0" name="theme_type" type="StringName" />
+ <description>
+ Adds an empty theme type for every valid data type.
+ [b]Note:[/b] Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available [code]set_*[/code] methods to add theme items.
+ </description>
+ </method>
<method name="clear">
<return type="void" />
<description>
- Clears all values on the theme.
+ Removes all the theme properties defined on the theme resource.
</description>
</method>
<method name="clear_color">
@@ -22,7 +32,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Removes the [Color] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Fails if it doesn't exist. Use [method has_color] to check for existence.
</description>
</method>
<method name="clear_constant">
@@ -30,7 +41,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code].
+ Removes the constant property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Fails if it doesn't exist. Use [method has_constant] to check for existence.
</description>
</method>
<method name="clear_font">
@@ -38,7 +50,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Removes the [Font] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Fails if it doesn't exist. Use [method has_font] to check for existence.
</description>
</method>
<method name="clear_font_size">
@@ -46,7 +59,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Clears the font size [code]name[/code] if the theme has [code]theme_type[/code].
+ Removes the font size property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Fails if it doesn't exist. Use [method has_font_size] to check for existence.
</description>
</method>
<method name="clear_icon">
@@ -54,7 +68,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code].
+ Removes the icon property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Fails if it doesn't exist. Use [method has_icon] to check for existence.
</description>
</method>
<method name="clear_stylebox">
@@ -62,7 +77,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Removes the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Fails if it doesn't exist. Use [method has_stylebox] to check for existence.
</description>
</method>
<method name="clear_theme_item">
@@ -71,14 +87,16 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Removes the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Fails if it doesn't exist. Use [method has_theme_item] to check for existence.
+ [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
<method name="clear_type_variation">
<return type="void" />
<argument index="0" name="theme_type" type="StringName" />
<description>
- Unmarks [code]theme_type[/code] as being a variation of any other type.
+ Unmarks [code]theme_type[/code] as being a variation of another theme type. See [method set_type_variation].
</description>
</method>
<method name="get_color" qualifiers="const">
@@ -86,20 +104,21 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the [Color] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the default color value if the property doesn't exist. Use [method has_color] to check for existence.
</description>
</method>
<method name="get_color_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="theme_type" type="String" />
<description>
- Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]theme_type[/code].
+ Returns a list of names for [Color] properties defined with [code]theme_type[/code]. Use [method get_color_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_color_type_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns all the [Color] types as a [PackedStringArray] filled with unique type names, for use in [method get_color] and/or [method get_color_list].
+ Returns a list of all unique theme type names for [Color] properties. Use [method get_type_list] to get a list of all unique theme types.
</description>
</method>
<method name="get_constant" qualifiers="const">
@@ -107,20 +126,21 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the constant property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns [code]0[/code] if the property doesn't exist. Use [method has_constant] to check for existence.
</description>
</method>
<method name="get_constant_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="theme_type" type="String" />
<description>
- Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]theme_type[/code].
+ Returns a list of names for constant properties defined with [code]theme_type[/code]. Use [method get_constant_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_constant_type_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns all the constant types as a [PackedStringArray] filled with unique type names, for use in [method get_constant] and/or [method get_constant_list].
+ Returns a list of all unique theme type names for constant properties. Use [method get_type_list] to get a list of all unique theme types.
</description>
</method>
<method name="get_font" qualifiers="const">
@@ -128,14 +148,16 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the [Font] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the default theme font if the property doesn't exist and the default theme font is set up (see [member default_font]). Use [method has_font] to check for existence of the property and [method has_default_font] to check for existence of the default theme font.
+ Returns the engine fallback font value, if neither exist.
</description>
</method>
<method name="get_font_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="theme_type" type="String" />
<description>
- Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]theme_type[/code].
+ Returns a list of names for [Font] properties defined with [code]theme_type[/code]. Use [method get_font_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_font_size" qualifiers="const">
@@ -143,26 +165,28 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the font size property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see [member default_font_size]). Use [method has_font_size] to check for existence of the property and [method has_default_font_size] to check for existence of the default theme font.
+ Returns the engine fallback font size value, if neither exist.
</description>
</method>
<method name="get_font_size_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="theme_type" type="String" />
<description>
- Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]theme_type[/code].
+ Returns a list of names for font size properties defined with [code]theme_type[/code]. Use [method get_font_size_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_font_size_type_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns all the font size types as a [PackedStringArray] filled with unique type names, for use in [method get_font_size] and/or [method get_font_size_list].
+ Returns a list of all unique theme type names for font size properties. Use [method get_type_list] to get a list of all unique theme types.
</description>
</method>
<method name="get_font_type_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns all the [Font] types as a [PackedStringArray] filled with unique type names, for use in [method get_font] and/or [method get_font_list].
+ Returns a list of all unique theme type names for [Font] properties. Use [method get_type_list] to get a list of all unique theme types.
</description>
</method>
<method name="get_icon" qualifiers="const">
@@ -170,20 +194,21 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the icon property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the engine fallback icon value if the property doesn't exist. Use [method has_icon] to check for existence.
</description>
</method>
<method name="get_icon_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="theme_type" type="String" />
<description>
- Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]theme_type[/code].
+ Returns a list of names for icon properties defined with [code]theme_type[/code]. Use [method get_icon_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_icon_type_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns all the icon types as a [PackedStringArray] filled with unique type names, for use in [method get_icon] and/or [method get_icon_list].
+ Returns a list of all unique theme type names for icon properties. Use [method get_type_list] to get a list of all unique theme types.
</description>
</method>
<method name="get_stylebox" qualifiers="const">
@@ -191,22 +216,21 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
- Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list].
+ Returns the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the engine fallback stylebox value if the property doesn't exist. Use [method has_stylebox] to check for existence.
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="theme_type" type="String" />
<description>
- Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]theme_type[/code].
- Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list].
+ Returns a list of names for [StyleBox] properties defined with [code]theme_type[/code]. Use [method get_stylebox_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_stylebox_type_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns all the [StyleBox] types as a [PackedStringArray] filled with unique type names, for use in [method get_stylebox] and/or [method get_stylebox_list].
+ Returns a list of all unique theme type names for [StyleBox] properties. Use [method get_type_list] to get a list of all unique theme types.
</description>
</method>
<method name="get_theme_item" qualifiers="const">
@@ -215,8 +239,9 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
- Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ Returns the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the engine fallback icon value if the property doesn't exist. Use [method has_theme_item] to check for existence.
+ [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
<method name="get_theme_item_list" qualifiers="const">
@@ -224,35 +249,36 @@
<argument index="0" name="data_type" type="int" enum="Theme.DataType" />
<argument index="1" name="theme_type" type="String" />
<description>
- Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]theme_type[/code].
- Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ Returns a list of names for properties of [code]data_type[/code] defined with [code]theme_type[/code]. Use [method get_theme_item_type_list] to get a list of possible theme type names.
+ [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
<method name="get_theme_item_type_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="data_type" type="int" enum="Theme.DataType" />
<description>
- Returns all the theme items of [code]data_type[/code] types as a [PackedStringArray] filled with unique type names, for use in [method get_theme_item], [method get_theme_item_list] or data type specific methods.
+ Returns a list of all unique theme type names for [code]data_type[/code] properties. Use [method get_type_list] to get a list of all unique theme types.
+ [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
<method name="get_type_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns all the theme types as a [PackedStringArray] filled with unique type names, for use in other [code]get_*[/code] functions of this theme.
+ Returns a list of all unique theme type names. Use the appropriate [code]get_*_type_list[/code] method to get a list of unique theme types for a single data type.
</description>
</method>
<method name="get_type_variation_base" qualifiers="const">
<return type="StringName" />
<argument index="0" name="theme_type" type="StringName" />
<description>
- Returns the base theme type if [code]theme_type[/code] is a valid variation type. Returns an empty string otherwise.
+ Returns the name of the base theme type if [code]theme_type[/code] is a valid variation type. Returns an empty string otherwise.
</description>
</method>
<method name="get_type_variation_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="base_type" type="StringName" />
<description>
- Returns a list of all variation for the given [code]base_type[/code].
+ Returns a list of all type variations for the given [code]base_type[/code].
</description>
</method>
<method name="has_color" qualifiers="const">
@@ -260,8 +286,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if the [Color] property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]false[/code] if it doesn't exist. Use [method set_color] to define it.
</description>
</method>
<method name="has_constant" qualifiers="const">
@@ -269,26 +295,29 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if the constant property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]false[/code] if it doesn't exist. Use [method set_constant] to define it.
</description>
</method>
<method name="has_default_base_scale" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if this theme has a valid [member default_base_scale] value.
+ Returns [code]true[/code] if [member default_base_scale] has a valid value.
+ Returns [code]false[/code] if it doesn't. The value must be greater than [code]0.0[/code] to be considered valid.
</description>
</method>
<method name="has_default_font" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if this theme has a valid [member default_font] value.
+ Returns [code]true[/code] if [member default_font] has a valid value.
+ Returns [code]false[/code] if it doesn't.
</description>
</method>
<method name="has_default_font_size" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if this theme has a valid [member default_font_size] value.
+ Returns [code]true[/code] if [member default_font_size] has a valid value.
+ Returns [code]false[/code] if it doesn't. The value must be greater than [code]0[/code] to be considered valid.
</description>
</method>
<method name="has_font" qualifiers="const">
@@ -296,8 +325,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if the [Font] property defined by [code]name[/code] and [code]theme_type[/code] exists, or if the default theme font is set up (see [method has_default_font]).
+ Returns [code]false[/code] if neither exist. Use [method set_font] to define the property.
</description>
</method>
<method name="has_font_size" qualifiers="const">
@@ -305,8 +334,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if the font size property defined by [code]name[/code] and [code]theme_type[/code] exists, or if the default theme font size is set up (see [method has_default_font_size]).
+ Returns [code]false[/code] if neither exist. Use [method set_font_size] to define the property.
</description>
</method>
<method name="has_icon" qualifiers="const">
@@ -314,8 +343,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if the icon property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]false[/code] if it doesn't exist. Use [method set_icon] to define it.
</description>
</method>
<method name="has_stylebox" qualifiers="const">
@@ -323,8 +352,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]false[/code] if it doesn't exist. Use [method set_stylebox] to define it.
</description>
</method>
<method name="has_theme_item" qualifiers="const">
@@ -333,8 +362,9 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]false[/code] if it doesn't exist. Use [method set_theme_item] to define it.
+ [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
<method name="is_type_variation" qualifiers="const">
@@ -342,24 +372,32 @@
<argument index="0" name="theme_type" type="StringName" />
<argument index="1" name="base_type" type="StringName" />
<description>
- Returns [code]true[/code] if [code]theme_type[/code] is marked as a variation of [code]base_type[/code] in this theme.
+ Returns [code]true[/code] if [code]theme_type[/code] is marked as a variation of [code]base_type[/code].
</description>
</method>
<method name="merge_with">
<return type="void" />
<argument index="0" name="other" type="Theme" />
<description>
- Adds missing and overrides existing definitions with values from the [code]other[/code] [Theme].
+ Adds missing and overrides existing definitions with values from the [code]other[/code] theme resource.
[b]Note:[/b] This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another.
</description>
</method>
+ <method name="remove_type">
+ <return type="void" />
+ <argument index="0" name="theme_type" type="StringName" />
+ <description>
+ Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base.
+ </description>
+ </method>
<method name="rename_color">
<return type="void" />
<argument index="0" name="old_name" type="StringName" />
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the [Color] property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_color] to check for existence, and [method clear_color] to remove the existing property.
</description>
</method>
<method name="rename_constant">
@@ -368,7 +406,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the constant property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_constant] to check for existence, and [method clear_constant] to remove the existing property.
</description>
</method>
<method name="rename_font">
@@ -377,7 +416,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the [Font] property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font] to check for existence, and [method clear_font] to remove the existing property.
</description>
</method>
<method name="rename_font_size">
@@ -386,7 +426,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the font size property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font_size] to check for existence, and [method clear_font_size] to remove the existing property.
</description>
</method>
<method name="rename_icon">
@@ -395,7 +436,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the icon property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_icon] to check for existence, and [method clear_icon] to remove the existing property.
</description>
</method>
<method name="rename_stylebox">
@@ -404,7 +446,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the [StyleBox] property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_stylebox] to check for existence, and [method clear_stylebox] to remove the existing property.
</description>
</method>
<method name="rename_theme_item">
@@ -414,7 +457,9 @@
<argument index="2" name="name" type="StringName" />
<argument index="3" name="theme_type" type="StringName" />
<description>
- Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the theme property of [code]data_type[/code] defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_theme_item] to check for existence, and [method clear_theme_item] to remove the existing property.
+ [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
<method name="set_color">
@@ -423,8 +468,7 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="color" type="Color" />
<description>
- Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code].
- Creates [code]theme_type[/code] if the theme does not have it.
+ Creates or changes the value of the [Color] property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_color] to remove the property.
</description>
</method>
<method name="set_constant">
@@ -433,8 +477,7 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="constant" type="int" />
<description>
- Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code].
- Creates [code]theme_type[/code] if the theme does not have it.
+ Creates or changes the value of the constant property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_constant] to remove the property.
</description>
</method>
<method name="set_font">
@@ -443,8 +486,7 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="font" type="Font" />
<description>
- Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code].
- Creates [code]theme_type[/code] if the theme does not have it.
+ Creates or changes the value of the [Font] property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_font] to remove the property.
</description>
</method>
<method name="set_font_size">
@@ -453,8 +495,7 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="font_size" type="int" />
<description>
- Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]theme_type[/code].
- Creates [code]theme_type[/code] if the theme does not have it.
+ Creates or changes the value of the font size property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_font_size] to remove the property.
</description>
</method>
<method name="set_icon">
@@ -463,8 +504,7 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="texture" type="Texture2D" />
<description>
- Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code].
- Creates [code]theme_type[/code] if the theme does not have it.
+ Creates or changes the value of the icon property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_icon] to remove the property.
</description>
</method>
<method name="set_stylebox">
@@ -473,8 +513,7 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="texture" type="StyleBox" />
<description>
- Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code].
- Creates [code]theme_type[/code] if the theme does not have it.
+ Creates or changes the value of the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_stylebox] to remove the property.
</description>
</method>
<method name="set_theme_item">
@@ -484,9 +523,9 @@
<argument index="2" name="theme_type" type="StringName" />
<argument index="3" name="value" type="Variant" />
<description>
- Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code].
- Does nothing if the [code]value[/code] type does not match [code]data_type[/code].
- Creates [code]theme_type[/code] if the theme does not have it.
+ Creates or changes the value of the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_theme_item] to remove the property.
+ Fails if the [code]value[/code] type is not accepted by [code]data_type[/code].
+ [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
<method name="set_type_variation">
@@ -494,25 +533,25 @@
<argument index="0" name="theme_type" type="StringName" />
<argument index="1" name="base_type" type="StringName" />
<description>
- Marks [code]theme_type[/code] as being a variation of [code]base_type[/code].
+ Marks [code]theme_type[/code] as a variation of [code]base_type[/code].
This adds [code]theme_type[/code] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [code]base_type[/code] class.
- Variations can also be nested, i.e. [code]base_type[/code] can be another variation. If a chain of variations ends with a [code]base_type[/code] matching a class of a [Control], the whole chain is going to be suggested as options.
- [b]Note:[/b] Suggestions only show up if this [Theme] is set as the project default theme. See [member ProjectSettings.gui/theme/custom].
+ Variations can also be nested, i.e. [code]base_type[/code] can be another variation. If a chain of variations ends with a [code]base_type[/code] matching the class of the [Control], the whole chain is going to be suggested as options.
+ [b]Note:[/b] Suggestions only show up if this theme resource is set as the project default theme. See [member ProjectSettings.gui/theme/custom].
</description>
</method>
</methods>
<members>
<member name="default_base_scale" type="float" setter="set_default_base_scale" getter="get_default_base_scale" default="0.0">
- The default base scale factor of this [Theme] resource. Used by some controls to scale their visual properties based on a global scale factor. If this value is set to [code]0.0[/code], the global scale factor is used.
+ The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to [code]0.0[/code], the global scale factor is used.
Use [method has_default_base_scale] to check if this value is valid.
</member>
<member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
- The default font of this [Theme] resource. Used as a fallback value for font items defined in this theme, but having invalid values. If this value is also invalid, the global default value is used.
+ The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used.
Use [method has_default_font] to check if this value is valid.
</member>
<member name="default_font_size" type="int" setter="set_default_font_size" getter="get_default_font_size" default="-1">
- The default font size of this [Theme] resource. Used as a fallback value for font size items defined in this theme, but having invalid values. If this value is set to [code]-1[/code], the global default value is used.
- Use [method has_default_font_size] to check if this value is valid.
+ The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used.
+ Values below [code]0[/code] are invalid and can be used to unset the property. Use [method has_default_font_size] to check if this value is valid.
</member>
</members>
<constants>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index eb2df8a4f9..d78b8db052 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="RefCounted" version="4.0">
+<class name="Thread" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A unit of execution in a process.
</brief_description>
@@ -8,8 +8,8 @@
[b]Note:[/b] Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger.
</description>
<tutorials>
- <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/performance/using_multiple_threads.html</link>
- <link title="Thread-safe APIs">https://docs.godotengine.org/en/latest/tutorials/performance/thread_safe_apis.html</link>
+ <link title="Using multiple threads">$DOCS_URL/tutorials/performance/using_multiple_threads.html</link>
+ <link title="Thread-safe APIs">$DOCS_URL/tutorials/performance/thread_safe_apis.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
index 81c5743ccc..d5c2693f8b 100644
--- a/doc/classes/TileData.xml
+++ b/doc/classes/TileData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileData" inherits="Object" version="4.0">
+<class name="TileData" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 22d61c7285..9453bb9e2a 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" version="4.0">
+<class name="TileMap" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Node for 2D tile-based maps.
</brief_description>
@@ -7,7 +7,7 @@
Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other.
</description>
<tutorials>
- <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
+ <link title="Using Tilemaps">$DOCS_URL/tutorials/2d/using_tilemaps.html</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
<link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
<link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link>
@@ -57,6 +57,14 @@
Clears all cells on the given layer.
</description>
</method>
+ <method name="erase_cell">
+ <return type="void" />
+ <argument index="0" name="layer" type="int" />
+ <argument index="1" name="coords" type="Vector2i" />
+ <description>
+ Erases the cell on layer [code]layer[/code] at coordinates [code]coords[/code].
+ </description>
+ </method>
<method name="fix_invalid_tiles">
<return type="void" />
<description>
@@ -69,7 +77,7 @@
<description>
Triggers an update of the TileMap. If [code]layer[/code] is provided, only updates the given layer.
[b]Note:[/b] The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in [method _tile_data_runtime_update]) need to be applied.
- [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example).
+ [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurrences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example).
</description>
</method>
<method name="get_cell_alternative_tile" qualifiers="const">
@@ -103,7 +111,7 @@
<return type="Vector2i" />
<argument index="0" name="body" type="RID" />
<description>
- Returns the coodinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.
+ Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.
</description>
</method>
<method name="get_layer_modulate" qualifiers="const">
@@ -144,7 +152,7 @@
<argument index="0" name="coords" type="Vector2i" />
<argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" />
<description>
- Returns the neighboring cell to the one at coordinates [code]coords[/code], indentified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take.
+ Returns the neighboring cell to the one at coordinates [code]coords[/code], identified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take.
</description>
</method>
<method name="get_pattern">
@@ -195,14 +203,15 @@
<argument index="1" name="coords_in_pattern" type="Vector2i" />
<argument index="2" name="pattern" type="TileMapPattern" />
<description>
- Returns for the given coodinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]
+ Returns for the given coordinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]
</description>
</method>
<method name="map_to_world" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="map_position" type="Vector2i" />
<description>
- Returns the local position corresponding to the given tilemap (grid-based) coordinates.
+ Returns a local position of the center of the cell at the given tilemap (grid-based) coordinates.
+ [b]Note:[/b] This doesn't correspond to the visual position of the tile, i.e. it ignores the [member TileData.texture_offset] property of individual tiles.
</description>
</method>
<method name="move_layer">
@@ -217,7 +226,7 @@
<return type="void" />
<argument index="0" name="layer" type="int" />
<description>
- Moves the layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array.
+ Removes the layer at index [code]layer[/code].
</description>
</method>
<method name="set_cell">
@@ -226,10 +235,10 @@
<argument index="1" name="coords" type="Vector2i" />
<argument index="2" name="source_id" type="int" default="-1" />
<argument index="3" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
- <argument index="4" name="alternative_tile" type="int" default="-1" />
+ <argument index="4" name="alternative_tile" type="int" default="0" />
<description>
Sets the tile indentifiers for the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. Each tile of the [TileSet] is identified using three parts:
- - The source indentifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],
+ - The source identifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],
- The atlas coordinates identifier [code]atlas_coords[/code] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0),
- The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource].
</description>
diff --git a/doc/classes/TileMapPattern.xml b/doc/classes/TileMapPattern.xml
index 4c46625423..5fe514d3da 100644
--- a/doc/classes/TileMapPattern.xml
+++ b/doc/classes/TileMapPattern.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileMapPattern" inherits="Resource" version="4.0">
+<class name="TileMapPattern" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Holds a pattern to be copied from or pasted into [TileMap]s.
</brief_description>
@@ -59,7 +59,7 @@
<method name="remove_cell">
<return type="void" />
<argument index="0" name="coords" type="Vector2i" />
- <argument index="1" name="arg1" type="bool" />
+ <argument index="1" name="update_size" type="bool" />
<description>
Remove the cell at the given coordinates.
</description>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 45d6f9ca6c..809992b58f 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" version="4.0">
+<class name="TileSet" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Tile library for tilemaps.
</brief_description>
@@ -13,7 +13,7 @@
See the functions to add new layers for more information.
</description>
<tutorials>
- <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
+ <link title="Using Tilemaps">$DOCS_URL/tutorials/2d/using_tilemaps.html</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
<link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
<link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link>
@@ -51,7 +51,7 @@
<argument index="0" name="pattern" type="TileMapPattern" />
<argument index="1" name="index" type="int" default="-1" />
<description>
- Adds a [TileMapPattern] to be stored in the TileSet resouce. If provided, insert it at the given [code]index[/code].
+ Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [code]index[/code].
</description>
</method>
<method name="add_physics_layer">
@@ -582,7 +582,7 @@
Diamond tile shape (for isometric look).
</constant>
<constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
- Rectangular tile shape with one row/colum out of two offset by half a tile.
+ Rectangular tile shape with one row/column out of two offset by half a tile.
</constant>
<constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape">
Hexagonal tile shape.
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index 881a1c3d07..db4e52f661 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0">
+<class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Exposes a 2D atlas texture as a set of tiles for a [TileSet] resource.
</brief_description>
@@ -45,6 +45,21 @@
Returns the alternative ID a following call to [method create_alternative_tile] would return.
</description>
</method>
+ <method name="get_runtime_texture" qualifiers="const">
+ <return type="Texture2D" />
+ <description>
+ If [member use_texture_padding] is [code]false[/code], returns [member texture]. Otherwise, returns and internal [ImageTexture] created that includes the padding.
+ </description>
+ </method>
+ <method name="get_runtime_tile_texture_region" qualifiers="const">
+ <return type="Rect2i" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="frame" type="int" />
+ <description>
+ Returns the region of the tile at coordinates [code]atlas_coords[/code] for frame [code]frame[/code] inside the texture returned by [method get_runtime_texture].
+ [b]Note:[/b] If [member use_texture_padding] is [code]false[/code], returns the same as [method get_tile_texture_region].
+ </description>
+ </method>
<method name="get_tile_animation_columns" qualifiers="const">
<return type="int" />
<argument index="0" name="atlas_coords" type="Vector2i" />
@@ -96,7 +111,7 @@
</description>
</method>
<method name="get_tile_data" qualifiers="const">
- <return type="Object" />
+ <return type="TileData" />
<argument index="0" name="atlas_coords" type="Vector2i" />
<argument index="1" name="alternative_tile" type="int" />
<description>
@@ -232,5 +247,9 @@
<member name="texture_region_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)">
The base tile size in the texture (in pixel). This size must be bigger than the TileSet's [code]tile_size[/code] value.
</member>
+ <member name="use_texture_padding" type="bool" setter="set_use_texture_padding" getter="get_use_texture_padding" default="true">
+ If [code]true[/code], generates an internal texture with an additional one pixel padding around each tile. Texture padding avoids a common artifact where lines appear between tiles.
+ Disabling this setting might lead a small performance improvement, as generating the internal texture requires both memory and processing time when the TileSetAtlasSource resource is modified.
+ </member>
</members>
</class>
diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml
index 3451519ff6..a8ef253933 100644
--- a/doc/classes/TileSetScenesCollectionSource.xml
+++ b/doc/classes/TileSetScenesCollectionSource.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0">
+<class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Exposes a set of scenes as tiles for a [TileSet] resource.
</brief_description>
<description>
- When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instanciate an assiciated scene at the cell's position in the TileMap.
- Scenes are instanciated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instanciate/free the scene accordingly.
+ When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instantiate an associated scene at the cell's position in the TileMap.
+ Scenes are instantiated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instantiate/free the scene accordingly.
</description>
<tutorials>
</tutorials>
@@ -87,7 +87,7 @@
<argument index="0" name="id" type="int" />
<argument index="1" name="packed_scene" type="PackedScene" />
<description>
- Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positionning properties are needed to place the scene on the TileMap.
+ Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap.
</description>
</method>
</methods>
diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml
index ed47684f14..3d23975e37 100644
--- a/doc/classes/TileSetSource.xml
+++ b/doc/classes/TileSetSource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileSetSource" inherits="Resource" version="4.0">
+<class name="TileSetSource" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Exposes a set of tiles for a [TileSet] resource.
</brief_description>
diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml
index b66ec83eaf..dd83fa54ff 100644
--- a/doc/classes/Time.xml
+++ b/doc/classes/Time.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Time" inherits="Object" version="4.0">
+<class name="Time" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Time singleton for working with time.
</brief_description>
@@ -97,6 +97,13 @@
If [code]use_space[/code] is true, use a space instead of the letter T in the middle.
</description>
</method>
+ <method name="get_offset_string_from_offset_minutes" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="offset_minutes" type="int" />
+ <description>
+ Converts the given timezone offset in minutes to a timezone offset string. For example, -480 returns "-08:00", 345 returns "+05:45", and 0 returns "+00:00".
+ </description>
+ </method>
<method name="get_ticks_msec" qualifiers="const">
<return type="int" />
<description>
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index f360099f2b..ebe25ed55e 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" version="4.0">
+<class name="Timer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A countdown timer.
</brief_description>
@@ -21,7 +21,7 @@
<return type="void" />
<argument index="0" name="time_sec" type="float" default="-1" />
<description>
- Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec &gt; 0[/code]. This also resets the remaining time to [code]wait_time[/code].
+ Starts the timer. Sets [member wait_time] to [code]time_sec[/code] if [code]time_sec &gt; 0[/code]. This also resets the remaining time to [member wait_time].
[b]Note:[/b] This method will not resume a paused timer. See [member paused].
</description>
</method>
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index f1becb6906..818f37cb8f 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" version="4.0">
+<class name="TouchScreenButton" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Button for touch screen devices for gameplay use.
</brief_description>
@@ -25,16 +25,10 @@
<member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask">
The button's bitmask.
</member>
- <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], the [signal pressed] and [signal released] signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button.
[b]Note:[/b] This is a "pass-by" (not "bypass") press mode.
</member>
- <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">
The button's shape.
</member>
@@ -44,6 +38,12 @@
<member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" default="true">
If [code]true[/code], the button's shape is visible in the editor.
</member>
+ <member name="texture_normal" type="Texture2D" setter="set_texture_normal" getter="get_texture_normal">
+ The button's texture for the normal state.
+ </member>
+ <member name="texture_pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed">
+ The button's texture for the pressed state.
+ </member>
<member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode" default="0">
The button's visibility mode. See [enum VisibilityMode] for possible values.
</member>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index d64752a00f..6c0c3032ec 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" version="4.0">
+<class name="Transform2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
2D transformation (2×3 matrix).
</brief_description>
@@ -8,34 +8,34 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Matrices and transforms">$DOCS_URL/tutorials/math/matrices_and_transforms.html</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
- <methods>
- <method name="Transform2D" qualifiers="constructor">
+ <constructors>
+ <constructor name="Transform2D">
<return type="Transform2D" />
<description>
Constructs a default-initialized [Transform2D] set to [constant IDENTITY].
</description>
- </method>
- <method name="Transform2D" qualifiers="constructor">
+ </constructor>
+ <constructor name="Transform2D">
<return type="Transform2D" />
<argument index="0" name="from" type="Transform2D" />
<description>
Constructs a [Transform2D] as a copy of the given [Transform2D].
</description>
- </method>
- <method name="Transform2D" qualifiers="constructor">
+ </constructor>
+ <constructor name="Transform2D">
<return type="Transform2D" />
<argument index="0" name="rotation" type="float" />
<argument index="1" name="position" type="Vector2" />
<description>
Constructs the transform from a given angle (in radians) and position.
</description>
- </method>
- <method name="Transform2D" qualifiers="constructor">
+ </constructor>
+ <constructor name="Transform2D">
<return type="Transform2D" />
<argument index="0" name="rotation" type="float" />
<argument index="1" name="scale" type="Vector2" />
@@ -44,8 +44,8 @@
<description>
Constructs the transform from a given angle (in radians), scale, skew (in radians) and position.
</description>
- </method>
- <method name="Transform2D" qualifiers="constructor">
+ </constructor>
+ <constructor name="Transform2D">
<return type="Transform2D" />
<argument index="0" name="x_axis" type="Vector2" />
<argument index="1" name="y_axis" type="Vector2" />
@@ -53,7 +53,9 @@
<description>
Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors).
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="affine_inverse" qualifiers="const">
<return type="Transform2D" />
<description>
@@ -129,72 +131,6 @@
Operations take place in global space.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Transform2D" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="PackedVector2Array" />
- <argument index="0" name="right" type="PackedVector2Array" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Transform2D" />
- <argument index="0" name="right" type="Transform2D" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Rect2" />
- <argument index="0" name="right" type="Rect2" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Transform2D" />
- <argument index="0" name="right" type="float" />
- <description>
- This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Transform2D" />
- <argument index="0" name="right" type="int" />
- <description>
- This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Transform2D" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
<method name="orthonormalized" qualifiers="const">
<return type="Transform2D" />
<description>
@@ -267,4 +203,81 @@
The [Transform2D] that will flip something along the Y axis.
</constant>
</constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Transform2D" />
+ <description>
+ Returns [code]true[/code] if the transforms are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="right" type="PackedVector2Array" />
+ <description>
+ Transforms (multiplies) each element of the [Vector2] array by the given [Transform2D] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Rect2" />
+ <argument index="0" name="right" type="Rect2" />
+ <description>
+ Transforms (multiplies) the [Rect2] by the given [Transform2D] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Transform2D" />
+ <argument index="0" name="right" type="Transform2D" />
+ <description>
+ Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Transforms (multiplies) the [Vector2] by the given [Transform2D] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Transform2D" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Transform2D" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Transform2D" />
+ <description>
+ Returns [code]true[/code] if the transforms are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Vector2" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Access transform components using their index. [code]t[0][/code] is equivalent to [code]t.x[/code], [code]t[1][/code] is equivalent to [code]t.y[/code], and [code]t[2][/code] is equivalent to [code]t.origin[/code].
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index 63a7746328..67e70f30e4 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform3D" version="4.0">
+<class name="Transform3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
3D transformation (3×4 matrix).
</brief_description>
@@ -8,36 +8,36 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
- <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Matrices and transforms">$DOCS_URL/tutorials/math/matrices_and_transforms.html</link>
+ <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
- <methods>
- <method name="Transform3D" qualifiers="constructor">
+ <constructors>
+ <constructor name="Transform3D">
<return type="Transform3D" />
<description>
Constructs a default-initialized [Transform3D] set to [constant IDENTITY].
</description>
- </method>
- <method name="Transform3D" qualifiers="constructor">
+ </constructor>
+ <constructor name="Transform3D">
<return type="Transform3D" />
<argument index="0" name="from" type="Transform3D" />
<description>
Constructs a [Transform3D] as a copy of the given [Transform3D].
</description>
- </method>
- <method name="Transform3D" qualifiers="constructor">
+ </constructor>
+ <constructor name="Transform3D">
<return type="Transform3D" />
<argument index="0" name="basis" type="Basis" />
<argument index="1" name="origin" type="Vector3" />
<description>
Constructs a Transform3D from a [Basis] and [Vector3].
</description>
- </method>
- <method name="Transform3D" qualifiers="constructor">
+ </constructor>
+ <constructor name="Transform3D">
<return type="Transform3D" />
<argument index="0" name="x_axis" type="Vector3" />
<argument index="1" name="y_axis" type="Vector3" />
@@ -46,7 +46,9 @@
<description>
Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="affine_inverse" qualifiers="const">
<return type="Transform3D" />
<description>
@@ -58,13 +60,13 @@
<argument index="0" name="xform" type="Transform3D" />
<argument index="1" name="weight" type="float" />
<description>
- Interpolates the transform to other Transform3D by weight amount (on the range of 0.0 to 1.0).
+ Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
+ Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling).
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
@@ -83,70 +85,10 @@
The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [code]target[/code] and [code]up[/code] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Transform3D" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="PackedVector3Array" />
- <argument index="0" name="right" type="PackedVector3Array" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Transform3D" />
- <argument index="0" name="right" type="Transform3D" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="AABB" />
- <argument index="0" name="right" type="AABB" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Transform3D" />
- <argument index="0" name="right" type="float" />
- <description>
- This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Transform3D" />
- <argument index="0" name="right" type="int" />
- <description>
- This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Transform3D" />
- <description>
- </description>
- </method>
<method name="orthonormalized" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors.
+ Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1).
</description>
</method>
<method name="rotated" qualifiers="const">
@@ -164,6 +106,14 @@
Scales basis and origin of the transform by the given scale factor, using matrix multiplication.
</description>
</method>
+ <method name="sphere_interpolate_with" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="xform" type="Transform3D" />
+ <argument index="1" name="weight" type="float" />
+ <description>
+ Returns a transform spherically interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
+ </description>
+ </method>
<method name="translated" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="offset" type="Vector3" />
@@ -195,4 +145,74 @@
[Transform3D] with mirroring applied perpendicular to the XY plane.
</constant>
</constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Transform3D" />
+ <description>
+ Returns [code]true[/code] if the transforms are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="AABB" />
+ <argument index="0" name="right" type="AABB" />
+ <description>
+ Transforms (multiplies) the [AABB] by the given [Transform3D] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="PackedVector3Array" />
+ <argument index="0" name="right" type="PackedVector3Array" />
+ <description>
+ Transforms (multiplies) each element of the [Vector3] array by the given [Transform3D] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Transform3D" />
+ <argument index="0" name="right" type="Transform3D" />
+ <description>
+ Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Transforms (multiplies) the [Vector3] by the given [Transform3D] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Transform3D" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Transform3D" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Transform3D" />
+ <description>
+ Returns [code]true[/code] if the transforms are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index 2a0695d42e..7aafbc68c6 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" version="4.0">
+<class name="Translation" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Language Translation.
</brief_description>
@@ -7,8 +7,8 @@
Translations are resources that can be loaded and unloaded on demand. They map a string to another string.
</description>
<tutorials>
- <link title="Internationalizing games">https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link>
- <link title="Locales">https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link>
+ <link title="Internationalizing games">$DOCS_URL/tutorials/i18n/internationalizing_games.html</link>
+ <link title="Locales">$DOCS_URL/tutorials/i18n/locales.html</link>
</tutorials>
<methods>
<method name="_get_message" qualifiers="virtual const">
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 8a6fa3571a..a4cf070ede 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" version="4.0">
+<class name="TranslationServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server that manages all translations.
</brief_description>
@@ -7,8 +7,8 @@
Server that manages all translations. Translations can be set to it and removed from it.
</description>
<tutorials>
- <link title="Internationalizing games">https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link>
- <link title="Locales">https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link>
+ <link title="Internationalizing games">$DOCS_URL/tutorials/i18n/internationalizing_games.html</link>
+ <link title="Locales">$DOCS_URL/tutorials/i18n/locales.html</link>
</tutorials>
<methods>
<method name="add_translation">
@@ -24,6 +24,46 @@
Clears the server from all translations.
</description>
</method>
+ <method name="compare_locales" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="locale_a" type="String" />
+ <argument index="1" name="locale_b" type="String" />
+ <description>
+ Compares two locales and return similarity score between [code]0[/code](no match) and [code]10[/code](full match).
+ </description>
+ </method>
+ <method name="get_all_countries" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns array of known country codes.
+ </description>
+ </method>
+ <method name="get_all_languages" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns array of known language codes.
+ </description>
+ </method>
+ <method name="get_all_scripts" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns array of known script codes.
+ </description>
+ </method>
+ <method name="get_country_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="country" type="String" />
+ <description>
+ Returns readable country name for the [code]country[/code] code.
+ </description>
+ </method>
+ <method name="get_language_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="language" type="String" />
+ <description>
+ Returns readable language name for the [code]language[/code] code.
+ </description>
+ </method>
<method name="get_loaded_locales" qualifiers="const">
<return type="Array" />
<description>
@@ -44,12 +84,26 @@
Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]).
</description>
</method>
+ <method name="get_script_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="script" type="String" />
+ <description>
+ Returns readable script name for the [code]script[/code] code.
+ </description>
+ </method>
+ <method name="get_tool_locale">
+ <return type="String" />
+ <description>
+ Returns the current locale of the editor.
+ [b]Note:[/b] When called from an exported project returns the same value as [method get_locale].
+ </description>
+ </method>
<method name="get_translation_object">
<return type="Translation" />
<argument index="0" name="locale" type="String" />
<description>
Returns the [Translation] instance based on the [code]locale[/code] passed in.
- It will return a [code]nullptr[/code] if there is no [Translation] instance that matches the [code]locale[/code].
+ It will return [code]null[/code] if there is no [Translation] instance that matches the [code]locale[/code].
</description>
</method>
<method name="pseudolocalize" qualifiers="const">
@@ -80,6 +134,13 @@
If translations have been loaded beforehand for the new locale, they will be applied.
</description>
</method>
+ <method name="standardize_locale" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="locale" type="String" />
+ <description>
+ Returns [code]locale[/code] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
+ </description>
+ </method>
<method name="translate" qualifiers="const">
<return type="StringName" />
<argument index="0" name="message" type="StringName" />
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index ed24905254..b8c39bee49 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" version="4.0">
+<class name="Tree" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control to show a tree of items.
</brief_description>
@@ -35,12 +35,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="are_column_titles_visible" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if the column titles are being shown.
- </description>
- </method>
<method name="clear">
<return type="void" />
<description>
@@ -56,10 +50,10 @@
</method>
<method name="create_item">
<return type="TreeItem" />
- <argument index="0" name="parent" type="Object" default="null" />
+ <argument index="0" name="parent" type="TreeItem" default="null" />
<argument index="1" name="idx" type="int" default="-1" />
<description>
- Creates an item in the tree and adds it as a child of [code]parent[/code].
+ Creates an item in the tree and adds it as a child of [code]parent[/code], which can be either a valid [TreeItem] or [code]null[/code].
If [code]parent[/code] is [code]null[/code], the root item will be the parent, or the new item will be the root itself if the tree is empty.
The new item will be the [code]idx[/code]th child of parent, or it will be the last child if there are not enough siblings.
</description>
@@ -78,6 +72,13 @@
[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_button_id_at_position" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="position" type="Vector2" />
+ <description>
+ Returns the button id at [code]position[/code], or -1 if no button is there.
+ </description>
+ </method>
<method name="get_column_at_position" qualifiers="const">
<return type="int" />
<argument index="0" name="position" type="Vector2" />
@@ -176,10 +177,10 @@
</method>
<method name="get_item_area_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="item" type="Object" />
+ <argument index="0" name="item" type="TreeItem" />
<argument index="1" name="column" type="int" default="-1" />
<description>
- 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.
+ Returns the rectangle area for the specified [TreeItem]. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
</description>
</method>
<method name="get_item_at_position" qualifiers="const">
@@ -191,9 +192,9 @@
</method>
<method name="get_next_selected">
<return type="TreeItem" />
- <argument index="0" name="from" type="Object" />
+ <argument index="0" name="from" type="TreeItem" />
<description>
- Returns the next selected item after the given one, or [code]null[/code] if the end is reached.
+ Returns the next selected [TreeItem] after the given one, or [code]null[/code] if the end is reached.
If [code]from[/code] is [code]null[/code], this returns the first selected item.
</description>
</method>
@@ -245,9 +246,10 @@
</method>
<method name="scroll_to_item">
<return type="void" />
- <argument index="0" name="item" type="Object" />
+ <argument index="0" name="item" type="TreeItem" />
+ <argument index="1" name="center_on_item" type="bool" default="false" />
<description>
- Causes the [Tree] to jump to the specified item.
+ Causes the [Tree] to jump to the specified [TreeItem].
</description>
</method>
<method name="set_column_clip_content">
@@ -313,13 +315,6 @@
Sets OpenType feature [code]tag[/code] for the column title.
</description>
</method>
- <method name="set_column_titles_visible">
- <return type="void" />
- <argument index="0" name="visible" type="bool" />
- <description>
- If [code]true[/code], column titles are visible.
- </description>
- </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
@@ -328,6 +323,10 @@
<member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" default="false">
If [code]true[/code], a right mouse button click can select items.
</member>
+ <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
+ <member name="column_titles_visible" type="bool" setter="set_column_titles_visible" getter="are_column_titles_visible" default="false">
+ If [code]true[/code], column titles are visible.
+ </member>
<member name="columns" type="int" setter="set_columns" getter="get_columns" default="1">
The number of columns.
</member>
@@ -335,14 +334,13 @@
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="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false">
If [code]true[/code], the folding arrow is hidden.
</member>
<member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden" default="false">
If [code]true[/code], the tree's root is hidden.
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true">
If [code]true[/code], enables horizontal scrolling.
</member>
@@ -367,6 +365,13 @@
Emitted when a cell is selected.
</description>
</signal>
+ <signal name="check_propagated_to_item">
+ <argument index="0" name="item" type="TreeItem" />
+ <argument index="1" name="column" type="int" />
+ <description>
+ Emitted when [method TreeItem.propagate_check] is called. Connect to this signal to process the items that are affected when [method TreeItem.propagate_check] is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item.
+ </description>
+ </signal>
<signal name="column_title_pressed">
<argument index="0" name="column" type="int" />
<description>
@@ -474,67 +479,16 @@
</constant>
</constants>
<theme_items>
- <theme_item name="arrow" data_type="icon" type="Texture2D">
- The arrow icon used when a foldable item is not collapsed.
- </theme_item>
- <theme_item name="arrow_collapsed" data_type="icon" type="Texture2D">
- The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
- </theme_item>
- <theme_item name="arrow_collapsed_mirrored" data_type="icon" type="Texture2D">
- The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
- </theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- Default [StyleBox] for the [Tree], i.e. used when the control is not being focused.
- </theme_item>
- <theme_item name="bg_focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [Tree] is being focused.
- </theme_item>
- <theme_item name="button_margin" data_type="constant" type="int" default="4">
- The horizontal space between each button in a cell.
- </theme_item>
- <theme_item name="button_pressed" data_type="style" type="StyleBox">
- [StyleBox] used when a button in the tree is pressed.
- </theme_item>
- <theme_item name="checked" data_type="icon" type="Texture2D">
- The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked.
- </theme_item>
<theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
The [Color] of the relationship lines between the selected [TreeItem] and its children.
</theme_item>
- <theme_item name="children_hl_line_width" data_type="constant" type="int" default="1">
- The width of the relationship lines between the selected [TreeItem] and its children.
- </theme_item>
- <theme_item name="cursor" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [Tree] is being focused.
- </theme_item>
- <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [Tree] is not being focused.
- </theme_item>
- <theme_item name="custom_button" data_type="style" type="StyleBox">
- Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
- </theme_item>
- <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
- <theme_item name="custom_button_hover" data_type="style" type="StyleBox">
- [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
- </theme_item>
- <theme_item name="custom_button_pressed" data_type="style" type="StyleBox">
- [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed.
- </theme_item>
- <theme_item name="draw_guides" data_type="constant" 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" data_type="constant" 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" data_type="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" data_type="font" type="Font">
- [Font] of the item's text.
- </theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
Default text [Color] of the item.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -543,36 +497,45 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the item's text.
- </theme_item>
- <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)">
+ <theme_item name="guide_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.25)">
[Color] of the guideline.
</theme_item>
+ <theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The [Color] of the relationship lines between the selected [TreeItem] and its parents.
+ </theme_item>
+ <theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The default [Color] of the relationship lines.
+ </theme_item>
+ <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ Default text [Color] of the title button.
+ </theme_item>
+ <theme_item name="button_margin" data_type="constant" type="int" default="4">
+ The horizontal space between each button in a cell.
+ </theme_item>
+ <theme_item name="children_hl_line_width" data_type="constant" type="int" default="1">
+ The width of the relationship lines between the selected [TreeItem] and its children.
+ </theme_item>
+ <theme_item name="draw_guides" data_type="constant" 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" data_type="constant" 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="hseparation" data_type="constant" 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="indeterminate" data_type="icon" type="Texture2D">
- The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate.
- </theme_item>
- <theme_item name="item_margin" data_type="constant" type="int" default="12">
+ <theme_item name="item_margin" data_type="constant" type="int" default="16">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
- The [Color] of the relationship lines between the selected [TreeItem] and its parents.
- </theme_item>
<theme_item name="parent_hl_line_margin" data_type="constant" type="int" default="0">
The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected.
</theme_item>
<theme_item name="parent_hl_line_width" data_type="constant" type="int" default="1">
The width of the relationship lines between the selected [TreeItem] and its parents.
</theme_item>
- <theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
- The default [Color] of the relationship lines.
- </theme_item>
<theme_item name="relationship_line_width" data_type="constant" type="int" default="1">
The default width of the relationship lines.
</theme_item>
@@ -582,21 +545,72 @@
<theme_item name="scroll_speed" data_type="constant" type="int" default="12">
The speed of border scrolling.
</theme_item>
+ <theme_item name="vseparation" data_type="constant" 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_item name="font" data_type="font" type="Font">
+ [Font] of the item's text.
+ </theme_item>
+ <theme_item name="title_button_font" data_type="font" type="Font">
+ [Font] of the title button's text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the item's text.
+ </theme_item>
+ <theme_item name="arrow" data_type="icon" type="Texture2D">
+ The arrow icon used when a foldable item is not collapsed.
+ </theme_item>
+ <theme_item name="arrow_collapsed" data_type="icon" type="Texture2D">
+ The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="arrow_collapsed_mirrored" data_type="icon" type="Texture2D">
+ The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
+ </theme_item>
+ <theme_item name="checked" data_type="icon" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked.
+ </theme_item>
+ <theme_item name="indeterminate" data_type="icon" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate.
+ </theme_item>
<theme_item name="select_arrow" data_type="icon" type="Texture2D">
The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
</theme_item>
+ <theme_item name="unchecked" data_type="icon" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked.
+ </theme_item>
+ <theme_item name="updown" data_type="icon" type="Texture2D">
+ The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
+ </theme_item>
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ Default [StyleBox] for the [Tree], i.e. used when the control is not being focused.
+ </theme_item>
+ <theme_item name="bg_focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Tree] is being focused.
+ </theme_item>
+ <theme_item name="button_pressed" data_type="style" type="StyleBox">
+ [StyleBox] used when a button in the tree is pressed.
+ </theme_item>
+ <theme_item name="cursor" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [Tree] is being focused.
+ </theme_item>
+ <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [Tree] is not being focused.
+ </theme_item>
+ <theme_item name="custom_button" data_type="style" type="StyleBox">
+ Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
+ </theme_item>
+ <theme_item name="custom_button_hover" data_type="style" type="StyleBox">
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
+ </theme_item>
+ <theme_item name="custom_button_pressed" data_type="style" type="StyleBox">
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed.
+ </theme_item>
<theme_item name="selected" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [Tree] is not being focused.
</theme_item>
<theme_item name="selected_focus" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [Tree] is being focused.
</theme_item>
- <theme_item name="title_button_color" data_type="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" data_type="font" type="Font">
- [Font] of the title button's text.
- </theme_item>
<theme_item name="title_button_hover" data_type="style" type="StyleBox">
[StyleBox] used when the title button is being hovered.
</theme_item>
@@ -606,14 +620,5 @@
<theme_item name="title_button_pressed" data_type="style" type="StyleBox">
[StyleBox] used when the title button is being pressed.
</theme_item>
- <theme_item name="unchecked" data_type="icon" type="Texture2D">
- The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked.
- </theme_item>
- <theme_item name="updown" data_type="icon" type="Texture2D">
- The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
- </theme_item>
- <theme_item name="vseparation" data_type="constant" 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 b997d87ac0..c909a35ab5 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TreeItem" inherits="Object" version="4.0">
+<class name="TreeItem" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control for a single item inside a [Tree].
</brief_description>
@@ -14,11 +14,11 @@
<return type="void" />
<argument index="0" name="column" type="int" />
<argument index="1" name="button" type="Texture2D" />
- <argument index="2" name="button_idx" type="int" default="-1" />
+ <argument index="2" name="id" type="int" default="-1" />
<argument index="3" name="disabled" type="bool" default="false" />
<argument index="4" name="tooltip" type="String" default="&quot;&quot;" />
<description>
- 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].
+ Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]id[/code] is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
</description>
</method>
<method name="call_recursive" qualifiers="vararg">
@@ -80,11 +80,27 @@
Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code].
</description>
</method>
+ <method name="get_button_by_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="id" type="int" />
+ <description>
+ Returns the button index if there is a button with id [code]id[/code] in column [code]column[/code], otherwise returns -1.
+ </description>
+ </method>
<method name="get_button_count" qualifiers="const">
<return type="int" />
<argument index="0" name="column" type="int" />
<description>
- Returns the number of buttons in column [code]column[/code]. May be used to get the most recently added button's index, if no index was specified.
+ Returns the number of buttons in column [code]column[/code].
+ </description>
+ </method>
+ <method name="get_button_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="button_idx" type="int" />
+ <description>
+ Returns the id for the button at index [code]button_idx[/code] in column [code]column[/code].
</description>
</method>
<method name="get_button_tooltip" qualifiers="const">
@@ -293,8 +309,8 @@
Returns the given column's text.
</description>
</method>
- <method name="get_text_align" qualifiers="const">
- <return type="int" enum="TreeItem.TextAlign" />
+ <method name="get_text_alignment" qualifiers="const">
+ <return type="int" enum="HorizontalAlignment" />
<argument index="0" name="column" type="int" />
<description>
Returns the given column's text alignment.
@@ -371,7 +387,7 @@
</method>
<method name="move_after">
<return type="void" />
- <argument index="0" name="item" type="Object" />
+ <argument index="0" name="item" type="TreeItem" />
<description>
Moves this TreeItem right after the given [code]item[/code].
[b]Note:[/b] You can't move to the root or move the root.
@@ -379,15 +395,23 @@
</method>
<method name="move_before">
<return type="void" />
- <argument index="0" name="item" type="Object" />
+ <argument index="0" name="item" type="TreeItem" />
<description>
Moves this TreeItem right before the given [code]item[/code].
[b]Note:[/b] You can't move to the root or move the root.
</description>
</method>
+ <method name="propagate_check">
+ <return type="void" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="emit_signal" type="bool" default="true" />
+ <description>
+ Propagates this item's checked status to its children and parents for the given [code]column[/code]. It is possible to process the items affected by this method call by connecting to [signal Tree.check_propagated_to_item]. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If [code]emit_signal[/code] is [code]false[/code], then [signal Tree.check_propagated_to_item] will not be emitted.
+ </description>
+ </method>
<method name="remove_child">
<return type="void" />
- <argument index="0" name="child" type="Object" />
+ <argument index="0" name="child" type="TreeItem" />
<description>
Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].
</description>
@@ -623,12 +647,12 @@
Sets the given column's text value.
</description>
</method>
- <method name="set_text_align">
+ <method name="set_text_alignment">
<return type="void" />
<argument index="0" name="column" type="int" />
- <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign" />
+ <argument index="1" name="text_alignment" type="int" enum="HorizontalAlignment" />
<description>
- Sets the given column's text alignment. See [enum TextAlign] for possible values.
+ Sets the given column's text alignment. See [enum HorizontalAlignment] for possible values.
</description>
</method>
<method name="set_text_direction">
@@ -679,14 +703,5 @@
</constant>
<constant name="CELL_MODE_CUSTOM" value="4" enum="TreeCellMode">
</constant>
- <constant name="ALIGN_LEFT" value="0" enum="TextAlign">
- Align text to the left. See [code]set_text_align()[/code].
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="TextAlign">
- Center text. See [code]set_text_align()[/code].
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TextAlign">
- Align text to the right. See [code]set_text_align()[/code].
- </constant>
</constants>
</class>
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
index f615f7965f..2c58a14bca 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="RefCounted" version="4.0">
+<class name="TriangleMesh" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Internal mesh type.
</brief_description>
diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml
index 2c84a79557..05fcbe967a 100644
--- a/doc/classes/TubeTrailMesh.xml
+++ b/doc/classes/TubeTrailMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TubeTrailMesh" inherits="PrimitiveMesh" version="4.0">
+<class name="TubeTrailMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 488a5aa340..2c152410ce 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tween" inherits="RefCounted" version="4.0">
+<class name="Tween" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Lightweight object used for general-purpose animation via script, using [Tweener]s.
</brief_description>
@@ -74,17 +74,17 @@
</method>
<method name="interpolate_value">
<return type="Variant" />
- <argument index="0" name="trans_type" type="Variant" />
- <argument index="1" name="ease_type" type="Variant" />
+ <argument index="0" name="initial_value" type="Variant" />
+ <argument index="1" name="delta_value" type="Variant" />
<argument index="2" name="elapsed_time" type="float" />
- <argument index="3" name="initial_value" type="float" />
- <argument index="4" name="delta_value" type="int" enum="Tween.TransitionType" />
- <argument index="5" name="duration" type="int" enum="Tween.EaseType" />
+ <argument index="3" name="duration" type="float" />
+ <argument index="4" name="trans_type" type="int" enum="Tween.TransitionType" />
+ <argument index="5" name="ease_type" type="int" enum="Tween.EaseType" />
<description>
This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing.
- [code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value.
[code]initial_value[/code] is the starting value of the interpolation.
[code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
+ [code]elapsed_time[/code] is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value.
[code]duration[/code] is the total time of the interpolation.
[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method will always return the final value, regardless of [code]elapsed_time[/code] provided.
</description>
@@ -146,7 +146,7 @@
<description>
Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice.
Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible).
- [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] with no delay) are equivalent to infinite [code]while[/code] loops and will freeze your game.
+ [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] with no delay or [PropertyTweener] with invalid node) are equivalent to infinite [code]while[/code] loops and will freeze your game. If a [Tween]'s lifetime depends on some node, always use [method bind_node].
</description>
</method>
<method name="set_parallel">
@@ -303,46 +303,64 @@
</signals>
<constants>
<constant name="TWEEN_PROCESS_PHYSICS" value="0" enum="TweenProcessMode">
- The [Tween] updates during physics frame.
+ The [Tween] updates during the physics frame.
</constant>
<constant name="TWEEN_PROCESS_IDLE" value="1" enum="TweenProcessMode">
- The [Tween] updates during idle
+ The [Tween] updates during the idle frame.
</constant>
<constant name="TWEEN_PAUSE_BOUND" value="0" enum="TweenPauseMode">
+ If the [Tween] has a bound node, it will process when that node can process (see [member Node.process_mode]). Otherwise it's the same as [constant TWEEN_PAUSE_STOP].
</constant>
<constant name="TWEEN_PAUSE_STOP" value="1" enum="TweenPauseMode">
+ If [SceneTree] is paused, the [Tween] will also pause.
</constant>
<constant name="TWEEN_PAUSE_PROCESS" value="2" enum="TweenPauseMode">
+ The [Tween] will process regardless of whether [SceneTree] is paused.
</constant>
<constant name="TRANS_LINEAR" value="0" enum="TransitionType">
+ The animation is interpolated linearly.
</constant>
<constant name="TRANS_SINE" value="1" enum="TransitionType">
+ The animation is interpolated using a sine function.
</constant>
<constant name="TRANS_QUINT" value="2" enum="TransitionType">
+ The animation is interpolated with a quintic (to the power of 5) function.
</constant>
<constant name="TRANS_QUART" value="3" enum="TransitionType">
+ The animation is interpolated with a quartic (to the power of 4) function.
</constant>
<constant name="TRANS_QUAD" value="4" enum="TransitionType">
+ The animation is interpolated with a quadratic (to the power of 2) function.
</constant>
<constant name="TRANS_EXPO" value="5" enum="TransitionType">
+ The animation is interpolated with an exponential (to the power of x) function.
</constant>
<constant name="TRANS_ELASTIC" value="6" enum="TransitionType">
+ The animation is interpolated with elasticity, wiggling around the edges.
</constant>
<constant name="TRANS_CUBIC" value="7" enum="TransitionType">
+ The animation is interpolated with a cubic (to the power of 3) function.
</constant>
<constant name="TRANS_CIRC" value="8" enum="TransitionType">
+ The animation is interpolated with a function using square roots.
</constant>
<constant name="TRANS_BOUNCE" value="9" enum="TransitionType">
+ The animation is interpolated by bouncing at the end.
</constant>
<constant name="TRANS_BACK" value="10" enum="TransitionType">
+ The animation is interpolated backing out at ends.
</constant>
<constant name="EASE_IN" value="0" enum="EaseType">
+ The interpolation starts slowly and speeds up towards the end.
</constant>
<constant name="EASE_OUT" value="1" enum="EaseType">
+ The interpolation starts quickly and slows down towards the end.
</constant>
<constant name="EASE_IN_OUT" value="2" enum="EaseType">
+ A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends.
</constant>
<constant name="EASE_OUT_IN" value="3" enum="EaseType">
+ A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends.
</constant>
</constants>
</class>
diff --git a/doc/classes/Tweener.xml b/doc/classes/Tweener.xml
index ad599c4d02..3392f9ee23 100644
--- a/doc/classes/Tweener.xml
+++ b/doc/classes/Tweener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tweener" inherits="RefCounted" version="4.0">
+<class name="Tweener" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Abstract class for all Tweeners used by [Tween].
</brief_description>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index 66f752b97a..6fb4d50c0c 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UDPServer" inherits="RefCounted" version="4.0">
+<class name="UDPServer" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper class to implement a UDP server.
</brief_description>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 044460f569..80a548ceaf 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" version="4.0">
+<class name="UndoRedo" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Helper to manage undo/redo operations in the editor or custom tools.
</brief_description>
@@ -162,7 +162,7 @@
<method name="get_history_count">
<return type="int" />
<description>
- Return how many elements are in the history.
+ Returns how many elements are in the history.
</description>
</method>
<method name="get_version" qualifiers="const">
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
index b62fb4707e..4821791f50 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" version="4.0">
+<class name="VBoxContainer" inherits="BoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vertical box container.
</brief_description>
diff --git a/doc/classes/VFlowContainer.xml b/doc/classes/VFlowContainer.xml
new file mode 100644
index 0000000000..d047f4142e
--- /dev/null
+++ b/doc/classes/VFlowContainer.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VFlowContainer" inherits="FlowContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Vertical flow container.
+ </brief_description>
+ <description>
+ Vertical version of [FlowContainer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <theme_items>
+ <theme_item name="hseparation" data_type="constant" type="int" default="4">
+ The horizontal separation of children nodes.
+ </theme_item>
+ <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ The vertical separation of children nodes.
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
index 0cf06576f6..f9baf194b7 100644
--- a/doc/classes/VScrollBar.xml
+++ b/doc/classes/VScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VScrollBar" inherits="ScrollBar" version="4.0">
+<class name="VScrollBar" inherits="ScrollBar" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vertical scroll bar.
</brief_description>
@@ -9,8 +9,8 @@
<tutorials>
</tutorials>
<members>
- <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" />
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" />
+ <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
</members>
<theme_items>
<theme_item name="decrement" data_type="icon" type="Texture2D">
@@ -22,15 +22,6 @@
<theme_item name="decrement_pressed" data_type="icon" type="Texture2D">
Displayed when the decrement button is being pressed.
</theme_item>
- <theme_item name="grabber" data_type="style" type="StyleBox">
- Used as texture for the grabber, the draggable element representing current scroll.
- </theme_item>
- <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
- Used when the mouse hovers over the grabber.
- </theme_item>
- <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
- Used when the grabber is being dragged.
- </theme_item>
<theme_item name="increment" data_type="icon" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
@@ -40,6 +31,15 @@
<theme_item name="increment_pressed" data_type="icon" type="Texture2D">
Displayed when the increment button is being pressed.
</theme_item>
+ <theme_item name="grabber" data_type="style" type="StyleBox">
+ Used as texture for the grabber, the draggable element representing current scroll.
+ </theme_item>
+ <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
+ Used when the mouse hovers over the grabber.
+ </theme_item>
+ <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
+ Used when the grabber is being dragged.
+ </theme_item>
<theme_item name="scroll" data_type="style" type="StyleBox">
Used as background of this [ScrollBar].
</theme_item>
diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml
index d9299bfe92..555ea13437 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" version="4.0">
+<class name="VSeparator" inherits="Separator" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vertical version of [Separator].
</brief_description>
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index 286674a9b4..36954a6912 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" version="4.0">
+<class name="VSlider" inherits="Slider" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vertical slider.
</brief_description>
@@ -10,29 +10,29 @@
<tutorials>
</tutorials>
<members>
- <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" />
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" />
+ <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
</members>
<theme_items>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
</theme_item>
- <theme_item name="grabber_area" data_type="style" type="StyleBox">
- The background of the area below the grabber.
- </theme_item>
- <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
- </theme_item>
<theme_item name="grabber_disabled" data_type="icon" type="Texture2D">
The texture for the grabber when it's disabled.
</theme_item>
<theme_item name="grabber_highlight" data_type="icon" type="Texture2D">
The texture for the grabber when it's focused.
</theme_item>
- <theme_item name="slider" data_type="style" type="StyleBox">
- The background for the whole slider. Determines the width of the [code]grabber_area[/code].
- </theme_item>
<theme_item name="tick" data_type="icon" type="Texture2D">
The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
</theme_item>
+ <theme_item name="grabber_area" data_type="style" type="StyleBox">
+ The background of the area below the grabber.
+ </theme_item>
+ <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
+ </theme_item>
+ <theme_item name="slider" data_type="style" type="StyleBox">
+ The background for the whole slider. Determines the width of the [code]grabber_area[/code].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index 323ce1fe80..32b7637c7e 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" version="4.0">
+<class name="VSplitContainer" inherits="SplitContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vertical split container.
</brief_description>
@@ -12,13 +12,11 @@
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
+ <theme_item name="separation" data_type="constant" type="int" default="12">
+ The space between sides of the container.
</theme_item>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area.
</theme_item>
- <theme_item name="separation" data_type="constant" 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 88644e2f8a..0d6fcd0ef5 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" version="4.0">
+<class name="Variant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
The most important data type in Godot.
</brief_description>
@@ -25,7 +25,6 @@
- GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types.
- VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time.
- C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept.
- - The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects.
The global [method @GlobalScope.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
[codeblocks]
[gdscript]
@@ -72,6 +71,6 @@
Modifications to a container will modify all references to it. A [Mutex] should be created to lock it if multi-threaded access is desired.
</description>
<tutorials>
- <link title="Variant class">https://docs.godotengine.org/en/latest/development/cpp/variant_class.html</link>
+ <link title="Variant class">$DOCS_URL/development/cpp/variant_class.html</link>
</tutorials>
</class>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 4035fb0ad2..a39ddb8187 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector2" version="4.0">
+<class name="Vector2" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vector used for 2D math using floating point coordinates.
</brief_description>
@@ -9,42 +9,44 @@
[b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link>
</tutorials>
- <methods>
- <method name="Vector2" qualifiers="constructor">
+ <constructors>
+ <constructor name="Vector2">
<return type="Vector2" />
<description>
Constructs a default-initialized [Vector2] with all components set to [code]0[/code].
</description>
- </method>
- <method name="Vector2" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector2">
<return type="Vector2" />
<argument index="0" name="from" type="Vector2" />
<description>
Constructs a [Vector2] as a copy of the given [Vector2].
</description>
- </method>
- <method name="Vector2" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector2">
<return type="Vector2" />
<argument index="0" name="from" type="Vector2i" />
<description>
Constructs a new [Vector2] from [Vector2i].
</description>
- </method>
- <method name="Vector2" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector2">
<return type="Vector2" />
<argument index="0" name="x" type="float" />
<argument index="1" name="y" type="float" />
<description>
Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="abs" qualifiers="const">
<return type="Vector2" />
<description>
@@ -73,6 +75,7 @@
<argument index="0" name="to" type="Vector2" />
<description>
Returns the angle between the line connecting the two points and the X axis, in radians.
+ [code]a.angle_to_point(b)[/code] is equivalent of doing [code](b - a).angle()[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url]
</description>
</method>
@@ -92,7 +95,7 @@
<method name="ceil" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with all components rounded up (towards positive infinity).
+ Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -107,7 +110,9 @@
<return type="float" />
<argument index="0" name="with" type="Vector2" />
<description>
- Returns the cross product of this vector and [code]with[/code].
+ Returns the 2D analog of the cross product for this vector and [code]with[/code].
+ This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area.
+ [b]Note:[/b] Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog.
</description>
</method>
<method name="cubic_interpolate" qualifiers="const">
@@ -122,16 +127,16 @@
</method>
<method name="direction_to" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="b" type="Vector2" />
+ <argument index="0" name="to" type="Vector2" />
<description>
- Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code].
+ Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to" qualifiers="const">
<return type="float" />
<argument index="0" name="to" type="Vector2" />
<description>
- Returns the squared distance between this vector and [code]b[/code].
+ Returns the squared distance between this vector and [code]to[/code].
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
@@ -155,7 +160,7 @@
<method name="floor" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with all components rounded down (towards negative infinity).
+ Returns a new vector with all components rounded down (towards negative infinity).
</description>
</method>
<method name="from_angle" qualifiers="static">
@@ -211,134 +216,30 @@
Returns the vector with a maximum length by limiting its length to [code]length[/code].
</description>
</method>
- <method name="move_toward" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="to" type="Vector2" />
- <argument index="1" name="delta" type="float" />
- <description>
- Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
- </description>
- </method>
- <method name="normalized" qualifiers="const">
- <return type="Vector2" />
- <description>
- Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="Transform2D" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="float" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="int" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="float" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="int" />
- <description>
- </description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector2" />
- <description>
- </description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector2" />
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
<description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="operator []" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="index" type="int" />
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
<description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y].
</description>
</method>
- <method name="operator unary+" qualifiers="operator">
+ <method name="move_toward" qualifiers="const">
<return type="Vector2" />
+ <argument index="0" name="to" type="Vector2" />
+ <argument index="1" name="delta" type="float" />
<description>
+ Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value.
</description>
</method>
- <method name="operator unary-" qualifiers="operator">
+ <method name="normalized" qualifiers="const">
<return type="Vector2" />
<description>
+ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
</description>
</method>
<method name="orthogonal" qualifiers="const">
@@ -365,14 +266,14 @@
<return type="Vector2" />
<argument index="0" name="b" type="Vector2" />
<description>
- Returns the vector projected onto the vector [code]b[/code].
+ Returns this vector projected onto the vector [code]b[/code].
</description>
</method>
<method name="reflect" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="n" type="Vector2" />
<description>
- Returns the vector reflected from a plane defined by the given normal.
+ Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined by the given direction vector [code]n[/code].
</description>
</method>
<method name="rotated" qualifiers="const">
@@ -385,13 +286,13 @@
<method name="round" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
<method name="sign" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
<method name="slerp" qualifiers="const">
@@ -400,7 +301,7 @@
<argument index="1" name="weight" type="float" />
<description>
Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
- [b]Note:[/b] Both vectors must be normalized.
+ This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].
</description>
</method>
<method name="slide" qualifiers="const">
@@ -428,10 +329,10 @@
</members>
<constants>
<constant name="AXIS_X" value="0">
- Enumerated value for the X axis.
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
- Enumerated value for the Y axis.
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector2(0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
@@ -455,4 +356,154 @@
Down unit vector. Y is down in 2D, so this vector points +Y.
</constant>
</constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="Transform2D" />
+ <description>
+ Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Multiplies each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) * Vector2(3, 4)) # Prints "(30, 80)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Multiplies each component of the [Vector2] by the given [float].
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Multiplies each component of the [Vector2] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Adds each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) + Vector2(3, 4)) # Prints "(13, 24)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator -">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Subtracts each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) - Vector2(3, 4)) # Prints "(7, 16)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Divides each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) / Vector2(2, 5)) # Prints "(5, 4)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Divides each component of the [Vector2] by the given [float].
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Divides each component of the [Vector2] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector2" />
+ <description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
+ </description>
+ </operator>
+ <operator name="operator unary+">
+ <return type="Vector2" />
+ <description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Vector2" />
+ <description>
+ Returns the negative value of the [Vector2]. This is the same as writing [code]Vector2(-v.x, -v.y)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 52fd8c6780..9b41e01c25 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector2i" version="4.0">
+<class name="Vector2i" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vector used for 2D math using integer coordinates.
</brief_description>
@@ -9,39 +9,41 @@
[b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
</tutorials>
- <methods>
- <method name="Vector2i" qualifiers="constructor">
+ <constructors>
+ <constructor name="Vector2i">
<return type="Vector2i" />
<description>
Constructs a default-initialized [Vector2i] with all components set to [code]0[/code].
</description>
- </method>
- <method name="Vector2i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector2i">
<return type="Vector2i" />
<argument index="0" name="from" type="Vector2i" />
<description>
Constructs a [Vector2i] as a copy of the given [Vector2i].
</description>
- </method>
- <method name="Vector2i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector2i">
<return type="Vector2i" />
<argument index="0" name="from" type="Vector2" />
<description>
Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated.
</description>
- </method>
- <method name="Vector2i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector2i">
<return type="Vector2i" />
<argument index="0" name="x" type="int" />
<argument index="1" name="y" type="int" />
<description>
Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code].
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="abs" qualifiers="const">
<return type="Vector2i" />
<description>
@@ -51,7 +53,7 @@
<method name="aspect" qualifiers="const">
<return type="float" />
<description>
- Returns the ratio of [member x] to [member y].
+ Returns the aspect ratio of this vector, the ratio of [member x] to [member y].
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -62,167 +64,237 @@
Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length (magnitude) of this vector.
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the squared length (squared magnitude) of this vector.
+ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
+ </description>
+ </method>
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
<description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y].
+ </description>
+ </method>
+ <method name="sign" qualifiers="const">
+ <return type="Vector2i" />
+ <description>
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="x" type="int" setter="" getter="" default="0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
+ </member>
+ <member name="y" type="int" setter="" getter="" default="0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
+ </member>
+ </members>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="ZERO" value="Vector2i(0, 0)">
+ Zero vector, a vector with all components set to [code]0[/code].
+ </constant>
+ <constant name="ONE" value="Vector2i(1, 1)">
+ One vector, a vector with all components set to [code]1[/code].
+ </constant>
+ <constant name="LEFT" value="Vector2i(-1, 0)">
+ Left unit vector. Represents the direction of left.
+ </constant>
+ <constant name="RIGHT" value="Vector2i(1, 0)">
+ Right unit vector. Represents the direction of right.
+ </constant>
+ <constant name="UP" value="Vector2i(0, -1)">
+ Up unit vector. Y is down in 2D, so this vector points -Y.
+ </constant>
+ <constant name="DOWN" value="Vector2i(0, 1)">
+ Down unit vector. Y is down in 2D, so this vector points +Y.
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
</description>
- </method>
- <method name="operator %" qualifiers="operator">
+ </operator>
+ <operator name="operator %">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints "(3, -4)"
+ [/codeblock]
</description>
- </method>
- <method name="operator %" qualifiers="operator">
+ </operator>
+ <operator name="operator %">
<return type="Vector2i" />
<argument index="0" name="right" type="int" />
<description>
+ Gets the remainder of each component of the [Vector2i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector2i(10, -20) % 7) # Prints "(3, -6)"
+ [/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Multiplies each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints "(30, 80)"
+ [/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2i" />
+ </operator>
+ <operator name="operator *">
+ <return type="Vector2" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
+ [codeblock]
+ print(Vector2i(10, 15) * 0.9) # Prints "(9, 13.5)"
+ [/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector2i" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector2i] by the given [int].
</description>
- </method>
- <method name="operator +" qualifiers="operator">
+ </operator>
+ <operator name="operator +">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Adds each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) + Vector2i(3, 4)) # Prints "(13, 24)"
+ [/codeblock]
</description>
- </method>
- <method name="operator -" qualifiers="operator">
+ </operator>
+ <operator name="operator -">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Subtracts each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) - Vector2i(3, 4)) # Prints "(7, 16)"
+ [/codeblock]
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Divides each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) / Vector2i(2, 5)) # Prints "(5, 4)"
+ [/codeblock]
</description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector2i" />
+ </operator>
+ <operator name="operator /">
+ <return type="Vector2" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector2i] by the given [float]. Returns a [Vector2].
+ [codeblock]
+ print(Vector2i(10, 20) / 2.9) # Prints "(5, 10)"
+ [/codeblock]
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="Vector2i" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector2i] by the given [int].
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Returns [code]true[/code] if the vectors are equal.
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator []" qualifiers="operator">
+ </operator>
+ <operator name="operator []">
<return type="int" />
<argument index="0" name="index" type="int" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
</description>
- </method>
- <method name="operator unary+" qualifiers="operator">
+ </operator>
+ <operator name="operator unary+">
<return type="Vector2i" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
- </method>
- <method name="operator unary-" qualifiers="operator">
+ </operator>
+ <operator name="operator unary-">
<return type="Vector2i" />
<description>
+ Returns the negative value of the [Vector2i]. This is the same as writing [code]Vector2i(-v.x, -v.y)[/code]. This operation flips the direction of the vector while keeping the same magnitude.
</description>
- </method>
- <method name="sign" qualifiers="const">
- <return type="Vector2i" />
- <description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components.
- </description>
- </method>
- </methods>
- <members>
- <member name="x" type="int" setter="" getter="" default="0">
- The vector's X component. Also accessible by using the index position [code][0][/code].
- </member>
- <member name="y" type="int" setter="" getter="" default="0">
- The vector's Y component. Also accessible by using the index position [code][1][/code].
- </member>
- </members>
- <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, a vector with all components set to [code]0[/code].
- </constant>
- <constant name="ONE" value="Vector2i(1, 1)">
- One vector, a vector with all components set to [code]1[/code].
- </constant>
- <constant name="LEFT" value="Vector2i(-1, 0)">
- Left unit vector. Represents the direction of left.
- </constant>
- <constant name="RIGHT" value="Vector2i(1, 0)">
- Right unit vector. Represents the direction of right.
- </constant>
- <constant name="UP" value="Vector2i(0, -1)">
- Up unit vector. Y is down in 2D, so this vector points -Y.
- </constant>
- <constant name="DOWN" value="Vector2i(0, 1)">
- Down unit vector. Y is down in 2D, so this vector points +Y.
- </constant>
- </constants>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 078ba1e1a4..ec695f41c1 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector3" version="4.0">
+<class name="Vector3" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vector used for 3D math using floating point coordinates.
</brief_description>
@@ -9,35 +9,35 @@
[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link>
</tutorials>
- <methods>
- <method name="Vector3" qualifiers="constructor">
+ <constructors>
+ <constructor name="Vector3">
<return type="Vector3" />
<description>
Constructs a default-initialized [Vector3] with all components set to [code]0[/code].
</description>
- </method>
- <method name="Vector3" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector3">
<return type="Vector3" />
<argument index="0" name="from" type="Vector3" />
<description>
Constructs a [Vector3] as a copy of the given [Vector3].
</description>
- </method>
- <method name="Vector3" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector3">
<return type="Vector3" />
<argument index="0" name="from" type="Vector3i" />
<description>
Constructs a new [Vector3] from [Vector3i].
</description>
- </method>
- <method name="Vector3" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector3">
<return type="Vector3" />
<argument index="0" name="x" type="float" />
<argument index="1" name="y" type="float" />
@@ -45,7 +45,9 @@
<description>
Returns a [Vector3] with the given components.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="abs" qualifiers="const">
<return type="Vector3" />
<description>
@@ -84,7 +86,7 @@
<return type="Vector3" />
<argument index="0" name="with" type="Vector3" />
<description>
- Returns the cross product of this vector and [code]b[/code].
+ Returns the cross product of this vector and [code]with[/code].
</description>
</method>
<method name="cubic_interpolate" qualifiers="const">
@@ -94,36 +96,36 @@
<argument index="2" name="post_b" type="Vector3" />
<argument index="3" name="weight" type="float" />
<description>
- Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Performs a cubic interpolation between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="direction_to" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="b" type="Vector3" />
+ <argument index="0" name="to" type="Vector3" />
<description>
- Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code].
+ Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="b" type="Vector3" />
+ <argument index="0" name="to" type="Vector3" />
<description>
- Returns the squared distance between this vector and [code]b[/code].
+ Returns the squared distance between this vector and [code]to[/code].
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="b" type="Vector3" />
+ <argument index="0" name="to" type="Vector3" />
<description>
- Returns the distance between this vector and [code]b[/code].
+ Returns the distance between this vector and [code]to[/code].
</description>
</method>
<method name="dot" qualifiers="const">
<return type="float" />
<argument index="0" name="with" type="Vector3" />
<description>
- Returns the dot product of this vector and [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
+ Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.
When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.
[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
@@ -182,16 +184,16 @@
Returns the vector with a maximum length by limiting its length to [code]length[/code].
</description>
</method>
- <method name="max_axis" qualifiers="const">
+ <method name="max_axis_index" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="min_axis" qualifiers="const">
+ <method name="min_axis_index" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
</description>
</method>
<method name="move_toward" qualifiers="const">
@@ -199,7 +201,7 @@
<argument index="0" name="to" type="Vector3" />
<argument index="1" name="delta" type="float" />
<description>
- Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
+ Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value.
</description>
</method>
<method name="normalized" qualifiers="const">
@@ -219,139 +221,11 @@
<description>
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Basis" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Quaternion" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Transform3D" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="float" />
- <description>
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="int" />
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="float" />
- <description>
- </description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector3" />
- <argument index="0" name="right" type="int" />
- <description>
- </description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
- <return type="bool" />
- <argument index="0" name="right" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator []" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
- <method name="operator unary+" qualifiers="operator">
- <return type="Vector3" />
- <description>
- </description>
- </method>
- <method name="operator unary-" qualifiers="operator">
- <return type="Vector3" />
- <description>
- </description>
- </method>
<method name="outer" qualifiers="const">
<return type="Basis" />
<argument index="0" name="with" type="Vector3" />
<description>
- Returns the outer product with [code]b[/code].
+ Returns the outer product with [code]with[/code].
</description>
</method>
<method name="posmod" qualifiers="const">
@@ -372,7 +246,7 @@
<return type="Vector3" />
<argument index="0" name="b" type="Vector3" />
<description>
- Returns this vector projected onto another vector [code]b[/code].
+ Returns this vector projected onto the vector [code]b[/code].
</description>
</method>
<method name="reflect" qualifiers="const">
@@ -393,13 +267,13 @@
<method name="round" qualifiers="const">
<return type="Vector3" />
<description>
- Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
<method name="sign" qualifiers="const">
<return type="Vector3" />
<description>
- Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
<method name="signed_angle_to" qualifiers="const">
@@ -416,7 +290,7 @@
<argument index="1" name="weight" type="float" />
<description>
Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
- [b]Note:[/b] Both vectors must be normalized.
+ This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].
</description>
</method>
<method name="slide" qualifiers="const">
@@ -447,13 +321,13 @@
</members>
<constants>
<constant name="AXIS_X" value="0">
- Enumerated value for the X axis. Returned by [method max_axis] and [method min_axis].
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
- Enumerated value for the Y axis. Returned by [method max_axis] and [method min_axis].
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Z" value="2">
- Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis].
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector3(0, 0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
@@ -483,4 +357,168 @@
Back unit vector. Represents the local direction of back, and the global direction of south.
</constant>
</constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Basis" />
+ <description>
+ Inversely transforms (multiplies) the [Vector3] by the given [Basis] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Quaternion" />
+ <description>
+ Inversely transforms (multiplies) the [Vector3] by the given [Quaternion].
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Transform3D" />
+ <description>
+ Inversely transforms (multiplies) the [Vector3] by the given [Transform3D] transformation matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Multiplies each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Multiplies each component of the [Vector3] by the given [float].
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Multiplies each component of the [Vector3] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Adds each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints "(13, 24, 35)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator -">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Subtracts each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints "(7, 16, 25)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Divides each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) # Prints "(5, 4, 10)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Divides each component of the [Vector3] by the given [float].
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector3" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Divides each component of the [Vector3] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector3" />
+ <description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
+ </description>
+ </operator>
+ <operator name="operator unary+">
+ <return type="Vector3" />
+ <description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Vector3" />
+ <description>
+ Returns the negative value of the [Vector3]. This is the same as writing [code]Vector3(-v.x, -v.y, -v.z)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
+ </description>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 2a7ee1ffb8..e486d7cfec 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector3i" version="4.0">
+<class name="Vector3i" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Vector used for 3D math using integer coordinates.
</brief_description>
@@ -9,32 +9,32 @@
[b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
</tutorials>
- <methods>
- <method name="Vector3i" qualifiers="constructor">
+ <constructors>
+ <constructor name="Vector3i">
<return type="Vector3i" />
<description>
Constructs a default-initialized [Vector3i] with all components set to [code]0[/code].
</description>
- </method>
- <method name="Vector3i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector3i">
<return type="Vector3i" />
<argument index="0" name="from" type="Vector3i" />
<description>
Constructs a [Vector3i] as a copy of the given [Vector3i].
</description>
- </method>
- <method name="Vector3i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector3i">
<return type="Vector3i" />
<argument index="0" name="from" type="Vector3" />
<description>
Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated.
</description>
- </method>
- <method name="Vector3i" qualifiers="constructor">
+ </constructor>
+ <constructor name="Vector3i">
<return type="Vector3i" />
<argument index="0" name="x" type="int" />
<argument index="1" name="y" type="int" />
@@ -42,10 +42,13 @@
<description>
Returns a [Vector3i] with the given components.
</description>
- </method>
+ </constructor>
+ </constructors>
+ <methods>
<method name="abs" qualifiers="const">
<return type="Vector3i" />
<description>
+ Returns a new vector with all components in absolute values (i.e. positive).
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -56,191 +59,249 @@
Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
- <method name="max_axis" qualifiers="const">
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length (magnitude) of this vector.
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ Returns the squared length (squared magnitude) of this vector.
+ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
- <method name="min_axis" qualifiers="const">
+ <method name="max_axis_index" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="operator !=" qualifiers="operator">
- <return type="bool" />
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
+ </description>
+ </method>
+ <method name="sign" qualifiers="const">
+ <return type="Vector3i" />
<description>
+ Returns the vector with each component set to one or negative one, depending on the signs of the components.
</description>
</method>
- <method name="operator !=" qualifiers="operator">
+ </methods>
+ <members>
+ <member name="x" type="int" setter="" getter="" default="0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
+ </member>
+ <member name="y" type="int" setter="" getter="" default="0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
+ </member>
+ <member name="z" type="int" setter="" getter="" default="0">
+ The vector's Z component. Also accessible by using the index position [code][2][/code].
+ </member>
+ </members>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="ZERO" value="Vector3i(0, 0, 0)">
+ Zero vector, a vector with all components set to [code]0[/code].
+ </constant>
+ <constant name="ONE" value="Vector3i(1, 1, 1)">
+ One vector, a vector with all components set to [code]1[/code].
+ </constant>
+ <constant name="LEFT" value="Vector3i(-1, 0, 0)">
+ Left unit vector. Represents the local direction of left, and the global direction of west.
+ </constant>
+ <constant name="RIGHT" value="Vector3i(1, 0, 0)">
+ Right unit vector. Represents the local direction of right, and the global direction of east.
+ </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. Represents the local direction of forward, and the global direction of north.
+ </constant>
+ <constant name="BACK" value="Vector3i(0, 0, 1)">
+ Back unit vector. Represents the local direction of back, and the global direction of south.
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
</description>
- </method>
- <method name="operator %" qualifiers="operator">
+ </operator>
+ <operator name="operator %">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Gets the remainder of each component of the [Vector3i] with the components of the given [Vector3i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) # Prints "(3, -4, 3)"
+ [/codeblock]
</description>
- </method>
- <method name="operator %" qualifiers="operator">
+ </operator>
+ <operator name="operator %">
<return type="Vector3i" />
<argument index="0" name="right" type="int" />
<description>
+ Gets the remainder of each component of the [Vector3i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector2i(10, -20, 30) % 7) # Prints "(3, -6, 2)"
+ [/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Multiplies each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) # Prints "(30, 80, 150)"
+ [/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3i" />
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
+ [codeblock]
+ print(Vector3i(10, 15, 20) * 0.9) # Prints "(9, 13.5, 18)"
+ [/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector3i" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector3i] by the given [int].
</description>
- </method>
- <method name="operator +" qualifiers="operator">
+ </operator>
+ <operator name="operator +">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Adds each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) # Prints "(13, 24, 35)"
+ [/codeblock]
</description>
- </method>
- <method name="operator -" qualifiers="operator">
+ </operator>
+ <operator name="operator -">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Subtracts each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) # Prints "(7, 16, 25)"
+ [/codeblock]
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Divides each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) / Vector3i(2, 5, 3)) # Prints "(5, 4, 10)"
+ [/codeblock]
</description>
- </method>
- <method name="operator /" qualifiers="operator">
- <return type="Vector3i" />
+ </operator>
+ <operator name="operator /">
+ <return type="Vector3" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector3i] by the given [float]. Returns a [Vector3].
+ [codeblock]
+ print(Vector3i(10, 20, 30) / 2.9) # Prints "(5, 10, 15)"
+ [/codeblock]
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="Vector3i" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector3i] by the given [int].
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Returns [code]true[/code] if the vectors are equal.
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
- </method>
- <method name="operator []" qualifiers="operator">
+ </operator>
+ <operator name="operator []">
<return type="int" />
<argument index="0" name="index" type="int" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
</description>
- </method>
- <method name="operator unary+" qualifiers="operator">
- <return type="Vector3i" />
- <description>
- </description>
- </method>
- <method name="operator unary-" qualifiers="operator">
+ </operator>
+ <operator name="operator unary+">
<return type="Vector3i" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
- </method>
- <method name="sign" qualifiers="const">
+ </operator>
+ <operator name="operator unary-">
<return type="Vector3i" />
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components.
+ Returns the negative value of the [Vector3i]. This is the same as writing [code]Vector3i(-v.x, -v.y, -v.z)[/code]. This operation flips the direction of the vector while keeping the same magnitude.
</description>
- </method>
- </methods>
- <members>
- <member name="x" type="int" setter="" getter="" default="0">
- The vector's X component. Also accessible by using the index position [code][0][/code].
- </member>
- <member name="y" type="int" setter="" getter="" default="0">
- The vector's Y component. Also accessible by using the index position [code][1][/code].
- </member>
- <member name="z" type="int" setter="" getter="" default="0">
- The vector's Z component. Also accessible by using the index position [code][2][/code].
- </member>
- </members>
- <constants>
- <constant name="AXIS_X" value="0">
- Enumerated value for the X axis.
- </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, a vector with all components set to [code]0[/code].
- </constant>
- <constant name="ONE" value="Vector3i(1, 1, 1)">
- One vector, a vector with all components set to [code]1[/code].
- </constant>
- <constant name="LEFT" value="Vector3i(-1, 0, 0)">
- Left unit vector. Represents the local direction of left, and the global direction of west.
- </constant>
- <constant name="RIGHT" value="Vector3i(1, 0, 0)">
- Right unit vector. Represents the local direction of right, and the global direction of east.
- </constant>
- <constant name="UP" value="Vector3i(0, 1, 0)">
- 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. Represents the local direction of forward, and the global direction of north.
- </constant>
- <constant name="BACK" value="Vector3i(0, 0, 1)">
- Back unit vector. Represents the local direction of back, and the global direction of south.
- </constant>
- </constants>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 9315f6e6ad..1ba86c633d 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleBody3D" inherits="RigidDynamicBody3D" version="4.0">
+<class name="VehicleBody3D" inherits="RigidDynamicBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body that simulates the behavior of a car.
</brief_description>
@@ -20,7 +20,7 @@
[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="mass" type="float" setter="set_mass" getter="get_mass" overrides="RigidDynamicBody3D" default="40.0" />
<member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0">
The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated.
</member>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index 951f4f8275..7fc59722e1 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleWheel3D" inherits="Node3D" version="4.0">
+<class name="VehicleWheel3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics object that simulates the behavior of a wheel.
</brief_description>
@@ -11,6 +11,13 @@
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
<methods>
+ <method name="get_contact_body" qualifiers="const">
+ <return type="Node3D" />
+ <description>
+ Returns the contacting body node if valid in the tree, as [Node3D]. At the moment, [GridMap] is not supported so the node will be always of type [PhysicsBody3D].
+ Returns [code]null[/code] if the wheel is not in contact with a surface, or the contact body is not a [PhysicsBody3D].
+ </description>
+ </method>
<method name="get_rpm" qualifiers="const">
<return type="float" />
<description>
diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml
index 5d8dcc6742..45ded446eb 100644
--- a/doc/classes/VelocityTracker3D.xml
+++ b/doc/classes/VelocityTracker3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VelocityTracker3D" inherits="RefCounted" version="4.0">
+<class name="VelocityTracker3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
index 39fefa8d95..2797ad3513 100644
--- a/doc/classes/VideoStream.xml
+++ b/doc/classes/VideoStream.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStream" inherits="Resource" version="4.0">
+<class name="VideoStream" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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].
+ Base resource type for all video streams. Classes that derive from [VideoStream] can all be used as resource types to play back videos in [VideoStreamPlayer].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoStreamPlayer.xml
index c8590988f5..092a754a39 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoStreamPlayer.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoPlayer" inherits="Control" version="4.0">
+<class name="VideoStreamPlayer" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control for playing video streams.
</brief_description>
<description>
Control node for playing video streams using [VideoStream] resources.
- Supported video formats are [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]) and any format exposed via a GDNative plugin using [VideoStreamGDNative].
- [b]Note:[/b] Due to a bug, VideoPlayer does not support localization remapping yet.
+ Supported video formats are [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]) and any format exposed via a GDExtension plugin.
+ [b]Note:[/b] Due to a bug, VideoStreamPlayer does not support localization remapping yet.
[b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations.
</description>
<tutorials>
@@ -69,7 +69,7 @@
</member>
<member name="stream_position" type="float" setter="set_stream_position" getter="get_stream_position">
The current position of the stream, in seconds.
- [b]Note:[/b] Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDNative add-on.
+ [b]Note:[/b] Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDExtension add-on.
</member>
<member name="volume" type="float" setter="set_volume" getter="get_volume">
Audio volume as a linear value.
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index e79cf0d233..ce61f51b9a 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Viewport" inherits="Node" version="4.0">
+<class name="Viewport" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Creates a sub-view into the screen.
+ Base class for viewports.
</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 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 [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.
</description>
<tutorials>
- <link title="Using Viewports">https://docs.godotengine.org/en/latest/tutorials/rendering/viewports.html</link>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="Using Viewports">$DOCS_URL/tutorials/rendering/viewports.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
<link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
@@ -25,13 +24,13 @@
<method name="find_world_2d" qualifiers="const">
<return type="World2D" />
<description>
- Returns the 2D world of the viewport.
+ Returns the first valid [World2D] for this viewport, searching the [member world_2d] property of itself and any Viewport ancestor.
</description>
</method>
<method name="find_world_3d" qualifiers="const">
<return type="World3D" />
<description>
- Returns the 3D world of the viewport, or if none the world of the parent viewport.
+ Returns the first valid [World3D] for this viewport, searching the [member world_3d] property of itself and any Viewport ancestor.
</description>
</method>
<method name="get_camera_2d" qualifiers="const">
@@ -55,7 +54,7 @@
<method name="get_mouse_position" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the mouse position relative to the viewport.
+ Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport].
</description>
</method>
<method name="get_render_info">
@@ -107,12 +106,30 @@
Returns the drag data from the GUI, that was previously returned by [method Control._get_drag_data].
</description>
</method>
+ <method name="gui_get_focus_owner">
+ <return type="Control" />
+ <description>
+ Returns the [Control] having the focus within this viewport. If no [Control] has the focus, returns null.
+ </description>
+ </method>
+ <method name="gui_is_drag_successful" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the drag operation is successful.
+ </description>
+ </method>
<method name="gui_is_dragging" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the viewport is currently performing a drag operation.
</description>
</method>
+ <method name="gui_release_focus">
+ <return type="void" />
+ <description>
+ Removes the focus from the currently focused [Control] within this viewport. If no [Control] has the focus, does nothing.
+ </description>
+ </method>
<method name="is_embedding_subwindows" qualifiers="const">
<return type="bool" />
<description>
@@ -162,7 +179,7 @@
<return type="void" />
<argument index="0" name="to_position" type="Vector2" />
<description>
- Warps the mouse to a position relative to the viewport.
+ Moves the mouse pointer to the specified position in this [Viewport] using the coordinate system of this [Viewport].
</description>
</method>
</methods>
@@ -188,6 +205,14 @@
<member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false">
Disable 3D rendering (but keep 2D rendering).
</member>
+ <member name="fsr_mipmap_bias" type="float" setter="set_fsr_mipmap_bias" getter="get_fsr_mipmap_bias" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap when using FSR. Mipmap bias does nothing when FSR is not being used. Negative values make textures sharper, while positive values make textures blurrier. This value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]. This updates the rendering server's mipmap bias when called
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_mipmap_bias] project setting.
+ </member>
+ <member name="fsr_sharpness" type="float" setter="set_fsr_sharpness" getter="get_fsr_sharpness" default="0.2">
+ Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_sharpness] project setting.
+ </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>
@@ -201,10 +226,13 @@
</member>
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
</member>
- <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
+ <member name="mesh_lod_threshold" type="float" setter="set_mesh_lod_threshold" getter="get_mesh_lod_threshold" default="1.0">
+ The automatic LOD bias to use for meshes rendered within the [Viewport] (this is analogous to [member ReflectionProbe.mesh_lod_threshold]). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member mesh_lod_threshold] to improve performance at the cost of geometry detail.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/mesh_lod/lod_change/threshold_pixels] project setting.
+ [b]Note:[/b] [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
</member>
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
- The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also [member scale_3d] for supersampling, which provides higher quality but is much more expensive.
+ The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d [member scaling_3d_mode] for supersampling, which provides higher quality but is much more expensive.
</member>
<member name="own_world_3d" type="bool" setter="set_use_own_world_3d" getter="is_using_own_world_3d" default="false">
If [code]true[/code], the viewport will use the [World3D] defined in [member world_3d].
@@ -212,9 +240,14 @@
<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="scale_3d" type="float" setter="set_scale_3d" getter="get_scale_3d" default="1.0">
- Scales the 3D render buffer based on the viewport size and displays the result with linear filtering. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
- To control this property on the root viewport, set the [member ProjectSettings.rendering/3d/viewport/scale] project setting.
+ <member name="scaling_3d_mode" type="int" setter="set_scaling_3d_mode" getter="get_scaling_3d_mode" enum="Viewport.Scaling3DMode" default="0">
+ Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/mode] project setting.
+ </member>
+ <member name="scaling_3d_scale" type="float" setter="set_scaling_3d_scale" getter="get_scaling_3d_scale" default="1.0">
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [member ProjectSettings.rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member ProjectSettings.rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/scale] project setting.
</member>
<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.
@@ -251,6 +284,8 @@
<member name="use_debanding" type="bool" setter="set_use_debanding" getter="is_using_debanding" default="false">
</member>
<member name="use_occlusion_culling" type="bool" setter="set_use_occlusion_culling" getter="is_using_occlusion_culling" default="false">
+ If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] must be set to [code]true[/code] instead.
+ [b]Note:[/b] Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling.
</member>
<member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false">
If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset.
@@ -300,6 +335,15 @@
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
</constant>
+ <constant name="SCALING_3D_MODE_BILINEAR" value="0" enum="Scaling3DMode">
+ Enables bilinear scaling on 3D viewports. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="SCALING_3D_MODE_FSR" value="1" enum="Scaling3DMode">
+ Enables FSR upscaling on 3D viewports. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear supersampling will be used instead. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="SCALING_3D_MODE_MAX" value="2" enum="Scaling3DMode">
+ Represents the size of the [enum Scaling3DMode] enum.
+ </constant>
<constant name="MSAA_DISABLED" value="0" enum="MSAA">
Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting.
</constant>
@@ -378,29 +422,32 @@
<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_PSSM_SPLITS" value="13" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_SSIL" value="13" enum="DebugDraw">
+ Draws the screen-space indirect lighting 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.ssil_enabled] set in your [WorldEnvironment].
+ </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="14" enum="DebugDraw">
+ <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="DEBUG_DRAW_SDFGI" value="15" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_SDFGI" value="16" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_SDFGI_PROBES" value="16" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_SDFGI_PROBES" value="17" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_GI_BUFFER" value="17" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_GI_BUFFER" value="18" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_DISABLE_LOD" value="18" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_DISABLE_LOD" value="19" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="20" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="21" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_DECALS" value="22" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="23" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_OCCLUDERS" value="23" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_OCCLUDERS" value="24" enum="DebugDraw">
</constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index c0cf3b3c7b..e5b7a68a51 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ViewportTexture" inherits="Texture2D" version="4.0">
+<class name="ViewportTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Texture which displays the content of a [Viewport].
</brief_description>
@@ -14,7 +14,7 @@
<link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
</tutorials>
<members>
- <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" 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.
</member>
diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml
index 523a3a2578..50d0c00017 100644
--- a/doc/classes/VisibleOnScreenEnabler2D.xml
+++ b/doc/classes/VisibleOnScreenEnabler2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" version="4.0">
+<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisibleOnScreenEnabler3D.xml b/doc/classes/VisibleOnScreenEnabler3D.xml
index 2000d54d74..5e03870005 100644
--- a/doc/classes/VisibleOnScreenEnabler3D.xml
+++ b/doc/classes/VisibleOnScreenEnabler3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibleOnScreenEnabler3D" inherits="VisibleOnScreenNotifier3D" version="4.0">
+<class name="VisibleOnScreenEnabler3D" inherits="VisibleOnScreenNotifier3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Enables certain nodes only when approximately visible.
</brief_description>
diff --git a/doc/classes/VisibleOnScreenNotifier2D.xml b/doc/classes/VisibleOnScreenNotifier2D.xml
index d82e64fa91..32cb191067 100644
--- a/doc/classes/VisibleOnScreenNotifier2D.xml
+++ b/doc/classes/VisibleOnScreenNotifier2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibleOnScreenNotifier2D" inherits="Node2D" version="4.0">
+<class name="VisibleOnScreenNotifier2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Detects when the node extents are visible on screen.
</brief_description>
diff --git a/doc/classes/VisibleOnScreenNotifier3D.xml b/doc/classes/VisibleOnScreenNotifier3D.xml
index 328db15231..6dec09d03f 100644
--- a/doc/classes/VisibleOnScreenNotifier3D.xml
+++ b/doc/classes/VisibleOnScreenNotifier3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibleOnScreenNotifier3D" inherits="VisualInstance3D" version="4.0">
+<class name="VisibleOnScreenNotifier3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Detects approximately when the node is visible on screen.
</brief_description>
diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml
index bbcf2f4730..7efa1f4df8 100644
--- a/doc/classes/VisualInstance3D.xml
+++ b/doc/classes/VisualInstance3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualInstance3D" inherits="Node3D" version="4.0">
+<class name="VisualInstance3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Parent of all visual 3D nodes.
</brief_description>
@@ -9,6 +9,11 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_get_aabb" qualifiers="virtual const">
+ <return type="AABB" />
+ <description>
+ </description>
+ </method>
<method name="get_aabb" qualifiers="const">
<return type="AABB" />
<description>
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index d7b4673b9f..138aad8d47 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" version="4.0">
+<class name="VisualShader" inherits="Shader" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A custom shader program with a visual editor.
</brief_description>
@@ -20,6 +20,14 @@
Adds the specified node to the shader.
</description>
</method>
+ <method name="add_varying">
+ <return type="void" />
+ <argument index="0" name="name" type="String" />
+ <argument index="1" name="mode" type="int" enum="VisualShader.VaryingMode" />
+ <argument index="2" name="type" type="int" enum="VisualShader.VaryingType" />
+ <description>
+ </description>
+ </method>
<method name="can_connect_nodes" qualifiers="const">
<return type="bool" />
<argument index="0" name="type" type="int" enum="VisualShader.Type" />
@@ -100,6 +108,12 @@
<description>
</description>
</method>
+ <method name="has_varying" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="name" type="String" />
+ <description>
+ </description>
+ </method>
<method name="is_node_connection" qualifiers="const">
<return type="bool" />
<argument index="0" name="type" type="int" enum="VisualShader.Type" />
@@ -119,6 +133,12 @@
Removes the specified node from the shader.
</description>
</method>
+ <method name="remove_varying">
+ <return type="void" />
+ <argument index="0" name="name" type="String" />
+ <description>
+ </description>
+ </method>
<method name="replace_node">
<return type="void" />
<argument index="0" name="type" type="int" enum="VisualShader.Type" />
@@ -182,6 +202,24 @@
<constant name="TYPE_MAX" value="10" enum="Type">
Represents the size of the [enum Type] enum.
</constant>
+ <constant name="VARYING_MODE_VERTEX_TO_FRAG_LIGHT" value="0" enum="VaryingMode">
+ </constant>
+ <constant name="VARYING_MODE_FRAG_TO_LIGHT" value="1" enum="VaryingMode">
+ </constant>
+ <constant name="VARYING_MODE_MAX" value="2" enum="VaryingMode">
+ </constant>
+ <constant name="VARYING_TYPE_FLOAT" value="0" enum="VaryingType">
+ </constant>
+ <constant name="VARYING_TYPE_VECTOR_2D" value="1" enum="VaryingType">
+ </constant>
+ <constant name="VARYING_TYPE_VECTOR_3D" value="2" enum="VaryingType">
+ </constant>
+ <constant name="VARYING_TYPE_COLOR" value="3" enum="VaryingType">
+ </constant>
+ <constant name="VARYING_TYPE_TRANSFORM" value="4" enum="VaryingType">
+ </constant>
+ <constant name="VARYING_TYPE_MAX" value="5" enum="VaryingType">
+ </constant>
<constant name="NODE_ID_INVALID" value="-1">
</constant>
<constant name="NODE_ID_OUTPUT" value="0">
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index b752e94490..b4a9c85625 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNode" inherits="Resource" version="4.0">
+<class name="VisualShaderNode" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for nodes in a visual shader graph.
</brief_description>
@@ -7,7 +7,7 @@
Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node has also connection ports that allow to connect it to another nodes and control the flow of the shader.
</description>
<tutorials>
- <link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shaders/visual_shaders.html</link>
+ <link title="VisualShaders">$DOCS_URL/tutorials/shaders/visual_shaders.html</link>
</tutorials>
<methods>
<method name="clear_default_input_values">
@@ -47,6 +47,7 @@
<return type="void" />
<argument index="0" name="port" type="int" />
<argument index="1" name="value" type="Variant" />
+ <argument index="2" name="prev_value" type="Variant" default="null" />
<description>
Sets the default value for the selected input [code]port[/code].
</description>
@@ -71,19 +72,22 @@
<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">
+ <constant name="PORT_TYPE_VECTOR_2D" value="2" enum="PortType">
+ 2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code.
+ </constant>
+ <constant name="PORT_TYPE_VECTOR_3D" value="3" enum="PortType">
3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_BOOLEAN" value="3" enum="PortType">
+ <constant name="PORT_TYPE_BOOLEAN" value="4" enum="PortType">
Boolean type. Translated to [code]bool[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_TRANSFORM" value="4" enum="PortType">
+ <constant name="PORT_TYPE_TRANSFORM" value="5" enum="PortType">
Transform type. Translated to [code]mat4[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_SAMPLER" value="5" enum="PortType">
+ <constant name="PORT_TYPE_SAMPLER" value="6" 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="6" enum="PortType">
+ <constant name="PORT_TYPE_MAX" value="7" enum="PortType">
Represents the size of the [enum PortType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeBillboard.xml b/doc/classes/VisualShaderNodeBillboard.xml
index 77069975ef..56a88cca08 100644
--- a/doc/classes/VisualShaderNodeBillboard.xml
+++ b/doc/classes/VisualShaderNodeBillboard.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeBillboard" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeBillboard" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node that controls how the object faces the camera to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml
index 73a423b93a..bf2d1ffb93 100644
--- a/doc/classes/VisualShaderNodeBooleanConstant.xml
+++ b/doc/classes/VisualShaderNodeBooleanConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNodeConstant" version="4.0">
+<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A boolean constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeBooleanUniform.xml b/doc/classes/VisualShaderNodeBooleanUniform.xml
index 86f61dde83..59b331aed2 100644
--- a/doc/classes/VisualShaderNodeBooleanUniform.xml
+++ b/doc/classes/VisualShaderNodeBooleanUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeBooleanUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeBooleanUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A boolean uniform to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml
index a68cbbec49..fd24b9cfc2 100644
--- a/doc/classes/VisualShaderNodeClamp.xml
+++ b/doc/classes/VisualShaderNodeClamp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeClamp" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeClamp" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Clamps a value within the visual shader graph.
</brief_description>
@@ -20,10 +20,13 @@
<constant name="OP_TYPE_INT" value="1" enum="OpType">
An integer scalar.
</constant>
- <constant name="OP_TYPE_VECTOR" value="2" enum="OpType">
- A vector type.
+ <constant name="OP_TYPE_VECTOR_2D" value="2" enum="OpType">
+ A 2D vector type.
</constant>
- <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="4" enum="OpType">
Represents the size of the [enum OpType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml
index d9f5167bd6..a2917d373e 100644
--- a/doc/classes/VisualShaderNodeColorConstant.xml
+++ b/doc/classes/VisualShaderNodeColorConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNodeConstant" version="4.0">
+<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Color] constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml
index 0d7698f755..4a73b1662e 100644
--- a/doc/classes/VisualShaderNodeColorFunc.xml
+++ b/doc/classes/VisualShaderNodeColorFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorFunc" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeColorFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Color] function to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml
index 378897d3cc..7e0e07584a 100644
--- a/doc/classes/VisualShaderNodeColorOp.xml
+++ b/doc/classes/VisualShaderNodeColorOp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorOp" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeColorOp" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Color] operator to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml
index 9c126fe700..5ca96dc285 100644
--- a/doc/classes/VisualShaderNodeColorUniform.xml
+++ b/doc/classes/VisualShaderNodeColorUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeColorUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Color] uniform to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeComment.xml b/doc/classes/VisualShaderNodeComment.xml
index daffd24f93..9f6488500d 100644
--- a/doc/classes/VisualShaderNodeComment.xml
+++ b/doc/classes/VisualShaderNodeComment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeComment" inherits="VisualShaderNodeResizableBase" version="4.0">
+<class name="VisualShaderNodeComment" inherits="VisualShaderNodeResizableBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A comment node to be placed on visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml
index 49bf952b31..d703181e2d 100644
--- a/doc/classes/VisualShaderNodeCompare.xml
+++ b/doc/classes/VisualShaderNodeCompare.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A comparison function for common types within the visual shader graph.
</brief_description>
@@ -10,7 +10,7 @@
</tutorials>
<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].
+ Extra condition which is applied if [member type] is set to [constant CTYPE_VECTOR_3D].
</member>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeCompare.Function" default="0">
A comparison function. See [enum Function] for options.
@@ -26,16 +26,19 @@
<constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType">
An integer scalar.
</constant>
- <constant name="CTYPE_VECTOR" value="2" enum="ComparisonType">
+ <constant name="CTYPE_VECTOR_2D" value="2" enum="ComparisonType">
+ A 2D vector type.
+ </constant>
+ <constant name="CTYPE_VECTOR_3D" value="3" enum="ComparisonType">
A 3D vector type.
</constant>
- <constant name="CTYPE_BOOLEAN" value="3" enum="ComparisonType">
+ <constant name="CTYPE_BOOLEAN" value="4" enum="ComparisonType">
A boolean type.
</constant>
- <constant name="CTYPE_TRANSFORM" value="4" enum="ComparisonType">
+ <constant name="CTYPE_TRANSFORM" value="5" enum="ComparisonType">
A transform ([code]mat4[/code]) type.
</constant>
- <constant name="CTYPE_MAX" value="5" enum="ComparisonType">
+ <constant name="CTYPE_MAX" value="6" enum="ComparisonType">
Represents the size of the [enum ComparisonType] enum.
</constant>
<constant name="FUNC_EQUAL" value="0" enum="Function">
diff --git a/doc/classes/VisualShaderNodeConstant.xml b/doc/classes/VisualShaderNodeConstant.xml
index d5f63be691..213ab664ad 100644
--- a/doc/classes/VisualShaderNodeConstant.xml
+++ b/doc/classes/VisualShaderNodeConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeConstant" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A base type for the constants within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeCubemap.xml b/doc/classes/VisualShaderNodeCubemap.xml
index 23d98ee4be..b6b3350ae1 100644
--- a/doc/classes/VisualShaderNodeCubemap.xml
+++ b/doc/classes/VisualShaderNodeCubemap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCubemap" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeCubemap" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Cubemap] sampling node to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeCubemapUniform.xml b/doc/classes/VisualShaderNodeCubemapUniform.xml
index bfc62469a8..3f6addd16a 100644
--- a/doc/classes/VisualShaderNodeCubemapUniform.xml
+++ b/doc/classes/VisualShaderNodeCubemapUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCubemapUniform" inherits="VisualShaderNodeTextureUniform" version="4.0">
+<class name="VisualShaderNodeCubemapUniform" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Cubemap] uniform node to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeCurveTexture.xml b/doc/classes/VisualShaderNodeCurveTexture.xml
index b039da1671..492bb4cc2a 100644
--- a/doc/classes/VisualShaderNodeCurveTexture.xml
+++ b/doc/classes/VisualShaderNodeCurveTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCurveTexture" inherits="VisualShaderNodeResizableBase" version="4.0">
+<class name="VisualShaderNodeCurveTexture" inherits="VisualShaderNodeResizableBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a [CurveTexture] lookup within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeCurveXYZTexture.xml b/doc/classes/VisualShaderNodeCurveXYZTexture.xml
index 48ff6ba800..3f04e5d34d 100644
--- a/doc/classes/VisualShaderNodeCurveXYZTexture.xml
+++ b/doc/classes/VisualShaderNodeCurveXYZTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCurveXYZTexture" inherits="VisualShaderNodeResizableBase" version="4.0">
+<class name="VisualShaderNodeCurveXYZTexture" inherits="VisualShaderNodeResizableBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a [CurveXYZTexture] lookup within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index b87b59c3e4..0a962a4aa4 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" version="4.0">
+<class name="VisualShaderNodeCustom" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Virtual class to define custom [VisualShaderNode]s for use in the Visual Shader Editor.
</brief_description>
@@ -13,7 +13,7 @@
[/codeblock]
</description>
<tutorials>
- <link title="Visual Shader plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link>
+ <link title="Visual Shader plugins">$DOCS_URL/tutorials/plugins/editor/visual_shader_plugins.html</link>
</tutorials>
<methods>
<method name="_get_category" qualifiers="virtual const">
@@ -25,10 +25,10 @@
</method>
<method name="_get_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="input_vars" type="PackedStringArray" />
+ <argument index="0" name="input_vars" type="String[]" />
<argument index="1" name="output_vars" type="String[]" />
- <argument index="2" name="mode" type="int" />
- <argument index="3" name="type" type="int" />
+ <argument index="2" name="mode" type="int" enum="Shader.Mode" />
+ <argument index="3" name="type" type="int" enum="VisualShader.Type" />
<description>
Override this method to define the actual shader code of the associated custom node. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
The [code]input_vars[/code] and [code]output_vars[/code] arrays contain the string names of the various input and output variables, as defined by [code]_get_input_*[/code] and [code]_get_output_*[/code] virtual methods in this class.
@@ -44,9 +44,20 @@
Defining this method is [b]optional[/b].
</description>
</method>
+ <method name="_get_func_code" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="mode" type="int" enum="Shader.Mode" />
+ <argument index="1" name="type" type="int" enum="VisualShader.Type" />
+ <description>
+ Override this method to add a shader code to the beginning of each shader function (once). The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
+ If there are multiple custom nodes of different types which use this feature the order of each insertion is undefined.
+ You can customize the generated code based on the shader [code]mode[/code] (see [enum Shader.Mode]) and/or [code]type[/code] (see [enum VisualShader.Type]).
+ Defining this method is [b]optional[/b].
+ </description>
+ </method>
<method name="_get_global_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="mode" type="int" />
+ <argument index="0" name="mode" type="int" enum="Shader.Mode" />
<description>
Override this method to add shader code on top of the global shader, to define your own standard library of reusable methods, varyings, constants, uniforms, etc. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
Be careful with this functionality as it can cause name conflicts with other custom nodes, so be sure to give the defined entities unique names.
@@ -114,11 +125,20 @@
Defining this method is [b]optional[/b]. If not overridden, no return icon is shown.
</description>
</method>
+ <method name="_is_available" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="mode" type="int" enum="Shader.Mode" />
+ <argument index="1" name="type" type="int" enum="VisualShader.Type" />
+ <description>
+ Override this method to prevent the node to be visible in the member dialog for the certain [code]mode[/code] (see [enum Shader.Mode]) and/or [code]type[/code] (see [enum VisualShader.Type]).
+ Defining this method is [b]optional[/b]. If not overridden, it's [code]true[/code].
+ </description>
+ </method>
<method name="_is_highend" qualifiers="virtual const">
<return type="bool" />
<description>
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.
+ Defining this method is [b]optional[/b]. If not overridden, it's [code]false[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/VisualShaderNodeDerivativeFunc.xml b/doc/classes/VisualShaderNodeDerivativeFunc.xml
new file mode 100644
index 0000000000..ea1153ca25
--- /dev/null
+++ b/doc/classes/VisualShaderNodeDerivativeFunc.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeDerivativeFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Calculates a 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>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeDerivativeFunc.Function" default="0">
+ A derivative function type. See [enum Function] for options.
+ </member>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeDerivativeFunc.OpType" default="0">
+ A type of operands and returned value. See [enum OpType] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A floating-point scalar.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType">
+ A 2D vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_3D" value="2" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ <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>
+ <constant name="FUNC_MAX" value="3" enum="Function">
+ Represents the size of the [enum Function] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml
index 47afbbb11c..e974241b1b 100644
--- a/doc/classes/VisualShaderNodeDeterminant.xml
+++ b/doc/classes/VisualShaderNodeDeterminant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Calculates the determinant of a [Transform3D] within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeDotProduct.xml b/doc/classes/VisualShaderNodeDotProduct.xml
index 49c26735c8..e00d908b58 100644
--- a/doc/classes/VisualShaderNodeDotProduct.xml
+++ b/doc/classes/VisualShaderNodeDotProduct.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeDotProduct" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeDotProduct" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Calculates a dot product of two vectors within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml
index 4fde6d3aaf..c4f010f3c0 100644
--- a/doc/classes/VisualShaderNodeExpression.xml
+++ b/doc/classes/VisualShaderNodeExpression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeExpression" inherits="VisualShaderNodeGroupBase" version="4.0">
+<class name="VisualShaderNodeExpression" inherits="VisualShaderNodeGroupBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A custom visual shader graph expression written in Godot Shading Language.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeFaceForward.xml b/doc/classes/VisualShaderNodeFaceForward.xml
index 80cb8aea4e..115f2f8f28 100644
--- a/doc/classes/VisualShaderNodeFaceForward.xml
+++ b/doc/classes/VisualShaderNodeFaceForward.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFaceForward" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeFaceForward" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Returns the vector that points in the same direction as a reference vector within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeFloatConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml
index 581155b013..f4c6c3e05f 100644
--- a/doc/classes/VisualShaderNodeFloatConstant.xml
+++ b/doc/classes/VisualShaderNodeFloatConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNodeConstant" version="4.0">
+<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A scalar floating-point constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml
index 884954e85e..0f057b2e6d 100644
--- a/doc/classes/VisualShaderNodeFloatFunc.xml
+++ b/doc/classes/VisualShaderNodeFloatFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A scalar floating-point function to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml
index 3b16363f70..ed9e66d4f4 100644
--- a/doc/classes/VisualShaderNodeFloatOp.xml
+++ b/doc/classes/VisualShaderNodeFloatOp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A floating-point scalar operator to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml
index 244b8c9830..1616964edb 100644
--- a/doc/classes/VisualShaderNodeFloatUniform.xml
+++ b/doc/classes/VisualShaderNodeFloatUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A scalar float uniform to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeFresnel.xml b/doc/classes/VisualShaderNodeFresnel.xml
index 1e4479f841..ecd33de18c 100644
--- a/doc/classes/VisualShaderNodeFresnel.xml
+++ b/doc/classes/VisualShaderNodeFresnel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFresnel" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeFresnel" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A Fresnel effect to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeGlobalExpression.xml b/doc/classes/VisualShaderNodeGlobalExpression.xml
index 0d95824158..2439850aae 100644
--- a/doc/classes/VisualShaderNodeGlobalExpression.xml
+++ b/doc/classes/VisualShaderNodeGlobalExpression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeGlobalExpression" inherits="VisualShaderNodeExpression" version="4.0">
+<class name="VisualShaderNodeGlobalExpression" inherits="VisualShaderNodeExpression" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A custom global visual shader graph expression written in Godot Shading Language.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml
index cbe4dc2ae6..1b724b00d6 100644
--- a/doc/classes/VisualShaderNodeGroupBase.xml
+++ b/doc/classes/VisualShaderNodeGroupBase.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeGroupBase" inherits="VisualShaderNodeResizableBase" version="4.0">
+<class name="VisualShaderNodeGroupBase" inherits="VisualShaderNodeResizableBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for a family of nodes with variable amount of input and output ports within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml
index 75fd797a06..852436d5ec 100644
--- a/doc/classes/VisualShaderNodeIf.xml
+++ b/doc/classes/VisualShaderNodeIf.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Compares two floating-point numbers in order to return a required vector within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 46d7dd6322..6268a3fe09 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Represents the input shader parameter within the visual shader graph.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Shading reference index">https://docs.godotengine.org/en/latest/tutorials/shaders/shader_reference/index.html</link>
+ <link title="Shading reference index">$DOCS_URL/tutorials/shaders/shader_reference/index.html</link>
</tutorials>
<methods>
<method name="get_input_real_name" qualifiers="const">
diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml
index e4a8a4447f..d74116857a 100644
--- a/doc/classes/VisualShaderNodeIntConstant.xml
+++ b/doc/classes/VisualShaderNodeIntConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNodeConstant" version="4.0">
+<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A scalar integer constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
index d2782efa96..6a1965781d 100644
--- a/doc/classes/VisualShaderNodeIntFunc.xml
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A scalar integer function to be used within the visual shader graph.
</brief_description>
@@ -23,7 +23,10 @@
<constant name="FUNC_SIGN" value="2" enum="Function">
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
</constant>
- <constant name="FUNC_MAX" value="3" enum="Function">
+ <constant name="FUNC_BITWISE_NOT" value="3" enum="Function">
+ Returns the result of bitwise [code]NOT[/code] operation on the integer. Translates to [code]~a[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_MAX" value="4" enum="Function">
Represents the size of the [enum Function] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml
index e5fcafca81..817b12f9a3 100644
--- a/doc/classes/VisualShaderNodeIntOp.xml
+++ b/doc/classes/VisualShaderNodeIntOp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An integer scalar operator to be used within the visual shader graph.
</brief_description>
@@ -35,7 +35,22 @@
<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>
- <constant name="OP_ENUM_SIZE" value="7" enum="Operator">
+ <constant name="OP_BITWISE_AND" value="7" enum="Operator">
+ Returns the result of bitwise [code]AND[/code] operation on the integer. Translates to [code]a &amp; b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_OR" value="8" enum="Operator">
+ Returns the result of bitwise [code]OR[/code] operation for two integers. Translates to [code]a | b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_XOR" value="9" enum="Operator">
+ Returns the result of bitwise [code]XOR[/code] operation for two integers. Translates to [code]a ^ b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_LEFT_SHIFT" value="10" enum="Operator">
+ Returns the result of bitwise left shift operation on the integer. Translates to [code]a &lt;&lt; b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_RIGHT_SHIFT" value="11" enum="Operator">
+ Returns the result of bitwise right shift operation on the integer. Translates to [code]a &gt;&gt; b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_ENUM_SIZE" value="12" enum="Operator">
Represents the size of the [enum Operator] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml
index 36a3fbd4c1..c83bdb5ad6 100644
--- a/doc/classes/VisualShaderNodeIntUniform.xml
+++ b/doc/classes/VisualShaderNodeIntUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A scalar integer uniform to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml
index 1f52e25d50..e8bbba336b 100644
--- a/doc/classes/VisualShaderNodeIs.xml
+++ b/doc/classes/VisualShaderNodeIs.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIs" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeIs" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A boolean comparison operator to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeMix.xml b/doc/classes/VisualShaderNodeMix.xml
index 1ef580a983..c8ca545183 100644
--- a/doc/classes/VisualShaderNodeMix.xml
+++ b/doc/classes/VisualShaderNodeMix.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeMix" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeMix" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Linearly interpolates between two values within the visual shader graph.
</brief_description>
@@ -15,15 +15,21 @@
</members>
<constants>
<constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
- A scalar type.
+ A floating-point scalar.
</constant>
- <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
- A vector type.
+ <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType">
+ A 2D vector type.
</constant>
- <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
- A vector type. [code]weight[/code] port is using a scalar type.
+ <constant name="OP_TYPE_VECTOR_2D_SCALAR" value="2" enum="OpType">
+ The [code]a[/code] and [code]b[/code] ports use a 2D vector type. The [code]weight[/code] port uses a scalar type.
</constant>
- <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_3D_SCALAR" value="4" enum="OpType">
+ The [code]a[/code] and [code]b[/code] ports use a 3D vector type. The [code]weight[/code] port uses a scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="5" enum="OpType">
Represents the size of the [enum OpType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml
index a0e9aef703..811f01fc28 100644
--- a/doc/classes/VisualShaderNodeMultiplyAdd.xml
+++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeMultiplyAdd" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeMultiplyAdd" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a fused multiply-add operation within the visual shader graph.
</brief_description>
@@ -15,12 +15,15 @@
</members>
<constants>
<constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
- A scalar type.
+ A floating-point scalar type.
</constant>
- <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
- A vector type.
+ <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType">
+ A 2D vector type.
</constant>
- <constant name="OP_TYPE_MAX" value="2" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_3D" value="2" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
Represents the size of the [enum OpType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeOuterProduct.xml b/doc/classes/VisualShaderNodeOuterProduct.xml
index adc32aff10..246be636a2 100644
--- a/doc/classes/VisualShaderNodeOuterProduct.xml
+++ b/doc/classes/VisualShaderNodeOuterProduct.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeOuterProduct" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeOuterProduct" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Calculates an outer product of two vectors within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml
index 8193ed6167..8cf30307a3 100644
--- a/doc/classes/VisualShaderNodeOutput.xml
+++ b/doc/classes/VisualShaderNodeOutput.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeOutput" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeOutput" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Represents the output shader parameters within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml
index da8c505719..f26362b336 100644
--- a/doc/classes/VisualShaderNodeParticleAccelerator.xml
+++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleAccelerator" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeParticleAccelerator" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
index acfd8e5572..dbef4b806d 100644
--- a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleBoxEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0">
+<class name="VisualShaderNodeParticleBoxEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeParticleConeVelocity.xml b/doc/classes/VisualShaderNodeParticleConeVelocity.xml
index 4755b19046..c3b3621fbc 100644
--- a/doc/classes/VisualShaderNodeParticleConeVelocity.xml
+++ b/doc/classes/VisualShaderNodeParticleConeVelocity.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleConeVelocity" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeParticleConeVelocity" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeParticleEmit.xml b/doc/classes/VisualShaderNodeParticleEmit.xml
index d6e4c384aa..c5e9d25ca1 100644
--- a/doc/classes/VisualShaderNodeParticleEmit.xml
+++ b/doc/classes/VisualShaderNodeParticleEmit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleEmit" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeParticleEmit" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeParticleEmitter.xml b/doc/classes/VisualShaderNodeParticleEmitter.xml
index 03ceb3adea..ddfd410708 100644
--- a/doc/classes/VisualShaderNodeParticleEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleEmitter.xml
@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleEmitter" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeParticleEmitter" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ A base class for particle emitters.
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
+ <members>
+ <member name="mode_2d" type="bool" setter="set_mode_2d" getter="is_mode_2d" default="false">
+ If [code]true[/code], the result of this emitter is projected to 2D space. By default it is [code]false[/code] and meant for use in 3D space.
+ </member>
+ </members>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleMeshEmitter.xml b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml
new file mode 100644
index 0000000000..25dd925112
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleMeshEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ </member>
+ <member name="surface_index" type="int" setter="set_surface_index" getter="get_surface_index" default="0">
+ </member>
+ <member name="use_all_surfaces" type="bool" setter="set_use_all_surfaces" getter="is_use_all_surfaces" default="true">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
index 5cd3d8f0b8..a911dbf3b4 100644
--- a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
+++ b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleMultiplyByAxisAngle" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeParticleMultiplyByAxisAngle" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeParticleOutput.xml b/doc/classes/VisualShaderNodeParticleOutput.xml
index 24eb6bf825..7542272e61 100644
--- a/doc/classes/VisualShaderNodeParticleOutput.xml
+++ b/doc/classes/VisualShaderNodeParticleOutput.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleOutput" inherits="VisualShaderNodeOutput" version="4.0">
+<class name="VisualShaderNodeParticleOutput" inherits="VisualShaderNodeOutput" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml
index 2dec41105c..a1f9ce040a 100644
--- a/doc/classes/VisualShaderNodeParticleRandomness.xml
+++ b/doc/classes/VisualShaderNodeParticleRandomness.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleRandomness" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeParticleRandomness" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -8,14 +8,20 @@
</tutorials>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeParticleRandomness.OpType" default="0">
+ A type of operands and returned value.
</member>
</members>
<constants>
<constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A floating-point scalar.
</constant>
- <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType">
+ A 2D vector type.
</constant>
- <constant name="OP_TYPE_MAX" value="2" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_3D" value="2" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
Represents the size of the [enum OpType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeParticleRingEmitter.xml b/doc/classes/VisualShaderNodeParticleRingEmitter.xml
index 9aabf1ed27..bebce51d6b 100644
--- a/doc/classes/VisualShaderNodeParticleRingEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleRingEmitter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleRingEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0">
+<class name="VisualShaderNodeParticleRingEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
index e2db81ff17..ffbd384f1e 100644
--- a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeParticleSphereEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0">
+<class name="VisualShaderNodeParticleSphereEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeResizableBase.xml b/doc/classes/VisualShaderNodeResizableBase.xml
index ef734ef857..ce5510b0cb 100644
--- a/doc/classes/VisualShaderNodeResizableBase.xml
+++ b/doc/classes/VisualShaderNodeResizableBase.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeResizableBase" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeResizableBase" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for resizable nodes in a visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeSDFRaymarch.xml b/doc/classes/VisualShaderNodeSDFRaymarch.xml
index 64a3e5a310..2cc0c68297 100644
--- a/doc/classes/VisualShaderNodeSDFRaymarch.xml
+++ b/doc/classes/VisualShaderNodeSDFRaymarch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeSDFRaymarch" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeSDFRaymarch" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
SDF raymarching algorithm to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeSDFToScreenUV.xml b/doc/classes/VisualShaderNodeSDFToScreenUV.xml
index 07e267b990..de87224570 100644
--- a/doc/classes/VisualShaderNodeSDFToScreenUV.xml
+++ b/doc/classes/VisualShaderNodeSDFToScreenUV.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeSDFToScreenUV" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeSDFToScreenUV" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A function to convert an SDF (signed-distance field) to screen UV, to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeSample3D.xml b/doc/classes/VisualShaderNodeSample3D.xml
index 85d2367eac..f979f90f4d 100644
--- a/doc/classes/VisualShaderNodeSample3D.xml
+++ b/doc/classes/VisualShaderNodeSample3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeSample3D" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeSample3D" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A base node for nodes which samples 3D textures in the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
deleted file mode 100644
index 8d108a5d28..0000000000
--- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<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>
- <members>
- <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>
- <constant name="FUNC_MAX" value="3" enum="Function">
- Represents the size of the [enum Function] enum.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScreenUVToSDF.xml b/doc/classes/VisualShaderNodeScreenUVToSDF.xml
index 8f1f4f486c..ddda2e0c93 100644
--- a/doc/classes/VisualShaderNodeScreenUVToSDF.xml
+++ b/doc/classes/VisualShaderNodeScreenUVToSDF.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScreenUVToSDF" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeScreenUVToSDF" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A function to convert screen UV to an SDF (signed-distance field), to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeSmoothStep.xml b/doc/classes/VisualShaderNodeSmoothStep.xml
index 2f8c7e0f33..b10e8b4433 100644
--- a/doc/classes/VisualShaderNodeSmoothStep.xml
+++ b/doc/classes/VisualShaderNodeSmoothStep.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeSmoothStep" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeSmoothStep" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Calculates a SmoothStep function within the visual shader graph.
</brief_description>
@@ -16,15 +16,21 @@
</members>
<constants>
<constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
- A scalar type.
+ A floating-point scalar type.
</constant>
- <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
- A vector type.
+ <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType">
+ A 2D vector type.
</constant>
- <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
- A vector type. [code]edge0[/code] and [code]edge1[/code] are using a scalar type.
+ <constant name="OP_TYPE_VECTOR_2D_SCALAR" value="2" enum="OpType">
+ The [code]x[/code] port uses a 2D vector type. The first two ports use a floating-point scalar type.
</constant>
- <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_3D_SCALAR" value="4" enum="OpType">
+ The [code]x[/code] port uses a 3D vector type. The first two ports use a floating-point scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="5" enum="OpType">
Represents the size of the [enum OpType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeStep.xml b/doc/classes/VisualShaderNodeStep.xml
index 5d8b464814..2d9e87e56c 100644
--- a/doc/classes/VisualShaderNodeStep.xml
+++ b/doc/classes/VisualShaderNodeStep.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeStep" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeStep" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Calculates a Step function within the visual shader graph.
</brief_description>
@@ -16,15 +16,21 @@
</members>
<constants>
<constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
- A scalar type.
+ A floating-point scalar type.
</constant>
- <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
- A vector type.
+ <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType">
+ A 2D vector type.
</constant>
- <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
- A vector type. [code]edge[/code] port is using a scalar type.
+ <constant name="OP_TYPE_VECTOR_2D_SCALAR" value="2" enum="OpType">
+ The [code]x[/code] port uses a 2D vector type, while the [code]edge[/code] port uses a floating-point scalar type.
</constant>
- <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_3D_SCALAR" value="4" enum="OpType">
+ The [code]x[/code] port uses a 3D vector type, while the [code]edge[/code] port uses a floating-point scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="5" enum="OpType">
Represents the size of the [enum OpType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml
index 921092cd07..4cadf79b8e 100644
--- a/doc/classes/VisualShaderNodeSwitch.xml
+++ b/doc/classes/VisualShaderNodeSwitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A selector function for use within the visual shader graph.
</brief_description>
@@ -20,16 +20,19 @@
<constant name="OP_TYPE_INT" value="1" enum="OpType">
An integer scalar.
</constant>
- <constant name="OP_TYPE_VECTOR" value="2" enum="OpType">
- A vector type.
+ <constant name="OP_TYPE_VECTOR_2D" value="2" enum="OpType">
+ A 2D vector type.
</constant>
- <constant name="OP_TYPE_BOOLEAN" value="3" enum="OpType">
+ <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_BOOLEAN" value="4" enum="OpType">
A boolean type.
</constant>
- <constant name="OP_TYPE_TRANSFORM" value="4" enum="OpType">
+ <constant name="OP_TYPE_TRANSFORM" value="5" enum="OpType">
A transform type.
</constant>
- <constant name="OP_TYPE_MAX" value="5" enum="OpType">
+ <constant name="OP_TYPE_MAX" value="6" enum="OpType">
Represents the size of the [enum OpType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml
index 0a2af30f67..72a7fadf1a 100644
--- a/doc/classes/VisualShaderNodeTexture.xml
+++ b/doc/classes/VisualShaderNodeTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTexture" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a 2D texture lookup within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTexture2DArray.xml b/doc/classes/VisualShaderNodeTexture2DArray.xml
index cd7c526e1f..39861299b0 100644
--- a/doc/classes/VisualShaderNodeTexture2DArray.xml
+++ b/doc/classes/VisualShaderNodeTexture2DArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture2DArray" inherits="VisualShaderNodeSample3D" version="4.0">
+<class name="VisualShaderNodeTexture2DArray" inherits="VisualShaderNodeSample3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A 2D texture uniform array to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml b/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
index ba320afd18..f8ba796c2e 100644
--- a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
+++ b/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture2DArrayUniform" inherits="VisualShaderNodeTextureUniform" version="4.0">
+<class name="VisualShaderNodeTexture2DArrayUniform" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualShaderNodeTexture3D.xml b/doc/classes/VisualShaderNodeTexture3D.xml
index 2f5b750ce1..691be3f6ab 100644
--- a/doc/classes/VisualShaderNodeTexture3D.xml
+++ b/doc/classes/VisualShaderNodeTexture3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture3D" inherits="VisualShaderNodeSample3D" version="4.0">
+<class name="VisualShaderNodeTexture3D" inherits="VisualShaderNodeSample3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a 3D texture lookup within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTexture3DUniform.xml b/doc/classes/VisualShaderNodeTexture3DUniform.xml
index 3b002c5449..365c7db02e 100644
--- a/doc/classes/VisualShaderNodeTexture3DUniform.xml
+++ b/doc/classes/VisualShaderNodeTexture3DUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture3DUniform" inherits="VisualShaderNodeTextureUniform" version="4.0">
+<class name="VisualShaderNodeTexture3DUniform" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Provides a 3D texture uniform within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTextureSDF.xml b/doc/classes/VisualShaderNodeTextureSDF.xml
index 09a5851ef7..0562f9e0b8 100644
--- a/doc/classes/VisualShaderNodeTextureSDF.xml
+++ b/doc/classes/VisualShaderNodeTextureSDF.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureSDF" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTextureSDF" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs an SDF (signed-distance field) texture lookup within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTextureSDFNormal.xml b/doc/classes/VisualShaderNodeTextureSDFNormal.xml
index e66492cebf..1e21544479 100644
--- a/doc/classes/VisualShaderNodeTextureSDFNormal.xml
+++ b/doc/classes/VisualShaderNodeTextureSDFNormal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureSDFNormal" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTextureSDFNormal" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs an SDF (signed-distance field) normal texture lookup within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml
index 26c72d2714..b104634da0 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeTextureUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a uniform texture lookup within the visual shader graph.
</brief_description>
@@ -12,6 +12,12 @@
<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_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="VisualShaderNodeTextureUniform.TextureFilter" default="0">
+ Sets the texture filtering mode. See [enum TextureFilter] for options.
+ </member>
+ <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="VisualShaderNodeTextureUniform.TextureRepeat" default="0">
+ Sets the texture repeating mode. See [enum TextureRepeat] for options.
+ </member>
<member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureUniform.TextureType" default="0">
Defines the type of data provided by the source texture. See [enum TextureType] for options.
</member>
@@ -26,8 +32,8 @@
<constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
</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 name="TYPE_ANISOTROPY" value="3" enum="TextureType">
+ Adds [code]hint_anisotropy[/code] as hint to the uniform declaration to use for a flowmap.
</constant>
<constant name="TYPE_MAX" value="4" enum="TextureType">
Represents the size of the [enum TextureType] enum.
@@ -41,5 +47,31 @@
<constant name="COLOR_DEFAULT_MAX" value="2" enum="ColorDefault">
Represents the size of the [enum ColorDefault] enum.
</constant>
+ <constant name="FILTER_DEFAULT" value="0" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_NEAREST" value="1" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_LINEAR" value="2" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_NEAREST_MIPMAP" value="3" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_LINEAR_MIPMAP" value="4" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_NEAREST_MIPMAP_ANISOTROPIC" value="5" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_LINEAR_MIPMAP_ANISOTROPIC" value="6" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_MAX" value="7" enum="TextureFilter">
+ Represents the size of the [enum TextureFilter] enum.
+ </constant>
+ <constant name="REPEAT_DEFAULT" value="0" enum="TextureRepeat">
+ </constant>
+ <constant name="REPEAT_ENABLED" value="1" enum="TextureRepeat">
+ </constant>
+ <constant name="REPEAT_DISABLED" value="2" enum="TextureRepeat">
+ </constant>
+ <constant name="REPEAT_MAX" value="3" enum="TextureRepeat">
+ Represents the size of the [enum TextureRepeat] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
index 76b5506cba..72082ef04d 100644
--- a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
+++ b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureUniformTriplanar" inherits="VisualShaderNodeTextureUniform" version="4.0">
+<class name="VisualShaderNodeTextureUniformTriplanar" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a uniform texture lookup with triplanar within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml
index 4ec59962e9..1a807804c9 100644
--- a/doc/classes/VisualShaderNodeTransformCompose.xml
+++ b/doc/classes/VisualShaderNodeTransformCompose.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Composes a [Transform3D] from four [Vector3]s within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml
index 66eda94fbe..24b5e757a6 100644
--- a/doc/classes/VisualShaderNodeTransformConstant.xml
+++ b/doc/classes/VisualShaderNodeTransformConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNodeConstant" version="4.0">
+<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Transform3D] constant for use within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml
index e1bfa94a07..f6ae4a370a 100644
--- a/doc/classes/VisualShaderNodeTransformDecompose.xml
+++ b/doc/classes/VisualShaderNodeTransformDecompose.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Decomposes a [Transform3D] into four [Vector3]s within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml
index bbc36fc8d5..f1fb0e699f 100644
--- a/doc/classes/VisualShaderNodeTransformFunc.xml
+++ b/doc/classes/VisualShaderNodeTransformFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Computes a [Transform3D] function within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformOp.xml b/doc/classes/VisualShaderNodeTransformOp.xml
index 65d5b9cbbd..8f2eceb24e 100644
--- a/doc/classes/VisualShaderNodeTransformOp.xml
+++ b/doc/classes/VisualShaderNodeTransformOp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformOp" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTransformOp" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Transform3D] operator to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml
index b6d8801932..60678c09e5 100644
--- a/doc/classes/VisualShaderNodeTransformUniform.xml
+++ b/doc/classes/VisualShaderNodeTransformUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Transform3D] uniform for use within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml
index 02fe18c7a0..4f7e1c018f 100644
--- a/doc/classes/VisualShaderNodeTransformVecMult.xml
+++ b/doc/classes/VisualShaderNodeTransformVecMult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Multiplies a [Transform3D] and a [Vector3] within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml
index 26bcea07e8..37a9769a10 100644
--- a/doc/classes/VisualShaderNodeUVFunc.xml
+++ b/doc/classes/VisualShaderNodeUVFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeUVFunc" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeUVFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Contains functions to modify texture coordinates ([code]uv[/code]) to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml
index 15c760656e..58d194e9d4 100644
--- a/doc/classes/VisualShaderNodeUniform.xml
+++ b/doc/classes/VisualShaderNodeUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeUniform" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeUniform" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A base type for the uniforms within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeUniformRef.xml b/doc/classes/VisualShaderNodeUniformRef.xml
index 44a28ed53c..4b12c6e649 100644
--- a/doc/classes/VisualShaderNodeUniformRef.xml
+++ b/doc/classes/VisualShaderNodeUniformRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeUniformRef" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeUniformRef" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A reference to an existing [VisualShaderNodeUniform].
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVarying.xml b/doc/classes/VisualShaderNodeVarying.xml
new file mode 100644
index 0000000000..0dbbd61f3a
--- /dev/null
+++ b/doc/classes/VisualShaderNodeVarying.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeVarying" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="varying_name" type="String" setter="set_varying_name" getter="get_varying_name" default="&quot;[None]&quot;">
+ </member>
+ <member name="varying_type" type="int" setter="set_varying_type" getter="get_varying_type" enum="VisualShader.VaryingType" default="0">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/VisualShaderNodeVaryingGetter.xml b/doc/classes/VisualShaderNodeVaryingGetter.xml
new file mode 100644
index 0000000000..de30b18d67
--- /dev/null
+++ b/doc/classes/VisualShaderNodeVaryingGetter.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeVaryingGetter" inherits="VisualShaderNodeVarying" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeVaryingSetter.xml b/doc/classes/VisualShaderNodeVaryingSetter.xml
new file mode 100644
index 0000000000..57ead3d82b
--- /dev/null
+++ b/doc/classes/VisualShaderNodeVaryingSetter.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeVaryingSetter" inherits="VisualShaderNodeVarying" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeVec2Constant.xml b/doc/classes/VisualShaderNodeVec2Constant.xml
new file mode 100644
index 0000000000..6063d8b9d9
--- /dev/null
+++ b/doc/classes/VisualShaderNodeVec2Constant.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeVec2Constant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A [Vector2] constant to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ A constant [Vector2], which can be used as an input node.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="constant" type="Vector2" setter="set_constant" getter="get_constant" default="Vector2(0, 0)">
+ A [Vector2] constant which represents the state of this node.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/VisualShaderNodeVec2Uniform.xml b/doc/classes/VisualShaderNodeVec2Uniform.xml
new file mode 100644
index 0000000000..4ad6279475
--- /dev/null
+++ b/doc/classes/VisualShaderNodeVec2Uniform.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeVec2Uniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A [Vector2] uniform to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform vec2[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="default_value" type="Vector2" setter="set_default_value" getter="get_default_value" default="Vector2(0, 0)">
+ A default value to be assigned within the shader.
+ </member>
+ <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false">
+ Enables usage of the [member default_value].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml
index 0a64357962..48e2b84490 100644
--- a/doc/classes/VisualShaderNodeVec3Constant.xml
+++ b/doc/classes/VisualShaderNodeVec3Constant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNodeConstant" version="4.0">
+<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Vector3] constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml
index 2b72e5252a..f712c89463 100644
--- a/doc/classes/VisualShaderNodeVec3Uniform.xml
+++ b/doc/classes/VisualShaderNodeVec3Uniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec3Uniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeVec3Uniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A [Vector3] uniform to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorBase.xml b/doc/classes/VisualShaderNodeVectorBase.xml
new file mode 100644
index 0000000000..21f70960ab
--- /dev/null
+++ b/doc/classes/VisualShaderNodeVectorBase.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeVectorBase" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A base type for the nodes using different vector types within the visual shader graph.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeVectorBase.OpType" default="1">
+ A base type.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_VECTOR_2D" value="0" enum="OpType">
+ A 2D vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_3D" value="1" enum="OpType">
+ A 3D vector type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="2" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeVectorCompose.xml b/doc/classes/VisualShaderNodeVectorCompose.xml
index ebc30d03f4..87947c088e 100644
--- a/doc/classes/VisualShaderNodeVectorCompose.xml
+++ b/doc/classes/VisualShaderNodeVectorCompose.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorCompose" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVectorCompose" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Composes a [Vector3] from three scalars within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorDecompose.xml b/doc/classes/VisualShaderNodeVectorDecompose.xml
index 09986bf969..f5cff2a9f7 100644
--- a/doc/classes/VisualShaderNodeVectorDecompose.xml
+++ b/doc/classes/VisualShaderNodeVectorDecompose.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorDecompose" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVectorDecompose" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Decomposes a [Vector3] into three scalars within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
deleted file mode 100644
index e0c7c8618c..0000000000
--- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<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>
- <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>
- <constant name="FUNC_MAX" value="3" enum="Function">
- Represents the size of the [enum Function] enum.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorDistance.xml b/doc/classes/VisualShaderNodeVectorDistance.xml
index 098787e583..35131dc294 100644
--- a/doc/classes/VisualShaderNodeVectorDistance.xml
+++ b/doc/classes/VisualShaderNodeVectorDistance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorDistance" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVectorDistance" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Returns the distance between two points. To be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml
index 27ae82e11b..dc6628a9af 100644
--- a/doc/classes/VisualShaderNodeVectorFunc.xml
+++ b/doc/classes/VisualShaderNodeVectorFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorFunc" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVectorFunc" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A vector function to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorLen.xml b/doc/classes/VisualShaderNodeVectorLen.xml
index 165455e622..9e363ecec8 100644
--- a/doc/classes/VisualShaderNodeVectorLen.xml
+++ b/doc/classes/VisualShaderNodeVectorLen.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorLen" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVectorLen" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Returns the length of a [Vector3] within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml
index 5e8f0abda3..daa17ee740 100644
--- a/doc/classes/VisualShaderNodeVectorOp.xml
+++ b/doc/classes/VisualShaderNodeVectorOp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorOp" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVectorOp" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A vector operator to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml
index 59e98fb000..d12188ea55 100644
--- a/doc/classes/VisualShaderNodeVectorRefract.xml
+++ b/doc/classes/VisualShaderNodeVectorRefract.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Returns the [Vector3] that points in the direction of refraction. For use within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VoxelGI.xml b/doc/classes/VoxelGI.xml
index f6470782ee..55ba1c4934 100644
--- a/doc/classes/VoxelGI.xml
+++ b/doc/classes/VoxelGI.xml
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VoxelGI" inherits="VisualInstance3D" version="4.0">
+<class name="VoxelGI" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Real-time global illumination (GI) probe.
</brief_description>
<description>
- [VoxelGI]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [VoxelGI]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
- Having [VoxelGI]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/voxel_gi/quality].
- [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
+ [VoxelGI]s are used to provide high-quality real-time indirect light and reflections to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [VoxelGI]s need to be baked before having a visible effect. However, once baked, dynamic objects will receive light from them. Furthermore, lights can be fully dynamic or baked.
+ [b]Procedural generation:[/b] [VoxelGI] can be baked in an exported project, which makes it suitable for procedurally generated or user-built levels as long as all the geometry is generated in advance. For games where geometry is generated at any time during gameplay, SDFGI is more suitable (see [member Environment.sdfgi_enabled]).
+ [b]Performance:[/b] [VoxelGI] is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider [LightmapGI] instead). To improve performance, adjust [member ProjectSettings.rendering/global_illumination/voxel_gi/quality] and enable [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution] in the Project Settings. To provide a fallback for low-end hardware, consider adding an option to disable [VoxelGI] in your project's options menus. A [VoxelGI] node can be disabled by hiding it.
+ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. To further prevent light leaks, you can also strategically place temporary [MeshInstance3D] nodes with their [member GeometryInstance3D.gi_mode] set to [constant GeometryInstance3D.GI_MODE_STATIC]. These temporary nodes can then be hidden after baking the [VoxelGI] node.
</description>
<tutorials>
- <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
+ <link title="GI probes">$DOCS_URL/tutorials/3d/gi_probes.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
@@ -18,7 +19,9 @@
<argument index="0" name="from_node" type="Node" default="null" />
<argument index="1" name="create_visual_debug" type="bool" default="false" />
<description>
- Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring.
+ Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_STATIC] and [Light3D]s marked with either [constant Light3D.BAKE_STATIC] or [constant Light3D.BAKE_DYNAMIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring.
+ [b]Note:[/b] [method bake] works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a [VoxelGI] node generally takes from 5 to 20 seconds in most scenes. Reducing [member subdiv] can speed up baking.
+ [b]Note:[/b] [GeometryInstance3D]s and [Light3D]s must be fully ready before [method bake] is called. If you are procedurally creating those and some meshes or lights are missing from your baked [VoxelGI], use [code]call_deferred("bake")[/code] instead of calling [method bake] directly.
</description>
</method>
<method name="debug_bake">
@@ -50,7 +53,7 @@
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.
+ 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/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index f0bd2a0601..b8d424b5fe 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VoxelGIData" inherits="Resource" version="4.0">
+<class name="VoxelGIData" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Contains baked voxel global illumination data for use in a [VoxelGI] node.
</brief_description>
<description>
+ [VoxelGIData] contains baked voxel global illumination for use in a [VoxelGI] node. [VoxelGIData] also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the [VoxelGI] node again.
+ [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the inspector then choosing [b]Save As...[/b].
</description>
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
@@ -23,6 +26,8 @@
<method name="get_bounds" qualifiers="const">
<return type="AABB" />
<description>
+ Returns the bounds of the baked voxel data as an [AABB], which should match [member VoxelGI.extents] after being baked (which only contains the size as a [Vector3]).
+ [b]Note:[/b] If the extents were modified without baking the VoxelGI data, then the value of [method get_bounds] and [member VoxelGI.extents] will not match.
</description>
</method>
<method name="get_data_cells" qualifiers="const">
@@ -53,18 +58,25 @@
</methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5">
+ The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
</member>
- <member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="4.0">
+ <member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="2.0">
+ The dynamic range to use ([code]1.0[/code] represents a low dynamic range scene brightness). Higher values can be used to provide brighter indirect lighting, at the cost of more visible color banding in dark areas (both in indirect lighting and reflections). To avoid color banding, it's recommended to use the lowest value that does not result in visible light clipping.
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
+ The energy of the indirect lighting and reflections produced by the [VoxelGI] node. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
+ If [code]true[/code], [Environment] lighting is ignored by the [VoxelGI] node. If [code]false[/code], [Environment] lighting is taken into account by the [VoxelGI] node. [Environment] lighting updates in real-time, which means it can be changed without having to bake the [VoxelGI] node again.
</member>
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
+ The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also [member bias]. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
</member>
<member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
+ If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
</member>
<member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
+ If [code]true[/code], performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling [member use_two_bounces], adjust [member propagation] and [member energy].
</member>
</members>
</class>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index 56617b581f..f80381acda 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="RefCounted" version="4.0">
+<class name="WeakRef" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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
index 0653c8b453..9853f906bc 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Window" inherits="Viewport" version="4.0">
+<class name="Window" inherits="Viewport" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for all windows.
</brief_description>
@@ -230,6 +230,12 @@
<description>
</description>
</method>
+ <method name="reset_size">
+ <return type="void" />
+ <description>
+ Resets the size to the minimum size, which is the max of [member min_size] and (if [member wrap_controls] is enabled) [method get_contents_minimum_size]. This is equivalent to calling [code]set_size(Vector2i())[/code] (or any size below the minimum).
+ </description>
+ </method>
<method name="set_flag">
<return type="void" />
<argument index="0" name="flag" type="int" enum="Window.Flags" />
@@ -281,6 +287,8 @@
</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_factor" type="float" setter="set_content_scale_factor" getter="get_content_scale_factor" default="1.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)">
@@ -298,6 +306,8 @@
Set's the window's current mode.
[b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux.
</member>
+ <member name="popup_window" type="bool" setter="set_flag" getter="get_flag" default="false">
+ </member>
<member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)">
The window's position in pixels.
</member>
@@ -338,6 +348,7 @@
<signal name="files_dropped">
<argument index="0" name="files" type="PackedStringArray" />
<description>
+ Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
</description>
</signal>
<signal name="focus_entered">
@@ -360,6 +371,10 @@
<description>
</description>
</signal>
+ <signal name="theme_changed">
+ <description>
+ </description>
+ </signal>
<signal name="visibility_changed">
<description>
</description>
@@ -384,7 +399,12 @@
</constant>
<constant name="MODE_FULLSCREEN" value="3" enum="Mode">
Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ </constant>
+ <constant name="MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="Mode">
+ Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant MODE_FULLSCREEN].
+ Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
</constant>
<constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
The window's ability to be resized.
@@ -399,7 +419,9 @@
</constant>
<constant name="FLAG_NO_FOCUS" value="4" enum="Flags">
</constant>
- <constant name="FLAG_MAX" value="5" enum="Flags">
+ <constant name="FLAG_POPUP" value="5" enum="Flags">
+ </constant>
+ <constant name="FLAG_MAX" value="6" enum="Flags">
</constant>
<constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">
</constant>
@@ -418,7 +440,7 @@
<constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect">
</constant>
<constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection">
- Automatic layout direction, determined from the parent control layout direction.
+ Automatic layout direction, determined from the parent window layout direction.
</constant>
<constant name="LAYOUT_DIRECTION_LOCALE" value="1" enum="LayoutDirection">
Automatic layout direction, determined from the current locale.
@@ -431,34 +453,34 @@
</constant>
</constants>
<theme_items>
- <theme_item name="close" data_type="icon" type="Texture2D">
+ <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
</theme_item>
- <theme_item name="close_h_ofs" data_type="constant" type="int" default="18">
- </theme_item>
- <theme_item name="close_pressed" data_type="icon" type="Texture2D">
+ <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ The color of the title outline.
</theme_item>
- <theme_item name="close_v_ofs" data_type="constant" type="int" default="18">
+ <theme_item name="close_h_ofs" data_type="constant" type="int" default="18">
</theme_item>
- <theme_item name="embedded_border" data_type="style" type="StyleBox">
+ <theme_item name="close_v_ofs" data_type="constant" type="int" default="24">
</theme_item>
<theme_item name="resize_margin" data_type="constant" type="int" default="4">
</theme_item>
<theme_item name="scaleborder_size" data_type="constant" type="int" default="4">
</theme_item>
- <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="title_height" data_type="constant" type="int" default="36">
+ </theme_item>
+ <theme_item name="title_outline_size" data_type="constant" type="int" default="0">
+ The size of the title outline.
</theme_item>
<theme_item name="title_font" data_type="font" type="Font">
</theme_item>
<theme_item name="title_font_size" data_type="font_size" type="int">
The size of the title font.
</theme_item>
- <theme_item name="title_height" data_type="constant" type="int" default="20">
+ <theme_item name="close" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The color of the title outline.
+ <theme_item name="close_pressed" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="title_outline_size" data_type="constant" type="int" default="0">
- The size of the title outline.
+ <theme_item name="embedded_border" data_type="style" type="StyleBox">
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index a6a4701dd4..b0cf126d7b 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" version="4.0">
+<class name="World2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class that has everything pertaining to a 2D world.
</brief_description>
@@ -7,7 +7,7 @@
Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
</description>
<tutorials>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<members>
<member name="canvas" type="RID" setter="" getter="get_canvas">
diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml
index 136ca2c598..c57029a180 100644
--- a/doc/classes/World3D.xml
+++ b/doc/classes/World3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="World3D" inherits="Resource" version="4.0">
+<class name="World3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Class that has everything pertaining to a world.
</brief_description>
@@ -7,7 +7,7 @@
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 title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<members>
<member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
diff --git a/doc/classes/WorldBoundaryShape2D.xml b/doc/classes/WorldBoundaryShape2D.xml
index cfbab4dcf8..cfcaede4a6 100644
--- a/doc/classes/WorldBoundaryShape2D.xml
+++ b/doc/classes/WorldBoundaryShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldBoundaryShape2D" inherits="Shape2D" version="4.0">
+<class name="WorldBoundaryShape2D" inherits="Shape2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
World boundary shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/WorldBoundaryShape3D.xml b/doc/classes/WorldBoundaryShape3D.xml
index a916ac03d0..a05c404125 100644
--- a/doc/classes/WorldBoundaryShape3D.xml
+++ b/doc/classes/WorldBoundaryShape3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldBoundaryShape3D" inherits="Shape3D" version="4.0">
+<class name="WorldBoundaryShape3D" inherits="Shape3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
World boundary shape for 3D collisions.
</brief_description>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index bd25a74c5b..8afe169874 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldEnvironment" inherits="Node" version="4.0">
+<class name="WorldEnvironment" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Default environment properties for the entire scene (post-processing effects, lighting and background settings).
</brief_description>
@@ -9,7 +9,7 @@
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>
- <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link>
+ <link title="Environment and post-processing">$DOCS_URL/tutorials/3d/environment_and_post_processing.html</link>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
<link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml
index 0af7094ee1..e5d8b45db6 100644
--- a/doc/classes/X509Certificate.xml
+++ b/doc/classes/X509Certificate.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="X509Certificate" inherits="Resource" version="4.0">
+<class name="X509Certificate" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An X509 certificate (e.g. for SSL).
</brief_description>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 4af3de8dfd..c40a07c40a 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="RefCounted" version="4.0">
+<class name="XMLParser" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/XML]XML[/url] files.
</brief_description>
diff --git a/doc/classes/XRAnchor3D.xml b/doc/classes/XRAnchor3D.xml
index 2c54c728ed..f43f822da4 100644
--- a/doc/classes/XRAnchor3D.xml
+++ b/doc/classes/XRAnchor3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRAnchor3D" inherits="XRNode3D" version="4.0">
+<class name="XRAnchor3D" inherits="XRNode3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
An anchor point in AR space.
</brief_description>
diff --git a/doc/classes/XRCamera3D.xml b/doc/classes/XRCamera3D.xml
index 31f05ca06c..e0fc016a7d 100644
--- a/doc/classes/XRCamera3D.xml
+++ b/doc/classes/XRCamera3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRCamera3D" inherits="Camera3D" version="4.0">
+<class name="XRCamera3D" inherits="Camera3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A camera node with a few overrules for AR/VR applied, such as location tracking.
</brief_description>
@@ -8,6 +8,6 @@
The position and orientation of this node is automatically updated by the XR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the XR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the XRCamera3D can lag a few milliseconds behind what is used for rendering as a result.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
</class>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index eb91196e00..deea888b8f 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRController3D" inherits="XRNode3D" version="4.0">
+<class name="XRController3D" inherits="XRNode3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A spatial node representing a spatially-tracked controller.
</brief_description>
@@ -10,7 +10,7 @@
As many XR runtimes now use a configurable action map all inputs are named.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_axis" qualifiers="const">
@@ -41,12 +41,6 @@
</description>
</method>
</methods>
- <members>
- <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
- 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>
<signal name="button_pressed">
<argument index="0" name="name" type="String" />
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 7ae70f97a2..0f4159cbbf 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRInterface" inherits="RefCounted" version="4.0">
+<class name="XRInterface" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for an XR 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 XRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform.
+ 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 GDExtension modules. 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 title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_camera_feed_id">
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index d2bb6aa59a..71f6a44724 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRInterfaceExtension" inherits="XRInterface" version="4.0">
+<class name="XRInterfaceExtension" inherits="XRInterface" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for XR interface extensions (plugins).
</brief_description>
@@ -9,46 +9,52 @@
<tutorials>
</tutorials>
<methods>
- <method name="_commit_views" qualifiers="virtual">
+ <method name="_end_frame" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="render_target" type="RID" />
- <argument index="1" name="screen_rect" type="Rect2" />
<description>
+ Called if interface is active and queues have been submitted.
</description>
</method>
<method name="_get_anchor_detection_is_enabled" qualifiers="virtual const">
<return type="bool" />
<description>
+ Return [code]true[/code] if anchor detection is enabled for this interface.
</description>
</method>
<method name="_get_camera_feed_id" qualifiers="virtual const">
<return type="int" />
<description>
+ Returns the camera feed id for the [CameraFeed] registered with the [CameraServer] that should be presented as the background on an AR capable device (if applicable).
</description>
</method>
<method name="_get_camera_transform" qualifiers="virtual">
<return type="Transform3D" />
<description>
+ Returns the [Transform3D] that positions the [XRCamera3D] in the world.
</description>
</method>
<method name="_get_capabilities" qualifiers="virtual const">
<return type="int" />
<description>
+ Returns the capabilities of this interface.
</description>
</method>
<method name="_get_name" qualifiers="virtual const">
<return type="StringName" />
<description>
+ Returns the name of this interface.
</description>
</method>
<method name="_get_play_area" qualifiers="virtual const">
<return type="PackedVector3Array" />
<description>
+ Returns an [PackedVector3Array] that denotes the play areas boundaries (if applicable).
</description>
</method>
<method name="_get_play_area_mode" qualifiers="virtual const">
<return type="int" />
<description>
+ Returns the [enum XRInterface.PlayAreaMode] that sets up our play area.
</description>
</method>
<method name="_get_projection_for_view" qualifiers="virtual">
@@ -58,27 +64,32 @@
<argument index="2" name="z_near" type="float" />
<argument index="3" name="z_far" type="float" />
<description>
+ Returns the projection matrix for the given view as a [PackedFloat64Array].
</description>
</method>
<method name="_get_render_target_size" qualifiers="virtual">
<return type="Vector2" />
<description>
+ Returns the size of our render target for this interface, this overrides the size of the [Viewport] marked as the xr viewport.
</description>
</method>
<method name="_get_suggested_pose_names" qualifiers="virtual const">
<return type="PackedStringArray" />
<argument index="0" name="tracker_name" type="StringName" />
<description>
+ Returns a [PackedStringArray] with pose names configured by this interface. Note that user configuration can override this list.
</description>
</method>
<method name="_get_suggested_tracker_names" qualifiers="virtual const">
<return type="PackedStringArray" />
<description>
+ Returns a [PackedStringArray] with tracker names configured by this interface. Note that user configuration can override this list.
</description>
</method>
<method name="_get_tracking_status" qualifiers="virtual const">
<return type="int" />
<description>
+ Returns a [enum XRInterface.TrackingStatus] specifying the current status of our tracking.
</description>
</method>
<method name="_get_transform_for_view" qualifiers="virtual">
@@ -86,50 +97,80 @@
<argument index="0" name="view" type="int" />
<argument index="1" name="cam_transform" type="Transform3D" />
<description>
+ Returns a [Transform3D] for a given view.
</description>
</method>
<method name="_get_view_count" qualifiers="virtual">
<return type="int" />
<description>
+ Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic.
</description>
</method>
<method name="_initialize" qualifiers="virtual">
<return type="bool" />
<description>
+ Initializes the interface, returns [code]true[/code] on success.
</description>
</method>
<method name="_is_initialized" qualifiers="virtual const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if this interface has been initialised.
</description>
</method>
<method name="_notification" qualifiers="virtual">
<return type="void" />
<argument index="0" name="what" type="int" />
<description>
+ Informs the interface of an applicable system notification.
+ </description>
+ </method>
+ <method name="_post_draw_viewport" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="render_target" type="RID" />
+ <argument index="1" name="screen_rect" type="Rect2" />
+ <description>
+ Called after the XR [Viewport] draw logic has completed.
+ </description>
+ </method>
+ <method name="_pre_draw_viewport" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="render_target" type="RID" />
+ <description>
+ Called if this is our primary [XRInterfaceExtension] before we start processing a [Viewport] for every active XR [Viewport], returns [code]true[/code] if that viewport should be rendered. An XR interface may return [code]false[/code] if the user has taken off their headset and we can pause rendering.
+ </description>
+ </method>
+ <method name="_pre_render" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called if this [XRInterfaceExtension] is active before rendering starts, most XR interfaces will sync tracking at this point in time.
</description>
</method>
<method name="_process" qualifiers="virtual">
<return type="void" />
<description>
+ Called if this [XRInterfaceExtension] is active before our physics and game process is called. most XR interfaces will update its [XRPositionalTracker]s at this point in time.
</description>
</method>
<method name="_set_anchor_detection_is_enabled" qualifiers="virtual">
<return type="void" />
<argument index="0" name="enabled" type="bool" />
<description>
+ Enables anchor detection on this interface if supported.
</description>
</method>
<method name="_set_play_area_mode" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="mode" type="int" />
<description>
+ Set the play area mode for this interface.
</description>
</method>
<method name="_supports_play_area_mode" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
<description>
+ Returns [code]true[/code] if this interface supports this play area mode.
</description>
</method>
<method name="_trigger_haptic_pulse" qualifiers="virtual">
@@ -141,11 +182,13 @@
<argument index="4" name="duration_sec" type="float" />
<argument index="5" name="delay_sec" type="float" />
<description>
+ Triggers a haptic pulse to be emitted on the specified tracker.
</description>
</method>
<method name="_uninitialize" qualifiers="virtual">
<return type="void" />
<description>
+ Uninitialize the interface.
</description>
</method>
<method name="add_blit">
@@ -169,6 +212,7 @@
<return type="RID" />
<argument index="0" name="render_target" type="RID" />
<description>
+ Returns a valid [RID] for a texture to which we should render the current frame if supported by the interface.
</description>
</method>
</methods>
diff --git a/doc/classes/XRNode3D.xml b/doc/classes/XRNode3D.xml
index 2e6d11d729..bb9dccc2e0 100644
--- a/doc/classes/XRNode3D.xml
+++ b/doc/classes/XRNode3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRNode3D" inherits="Node3D" version="4.0">
+<class name="XRNode3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A spatial node that has its position automatically updated by the [XRServer].
</brief_description>
diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml
index 0d8acfeb1b..b7811f4d53 100644
--- a/doc/classes/XROrigin3D.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XROrigin3D" inherits="Node3D" version="4.0">
+<class name="XROrigin3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
The origin point in AR/VR.
</brief_description>
@@ -10,7 +10,7 @@
For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
diff --git a/doc/classes/XRPose.xml b/doc/classes/XRPose.xml
index 0de2bc9e48..0e58fab9b3 100644
--- a/doc/classes/XRPose.xml
+++ b/doc/classes/XRPose.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRPose" inherits="RefCounted" version="4.0">
+<class name="XRPose" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
This object contains all data related to a pose on a tracked object.
</brief_description>
@@ -34,8 +34,22 @@
- [code]grip[/code] defines the location where the user grips the controller
- [code]skeleton[/code] defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
</member>
+ <member name="tracking_confidence" type="int" setter="set_tracking_confidence" getter="get_tracking_confidence" enum="XRPose.TrackingConfidence" default="0">
+ The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
+ </member>
<member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
The transform containing the original and transform as reported by the XR runtime.
</member>
</members>
+ <constants>
+ <constant name="XR_TRACKING_CONFIDENCE_NONE" value="0" enum="TrackingConfidence">
+ No tracking information is available for this pose.
+ </constant>
+ <constant name="XR_TRACKING_CONFIDENCE_LOW" value="1" enum="TrackingConfidence">
+ Tracking information may be inaccurate or estimated. For instance with inside out tracking this would indicate a controller may be (partially) obscured.
+ </constant>
+ <constant name="XR_TRACKING_CONFIDENCE_HIGH" value="2" enum="TrackingConfidence">
+ Tracking information is deemed accurate and up to date.
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index bd6a518835..d15558c9e8 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRPositionalTracker" inherits="RefCounted" version="4.0">
+<class name="XRPositionalTracker" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A tracked object.
</brief_description>
@@ -9,7 +9,7 @@
The [XRController3D] and [XRAnchor3D] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDExtension-based interfaces can interact with them.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_input" qualifiers="const">
@@ -54,8 +54,9 @@
<argument index="1" name="transform" type="Transform3D" />
<argument index="2" name="linear_velocity" type="Vector3" />
<argument index="3" name="angular_velocity" type="Vector3" />
+ <argument index="4" name="tracking_confidence" type="int" enum="XRPose.TrackingConfidence" />
<description>
- Sets the transform, linear velocity and angular velocity for the given pose. This method is called by a [XRInterface] implementation and should not be used directly.
+ Sets the transform, linear velocity, angular velocity and tracking confidence for the given pose. This method is called by a [XRInterface] implementation and should not be used directly.
</description>
</method>
</methods>
@@ -71,8 +72,8 @@
- [code]left_hand[/code] identifies the controller held in the players left hand
- [code]right_hand[/code] identifies the controller held in the players right hand
</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].
+ <member name="profile" type="String" setter="set_tracker_profile" getter="get_tracker_profile" default="&quot;&quot;">
+ The profile associated with this tracker, interface dependent but will indicate the type of controller being tracked.
</member>
<member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" enum="XRServer.TrackerType" default="128">
The type of tracker.
@@ -111,6 +112,12 @@
Emitted when the state of a pose tracked by this tracker changes.
</description>
</signal>
+ <signal name="profile_changed">
+ <argument index="0" name="role" type="String" />
+ <description>
+ Emitted when the profile of our tracker changes.
+ </description>
+ </signal>
</signals>
<constants>
<constant name="TRACKER_HAND_UNKNOWN" value="0" enum="TrackerHand">
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 87164ebb52..a322a3c5c9 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRServer" inherits="Object" version="4.0">
+<class name="XRServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server for AR and VR features.
</brief_description>
@@ -7,7 +7,7 @@
The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="add_interface">
@@ -69,24 +69,6 @@
Returns a list of available interfaces the ID and name of each interface.
</description>
</method>
- <method name="get_last_commit_usec">
- <return type="int" />
- <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 Time.get_ticks_usec].
- </description>
- </method>
- <method name="get_last_frame_usec">
- <return type="int" />
- <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" />
- <description>
- Returns the absolute timestamp (in μs) of the last [XRServer] process callback. The value comes from an internal call to [method Time.get_ticks_usec].
- </description>
- </method>
<method name="get_reference_frame" qualifiers="const">
<return type="Transform3D" />
<description>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index 39e34a7b96..6b1243b8c0 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="bool" version="4.0">
+<class name="bool" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Boolean built-in type.
</brief_description>
@@ -52,7 +52,7 @@
[codeblocks]
[gdscript]
var _can_shoot = true
- onready var _cool_down = $CoolDownTimer
+ @onready var _cool_down = $CoolDownTimer
func shoot():
if _can_shoot and Input.is_action_pressed("shoot"):
@@ -91,71 +91,74 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="bool" qualifiers="constructor">
+ <constructors>
+ <constructor name="bool">
<return type="bool" />
<description>
Constructs a default-initialized [bool] set to [code]false[/code].
</description>
- </method>
- <method name="bool" qualifiers="constructor">
+ </constructor>
+ <constructor name="bool">
<return type="bool" />
<argument index="0" name="from" type="bool" />
<description>
Constructs a [bool] as a copy of the given [bool].
</description>
- </method>
- <method name="bool" qualifiers="constructor">
+ </constructor>
+ <constructor name="bool">
<return type="bool" />
<argument index="0" name="from" type="float" />
<description>
Cast a [float] value to a boolean value, this method will return [code]false[/code] if [code]0.0[/code] is passed in, and [code]true[/code] for all other floats.
</description>
- </method>
- <method name="bool" qualifiers="constructor">
+ </constructor>
+ <constructor name="bool">
<return type="bool" />
<argument index="0" name="from" type="int" />
<description>
Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints.
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </constructor>
+ </constructors>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code].
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="bool" />
<description>
- Returns [code]true[/code] if left operand is [code]false[/code] and right operand is [code]true[/code].
+ Returns [code]true[/code] if the left operand is [code]false[/code] and the right operand is [code]true[/code].
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
+ Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code].
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code].
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="bool" />
<description>
- Returns [code]true[/code] if left operand is [code]true[/code] and right operand is [code]false[/code].
+ Returns [code]true[/code] if the left operand is [code]true[/code] and the right operand is [code]false[/code].
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index b45cdd2099..1fe234c567 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="float" version="4.0">
+<class name="float" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Float built-in type.
</brief_description>
@@ -12,247 +12,252 @@
<link title="Wikipedia: Double-precision floating-point format">https://en.wikipedia.org/wiki/Double-precision_floating-point_format</link>
<link title="Wikipedia: Single-precision floating-point format">https://en.wikipedia.org/wiki/Single-precision_floating-point_format</link>
</tutorials>
- <methods>
- <method name="float" qualifiers="constructor">
+ <constructors>
+ <constructor name="float">
<return type="float" />
<description>
Constructs a default-initialized [float] set to [code]0.0[/code].
</description>
- </method>
- <method name="float" qualifiers="constructor">
+ </constructor>
+ <constructor name="float">
<return type="float" />
<argument index="0" name="from" type="float" />
<description>
Constructs a [float] as a copy of the given [float].
</description>
- </method>
- <method name="float" qualifiers="constructor">
+ </constructor>
+ <constructor name="float">
<return type="float" />
<argument index="0" name="from" type="bool" />
<description>
Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0.
</description>
- </method>
- <method name="float" qualifiers="constructor">
+ </constructor>
+ <constructor name="float">
<return type="float" />
<argument index="0" name="from" type="int" />
<description>
Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code].
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </constructor>
+ </constructors>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if two floats are different from each other.
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if the integer has different value than the float.
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="right" type="float" />
+ </operator>
+ <operator name="operator *">
+ <return type="Color" />
+ <argument index="0" name="right" type="Color" />
<description>
- Multiplies two [float]s.
+ Multiplies each component of the [Color] by the given [float].
+ [codeblock]
+ print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75)
+ [/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="Quaternion" />
+ <description>
+ Multiplies each component of the [Quaternion] by the given [float]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="Vector2" />
<argument index="0" name="right" type="Vector2" />
<description>
Multiplies each component of the [Vector2] by the given [float].
[codeblock]
- print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5)
+ print(2.5 * Vector2(1, 3)) # Prints "(2.5, 7.5)"
[/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2i" />
+ </operator>
+ <operator name="operator *">
+ <return type="Vector2" />
<argument index="0" name="right" type="Vector2i" />
<description>
- Multiplies each component of the [Vector2i] by the given [float].
+ Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
[codeblock]
- print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0)
+ print(0.9 * Vector2i(10, 15)) # Prints "(9, 13.5)"
[/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
Multiplies each component of the [Vector3] by the given [float].
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector3i" />
+ </operator>
+ <operator name="operator *">
+ <return type="Vector3" />
<argument index="0" name="right" type="Vector3i" />
<description>
- Multiplies each component of the [Vector3i] by the given [float].
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Quaternion" />
- <argument index="0" name="right" type="Quaternion" />
- <description>
- Multiplies each component of the [Quaternion] by the given [float].
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="Color" />
- <description>
- Multiplies each component of the [Color] by the given [float].
+ Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
[codeblock]
- print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75)
+ print(0.9 * Vector3i(10, 15, 20)) # Prints "(9, 13.5, 18)"
[/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
+ <return type="float" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Multiplies two [float]s.
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="float" />
<argument index="0" name="right" type="int" />
<description>
Multiplies a [float] and an [int]. The result is a [float].
</description>
- </method>
- <method name="operator +" qualifiers="operator">
+ </operator>
+ <operator name="operator +">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>
Adds two floats.
</description>
- </method>
- <method name="operator +" qualifiers="operator">
+ </operator>
+ <operator name="operator +">
<return type="float" />
<argument index="0" name="right" type="int" />
<description>
Adds a [float] and an [int]. The result is a [float].
</description>
- </method>
- <method name="operator -" qualifiers="operator">
+ </operator>
+ <operator name="operator -">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>
Subtracts a float from a float.
</description>
- </method>
- <method name="operator -" qualifiers="operator">
+ </operator>
+ <operator name="operator -">
<return type="float" />
<argument index="0" name="right" type="int" />
<description>
Subtracts an [int] from a [float]. The result is a [float].
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>
Divides two floats.
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="float" />
<argument index="0" name="right" type="int" />
<description>
Divides a [float] by an [int]. The result is a [float].
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left float is less than the right one.
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is less than the given [int].
</description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is less than or equal to the given [int].
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if both floats are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method @GlobalScope.is_equal_approx] or [method @GlobalScope.is_zero_approx] instead, which are more reliable.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if the [float] and the given [int] are equal.
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left float is greater than the right one.
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is greater than the given [int].
</description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left float is greater than or equal to the right one.
</description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is greater than or equal to the given [int].
</description>
- </method>
- <method name="operator unary+" qualifiers="operator">
+ </operator>
+ <operator name="operator unary+">
<return type="float" />
<description>
Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
- </method>
- <method name="operator unary-" qualifiers="operator">
+ </operator>
+ <operator name="operator unary-">
<return type="float" />
<description>
Returns the negative value of the [float]. If positive, turns the number negative. If negative, turns the number positive. With floats, the number zero can be either positive or negative.
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index a75d11ba4a..eac7ee8dfd 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" version="4.0">
+<class name="int" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Integer built-in type.
</brief_description>
@@ -38,66 +38,68 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="int" qualifiers="constructor">
+ <constructors>
+ <constructor name="int">
<return type="int" />
<description>
Constructs a default-initialized [int] set to [code]0[/code].
</description>
- </method>
- <method name="int" qualifiers="constructor">
+ </constructor>
+ <constructor name="int">
<return type="int" />
<argument index="0" name="from" type="int" />
<description>
Constructs an [int] as a copy of the given [int].
</description>
- </method>
- <method name="int" qualifiers="constructor">
+ </constructor>
+ <constructor name="int">
<return type="int" />
<argument index="0" name="from" type="bool" />
<description>
Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0.
</description>
- </method>
- <method name="int" qualifiers="constructor">
+ </constructor>
+ <constructor name="int">
<return type="int" />
<argument index="0" name="from" type="float" />
<description>
Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [code]from[/code] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation.
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </constructor>
+ </constructors>
+ <operators>
+ <operator name="operator !=">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if operands are different from each other.
</description>
- </method>
- <method name="operator !=" qualifiers="operator">
+ </operator>
+ <operator name="operator !=">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if operands are different from each other.
</description>
- </method>
- <method name="operator %" qualifiers="operator">
+ </operator>
+ <operator name="operator %">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
- Returns the result of the modulo operator for two integers, i.e. the remainder after dividing both numbers.
+ Returns the remainder after dividing two integers. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
[codeblock]
print(5 % 2) # 1
print(12 % 4) # 0
- print(12 % 2) # 2
+ print(-5 % 3) # -2
[/codeblock]
</description>
- </method>
- <method name="operator &amp;" qualifiers="operator">
+ </operator>
+ <operator name="operator &amp;">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
@@ -114,98 +116,102 @@
do_stuff()
[/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="int" />
- <argument index="0" name="right" type="int" />
+ </operator>
+ <operator name="operator *">
+ <return type="Color" />
+ <argument index="0" name="right" type="Color" />
<description>
- Multiplies two [int]s.
+ Multiplies each component of the [Color] by the given [int].
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="right" type="float" />
+ </operator>
+ <operator name="operator *">
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="Quaternion" />
<description>
- Multiplies an [int] and a [float]. The result is a [float].
+ Multiplies each component of the [Quaternion] by the given [int]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector2" />
<argument index="0" name="right" type="Vector2" />
<description>
- Multiplies each component of the vector by the given integer.
+ Multiplies each component of the [Vector2] by the given [int].
[codeblock]
print(2 * Vector2(1, 1)) # Vector2(2, 2)
[/codeblock]
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
- Multiplies each component of the integer vector by the given integer.
+ Multiplies each component of the [Vector2i] by the given [int].
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
- Multiplies each component of the vector by the given integer.
+ Multiplies each component of the [Vector3] by the given [int].
</description>
- </method>
- <method name="operator *" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
- Multiplies each component of the integer vector by the given integer.
+ Multiplies each component of the [Vector3i] by the given [int].
</description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Quaternion" />
- <argument index="0" name="right" type="Quaternion" />
- <description>
- Multiplies each component of the quaternion by the given integer.
- </description>
- </method>
- <method name="operator *" qualifiers="operator">
- <return type="Color" />
- <argument index="0" name="right" type="Color" />
+ </operator>
+ <operator name="operator *">
+ <return type="float" />
+ <argument index="0" name="right" type="float" />
<description>
- Multiplies each component of the color by the given integer.
- [codeblock]
- print(2 * Color(0.5, 0.5, 0.5)) # Color(1, 1, 1)
- [/codeblock]
+ Multiplies an [int] and a [float]. The result is a [float].
</description>
- </method>
- <method name="operator +" qualifiers="operator">
+ </operator>
+ <operator name="operator *">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
- Adds two integers.
+ Multiplies two [int]s.
</description>
- </method>
- <method name="operator +" qualifiers="operator">
+ </operator>
+ <operator name="operator +">
+ <return type="String" />
+ <argument index="0" name="right" type="String" />
+ <description>
+ Adds Unicode character with code [int] to the [String].
+ </description>
+ </operator>
+ <operator name="operator +">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>
- Adds an [int] to a [float]. The result is a [float].
+ Adds an [int] and a [float]. The result is a [float].
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="int" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Adds two integers.
</description>
- </method>
- <method name="operator -" qualifiers="operator">
+ </operator>
+ <operator name="operator -">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>
Subtracts a [float] from an [int]. The result is a [float].
</description>
- </method>
- <method name="operator -" qualifiers="operator">
+ </operator>
+ <operator name="operator -">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
Subtracts two integers.
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>
@@ -214,8 +220,8 @@
print(10 / 3.0) # 3.333...
[/codeblock]
</description>
- </method>
- <method name="operator /" qualifiers="operator">
+ </operator>
+ <operator name="operator /">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
@@ -225,22 +231,22 @@
print(10 / 3) # 3
[/codeblock]
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is less than the given [float].
</description>
- </method>
- <method name="operator &lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is less than the right one.
</description>
- </method>
- <method name="operator &lt;&lt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;&lt;">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
@@ -250,69 +256,69 @@
print(10 &lt;&lt; 4) # 160
[/codeblock]
</description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is less than or equal to the given [float].
</description>
- </method>
- <method name="operator &lt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<description>
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if the integer is equal to the given [float].
</description>
- </method>
- <method name="operator ==" qualifiers="operator">
+ </operator>
+ <operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if both integers are equal.
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is greater than the given [float].
</description>
- </method>
- <method name="operator &gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is greater than the right one.
</description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is greater than or equal to the given [float].
</description>
- </method>
- <method name="operator &gt;=" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is greater than or equal to the right one.
</description>
- </method>
- <method name="operator &gt;&gt;" qualifiers="operator">
+ </operator>
+ <operator name="operator &gt;&gt;">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
@@ -322,8 +328,8 @@
print(10 &gt;&gt; 2) # 2
[/codeblock]
</description>
- </method>
- <method name="operator ^" qualifiers="operator">
+ </operator>
+ <operator name="operator ^">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
@@ -333,20 +339,20 @@
print(4 ^ 7) # 3
[/codeblock]
</description>
- </method>
- <method name="operator unary+" qualifiers="operator">
+ </operator>
+ <operator name="operator unary+">
<return type="int" />
<description>
Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
- </method>
- <method name="operator unary-" qualifiers="operator">
+ </operator>
+ <operator name="operator unary-">
<return type="int" />
<description>
Returns the negated value of the [int]. If positive, turns the number negative. If negative, turns the number positive. If zero, does nothing.
</description>
- </method>
- <method name="operator |" qualifiers="operator">
+ </operator>
+ <operator name="operator |">
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
@@ -363,8 +369,8 @@
flags |= 4
[/codeblock]
</description>
- </method>
- <method name="operator ~" qualifiers="operator">
+ </operator>
+ <operator name="operator ~">
<return type="int" />
<description>
Returns the result of bitwise [code]NOT[/code] operation for the integer. It's effectively equal to [code]-int + 1[/code].
@@ -373,6 +379,6 @@
print(~7) # -6
[/codeblock]
</description>
- </method>
- </methods>
+ </operator>
+ </operators>
</class>