summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml412
-rw-r--r--doc/classes/AStar2D.xml10
-rw-r--r--doc/classes/AStar3D.xml4
-rw-r--r--doc/classes/AcceptDialog.xml4
-rw-r--r--doc/classes/Animation.xml4
-rw-r--r--doc/classes/AnimationLibrary.xml8
-rw-r--r--doc/classes/AnimationNode.xml4
-rw-r--r--doc/classes/AnimationNodeAdd2.xml7
-rw-r--r--doc/classes/AnimationNodeAdd3.xml7
-rw-r--r--doc/classes/AnimationNodeBlend2.xml7
-rw-r--r--doc/classes/AnimationNodeBlend3.xml7
-rw-r--r--doc/classes/AnimationNodeBlendSpace1D.xml4
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml4
-rw-r--r--doc/classes/AnimationNodeOneShot.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml6
-rw-r--r--doc/classes/AnimationNodeSync.xml15
-rw-r--r--doc/classes/AnimationNodeTransition.xml5
-rw-r--r--doc/classes/AnimationPlayer.xml47
-rw-r--r--doc/classes/AnimationTree.xml3
-rw-r--r--doc/classes/Array.xml10
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AudioEffectAmplify.xml2
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml1
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml1
-rw-r--r--doc/classes/AudioEffectCapture.xml1
-rw-r--r--doc/classes/AudioEffectChorus.xml1
-rw-r--r--doc/classes/AudioEffectCompressor.xml1
-rw-r--r--doc/classes/AudioEffectDelay.xml1
-rw-r--r--doc/classes/AudioEffectEQ.xml1
-rw-r--r--doc/classes/AudioEffectEQ10.xml1
-rw-r--r--doc/classes/AudioEffectEQ21.xml1
-rw-r--r--doc/classes/AudioEffectEQ6.xml3
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml3
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml3
-rw-r--r--doc/classes/AudioEffectLimiter.xml1
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml3
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml3
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml1
-rw-r--r--doc/classes/AudioEffectPanner.xml3
-rw-r--r--doc/classes/AudioEffectPhaser.xml3
-rw-r--r--doc/classes/AudioEffectPitchShift.xml3
-rw-r--r--doc/classes/AudioEffectRecord.xml6
-rw-r--r--doc/classes/AudioEffectReverb.xml4
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml1
-rw-r--r--doc/classes/AudioServer.xml6
-rw-r--r--doc/classes/AudioStream.xml18
-rw-r--r--doc/classes/AudioStreamPlayback.xml7
-rw-r--r--doc/classes/AudioStreamPlayer.xml1
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml4
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml4
-rw-r--r--doc/classes/AudioStreamWAV.xml (renamed from doc/classes/AudioStreamSample.xml)10
-rw-r--r--doc/classes/BaseMaterial3D.xml11
-rw-r--r--doc/classes/BoneMap.xml56
-rw-r--r--doc/classes/Button.xml26
-rw-r--r--doc/classes/CPUParticles2D.xml4
-rw-r--r--doc/classes/CPUParticles3D.xml4
-rw-r--r--doc/classes/Camera3D.xml12
-rw-r--r--doc/classes/CanvasItem.xml78
-rw-r--r--doc/classes/CharacterBody3D.xml4
-rw-r--r--doc/classes/CodeEdit.xml3
-rw-r--r--doc/classes/CollisionObject2D.xml7
-rw-r--r--doc/classes/CollisionObject3D.xml7
-rw-r--r--doc/classes/ColorPicker.xml25
-rw-r--r--doc/classes/ColorPickerButton.xml2
-rw-r--r--doc/classes/ConfirmationDialog.xml3
-rw-r--r--doc/classes/Control.xml20
-rw-r--r--doc/classes/CurveTexture.xml8
-rw-r--r--doc/classes/CurveXYZTexture.xml7
-rw-r--r--doc/classes/Decal.xml27
-rw-r--r--doc/classes/DisplayServer.xml4
-rw-r--r--doc/classes/EditorExportPlugin.xml2
-rw-r--r--doc/classes/EditorFeatureProfile.xml2
-rw-r--r--doc/classes/EditorFileDialog.xml6
-rw-r--r--doc/classes/EditorPaths.xml6
-rw-r--r--doc/classes/EditorPlugin.xml22
-rw-r--r--doc/classes/EditorProperty.xml9
-rw-r--r--doc/classes/EditorScenePostImportPlugin.xml6
-rw-r--r--doc/classes/EditorSettings.xml454
-rw-r--r--doc/classes/Engine.xml6
-rw-r--r--doc/classes/Environment.xml9
-rw-r--r--doc/classes/Expression.xml1
-rw-r--r--doc/classes/File.xml5
-rw-r--r--doc/classes/FileDialog.xml10
-rw-r--r--doc/classes/Font.xml297
-rw-r--r--doc/classes/FontFile.xml (renamed from doc/classes/FontData.xml)250
-rw-r--r--doc/classes/FontVariation.xml76
-rw-r--r--doc/classes/GPUParticles2D.xml4
-rw-r--r--doc/classes/GPUParticles3D.xml4
-rw-r--r--doc/classes/Geometry2D.xml12
-rw-r--r--doc/classes/GradientTexture1D.xml2
-rw-r--r--doc/classes/GradientTexture2D.xml2
-rw-r--r--doc/classes/GraphEdit.xml23
-rw-r--r--doc/classes/GraphNode.xml21
-rw-r--r--doc/classes/HTTPRequest.xml34
-rw-r--r--doc/classes/Image.xml89
-rw-r--r--doc/classes/ImageTexture.xml26
-rw-r--r--doc/classes/ImporterMesh.xml12
-rw-r--r--doc/classes/Input.xml5
-rw-r--r--doc/classes/InputEventMouseMotion.xml4
-rw-r--r--doc/classes/ItemList.xml29
-rw-r--r--doc/classes/Label.xml81
-rw-r--r--doc/classes/Label3D.xml47
-rw-r--r--doc/classes/LabelSettings.xml29
-rw-r--r--doc/classes/Light3D.xml1
-rw-r--r--doc/classes/LightmapGI.xml44
-rw-r--r--doc/classes/LightmapGIData.xml10
-rw-r--r--doc/classes/LightmapProbe.xml3
-rw-r--r--doc/classes/Lightmapper.xml3
-rw-r--r--doc/classes/LightmapperRD.xml3
-rw-r--r--doc/classes/LineEdit.xml21
-rw-r--r--doc/classes/LinkButton.xml23
-rw-r--r--doc/classes/Mesh.xml27
-rw-r--r--doc/classes/MeshInstance2D.xml2
-rw-r--r--doc/classes/MeshInstance3D.xml2
-rw-r--r--doc/classes/MovieWriter.xml76
-rw-r--r--doc/classes/MultiMesh.xml3
-rw-r--r--doc/classes/MultiplayerAPI.xml100
-rw-r--r--doc/classes/MultiplayerAPIExtension.xml141
-rw-r--r--doc/classes/MultiplayerPeer.xml11
-rw-r--r--doc/classes/MultiplayerPeerExtension.xml13
-rw-r--r--doc/classes/MultiplayerSpawner.xml67
-rw-r--r--doc/classes/MultiplayerSynchronizer.xml17
-rw-r--r--doc/classes/NavigationAgent2D.xml40
-rw-r--r--doc/classes/NavigationAgent3D.xml40
-rw-r--r--doc/classes/NavigationMesh.xml7
-rw-r--r--doc/classes/NavigationMeshGenerator.xml1
-rw-r--r--doc/classes/NavigationRegion2D.xml25
-rw-r--r--doc/classes/NavigationRegion3D.xml25
-rw-r--r--doc/classes/NavigationServer2D.xml59
-rw-r--r--doc/classes/NavigationServer3D.xml64
-rw-r--r--doc/classes/Node.xml32
-rw-r--r--doc/classes/Node2D.xml1
-rw-r--r--doc/classes/Node3D.xml8
-rw-r--r--doc/classes/NodePath.xml6
-rw-r--r--doc/classes/ORMMaterial3D.xml3
-rw-r--r--doc/classes/OS.xml66
-rw-r--r--doc/classes/Object.xml12
-rw-r--r--doc/classes/OptionButton.xml4
-rw-r--r--doc/classes/PackedByteArray.xml10
-rw-r--r--doc/classes/ParticlesMaterial.xml93
-rw-r--r--doc/classes/Plane.xml10
-rw-r--r--doc/classes/PopupMenu.xml40
-rw-r--r--doc/classes/ProjectSettings.xml153
-rw-r--r--doc/classes/Projection.xml273
-rw-r--r--doc/classes/Quaternion.xml20
-rw-r--r--doc/classes/RenderingDevice.xml2
-rw-r--r--doc/classes/RenderingServer.xml206
-rw-r--r--doc/classes/ResourceFormatLoader.xml6
-rw-r--r--doc/classes/ResourceFormatSaver.xml4
-rw-r--r--doc/classes/ResourceLoader.xml19
-rw-r--r--doc/classes/ResourceSaver.xml40
-rw-r--r--doc/classes/RichTextLabel.xml44
-rw-r--r--doc/classes/RootMotionView.xml12
-rw-r--r--doc/classes/SceneReplicationConfig.xml67
-rw-r--r--doc/classes/SceneTree.xml9
-rw-r--r--doc/classes/ScriptCreateDialog.xml1
-rw-r--r--doc/classes/ScriptExtension.xml4
-rw-r--r--doc/classes/ScriptLanguageExtension.xml9
-rw-r--r--doc/classes/ScrollContainer.xml2
-rw-r--r--doc/classes/ShaderInclude.xml13
-rw-r--r--doc/classes/ShapeCast2D.xml18
-rw-r--r--doc/classes/ShapeCast3D.xml168
-rw-r--r--doc/classes/Skeleton3D.xml4
-rw-r--r--doc/classes/SkeletonProfile.xml193
-rw-r--r--doc/classes/SkeletonProfileHumanoid.xml16
-rw-r--r--doc/classes/SpriteBase3D.xml2
-rw-r--r--doc/classes/SpriteFrames.xml5
-rw-r--r--doc/classes/StandardMaterial3D.xml4
-rw-r--r--doc/classes/String.xml25
-rw-r--r--doc/classes/StyleBox.xml4
-rw-r--r--doc/classes/SurfaceTool.xml47
-rw-r--r--doc/classes/SystemFont.xml44
-rw-r--r--doc/classes/TabBar.xml24
-rw-r--r--doc/classes/TextEdit.xml29
-rw-r--r--doc/classes/TextLine.xml34
-rw-r--r--doc/classes/TextMesh.xml25
-rw-r--r--doc/classes/TextParagraph.xml56
-rw-r--r--doc/classes/TextServer.xml222
-rw-r--r--doc/classes/TextServerExtension.xml96
-rw-r--r--doc/classes/Theme.xml11
-rw-r--r--doc/classes/Thread.xml7
-rw-r--r--doc/classes/TileData.xml9
-rw-r--r--doc/classes/TileMap.xml23
-rw-r--r--doc/classes/TileSet.xml39
-rw-r--r--doc/classes/Transform2D.xml47
-rw-r--r--doc/classes/Transform3D.xml57
-rw-r--r--doc/classes/Tree.xml25
-rw-r--r--doc/classes/TreeItem.xml32
-rw-r--r--doc/classes/Tween.xml40
-rw-r--r--doc/classes/Vector2.xml10
-rw-r--r--doc/classes/Vector3.xml10
-rw-r--r--doc/classes/Vector4.xml332
-rw-r--r--doc/classes/Vector4i.xml214
-rw-r--r--doc/classes/VehicleBody3D.xml2
-rw-r--r--doc/classes/VehicleWheel3D.xml2
-rw-r--r--doc/classes/VideoStreamPlayer.xml2
-rw-r--r--doc/classes/Viewport.xml103
-rw-r--r--doc/classes/VisualShader.xml4
-rw-r--r--doc/classes/VisualShaderNodeTextureUniform.xml9
-rw-r--r--doc/classes/VoxelGI.xml1
-rw-r--r--doc/classes/VoxelGIData.xml6
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/Window.xml120
-rw-r--r--doc/classes/WorkerThreadPool.xml59
-rw-r--r--doc/classes/World3D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml1
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--doc/classes/XRCamera3D.xml2
-rw-r--r--doc/classes/XRController3D.xml2
-rw-r--r--doc/classes/XRInterface.xml2
-rw-r--r--doc/classes/XRInterfaceExtension.xml5
-rw-r--r--doc/classes/XROrigin3D.xml2
-rw-r--r--doc/classes/XRPositionalTracker.xml2
-rw-r--r--doc/classes/XRServer.xml2
-rw-r--r--doc/classes/float.xml12
-rw-r--r--doc/classes/int.xml12
216 files changed, 4971 insertions, 1819 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index dce96fb315..709863b70f 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -106,6 +106,17 @@
[/codeblock]
</description>
</method>
+ <method name="bezier_interpolate">
+ <return type="float" />
+ <argument index="0" name="start" type="float" />
+ <argument index="1" name="control_1" type="float" />
+ <argument index="2" name="control_2" type="float" />
+ <argument index="3" name="end" type="float" />
+ <argument index="4" name="t" type="float" />
+ <description>
+ Returns the point at the given [code]t[/code] on a one-dimnesional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [code]control_1[/code], [code]control_2[/code], and [code]end[/code] points.
+ </description>
+ </method>
<method name="bytes2var">
<return type="Variant" />
<argument index="0" name="bytes" type="PackedByteArray" />
@@ -646,6 +657,16 @@
[b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
</description>
</method>
+ <method name="print_rich" qualifiers="vararg">
+ <description>
+ Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as [code]red[/code], [i]not[/i] hexadecimal color codes. Unsupported tags will be left as-is in standard output.
+ When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Displaying ANSI escape codes is currently only supported on Linux and macOS. Support for ANSI escape codes may vary across terminal emulators, especially for italic and strikethrough.
+ [codeblock]
+ print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b]
+ [/codeblock]
+ [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
+ </description>
+ </method>
<method name="print_verbose" qualifiers="vararg">
<description>
If verbose mode is enabled ([method OS.is_stdout_verbose] returning [code]true[/code]), converts one or more arguments of any type to string in the best way possible and prints them to the console.
@@ -1040,6 +1061,27 @@
A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
</description>
</method>
+ <method name="wrap">
+ <return type="Variant" />
+ <argument index="0" name="value" type="Variant" />
+ <argument index="1" name="min" type="Variant" />
+ <argument index="2" name="max" type="Variant" />
+ <description>
+ Wraps the [Variant] [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Usable for creating loop-alike behavior or infinite surfaces.
+ Variant types [int] and [float] (real) are supported. If any of the argument is [float] the result will be [float], otherwise it is [int].
+ [codeblock]
+ var a = wrap(4, 5, 10)
+ # a is 9 (int)
+
+ var a = wrap(7, 5, 10)
+ # a is 7 (int)
+
+ var a = wrap(10.5, 5, 10)
+ # a is 5.5 (float)
+ [/codeblock]
+ </description>
+ </method>
<method name="wrapf">
<return type="float" />
<argument index="0" name="value" type="float" />
@@ -1180,6 +1222,8 @@
<member name="VisualScriptCustomNodes" type="VisualScriptCustomNodes" setter="" getter="">
The [VisualScriptCustomNodes] singleton.
</member>
+ <member name="WorkerThreadPool" type="WorkerThreadPool" setter="" getter="">
+ </member>
<member name="XRServer" type="XRServer" setter="" getter="">
The [XRServer] singleton.
</member>
@@ -1414,6 +1458,63 @@
<constant name="KEY_F16" value="16777259" enum="Key">
F16 key.
</constant>
+ <constant name="KEY_F17" value="16777260" enum="Key">
+ F17 key.
+ </constant>
+ <constant name="KEY_F18" value="16777261" enum="Key">
+ F18 key.
+ </constant>
+ <constant name="KEY_F19" value="16777262" enum="Key">
+ F19 key.
+ </constant>
+ <constant name="KEY_F20" value="16777263" enum="Key">
+ F20 key.
+ </constant>
+ <constant name="KEY_F21" value="16777264" enum="Key">
+ F21 key.
+ </constant>
+ <constant name="KEY_F22" value="16777265" enum="Key">
+ F22 key.
+ </constant>
+ <constant name="KEY_F23" value="16777266" enum="Key">
+ F23 key.
+ </constant>
+ <constant name="KEY_F24" value="16777267" enum="Key">
+ F24 key.
+ </constant>
+ <constant name="KEY_F25" value="16777268" enum="Key">
+ F25 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F26" value="16777269" enum="Key">
+ F26 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F27" value="16777270" enum="Key">
+ F27 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F28" value="16777271" enum="Key">
+ F28 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F29" value="16777272" enum="Key">
+ F29 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F30" value="16777273" enum="Key">
+ F30 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F31" value="16777274" enum="Key">
+ F31 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F32" value="16777275" enum="Key">
+ F32 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F33" value="16777276" enum="Key">
+ F33 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F34" value="16777277" enum="Key">
+ F34 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F35" value="16777278" enum="Key">
+ F35 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
<constant name="KEY_KP_MULTIPLY" value="16777345" enum="Key">
Multiply (*) key on the numeric keypad.
</constant>
@@ -1459,148 +1560,148 @@
<constant name="KEY_KP_9" value="16777359" enum="Key">
Number 9 on the numeric keypad.
</constant>
- <constant name="KEY_SUPER_L" value="16777260" enum="Key">
+ <constant name="KEY_SUPER_L" value="16777280" enum="Key">
Left Super key (Windows key).
</constant>
- <constant name="KEY_SUPER_R" value="16777261" enum="Key">
+ <constant name="KEY_SUPER_R" value="16777281" enum="Key">
Right Super key (Windows key).
</constant>
- <constant name="KEY_MENU" value="16777262" enum="Key">
+ <constant name="KEY_MENU" value="16777282" enum="Key">
Context menu key.
</constant>
- <constant name="KEY_HYPER_L" value="16777263" enum="Key">
+ <constant name="KEY_HYPER_L" value="16777283" enum="Key">
Left Hyper key.
</constant>
- <constant name="KEY_HYPER_R" value="16777264" enum="Key">
+ <constant name="KEY_HYPER_R" value="16777284" enum="Key">
Right Hyper key.
</constant>
- <constant name="KEY_HELP" value="16777265" enum="Key">
+ <constant name="KEY_HELP" value="16777285" enum="Key">
Help key.
</constant>
- <constant name="KEY_DIRECTION_L" value="16777266" enum="Key">
+ <constant name="KEY_DIRECTION_L" value="16777286" enum="Key">
Left Direction key.
</constant>
- <constant name="KEY_DIRECTION_R" value="16777267" enum="Key">
+ <constant name="KEY_DIRECTION_R" value="16777287" enum="Key">
Right Direction key.
</constant>
- <constant name="KEY_BACK" value="16777280" enum="Key">
+ <constant name="KEY_BACK" value="16777288" enum="Key">
Media back key. Not to be confused with the Back button on an Android device.
</constant>
- <constant name="KEY_FORWARD" value="16777281" enum="Key">
+ <constant name="KEY_FORWARD" value="16777289" enum="Key">
Media forward key.
</constant>
- <constant name="KEY_STOP" value="16777282" enum="Key">
+ <constant name="KEY_STOP" value="16777290" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_REFRESH" value="16777283" enum="Key">
+ <constant name="KEY_REFRESH" value="16777291" enum="Key">
Media refresh key.
</constant>
- <constant name="KEY_VOLUMEDOWN" value="16777284" enum="Key">
+ <constant name="KEY_VOLUMEDOWN" value="16777292" enum="Key">
Volume down key.
</constant>
- <constant name="KEY_VOLUMEMUTE" value="16777285" enum="Key">
+ <constant name="KEY_VOLUMEMUTE" value="16777293" enum="Key">
Mute volume key.
</constant>
- <constant name="KEY_VOLUMEUP" value="16777286" enum="Key">
+ <constant name="KEY_VOLUMEUP" value="16777294" enum="Key">
Volume up key.
</constant>
- <constant name="KEY_BASSBOOST" value="16777287" enum="Key">
+ <constant name="KEY_BASSBOOST" value="16777295" enum="Key">
Bass Boost key.
</constant>
- <constant name="KEY_BASSUP" value="16777288" enum="Key">
+ <constant name="KEY_BASSUP" value="16777296" enum="Key">
Bass up key.
</constant>
- <constant name="KEY_BASSDOWN" value="16777289" enum="Key">
+ <constant name="KEY_BASSDOWN" value="16777297" enum="Key">
Bass down key.
</constant>
- <constant name="KEY_TREBLEUP" value="16777290" enum="Key">
+ <constant name="KEY_TREBLEUP" value="16777298" enum="Key">
Treble up key.
</constant>
- <constant name="KEY_TREBLEDOWN" value="16777291" enum="Key">
+ <constant name="KEY_TREBLEDOWN" value="16777299" enum="Key">
Treble down key.
</constant>
- <constant name="KEY_MEDIAPLAY" value="16777292" enum="Key">
+ <constant name="KEY_MEDIAPLAY" value="16777300" enum="Key">
Media play key.
</constant>
- <constant name="KEY_MEDIASTOP" value="16777293" enum="Key">
+ <constant name="KEY_MEDIASTOP" value="16777301" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="Key">
+ <constant name="KEY_MEDIAPREVIOUS" value="16777302" enum="Key">
Previous song key.
</constant>
- <constant name="KEY_MEDIANEXT" value="16777295" enum="Key">
+ <constant name="KEY_MEDIANEXT" value="16777303" enum="Key">
Next song key.
</constant>
- <constant name="KEY_MEDIARECORD" value="16777296" enum="Key">
+ <constant name="KEY_MEDIARECORD" value="16777304" enum="Key">
Media record key.
</constant>
- <constant name="KEY_HOMEPAGE" value="16777297" enum="Key">
+ <constant name="KEY_HOMEPAGE" value="16777305" enum="Key">
Home page key.
</constant>
- <constant name="KEY_FAVORITES" value="16777298" enum="Key">
+ <constant name="KEY_FAVORITES" value="16777306" enum="Key">
Favorites key.
</constant>
- <constant name="KEY_SEARCH" value="16777299" enum="Key">
+ <constant name="KEY_SEARCH" value="16777307" enum="Key">
Search key.
</constant>
- <constant name="KEY_STANDBY" value="16777300" enum="Key">
+ <constant name="KEY_STANDBY" value="16777308" enum="Key">
Standby key.
</constant>
- <constant name="KEY_OPENURL" value="16777301" enum="Key">
+ <constant name="KEY_OPENURL" value="16777309" enum="Key">
Open URL / Launch Browser key.
</constant>
- <constant name="KEY_LAUNCHMAIL" value="16777302" enum="Key">
+ <constant name="KEY_LAUNCHMAIL" value="16777310" enum="Key">
Launch Mail key.
</constant>
- <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="Key">
+ <constant name="KEY_LAUNCHMEDIA" value="16777311" enum="Key">
Launch Media key.
</constant>
- <constant name="KEY_LAUNCH0" value="16777304" enum="Key">
+ <constant name="KEY_LAUNCH0" value="16777312" enum="Key">
Launch Shortcut 0 key.
</constant>
- <constant name="KEY_LAUNCH1" value="16777305" enum="Key">
+ <constant name="KEY_LAUNCH1" value="16777313" enum="Key">
Launch Shortcut 1 key.
</constant>
- <constant name="KEY_LAUNCH2" value="16777306" enum="Key">
+ <constant name="KEY_LAUNCH2" value="16777314" enum="Key">
Launch Shortcut 2 key.
</constant>
- <constant name="KEY_LAUNCH3" value="16777307" enum="Key">
+ <constant name="KEY_LAUNCH3" value="16777315" enum="Key">
Launch Shortcut 3 key.
</constant>
- <constant name="KEY_LAUNCH4" value="16777308" enum="Key">
+ <constant name="KEY_LAUNCH4" value="16777316" enum="Key">
Launch Shortcut 4 key.
</constant>
- <constant name="KEY_LAUNCH5" value="16777309" enum="Key">
+ <constant name="KEY_LAUNCH5" value="16777317" enum="Key">
Launch Shortcut 5 key.
</constant>
- <constant name="KEY_LAUNCH6" value="16777310" enum="Key">
+ <constant name="KEY_LAUNCH6" value="16777318" enum="Key">
Launch Shortcut 6 key.
</constant>
- <constant name="KEY_LAUNCH7" value="16777311" enum="Key">
+ <constant name="KEY_LAUNCH7" value="16777319" enum="Key">
Launch Shortcut 7 key.
</constant>
- <constant name="KEY_LAUNCH8" value="16777312" enum="Key">
+ <constant name="KEY_LAUNCH8" value="16777320" enum="Key">
Launch Shortcut 8 key.
</constant>
- <constant name="KEY_LAUNCH9" value="16777313" enum="Key">
+ <constant name="KEY_LAUNCH9" value="16777321" enum="Key">
Launch Shortcut 9 key.
</constant>
- <constant name="KEY_LAUNCHA" value="16777314" enum="Key">
+ <constant name="KEY_LAUNCHA" value="16777322" enum="Key">
Launch Shortcut A key.
</constant>
- <constant name="KEY_LAUNCHB" value="16777315" enum="Key">
+ <constant name="KEY_LAUNCHB" value="16777323" enum="Key">
Launch Shortcut B key.
</constant>
- <constant name="KEY_LAUNCHC" value="16777316" enum="Key">
+ <constant name="KEY_LAUNCHC" value="16777324" enum="Key">
Launch Shortcut C key.
</constant>
- <constant name="KEY_LAUNCHD" value="16777317" enum="Key">
+ <constant name="KEY_LAUNCHD" value="16777325" enum="Key">
Launch Shortcut D key.
</constant>
- <constant name="KEY_LAUNCHE" value="16777318" enum="Key">
+ <constant name="KEY_LAUNCHE" value="16777326" enum="Key">
Launch Shortcut E key.
</constant>
- <constant name="KEY_LAUNCHF" value="16777319" enum="Key">
+ <constant name="KEY_LAUNCHF" value="16777327" enum="Key">
Launch Shortcut F key.
</constant>
<constant name="KEY_UNKNOWN" value="33554431" enum="Key">
@@ -2403,7 +2504,7 @@
</constant>
<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code].
- Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "noslider" to hide the slider.
+ Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "no_slider" to hide the slider.
</constant>
<constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string.
@@ -2416,51 +2517,51 @@
<constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing.
</constant>
- <constant name="PROPERTY_HINT_LENGTH" value="5" enum="PropertyHint">
- Deprecated hint, unused.
+ <constant name="PROPERTY_HINT_LINK" value="5" enum="PropertyHint">
+ Hints that a vector property should allow linking values (e.g. to edit both [code]x[/code] and [code]y[/code] together).
</constant>
- <constant name="PROPERTY_HINT_KEY_ACCEL" value="6" enum="PropertyHint">
- Deprecated hint, unused.
- </constant>
- <constant name="PROPERTY_HINT_FLAGS" value="7" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_FLAGS" value="6" enum="PropertyHint">
Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="8" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="7" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D render layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="9" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="8" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D physics layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="10" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="9" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D render layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D physics layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="13" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
+ <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="12" enum="PropertyHint">
+ Hints that an integer property is a bitmask using the optionally named 3D navigation layers.
</constant>
- <constant name="PROPERTY_HINT_FILE" value="14" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint">
Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
- <constant name="PROPERTY_HINT_DIR" value="15" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint">
Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_FILE" value="16" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint">
Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_DIR" value="17" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint">
Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
</constant>
- <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="18" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint">
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
- <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="19" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
</constant>
+ <constant name="PROPERTY_HINT_EXPRESSION" value="19" enum="PropertyHint">
+ Hints that a string property is an [Expression].
+ </constant>
<constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint">
Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
</constant>
@@ -2509,100 +2610,100 @@
</constant>
<constant name="PROPERTY_HINT_SAVE_FILE" value="37" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="38" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="38" enum="PropertyHint">
+ </constant>
+ <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="39" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_INT_IS_POINTER" value="41" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_ARRAY_TYPE" value="40" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_LOCALE_ID" value="41" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LOCALE_ID" value="42" enum="PropertyHint">
Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
</constant>
- <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="42" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="43" enum="PropertyHint">
Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
</constant>
- <constant name="PROPERTY_HINT_MAX" value="43" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_NODE_TYPE" value="44" enum="PropertyHint">
+ </constant>
+ <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint">
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags">
The property is serialized and saved in the scene file (default).
</constant>
- <constant name="PROPERTY_USAGE_EDITOR" value="2" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags">
The property is shown in the editor inspector (default).
</constant>
- <constant name="PROPERTY_USAGE_NETWORK" value="4" enum="PropertyUsageFlags">
- Deprecated usage flag, unused.
- </constant>
- <constant name="PROPERTY_USAGE_EDITOR_HELPER" value="8" enum="PropertyUsageFlags">
- Deprecated usage flag, unused.
- </constant>
- <constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags">
The property can be checked in the editor inspector.
</constant>
- <constant name="PROPERTY_USAGE_CHECKED" value="32" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags">
The property is checked in the editor inspector.
</constant>
- <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="64" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags">
The property is a translatable string.
</constant>
- <constant name="PROPERTY_USAGE_GROUP" value="128" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_GROUP" value="64" enum="PropertyUsageFlags">
Used to group properties together in the editor. See [EditorInspector].
</constant>
- <constant name="PROPERTY_USAGE_CATEGORY" value="256" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CATEGORY" value="128" enum="PropertyUsageFlags">
Used to categorize properties together in the editor.
</constant>
- <constant name="PROPERTY_USAGE_SUBGROUP" value="512" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags">
Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector].
</constant>
- <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags">
+ </constant>
+ <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags">
The property does not save its state in [PackedScene].
</constant>
- <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="2048" enum="PropertyUsageFlags">
Editing the property prompts the user for restarting the editor.
</constant>
- <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="4096" enum="PropertyUsageFlags">
The property is a script variable which should be serialized and saved in the scene file.
</constant>
- <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="16384" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="32768" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="16384" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="65536" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="32768" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="131072" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="65536" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="262144" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="131072" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="524288" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="262144" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_INTERNAL" value="1048576" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_INTERNAL" value="524288" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="2097152" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="1048576" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="4194304" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="2097152" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="8388608" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="4194304" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="16777216" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="8388608" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="33554432" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="16777216" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="67108864" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="33554432" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="134217728" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="67108864" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="268435456" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_ARRAY" value="1073741824" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags">
Default usage (storage, editor and network).
</constant>
- <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="38" enum="PropertyUsageFlags">
Default usage for translatable strings (storage, editor, network and internationalized).
</constant>
- <constant name="PROPERTY_USAGE_NO_EDITOR" value="5" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags">
Default usage but without showing the property in the editor (storage, network).
</constant>
<constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags">
@@ -2611,49 +2712,22 @@
<constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags">
Flag for an editor method.
</constant>
- <constant name="METHOD_FLAG_NOSCRIPT" value="4" enum="MethodFlags">
- Deprecated method flag, unused.
- </constant>
- <constant name="METHOD_FLAG_CONST" value="8" enum="MethodFlags">
+ <constant name="METHOD_FLAG_CONST" value="4" enum="MethodFlags">
Flag for a constant method.
</constant>
- <constant name="METHOD_FLAG_REVERSE" value="16" enum="MethodFlags">
- Deprecated method flag, unused.
- </constant>
- <constant name="METHOD_FLAG_VIRTUAL" value="32" enum="MethodFlags">
+ <constant name="METHOD_FLAG_VIRTUAL" value="8" enum="MethodFlags">
Flag for a virtual method.
</constant>
- <constant name="METHOD_FLAG_FROM_SCRIPT" value="64" enum="MethodFlags">
- Deprecated method flag, unused.
- </constant>
- <constant name="METHOD_FLAG_VARARG" value="128" enum="MethodFlags">
+ <constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags">
</constant>
- <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags">
+ <constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags">
</constant>
- <constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags">
+ <constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags">
Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API.
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags.
</constant>
- <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
- Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
- </constant>
- <constant name="RPC_MODE_ANY_PEER" value="1" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
- </constant>
- <constant name="RPC_MODE_AUTHORITY" value="2" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(authority)[/code] annotation. See [method Node.set_multiplayer_authority].
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
- </constant>
- <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
- </constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is [code]null[/code].
</constant>
@@ -2690,76 +2764,82 @@
<constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type">
Variable is of type [Transform2D].
</constant>
- <constant name="TYPE_PLANE" value="12" enum="Variant.Type">
+ <constant name="TYPE_VECTOR4" value="12" enum="Variant.Type">
+ </constant>
+ <constant name="TYPE_VECTOR4I" value="13" enum="Variant.Type">
+ </constant>
+ <constant name="TYPE_PLANE" value="14" enum="Variant.Type">
Variable is of type [Plane].
</constant>
- <constant name="TYPE_QUATERNION" value="13" enum="Variant.Type">
+ <constant name="TYPE_QUATERNION" value="15" enum="Variant.Type">
Variable is of type [Quaternion].
</constant>
- <constant name="TYPE_AABB" value="14" enum="Variant.Type">
+ <constant name="TYPE_AABB" value="16" enum="Variant.Type">
Variable is of type [AABB].
</constant>
- <constant name="TYPE_BASIS" value="15" enum="Variant.Type">
+ <constant name="TYPE_BASIS" value="17" enum="Variant.Type">
Variable is of type [Basis].
</constant>
- <constant name="TYPE_TRANSFORM3D" value="16" enum="Variant.Type">
+ <constant name="TYPE_TRANSFORM3D" value="18" enum="Variant.Type">
Variable is of type [Transform3D].
</constant>
- <constant name="TYPE_COLOR" value="17" enum="Variant.Type">
+ <constant name="TYPE_PROJECTION" value="19" enum="Variant.Type">
+ </constant>
+ <constant name="TYPE_COLOR" value="20" enum="Variant.Type">
Variable is of type [Color].
</constant>
- <constant name="TYPE_STRING_NAME" value="18" enum="Variant.Type">
+ <constant name="TYPE_STRING_NAME" value="21" enum="Variant.Type">
Variable is of type [StringName].
</constant>
- <constant name="TYPE_NODE_PATH" value="19" enum="Variant.Type">
+ <constant name="TYPE_NODE_PATH" value="22" enum="Variant.Type">
Variable is of type [NodePath].
</constant>
- <constant name="TYPE_RID" value="20" enum="Variant.Type">
+ <constant name="TYPE_RID" value="23" enum="Variant.Type">
Variable is of type [RID].
</constant>
- <constant name="TYPE_OBJECT" value="21" enum="Variant.Type">
+ <constant name="TYPE_OBJECT" value="24" enum="Variant.Type">
Variable is of type [Object].
</constant>
- <constant name="TYPE_CALLABLE" value="22" enum="Variant.Type">
+ <constant name="TYPE_CALLABLE" value="25" enum="Variant.Type">
Variable is of type [Callable].
</constant>
- <constant name="TYPE_SIGNAL" value="23" enum="Variant.Type">
+ <constant name="TYPE_SIGNAL" value="26" enum="Variant.Type">
Variable is of type [Signal].
</constant>
- <constant name="TYPE_DICTIONARY" value="24" enum="Variant.Type">
+ <constant name="TYPE_DICTIONARY" value="27" enum="Variant.Type">
Variable is of type [Dictionary].
</constant>
- <constant name="TYPE_ARRAY" value="25" enum="Variant.Type">
+ <constant name="TYPE_ARRAY" value="28" enum="Variant.Type">
Variable is of type [Array].
</constant>
- <constant name="TYPE_PACKED_BYTE_ARRAY" value="26" enum="Variant.Type">
+ <constant name="TYPE_PACKED_BYTE_ARRAY" value="29" enum="Variant.Type">
Variable is of type [PackedByteArray].
</constant>
- <constant name="TYPE_PACKED_INT32_ARRAY" value="27" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT32_ARRAY" value="30" enum="Variant.Type">
Variable is of type [PackedInt32Array].
</constant>
- <constant name="TYPE_PACKED_INT64_ARRAY" value="28" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT64_ARRAY" value="31" enum="Variant.Type">
Variable is of type [PackedInt64Array].
</constant>
- <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="29" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="32" enum="Variant.Type">
Variable is of type [PackedFloat32Array].
</constant>
- <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="30" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="33" enum="Variant.Type">
Variable is of type [PackedFloat64Array].
</constant>
- <constant name="TYPE_PACKED_STRING_ARRAY" value="31" enum="Variant.Type">
+ <constant name="TYPE_PACKED_STRING_ARRAY" value="34" enum="Variant.Type">
Variable is of type [PackedStringArray].
</constant>
- <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="32" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="35" enum="Variant.Type">
Variable is of type [PackedVector2Array].
</constant>
- <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="33" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="36" enum="Variant.Type">
Variable is of type [PackedVector3Array].
</constant>
- <constant name="TYPE_PACKED_COLOR_ARRAY" value="34" enum="Variant.Type">
+ <constant name="TYPE_PACKED_COLOR_ARRAY" value="37" enum="Variant.Type">
Variable is of type [PackedColorArray].
</constant>
- <constant name="TYPE_MAX" value="35" enum="Variant.Type">
+ <constant name="TYPE_MAX" value="38" enum="Variant.Type">
Represents the size of the [enum Variant.Type] enum.
</constant>
<constant name="OP_EQUAL" value="0" enum="Variant.Operator">
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 7a27568d30..c05fb885b9 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -52,8 +52,9 @@
<return type="bool" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
+ <argument index="2" name="bidirectional" type="bool" default="true" />
<description>
- Returns whether there is a connection/segment between the given points.
+ Returns whether there is a connection/segment between the given points. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
</description>
</method>
<method name="clear">
@@ -89,8 +90,9 @@
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
+ <argument index="2" name="bidirectional" type="bool" default="true" />
<description>
- Deletes the segment between the given points.
+ Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
@@ -133,7 +135,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PackedInt32Array" />
+ <return type="PackedInt64Array" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
@@ -177,7 +179,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PackedInt32Array" />
+ <return type="PackedInt64Array" />
<argument index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml
index 33407c3e74..ea4e49c173 100644
--- a/doc/classes/AStar3D.xml
+++ b/doc/classes/AStar3D.xml
@@ -164,7 +164,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PackedInt32Array" />
+ <return type="PackedInt64Array" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
@@ -207,7 +207,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PackedInt32Array" />
+ <return type="PackedInt64Array" />
<argument index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index c1e28ffba3..0009c82548 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -62,6 +62,7 @@
Sets autowrapping for the text in the dialog.
</member>
<member name="dialog_close_on_escape" type="bool" setter="set_close_on_escape" getter="get_close_on_escape" default="true">
+ If [code]true[/code], the dialog will be hidden when the escape key ([constant @GlobalScope.KEY_ESCAPE]) is pressed.
</member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" default="true">
If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic.
@@ -71,6 +72,9 @@
The text displayed by the dialog.
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" overrides="Window" default="true" />
+ <member name="ok_button_text" type="String" setter="set_ok_button_text" getter="get_ok_button_text" default="&quot;OK&quot;">
+ The text displayed by the OK button (see [method get_ok_button]).
+ </member>
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Alert!&quot;" />
<member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />
<member name="visible" type="bool" setter="set_visible" getter="is_visible" overrides="Window" default="false" />
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index a92b237624..f40f11944d 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -391,13 +391,13 @@
</description>
</method>
<method name="track_insert_key">
- <return type="void" />
+ <return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="key" type="Variant" />
<argument index="3" name="transition" type="float" default="1" />
<description>
- Insert a generic key in a given track.
+ Inserts a generic key in a given track. Returns the key index.
</description>
</method>
<method name="track_is_compressed" qualifiers="const">
diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml
index 0a731edadd..d856c65dfc 100644
--- a/doc/classes/AnimationLibrary.xml
+++ b/doc/classes/AnimationLibrary.xml
@@ -51,18 +51,18 @@
</members>
<signals>
<signal name="animation_added">
- <argument index="0" name="name" type="Animation" />
+ <argument index="0" name="name" type="StringName" />
<description>
</description>
</signal>
<signal name="animation_removed">
- <argument index="0" name="name" type="Animation" />
+ <argument index="0" name="name" type="StringName" />
<description>
</description>
</signal>
<signal name="animation_renamed">
- <argument index="0" name="name" type="Animation" />
- <argument index="1" name="to_name" type="Animation" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="to_name" type="StringName" />
<description>
</description>
</signal>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index 9026aa6a34..189e30b5f2 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -88,7 +88,7 @@
<argument index="3" name="seek_root" type="bool" />
<argument index="4" name="blend" type="float" />
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
- <argument index="6" name="optimize" type="bool" default="true" />
+ <argument index="6" name="sync" type="bool" default="true" />
<description>
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
</description>
@@ -102,7 +102,7 @@
<argument index="4" name="seek_root" type="bool" />
<argument index="5" name="blend" type="float" />
<argument index="6" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
- <argument index="7" name="optimize" type="bool" default="true" />
+ <argument index="7" name="sync" type="bool" default="true" />
<description>
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
</description>
diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml
index ca117e3ecd..e6ac1dd963 100644
--- a/doc/classes/AnimationNodeAdd2.xml
+++ b/doc/classes/AnimationNodeAdd2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeAdd2" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -9,9 +9,4 @@
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml
index 91e030a6ae..f290032e11 100644
--- a/doc/classes/AnimationNodeAdd3.xml
+++ b/doc/classes/AnimationNodeAdd3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeAdd3" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -14,9 +14,4 @@
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml
index f17163e155..5001e3ba24 100644
--- a/doc/classes/AnimationNodeBlend2.xml
+++ b/doc/classes/AnimationNodeBlend2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeBlend2" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -11,9 +11,4 @@
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml
index 6bc7a20823..93947c2462 100644
--- a/doc/classes/AnimationNodeBlend3.xml
+++ b/doc/classes/AnimationNodeBlend3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeBlend3" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -13,9 +13,4 @@
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml
index 6ded3a7ff9..7bb136308d 100644
--- a/doc/classes/AnimationNodeBlendSpace1D.xml
+++ b/doc/classes/AnimationNodeBlendSpace1D.xml
@@ -76,6 +76,10 @@
<member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.1">
Position increment to snap to when moving a point on the axis.
</member>
+ <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
+ If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].
+ If [code]true[/code], forcing the blended animations to advance frame.
+ </member>
<member name="value_label" type="String" setter="set_value_label" getter="get_value_label" default="&quot;value&quot;">
Label of the virtual axis of the blend space.
</member>
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index 9e0e408ac5..eb2249d2d2 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -113,6 +113,10 @@
<member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0.1, 0.1)">
Position increment to snap to when moving a point.
</member>
+ <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
+ If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].
+ If [code]true[/code], forcing the blended animations to advance frame.
+ </member>
<member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default="&quot;x&quot;">
Name of the blend space's X axis.
</member>
diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml
index de2414cd43..14abc34992 100644
--- a/doc/classes/AnimationNodeOneShot.xml
+++ b/doc/classes/AnimationNodeOneShot.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeOneShot" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plays an animation once in [AnimationNodeBlendTree].
</brief_description>
@@ -26,8 +26,6 @@
</member>
<member name="mix_mode" type="int" setter="set_mix_mode" getter="get_mix_mode" enum="AnimationNodeOneShot.MixMode" default="0">
</member>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- </member>
</members>
<constants>
<constant name="MIX_MODE_BLEND" value="0" enum="MixMode">
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 94e6a2f23d..0badb831de 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -19,6 +19,12 @@
[/csharp]
[/codeblocks]
</member>
+ <member name="advance_expression" type="String" setter="set_advance_expression" getter="get_advance_expression" default="&quot;&quot;">
+ Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code.
+ </member>
+ <member name="advance_expression_base_node" type="NodePath" setter="set_advance_expression_base_node" getter="get_advance_expression_base_node" default="NodePath(&quot;&quot;)">
+ The path to the [Node] used to evaluate an [Expression] if one is not explicitly specified internally.
+ </member>
<member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false">
Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END].
</member>
diff --git a/doc/classes/AnimationNodeSync.xml b/doc/classes/AnimationNodeSync.xml
new file mode 100644
index 0000000000..21cac11d50
--- /dev/null
+++ b/doc/classes/AnimationNodeSync.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimationNodeSync" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
+ If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].
+ If [code]true[/code], forcing the blended animations to advance frame.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index 70c874d251..7e757d4640 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeTransition" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A generic animation transition node for [AnimationTree].
</brief_description>
@@ -40,6 +40,9 @@
</method>
</methods>
<members>
+ <member name="from_start" type="bool" setter="set_from_start" getter="is_from_start" default="true">
+ If [code]true[/code], the destination animation is played back from the beginning when switched.
+ </member>
<member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0">
The number of available input ports for this node.
</member>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 653607610d..d3c8bdac3a 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationPlayer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Container and player of [Animation] resources.
+ Player of [Animation] resources.
</brief_description>
<description>
- An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
- [AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween] node, but it requires doing everything by code.
+ An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of [AnimationLibrary] resources and custom blend times between animation transitions.
+ Some methods and properties use a single key to refence an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation whithin the library, for example [code]"movement/run"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library.
+ [AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween], but it requires doing everything by code.
Updating the target properties of animations occurs at process time.
</description>
<tutorials>
@@ -19,6 +20,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="library" type="AnimationLibrary" />
<description>
+ Adds [code]library[/code] to the animation player, under the key [code]name[/code].
</description>
</method>
<method name="advance">
@@ -32,7 +34,7 @@
<return type="StringName" />
<argument index="0" name="anim_from" type="StringName" />
<description>
- Returns the name of the next animation in the queue.
+ Returns the key of the animation which is queued to play after the [code]anim_from[/code] animation.
</description>
</method>
<method name="animation_set_next">
@@ -59,13 +61,14 @@
<return type="StringName" />
<argument index="0" name="animation" type="Animation" />
<description>
- Returns the name of [code]animation[/code] or an empty string if not found.
+ Returns the key of [code]animation[/code] or an empty [StringName] if not found.
</description>
</method>
<method name="find_animation_library" qualifiers="const">
<return type="StringName" />
<argument index="0" name="animation" type="Animation" />
<description>
+ Returns the key for the [AnimationLibrary] that contains [code]animation[/code] or an empty [StringName] if not found.
</description>
</method>
<method name="get_animation" qualifiers="const">
@@ -79,17 +82,19 @@
<return type="AnimationLibrary" />
<argument index="0" name="name" type="StringName" />
<description>
+ Returns the first [AnimationLibrary] with key [code]name[/code] or [code]null[/code] if not found.
</description>
</method>
<method name="get_animation_library_list" qualifiers="const">
<return type="StringName[]" />
<description>
+ Returns the list of stored library keys.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns the list of stored animation names.
+ Returns the list of stored animation keys.
</description>
</method>
<method name="get_blend_time" qualifiers="const">
@@ -97,7 +102,7 @@
<argument index="0" name="anim_from" type="StringName" />
<argument index="1" name="anim_to" type="StringName" />
<description>
- Gets the blend time (in seconds) between two animations, referenced by their names.
+ Gets the blend time (in seconds) between two animations, referenced by their keys.
</description>
</method>
<method name="get_playing_speed" qualifiers="const">
@@ -109,7 +114,7 @@
<method name="get_queue">
<return type="PackedStringArray" />
<description>
- Returns a list of the animation names that are currently queued to play.
+ Returns a list of the animation keys that are currently queued to play.
</description>
</method>
<method name="has_animation" qualifiers="const">
@@ -123,6 +128,7 @@
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
+ Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [code]name[/code].
</description>
</method>
<method name="is_playing" qualifiers="const">
@@ -164,6 +170,7 @@
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
+ Removes the [AnimationLibrary] assosiated with the key [code]name[/code].
</description>
</method>
<method name="rename_animation_library">
@@ -171,6 +178,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="newname" type="StringName" />
<description>
+ Moves the [AnimationLibrary] associated with the key [code]name[/code] to the key [code]newname[/code].
</description>
</method>
<method name="seek">
@@ -188,7 +196,7 @@
<argument index="1" name="anim_to" type="StringName" />
<argument index="2" name="sec" type="float" />
<description>
- Specifies a blend time (in seconds) between two animations, referenced by their names.
+ Specifies a blend time (in seconds) between two animations, referenced by their keys.
</description>
</method>
<method name="stop">
@@ -202,17 +210,17 @@
</methods>
<members>
<member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation">
- If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [member current_animation].
+ If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation].
</member>
<member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay" default="&quot;&quot;">
- The name of the animation to play when the scene loads.
+ The key of the animation to play when the scene loads.
</member>
<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default="&quot;&quot;">
- The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.
+ The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.
[b]Note:[/b] while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
</member>
<member name="current_animation_length" type="float" setter="" getter="get_current_animation_length">
- The length (in seconds) of the currently being played animation.
+ The length (in seconds) of the currently playing animation.
</member>
<member name="current_animation_position" type="float" setter="" getter="get_current_animation_position">
The position (in seconds) of the currently playing animation.
@@ -220,6 +228,10 @@
<member name="method_call_mode" type="int" setter="set_method_call_mode" getter="get_method_call_mode" enum="AnimationPlayer.AnimationMethodCallMode" default="0">
The call mode to use for Call Method tracks.
</member>
+ <member name="movie_quit_on_finish" type="bool" setter="set_movie_quit_on_finish_enabled" getter="is_movie_quit_on_finish_enabled" default="false">
+ If [code]true[/code] and the engine is running in Movie Maker mode (see [MovieWriter]), exits the engine with [method SceneTree.quit] as soon as an animation is done playing in this [AnimationPlayer]. A message is printed when the engine quits for this reason.
+ [b]Note:[/b] This obeys the same logic as the [signal animation_finished] signal, so it will not quit the engine if the animation is set to be looping.
+ </member>
<member name="playback_active" type="bool" setter="set_active" getter="is_active">
If [code]true[/code], updates animations in response to process-related notifications.
</member>
@@ -233,8 +245,8 @@
The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
</member>
<member name="reset_on_save" type="bool" setter="set_reset_on_save_enabled" getter="is_reset_on_save_enabled" default="true">
- This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving.
- In other words, the saved scene file will contain the "default pose", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving.
+ This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation (the animation with the key [code]"RESET"[/code]) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving.
+ This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation.
</member>
<member name="root_node" type="NodePath" setter="set_root" getter="get_root" default="NodePath(&quot;..&quot;)">
The node from which node path references will travel.
@@ -245,14 +257,15 @@
<argument index="0" name="old_name" type="StringName" />
<argument index="1" name="new_name" type="StringName" />
<description>
- Emitted when a queued animation plays after the previous animation was finished. See [method queue].
- [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or from [AnimationTree].
+ Emitted when a queued animation plays after the previous animation finished. See [method queue].
+ [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or by an [AnimationTree].
</description>
</signal>
<signal name="animation_finished">
<argument index="0" name="anim_name" type="StringName" />
<description>
Notifies when an animation finished playing.
+ [b]Note:[/b] This signal is not emitted if an animation is looping.
</description>
</signal>
<signal name="animation_started">
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 67e64c6bee..45d9152564 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -37,6 +37,9 @@
<member name="active" type="bool" setter="set_active" getter="is_active" default="false">
If [code]true[/code], the [AnimationTree] will be processing.
</member>
+ <member name="advance_expression_base_node" type="NodePath" setter="set_advance_expression_base_node" getter="get_advance_expression_base_node" default="NodePath(&quot;.&quot;)">
+ The path to the [Node] used to evaluate the AnimationNode [Expression] if one is not explicitly specified internally.
+ </member>
<member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
The path to the [AnimationPlayer] used for animating.
</member>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 94181db95f..c149cdc0e4 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -131,9 +131,10 @@
The callable's method should take one [Variant] parameter (the current array element) and return a boolean value.
[codeblock]
func _ready():
- print([6, 10, 6].all(greater_than_5)) # Prints True (3 elements evaluate to `true`).
- print([4, 10, 4].all(greater_than_5)) # Prints False (1 elements evaluate to `true`).
- print([4, 4, 4].all(greater_than_5)) # Prints False (0 elements evaluate to `true`).
+ print([6, 10, 6].all(greater_than_5)) # Prints True (3/3 elements evaluate to `true`).
+ print([4, 10, 4].all(greater_than_5)) # Prints False (1/3 elements evaluate to `true`).
+ print([4, 4, 4].all(greater_than_5)) # Prints False (0/3 elements evaluate to `true`).
+ print([].all(greater_than_5)) # Prints True (0/0 elements evaluate to `true`).
print([6, 10, 6].all(func(number): return number &gt; 5)) # Prints True. Same as the first line above, but using lambda function.
@@ -142,6 +143,7 @@
[/codeblock]
See also [method any], [method filter], [method map] and [method reduce].
[b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays).
+ [b]Note:[/b] For an empty array, this method [url=https://en.wikipedia.org/wiki/Vacuous_truth]always[/url] returns [code]true[/code].
</description>
</method>
<method name="any" qualifiers="const">
@@ -155,6 +157,7 @@
print([6, 10, 6].any(greater_than_5)) # Prints True (3 elements evaluate to `true`).
print([4, 10, 4].any(greater_than_5)) # Prints True (1 elements evaluate to `true`).
print([4, 4, 4].any(greater_than_5)) # Prints False (0 elements evaluate to `true`).
+ print([].any(greater_than_5)) # Prints False (0 elements evaluate to `true`).
print([6, 10, 6].any(func(number): return number &gt; 5)) # Prints True. Same as the first line above, but using lambda function.
@@ -163,6 +166,7 @@
[/codeblock]
See also [method all], [method filter], [method map] and [method reduce].
[b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays).
+ [b]Note:[/b] For an empty array, this method always returns [code]false[/code].
</description>
</method>
<method name="append">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 0f2dd6587a..f5c799d4de 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -67,7 +67,7 @@
<description>
Creates a new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear_blend_shapes">
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
index 7ae0b06dad..43fa9d6ad3 100644
--- a/doc/classes/AudioEffectAmplify.xml
+++ b/doc/classes/AudioEffectAmplify.xml
@@ -2,12 +2,12 @@
<class name="AudioEffectAmplify" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds an amplifying audio effect to an audio bus.
- Increases or decreases the volume of the selected audio bus.
</brief_description>
<description>
Increases or decreases the volume being routed through the audio bus.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index 3635f122f2..4efa431714 100644
--- a/doc/classes/AudioEffectBandLimitFilter.xml
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -7,5 +7,6 @@
Limits the frequencies in a range around the [member AudioEffectFilter.cutoff_hz] and allows frequencies outside of this range to pass.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
index 5e7713f3d4..6820b2c9f8 100644
--- a/doc/classes/AudioEffectBandPassFilter.xml
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -7,5 +7,6 @@
Attenuates the frequencies inside of a range around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this band.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
index 7a7f1f8e8a..8e02056456 100644
--- a/doc/classes/AudioEffectCapture.xml
+++ b/doc/classes/AudioEffectCapture.xml
@@ -8,6 +8,7 @@
Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
<method name="can_get_buffer" qualifiers="const">
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
index ca04126da4..5efba17e6a 100644
--- a/doc/classes/AudioEffectChorus.xml
+++ b/doc/classes/AudioEffectChorus.xml
@@ -7,6 +7,7 @@
Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
<method name="get_voice_cutoff_hz" qualifiers="const">
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 5ad948feba..8793ec0a02 100644
--- a/doc/classes/AudioEffectCompressor.xml
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -13,6 +13,7 @@
- Accentuates transients by using a wider attack, making effects sound more punchy.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" default="20.0">
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index 8a95e315cd..8223ccd6bd 100644
--- a/doc/classes/AudioEffectDelay.xml
+++ b/doc/classes/AudioEffectDelay.xml
@@ -8,6 +8,7 @@
Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0">
diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
index 908ae956ed..ce5b6de3be 100644
--- a/doc/classes/AudioEffectEQ.xml
+++ b/doc/classes/AudioEffectEQ.xml
@@ -8,6 +8,7 @@
AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged).
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
<method name="get_band_count" qualifiers="const">
diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml
index 0b03ea99dd..8cf53b9df2 100644
--- a/doc/classes/AudioEffectEQ10.xml
+++ b/doc/classes/AudioEffectEQ10.xml
@@ -19,5 +19,6 @@
See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21].
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml
index 6861a74596..2eed3b4836 100644
--- a/doc/classes/AudioEffectEQ21.xml
+++ b/doc/classes/AudioEffectEQ21.xml
@@ -30,5 +30,6 @@
See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10].
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml
index 5aea8efaa9..816d4b9b38 100644
--- a/doc/classes/AudioEffectEQ6.xml
+++ b/doc/classes/AudioEffectEQ6.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ6" inherits="AudioEffectEQ" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
+ Adds a 6-band equalizer audio effect to an audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
Each frequency can be modulated between -60/+24 dB.
</brief_description>
<description>
@@ -15,5 +15,6 @@
See also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21].
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index 02d8dbfffc..53e6f3ca63 100644
--- a/doc/classes/AudioEffectHighPassFilter.xml
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a high-pass filter to the Audio Bus.
+ Adds a high-pass filter to the audio bus.
</brief_description>
<description>
Cuts frequencies lower than the [member AudioEffectFilter.cutoff_hz] and allows higher frequencies to pass.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index bb5cf5c4a0..f2c20862fb 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz].
+ Adds a high-shelf filter to the audio bus.
</brief_description>
<description>
+ Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz].
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index 3fd099b55e..e841889b2a 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -8,6 +8,7 @@
Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" default="-0.1">
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
index 8a9ca04354..b0577f19c3 100644
--- a/doc/classes/AudioEffectLowPassFilter.xml
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a low-pass filter to the Audio bus.
+ Adds a low-pass filter to the audio bus.
</brief_description>
<description>
Cuts frequencies higher than the [member AudioEffectFilter.cutoff_hz] and allows lower frequencies to pass.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index 04cc1ab1d8..f654ba3612 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz].
+ Adds a low-shelf filter to the audio bus.
</brief_description>
<description>
+ Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz].
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index a2cc764003..ad4577cfbc 100644
--- a/doc/classes/AudioEffectNotchFilter.xml
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -7,5 +7,6 @@
Attenuates frequencies in a narrow band around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this range.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml
index 1dd2d9fa27..291e86214e 100644
--- a/doc/classes/AudioEffectPanner.xml
+++ b/doc/classes/AudioEffectPanner.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPanner" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a panner audio effect to an Audio bus. Pans sound left or right.
+ Adds a panner audio effect to an audio bus. Pans sound left or right.
</brief_description>
<description>
Determines how much of an audio signal is sent to the left and right buses.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="pan" type="float" setter="set_pan" getter="get_pan" default="0.0">
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
index 9c10052b6a..7aaf404352 100644
--- a/doc/classes/AudioEffectPhaser.xml
+++ b/doc/classes/AudioEffectPhaser.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPhaser" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a phaser audio effect to an Audio bus.
+ Adds a phaser audio effect to an audio bus.
Combines the original signal with a copy that is slightly out of phase with the original.
</brief_description>
<description>
Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index aab380aa72..952d432879 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPitchShift" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a pitch-shifting audio effect to an Audio bus.
+ Adds a pitch-shifting audio effect to an audio bus.
Raises or lowers the pitch of original sound.
</brief_description>
<description>
Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3">
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index 9728011bb2..32a6aea340 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -14,7 +14,7 @@
</tutorials>
<methods>
<method name="get_recording" qualifiers="const">
- <return type="AudioStreamSample" />
+ <return type="AudioStreamWAV" />
<description>
Returns the recorded sample.
</description>
@@ -34,8 +34,8 @@
</method>
</methods>
<members>
- <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1">
- Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats.
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamWAV.Format" default="1">
+ Specifies the format in which the sample will be recorded. See [enum AudioStreamWAV.Format] for available formats.
</member>
</members>
</class>
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index 5525102806..b024f06849 100644
--- a/doc/classes/AudioEffectReverb.xml
+++ b/doc/classes/AudioEffectReverb.xml
@@ -2,12 +2,12 @@
<class name="AudioEffectReverb" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a reverberation audio effect to an Audio bus.
- Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
</brief_description>
<description>
- Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room.
+ Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<members>
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
index 5c62ba982f..088d61189f 100644
--- a/doc/classes/AudioEffectStereoEnhance.xml
+++ b/doc/classes/AudioEffectStereoEnhance.xml
@@ -7,6 +7,7 @@
An audio effect that can be used to adjust the intensity of stereo panning.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0">
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 1e076654fb..28dcd2794e 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -275,6 +275,12 @@
Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code].
</description>
</method>
+ <method name="set_enable_tagging_used_audio_streams">
+ <return type="void" />
+ <argument index="0" name="enable" type="bool" />
+ <description>
+ </description>
+ </method>
<method name="swap_bus_effects">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index 6343da6eed..7645cafe86 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -4,7 +4,7 @@
Base class for audio streams.
</brief_description>
<description>
- Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats.
+ Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamWAV]) and Ogg (via [AudioStreamOggVorbis]) file formats.
</description>
<tutorials>
<link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
@@ -13,6 +13,16 @@
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
+ <method name="_get_beat_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_bpm" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
<method name="_get_length" qualifiers="virtual const">
<return type="float" />
<description>
@@ -23,7 +33,7 @@
<description>
</description>
</method>
- <method name="_instance_playback" qualifiers="virtual const">
+ <method name="_instantiate_playback" qualifiers="virtual const">
<return type="AudioStreamPlayback" />
<description>
</description>
@@ -39,10 +49,10 @@
Returns the length of the audio stream in seconds.
</description>
</method>
- <method name="instance_playback">
+ <method name="instantiate_playback">
<return type="AudioStreamPlayback" />
<description>
- Returns an AudioStreamPlayback. Useful for when you want to extend `_instance_playback` but call `instance_playback` from an internally held AudioStream subresource. An example of this can be found in the source files for `AudioStreamRandomPitch::instance_playback`.
+ Returns an AudioStreamPlayback. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source files for [code]AudioStreamRandomPitch::instantiate_playback[/code].
</description>
</method>
<method name="is_monophonic" qualifiers="const">
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index 1909c4b621..f1a1c18c1c 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -4,7 +4,7 @@
Meta class for playing back audio.
</brief_description>
<description>
- Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage.
+ Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOggVorbis] for usage.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
@@ -50,5 +50,10 @@
<description>
</description>
</method>
+ <method name="_tag_used_streams" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
</methods>
</class>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 26fe1278f7..e0bc98e208 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -55,6 +55,7 @@
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Bus on which this audio is playing.
+ [b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 7d0470f396..f04f95bd72 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -57,6 +57,7 @@
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Bus on which this audio is playing.
+ [b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0">
Maximum distance from which audio is still hearable.
@@ -64,6 +65,9 @@
<member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
</member>
+ <member name="panning_strength" type="float" setter="set_panning_strength" getter="get_panning_strength" default="1.0">
+ Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/2d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values.
+ </member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 8356596f54..72febf7006 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -64,6 +64,7 @@
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
The bus on which this audio is playing.
+ [b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0">
Decides in which step the Doppler effect should be calculated.
@@ -86,6 +87,9 @@
<member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
</member>
+ <member name="panning_strength" type="float" setter="set_panning_strength" getter="get_panning_strength" default="1.0">
+ Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/3d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values.
+ </member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamWAV.xml
index 62f27ce876..17595aec2f 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamWAV.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamSample" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AudioStreamWAV" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Stores audio data loaded from WAV files.
</brief_description>
<description>
- AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
+ AudioStreamWAV stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation.
</description>
<tutorials>
@@ -14,7 +14,7 @@
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
- Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
+ Saves the AudioStreamWAV as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
</description>
</method>
@@ -24,7 +24,7 @@
Contains the audio data in bytes.
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
- <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0">
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamWAV.Format" default="0">
Audio format. See [enum Format] constants for values.
</member>
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0">
@@ -33,7 +33,7 @@
<member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0">
The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present.
</member>
- <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0">
+ <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamWAV.LoopMode" default="0">
The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100">
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index a9c6030809..16359108a4 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -241,7 +241,7 @@
A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness].
</member>
<member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5">
- Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.
+ Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to [code]0.0[/code], no specular reflections will be visible. This differs from the [constant SPECULAR_DISABLED] [enum SpecularMode] as [constant SPECULAR_DISABLED] only applies to the specular lobe from the light source.
[b]Note:[/b] Unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness].
</member>
<member name="metallic_texture" type="Texture2D" setter="set_texture" getter="get_texture">
@@ -359,6 +359,7 @@
</member>
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3">
Filter flags for the texture. See [enum TextureFilter] for options.
+ [b]Note:[/b] [member heightmap_texture] is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering.
</member>
<member name="texture_repeat" type="bool" setter="set_flag" getter="get_flag" default="true">
Repeat flags for the texture. See [enum TextureFilter] for options.
@@ -373,10 +374,10 @@
[b]Note:[/b] This is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size].
</member>
<member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3(0, 0, 0)">
- How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture.
+ How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture. The Z component is used when [member uv1_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3(1, 1, 1)">
- How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function.
+ How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function. The Z component is used when [member uv1_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], instead of using [code]UV[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
@@ -388,10 +389,10 @@
If [code]true[/code], triplanar mapping for [code]UV[/code] is calculated in world space rather than object local space. See also [member uv1_triplanar].
</member>
<member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3(0, 0, 0)">
- How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture.
+ How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture. The Z component is used when [member uv2_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3(1, 1, 1)">
- How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function.
+ How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function. The Z component is used when [member uv2_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], instead of using [code]UV2[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
diff --git a/doc/classes/BoneMap.xml b/doc/classes/BoneMap.xml
new file mode 100644
index 0000000000..371cb4fa93
--- /dev/null
+++ b/doc/classes/BoneMap.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BoneMap" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Bone map for retargeting.
+ </brief_description>
+ <description>
+ This class contains a hashmap that uses a list of bone names in [SkeletonProfile] as key names.
+ By assigning the actual [Skeleton3D] bone name as the key value, it maps the [Skeleton3D] to the [SkeletonProfile].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="find_profile_bone_name" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="skeleton_bone_name" type="StringName" />
+ <description>
+ Returns a profile bone name having [code]skeleton_bone_name[/code]. If not found, an empty [StringName] will be returned.
+ In the retargeting process, the returned bone name is the bone name of the target skeleton.
+ </description>
+ </method>
+ <method name="get_skeleton_bone_name" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="profile_bone_name" type="StringName" />
+ <description>
+ Returns a skeleton bone name is mapped to [code]profile_bone_name[/code].
+ In the retargeting process, the returned bone name is the bone name of the source skeleton.
+ </description>
+ </method>
+ <method name="set_skeleton_bone_name">
+ <return type="void" />
+ <argument index="0" name="profile_bone_name" type="StringName" />
+ <argument index="1" name="skeleton_bone_name" type="StringName" />
+ <description>
+ Maps a skeleton bone name to [code]profile_bone_name[/code].
+ In the retargeting process, the setting bone name is the bone name of the source skeleton.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="profile" type="SkeletonProfile" setter="set_profile" getter="get_profile">
+ A [SkeletonProfile] of the mapping target. Key names in the [BoneMap] are synchronized with it.
+ </member>
+ </members>
+ <signals>
+ <signal name="bone_map_updated">
+ <description>
+ This signal is emitted when change the key value in the [BoneMap]. This is used to validate mapping and to update [BoneMap] editor.
+ </description>
+ </signal>
+ <signal name="profile_updated">
+ <description>
+ This signal is emitted when change the value in profile or change the reference of profile. This is used to update key names in the [BoneMap] and to redraw the [BoneMap] editor.
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index d85d02fbfb..1cd9ca0afb 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -40,29 +40,6 @@
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
- <methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
- </methods>
<members>
<member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" enum="HorizontalAlignment" default="1">
Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants.
@@ -92,6 +69,9 @@
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
</member>
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="0">
+ Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes.
+ </member>
</members>
<theme_items>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index dacdca1cee..b0282e4107 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -192,8 +192,8 @@
</member>
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false">
+ If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index f2a0040ed4..d8faf8e91d 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -224,8 +224,8 @@
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
Minimum linear acceleration.
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false">
+ If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles3D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles3D] node (and its parents) when it is moved or rotated.
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
The [Mesh] used for each particle. If [code]null[/code], particles will be spheres.
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 56e5ce1522..5595abc02a 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -113,7 +113,7 @@
<argument index="2" name="z_near" type="float" />
<argument index="3" name="z_far" type="float" />
<description>
- Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units.
+ Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. See also [member frustum_offset].
</description>
</method>
<method name="set_orthogonal">
@@ -155,6 +155,7 @@
</member>
<member name="current" type="bool" setter="set_current" getter="is_current" default="false">
If [code]true[/code], the ancestor [Viewport] is currently using this camera.
+ If multiple cameras are in the scene, one will always be made current. For example, if two [Camera3D] nodes are present in the scene and only one is current, setting one camera's [member current] to [code]false[/code] will cause the other camera to be made current.
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera3D.DopplerTracking" default="0">
If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values.
@@ -178,6 +179,7 @@
</member>
<member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2(0, 0)">
The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
+ [b]Note:[/b] Only effective if [member projection] is [constant PROJECTION_FRUSTUM].
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
The horizontal (X) offset of the camera viewport.
@@ -188,7 +190,7 @@
<member name="near" type="float" setter="set_near" getter="get_near" default="0.05">
The distance to the near culling boundary for this camera relative to its local Z axis.
</member>
- <member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera3D.Projection" default="0">
+ <member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera3D.ProjectionType" default="0">
The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size.
</member>
<member name="size" type="float" setter="set_size" getter="get_size" default="1.0">
@@ -199,13 +201,13 @@
</member>
</members>
<constants>
- <constant name="PROJECTION_PERSPECTIVE" value="0" enum="Projection">
+ <constant name="PROJECTION_PERSPECTIVE" value="0" enum="ProjectionType">
Perspective projection. Objects on the screen becomes smaller when they are far away.
</constant>
- <constant name="PROJECTION_ORTHOGONAL" value="1" enum="Projection">
+ <constant name="PROJECTION_ORTHOGONAL" value="1" enum="ProjectionType">
Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
</constant>
- <constant name="PROJECTION_FRUSTUM" value="2" enum="Projection">
+ <constant name="PROJECTION_FRUSTUM" value="2" enum="ProjectionType">
Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects.
</constant>
<constant name="KEEP_WIDTH" value="0" enum="KeepAspect">
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 98a498d719..2d68ae6902 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -48,17 +48,26 @@
</description>
</method>
<method name="draw_char" qualifiers="const">
- <return type="float" />
+ <return type="void" />
+ <argument index="0" name="font" type="Font" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="char" type="String" />
+ <argument index="3" name="font_size" type="int" default="16" />
+ <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <description>
+ Draws a string first character using a custom font.
+ </description>
+ </method>
+ <method name="draw_char_outline" qualifiers="const">
+ <return type="void" />
<argument index="0" name="font" type="Font" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="String" />
- <argument index="3" name="next" type="String" default="&quot;&quot;" />
- <argument index="4" name="size" type="int" default="16" />
+ <argument index="3" name="font_size" type="int" default="16" />
+ <argument index="4" name="size" type="int" default="-1" />
<argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="6" name="outline_size" type="int" default="0" />
- <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
<description>
- Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character.
+ Draws a string first character outline using a custom font.
</description>
</method>
<method name="draw_circle">
@@ -127,7 +136,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 [member FontData.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 FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering.
If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius.
Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation.
</description>
@@ -157,16 +166,36 @@
<argument index="2" name="text" type="String" />
<argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="max_lines" type="int" default="-1" />
- <argument index="6" name="size" type="int" default="16" />
+ <argument index="5" name="font_size" type="int" default="16" />
+ <argument index="6" name="max_lines" type="int" default="-1" />
<argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="8" name="outline_size" type="int" default="0" />
- <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="10" name="flags" type="int" default="99" />
+ <argument index="8" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <argument index="9" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="10" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
</description>
</method>
+ <method name="draw_multiline_string_outline" qualifiers="const">
+ <return type="void" />
+ <argument index="0" name="font" type="Font" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="text" type="String" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <argument index="4" name="width" type="float" default="-1" />
+ <argument index="5" name="font_size" type="int" default="16" />
+ <argument index="6" name="max_lines" type="int" default="-1" />
+ <argument index="7" name="size" type="int" default="1" />
+ <argument index="8" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="9" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <argument index="10" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="11" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
+ <description>
+ Breaks [code]text[/code] to the lines and draws text outline using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
+ </description>
+ </method>
<method name="draw_multimesh">
<return type="void" />
<argument index="0" name="multimesh" type="MultiMesh" />
@@ -250,11 +279,11 @@
<argument index="2" name="text" type="String" />
<argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="size" type="int" default="16" />
+ <argument index="5" name="font_size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="7" name="outline_size" type="int" default="0" />
- <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="9" name="flags" type="int" default="3" />
+ <argument index="7" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="8" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
[b]Example using the default project font:[/b]
@@ -279,6 +308,23 @@
See also [method Font.draw_string].
</description>
</method>
+ <method name="draw_string_outline" qualifiers="const">
+ <return type="void" />
+ <argument index="0" name="font" type="Font" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="text" type="String" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <argument index="4" name="width" type="float" default="-1" />
+ <argument index="5" name="font_size" type="int" default="16" />
+ <argument index="6" name="size" type="int" default="1" />
+ <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="8" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
+ <description>
+ Draws [code]text[/code] outline using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
+ </description>
+ </method>
<method name="draw_style_box">
<return type="void" />
<argument index="0" name="style_box" type="StyleBox" />
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 6c5cd62fe1..795bd7a429 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -159,10 +159,10 @@
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.
+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all floor bodies are detected and propagate their velocity.
</member>
<member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
- Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all wall bodies are ignored.
</member>
<member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 7ca27a35fe..4994ef352e 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -592,6 +592,9 @@
<theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.29)">
[Color] of the scrollbar in the code completion popup.
</theme_item>
+ <theme_item name="completion_scroll_hovered_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.4)">
+ [Color] of the scrollbar in the code completion popup when hovered.
+ </theme_item>
<theme_item name="completion_selected_color" data_type="color" type="Color" default="Color(0.26, 0.26, 0.27, 1)">
Background highlight [Color] for the current selected option item in the code completion popup.
</theme_item>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 5d025985cc..95d99855f6 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -16,7 +16,8 @@
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="shape_idx" type="int" />
<description>
- Accepts unhandled [InputEvent]s. Requires [member input_pickable] to be [code]true[/code]. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Accepts unhandled [InputEvent]s. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ [b]Note:[/b] [method _input_event] requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
<method name="create_shape_owner">
@@ -218,17 +219,19 @@
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="shape_idx" type="int" />
<description>
- Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details.
+ Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. See [method _input_event] for details.
</description>
</signal>
<signal name="mouse_entered">
<description>
Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_shape_entered">
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 2aac5528f4..7284a7e341 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -18,6 +18,7 @@
<argument index="4" name="shape_idx" type="int" />
<description>
Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
+ [b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
<method name="create_shape_owner">
@@ -199,12 +200,14 @@
</signal>
<signal name="mouse_entered">
<description>
- Emitted when the mouse pointer enters any of this object's shapes.
+ Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
- Emitted when the mouse pointer exits all this object's shapes.
+ Emitted when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
</signals>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 7c9c4ed4d6..cc9c5877c5 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -37,16 +37,15 @@
<member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(1, 1, 1, 1)">
The currently selected color.
</member>
+ <member name="color_mode" type="int" setter="set_color_mode" getter="get_color_mode" enum="ColorPicker.ColorModeType" default="0">
+ The currently selected color mode. See [enum ColorModeType].
+ </member>
<member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false">
If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
If [code]true[/code], shows an alpha channel slider (opacity).
</member>
- <member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false">
- If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.
- [b]Note:[/b] Cannot be enabled if raw mode is on.
- </member>
<member name="picker_shape" type="int" setter="set_picker_shape" getter="get_picker_shape" enum="ColorPicker.PickerShapeType" default="0">
The shape of the color space view. See [enum PickerShapeType].
</member>
@@ -56,10 +55,6 @@
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true">
If [code]true[/code], saved color presets are visible.
</member>
- <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode" default="false">
- If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
- [b]Note:[/b] Cannot be enabled if HSV mode is on.
- </member>
</members>
<signals>
<signal name="color_changed">
@@ -82,6 +77,20 @@
</signal>
</signals>
<constants>
+ <constant name="MODE_RGB" value="0" enum="ColorModeType">
+ Allows editing the color with Red/Green/Blue sliders.
+ </constant>
+ <constant name="MODE_HSV" value="1" enum="ColorModeType">
+ Allows editing the color with Hue/Saturation/Value sliders.
+ </constant>
+ <constant name="MODE_RAW" value="2" enum="ColorModeType">
+ Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
+ </constant>
+ <constant name="MODE_OKHSL" value="3" enum="ColorModeType">
+ Allows editing the color with Hue/Saturation/Lightness sliders.
+ OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue.
+ [url=https://bottosson.github.io/posts/colorpicker/]Okhsv and Okhsl color spaces[/url]
+ </constant>
<constant name="SHAPE_HSV_RECTANGLE" value="0" enum="PickerShapeType">
HSV Color Model rectangle color space.
</constant>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 53d35c1a3d..75a715789c 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -6,7 +6,7 @@
<description>
Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility.
See also [BaseButton] which contains common properties and methods associated with this node.
- [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.minimum_size] to a big enough value to give the button enough space.
+ [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.custom_minimum_size] to a big enough value to give the button enough space.
</description>
<tutorials>
<link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 2316e32b5d..d4c503857d 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -27,6 +27,9 @@
</method>
</methods>
<members>
+ <member name="cancel_button_text" type="String" setter="set_cancel_button_text" getter="get_cancel_button_text" default="&quot;Cancel&quot;">
+ The text displayed by the cancel button (see [method get_cancel_button]).
+ </member>
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" overrides="Window" default="Vector2i(200, 70)" />
<member name="size" type="Vector2i" setter="set_size" getter="get_size" overrides="Window" default="Vector2i(200, 100)" />
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Please Confirm...&quot;" />
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 2828896eac..9fc80e1aab 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -100,7 +100,7 @@
<method name="_get_minimum_size" qualifiers="virtual const">
<return type="Vector2" />
<description>
- Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
+ Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member custom_minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
If not overridden, defaults to [constant Vector2.ZERO].
[b]Note:[/b] This method will not be called when the script is attached to a [Control] node that already overrides its minimum size (e.g. [Label], [Button], [PanelContainer] etc.). It can only be used with most basic GUI nodes, like [Control], [Container], [Panel] etc.
</description>
@@ -157,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 minimum_size] to some non-zero value.
+ [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value.
[b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably.
Example of usage with a custom-constructed node:
[codeblocks]
@@ -357,7 +357,7 @@
<method name="get_combined_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns combined minimum size from [member minimum_size] and [method get_minimum_size].
+ Returns combined minimum size from [member custom_minimum_size] and [method get_minimum_size].
</description>
</method>
<method name="get_cursor_shape" qualifiers="const">
@@ -389,7 +389,7 @@
<method name="get_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the minimum size for this control. See [member minimum_size].
+ Returns the minimum size for this control. See [member custom_minimum_size].
</description>
</method>
<method name="get_offset" qualifiers="const">
@@ -939,7 +939,7 @@
<method name="update_minimum_size">
<return type="void" />
<description>
- Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member minimum_size] directly calls this method automatically.
+ Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member custom_minimum_size] directly calls this method automatically.
</description>
</method>
<method name="warp_mouse">
@@ -970,6 +970,9 @@
<member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.
</member>
+ <member name="custom_minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
+ The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
+ </member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
</member>
@@ -1027,9 +1030,6 @@
<member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" enum="Control.LayoutDirection" default="0">
Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</member>
- <member name="minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
- The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
- </member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0">
The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.
[b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system.
@@ -1281,8 +1281,8 @@
<constant name="PRESET_HCENTER_WIDE" value="14" enum="LayoutPreset">
Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset].
</constant>
- <constant name="PRESET_WIDE" value="15" enum="LayoutPreset">
- Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset].
+ <constant name="PRESET_FULL_RECT" value="15" enum="LayoutPreset">
+ Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_MODE_MINSIZE" value="0" enum="LayoutPresetMode">
The control will be resized to its minimum size.
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index 6aa39e453e..85473fc237 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -5,23 +5,27 @@
</brief_description>
<description>
Renders a given [Curve] provided to it. Simplifies the task of drawing curves and/or saving them as image files.
+ If you need to store up to 3 curves within a single texture, use [CurveXYZTexture] instead. See also [GradientTexture1D] and [GradientTexture2D].
</description>
<tutorials>
</tutorials>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
- The [code]curve[/code] rendered onto the texture.
+ The [Curve] that is rendered onto the texture.
</member>
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0">
+ The format the texture should be generated with. When passing a CurveTexture as a input to a [Shader], this may need to be adjusted.
</member>
<member name="width" type="int" setter="set_width" getter="get_width" default="256">
- The width of the texture.
+ The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage.
</member>
</members>
<constants>
<constant name="TEXTURE_MODE_RGB" value="0" enum="TextureMode">
+ Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values.
</constant>
<constant name="TEXTURE_MODE_RED" value="1" enum="TextureMode">
+ Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this.
</constant>
</constants>
</class>
diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml
index d289e394aa..e3f2e8fc45 100644
--- a/doc/classes/CurveXYZTexture.xml
+++ b/doc/classes/CurveXYZTexture.xml
@@ -1,19 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CurveXYZTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ A texture that shows 3 different curves (stored on the red, green and blue color channels).
</brief_description>
<description>
+ Renders 3 given [Curve]s provided to it, on the red, green and blue channels respectively. Compared to using separate [CurveTexture]s, this further simplifies the task of drawing curves and/or saving them as image files.
+ If you only need to store one curve within a single texture, use [CurveTexture] instead. See also [GradientTexture1D] and [GradientTexture2D].
</description>
<tutorials>
</tutorials>
<members>
<member name="curve_x" type="Curve" setter="set_curve_x" getter="get_curve_x">
+ The [Curve] that is rendered onto the texture's red channel.
</member>
<member name="curve_y" type="Curve" setter="set_curve_y" getter="get_curve_y">
+ The [Curve] that is rendered onto the texture's green channel.
</member>
<member name="curve_z" type="Curve" setter="set_curve_z" getter="get_curve_z">
+ The [Curve] that is rendered onto the texture's blue channel.
</member>
<member name="width" type="int" setter="set_width" getter="get_width" default="256">
+ The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage.
</member>
</members>
</class>
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
index c0ad61b77e..3322ab4c66 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -58,49 +58,56 @@
</methods>
<members>
<member name="albedo_mix" type="float" setter="set_albedo_mix" getter="get_albedo_mix" default="1.0">
- Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh.
+ Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh. This can be set to [code]0.0[/code] to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See also [member modulate].
</member>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them.
</member>
- <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="10.0">
- Distance from the camera at which the Decal begins to fade away.
+ <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="40.0">
+ The distance from the camera at which the Decal begins to fade away (in 3D units).
</member>
<member name="distance_fade_enabled" type="bool" setter="set_enable_distance_fade" getter="is_distance_fade_enabled" default="false">
- If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
+ If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_begin] + [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
</member>
- <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="1.0">
- Distance over which the Decal fades. The Decal becomes slowly more transparent over this distance and is completely invisible at the end.
+ <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="10.0">
+ The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast.
</member>
<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
- Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity.
+ Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also [member modulate].
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
Sets the size of the [AABB] used by the decal. The AABB goes from [code]-extents[/code] to [code]extents[/code].
</member>
<member name="lower_fade" type="float" setter="set_lower_fade" getter="get_lower_fade" default="0.3">
- Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB].
+ Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member upper_fade].
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
- Changes the [Color] of the Decal by multiplying it with this value.
+ Changes the [Color] of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See also [member emission_energy] and [member albedo_mix] to change the emission and albedo intensity independently of each other.
</member>
<member name="normal_fade" type="float" setter="set_normal_fade" getter="get_normal_fade" default="0.0">
Fades the Decal if the angle between the Decal's [AABB] and the target surface becomes too large. A value of [code]0[/code] projects the Decal regardless of angle, a value of [code]1[/code] limits the Decal to surfaces that are nearly perpendicular.
+ [b]Note:[/b] Setting [member normal_fade] to a value greater than [code]0.0[/code] has a small performance cost due to the added normal angle computations.
</member>
<member name="texture_albedo" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the base [Color] of the Decal. Either this or the [member texture_emission] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
</member>
<member name="texture_emission" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the emission [Color] of the Decal. Either this or the [member texture_emission] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
</member>
<member name="texture_normal" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the per-pixel normal map for the decal. Use this to add extra detail to decals.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
+ [b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a normal-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's normal map should be overridden (and its intensity).
</member>
<member name="texture_orm" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
+ [b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity).
</member>
<member name="upper_fade" type="float" setter="set_upper_fade" getter="get_upper_fade" default="0.3">
- Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB].
+ Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member lower_fade].
</member>
</members>
<constants>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index cec504584c..d5db7da1f0 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1049,7 +1049,7 @@
<return type="int" enum="DisplayServer.VSyncMode" />
<argument index="0" name="window_id" type="int" default="0" />
<description>
- Returns the VSync mode of the given window.
+ Returns the V-Sync mode of the given window.
</description>
</method>
<method name="window_move_to_foreground">
@@ -1234,7 +1234,7 @@
<argument index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" />
<argument index="1" name="window_id" type="int" default="0" />
<description>
- Sets the VSync mode of the given window.
+ Sets the V-Sync mode of the given window.
See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application.
Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED], if the desired mode is not supported.
</description>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 8aa2db2cf8..f217fbaf48 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -96,7 +96,7 @@
Adds a static lib from the given [code]path[/code] to the iOS project.
</description>
</method>
- <method name="add_osx_plugin_file">
+ <method name="add_macos_plugin_file">
<return type="void" />
<argument index="0" name="path" type="String" />
<description>
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index 2ab87b0dd1..a6bdc294ac 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -57,7 +57,7 @@
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
- Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] button.
+ Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] method.
</description>
</method>
<method name="set_disable_class">
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index b1fd7b4e76..6fd5abe369 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -11,9 +11,11 @@
<method name="add_filter">
<return type="void" />
<argument index="0" name="filter" type="String" />
+ <argument index="1" name="description" type="String" default="&quot;&quot;" />
<description>
- Adds a comma-delimited file extension filter option to the [EditorFileDialog] with an optional semi-colon-delimited label.
- For example, [code]"*.tscn, *.scn; Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)".
+ Adds a comma-delimited file name [code]filter[/code] option to the [EditorFileDialog] with an optional [code]description[/code], which restricts what files can be picked.
+ A [code]filter[/code] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
+ For example, a [code]filter[/code] of [code]"*.tscn, *.scn"[/code] and a [code]description[/code] of [code]"Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)".
</description>
</method>
<method name="clear_filters">
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index d44c08cb0f..2975ea6d75 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -48,6 +48,12 @@
[/codeblock]
</description>
</method>
+ <method name="get_project_settings_dir" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved.
+ </description>
+ </method>
<method name="get_self_contained_file" qualifiers="const">
<return type="String" />
<description>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 1514b82ff8..2930c2ec22 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -296,6 +296,28 @@
<return type="bool" />
<description>
Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]).
+ When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of [method EditorInterface.get_base_control] and made visible inside [method _make_visible].
+ Use [method _get_plugin_name] and [method _get_plugin_icon] to customize the plugin button's appearance.
+ [codeblock]
+ var plugin_control
+
+ func _enter_tree():
+ plugin_control = preload("my_plugin_control.tscn").instantiate()
+ get_editor_interface().get_editor_main_control().add_child(plugin_control)
+ plugin_control.hide()
+
+ func _has_main_screen():
+ return true
+
+ func _make_visible(visible):
+ plugin_control.visible = visible
+
+ func _get_plugin_name():
+ return "My Super Cool Plugin 3000"
+
+ func _get_plugin_icon():
+ return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons")
+ [/codeblock]
</description>
</method>
<method name="_make_visible" qualifiers="virtual">
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index c428233372..586458bd28 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -38,7 +38,7 @@
Gets the edited object.
</description>
</method>
- <method name="get_edited_property">
+ <method name="get_edited_property" qualifiers="const">
<return type="StringName" />
<description>
Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property.
@@ -101,6 +101,13 @@
Used by sub-inspectors. Emit it if what was selected was an Object ID.
</description>
</signal>
+ <signal name="property_can_revert_changed">
+ <argument index="0" name="property" type="StringName" />
+ <argument index="1" name="can_revert" type="bool" />
+ <description>
+ Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed.
+ </description>
+ </signal>
<signal name="property_changed">
<argument index="0" name="property" type="StringName" />
<argument index="1" name="value" type="Variant" />
diff --git a/doc/classes/EditorScenePostImportPlugin.xml b/doc/classes/EditorScenePostImportPlugin.xml
index 0fdbd5db1e..44d644411d 100644
--- a/doc/classes/EditorScenePostImportPlugin.xml
+++ b/doc/classes/EditorScenePostImportPlugin.xml
@@ -88,7 +88,7 @@
<argument index="2" name="default_value" type="Variant" />
<argument index="3" name="hint" type="int" enum="PropertyHint" default="0" />
<argument index="4" name="hint_string" type="String" default="&quot;&quot;" />
- <argument index="5" name="usage_flags" type="int" default="7" />
+ <argument index="5" name="usage_flags" type="int" default="6" />
<description>
Add a specific import option. This function can only be called from [method _get_import_options] and [method _get_internal_import_options].
</description>
@@ -114,7 +114,9 @@
</constant>
<constant name="INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE" value="5" enum="InternalImportCategory">
</constant>
- <constant name="INTERNAL_IMPORT_CATEGORY_MAX" value="6" enum="InternalImportCategory">
+ <constant name="INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE" value="6" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_MAX" value="7" enum="InternalImportCategory">
</constant>
</constants>
</class>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index ac2250ab6d..fea4085019 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -105,12 +105,6 @@
Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata].
</description>
</method>
- <method name="get_project_settings_dir" qualifiers="const">
- <return type="String" />
- <description>
- Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved.
- </description>
- </method>
<method name="get_recent_dirs" qualifiers="const">
<return type="PackedStringArray" />
<description>
@@ -200,6 +194,454 @@
</description>
</method>
</methods>
+ <members>
+ <member name="debugger/profiler_frame_history_size" type="int" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/always_show_folders" type="bool" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/textfile_extensions" type="String" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/thumbnail_size" type="int" setter="" getter="">
+ </member>
+ <member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter="">
+ </member>
+ <member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter="">
+ </member>
+ <member name="docks/scene_tree/auto_expand_to_selected" type="bool" setter="" getter="">
+ </member>
+ <member name="docks/scene_tree/start_create_dialog_fully_expanded" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_color1" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_color2" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_ik_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_outline_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_outline_size" type="int" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_width" type="int" setter="" getter="">
+ </member>
+ <member name="editors/2d/constrain_editor_view" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/2d/grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/guides_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/smart_snapping_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/viewport_border_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_fov" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_z_far" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_z_near" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_activation_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_base_speed" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_navigation_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_sensitivity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_speed_zoom_link" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_bias" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_max" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_min" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_size" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_xy_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_xz_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/emulate_numpad" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/invert_x_axis" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/invert_y_axis" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/navigation_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/orbit_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/pan_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/warped_mouse_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/zoom_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/zoom_style" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_sensitivity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/translation_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/zoom_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/primary_grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/primary_grid_steps" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/secondary_grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/selection_box_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/instantiated" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/shape" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/animation/autorename_animation_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/confirm_insert_track" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/default_create_bezier_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/default_create_reset_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/onion_layers_future_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/animation/onion_layers_past_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/grid_map/pick_distance" type="float" setter="" getter="">
+ </member>
+ <member name="editors/panning/2d_editor_pan_speed" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/2d_editor_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/animation_editors_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/simple_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/panning/sub_editors_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/warped_mouse_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/polygon_editor/point_grab_radius" type="int" setter="" getter="">
+ </member>
+ <member name="editors/polygon_editor/show_previous_outline" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/tiles_editor/display_grid" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/tiles_editor/grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/lines_curvature" type="float" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/minimap_opacity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/visual_shader/port_preview_size" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/directories/autoscan_project_path" type="String" setter="" getter="">
+ </member>
+ <member name="filesystem/directories/default_project_path" type="String" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/display_mode" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/show_hidden_files" type="bool" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/thumbnail_size" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/on_save/compress_binary_resources" type="bool" setter="" getter="">
+ </member>
+ <member name="filesystem/on_save/safe_save_on_backup_then_rename" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/automatically_open_screenshots" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_contextual_ligatures" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_custom_opentype_features" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_custom_variations" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/custom_display_scale" type="float" setter="" getter="">
+ </member>
+ <member name="interface/editor/debug/enable_pseudolocalization" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/display_scale" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/editor_language" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_antialiased" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_hinting" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_subpixel_positioning" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/low_processor_mode_sleep_usec" type="float" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font_bold" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/mouse_extra_buttons_navigate_history" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/save_each_scene_on_quit" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/separate_distraction_mode" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/show_internal_errors_in_toast_notifications" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/single_window_mode" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/unfocused_low_processor_mode_sleep_usec" type="float" setter="" getter="">
+ </member>
+ <member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
+ </member>
+ <member name="interface/inspector/show_low_level_opentype_features" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/display_close_button" type="int" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/maximum_width" type="int" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/show_script_button" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/show_thumbnail_on_hover" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/theme/accent_color" type="Color" setter="" getter="">
+ </member>
+ <member name="interface/theme/additional_spacing" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/base_color" type="Color" setter="" getter="">
+ </member>
+ <member name="interface/theme/border_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/contrast" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/corner_radius" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/custom_theme" type="String" setter="" getter="">
+ </member>
+ <member name="interface/theme/icon_and_font_color" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/icon_saturation" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/preset" type="String" setter="" getter="">
+ </member>
+ <member name="interface/theme/relationship_line_opacity" type="float" setter="" getter="">
+ </member>
+ <member name="network/debug/remote_host" type="String" setter="" getter="">
+ </member>
+ <member name="network/debug/remote_port" type="int" setter="" getter="">
+ </member>
+ <member name="network/http_proxy/host" type="String" setter="" getter="">
+ </member>
+ <member name="network/http_proxy/port" type="int" setter="" getter="">
+ </member>
+ <member name="network/ssl/editor_ssl_certificates" type="String" setter="" getter="">
+ </member>
+ <member name="project_manager/sorting_order" type="int" setter="" getter="">
+ </member>
+ <member name="run/auto_save/save_before_running" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_clear_output_on_play" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_close_output_on_stop" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_open_output_on_play" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/font_size" type="int" setter="" getter="">
+ </member>
+ <member name="run/window_placement/rect" type="int" setter="" getter="">
+ </member>
+ <member name="run/window_placement/rect_custom_position" type="Vector2" setter="" getter="">
+ </member>
+ <member name="run/window_placement/screen" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/caret_blink" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/caret_blink_speed" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/highlight_all_occurrences" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/highlight_current_line" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/type" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_hard_column" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_soft_column" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/show_line_length_guidelines" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/highlight_type_safe_lines" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/line_numbers_zero_padded" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_bookmark_gutter" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_info_gutter" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_line_numbers" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/lines/code_folding" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/lines/word_wrap" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/minimap/minimap_width" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/minimap/show_minimap" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_spaces" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_tabs" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/line_spacing" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/auto_reload_scripts_on_external_change" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/autosave_interval_secs" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/convert_indent_on_save" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/restore_scripts_on_load" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/trim_trailing_whitespace_on_save" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/auto_indent" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/type" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/drag_and_drop_selection" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/move_caret_on_right_click" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/scroll_past_end_of_file" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/smooth_scrolling" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/stay_in_script_editor_on_node_selected" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/v_scroll_speed" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/add_type_hints" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/code_complete_delay" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/complete_file_paths" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/idle_parse_delay" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/put_callhint_tooltip_below_current_line" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/use_single_quotes" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/help/class_reference_examples" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_source_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_title_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/show_help_index" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/script_list/show_members_overview" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/script_list/sort_members_outline_alphabetically" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/color_theme" type="String" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/base_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/bookmark_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/brace_mismatch_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/breakpoint_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/caret_background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/caret_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/code_folding_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/comment_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_existing_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_font_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_hovered_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/control_flow_keyword_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/current_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/engine_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/executing_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/function_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/keyword_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/line_length_guideline_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/line_number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/mark_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/member_variable_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/safe_line_number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_border_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/selection_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/string_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/symbol_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/text_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/text_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/user_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/word_highlighted_color" type="Color" setter="" getter="">
+ </member>
+ </members>
<signals>
<signal name="settings_changed">
<description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 506992e3af..36dfee833b 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -151,6 +151,12 @@
[/codeblocks]
</description>
</method>
+ <method name="get_write_movie_path" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the path to the [MovieWriter]'s output file, or an empty string if the engine wasn't started in Movie Maker mode. This path can be absolute or relative depending on how the user specified it.
+ </description>
+ </method>
<method name="has_singleton" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 9da360915b..f662a07825 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -97,7 +97,7 @@
Blend factor between the fog's color and the color of the background [Sky]. Must have [member background_mode] set to [constant BG_SKY].
This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to [code]1.0[/code], the fog color comes completely from the [Sky]. If set to [code]0.0[/code], aerial perspective is disabled.
</member>
- <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.001">
+ <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.01">
The exponential fog density to use. Higher values result in a more dense fog.
</member>
<member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false">
@@ -109,7 +109,7 @@
<member name="fog_height_density" type="float" setter="set_fog_height_density" getter="get_fog_height_density" default="0.0">
The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
</member>
- <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.5, 0.6, 0.7, 1)">
+ <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.518, 0.553, 0.608, 1)">
The fog's color.
</member>
<member name="fog_light_energy" type="float" setter="set_fog_light_energy" getter="get_fog_light_energy" default="1.0">
@@ -320,8 +320,9 @@
<member name="volumetric_fog_enabled" type="bool" setter="set_volumetric_fog_enabled" getter="is_volumetric_fog_enabled" default="false">
Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with [FogVolume]s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission.
</member>
- <member name="volumetric_fog_gi_inject" type="float" setter="set_volumetric_fog_gi_inject" getter="get_volumetric_fog_gi_inject" default="0.0">
- Scales the strength of Global Illumination used in the volumetric fog. A value of [code]0[/code] means that Global Illumination will not impact the volumetric fog.
+ <member name="volumetric_fog_gi_inject" type="float" setter="set_volumetric_fog_gi_inject" getter="get_volumetric_fog_gi_inject" default="1.0">
+ Scales the strength of Global Illumination used in the volumetric fog. A value of [code]0.0[/code] means that Global Illumination will not impact the volumetric fog.
+ [b]Note:[/b] Only [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) are taken into account when using [member volumetric_fog_gi_inject]. Global illumination from [LightmapGI], [ReflectionProbe] and SSIL (see [member ssil_enabled]) will be ignored by volumetric fog.
</member>
<member name="volumetric_fog_length" type="float" setter="set_volumetric_fog_length" getter="get_volumetric_fog_length" default="64.0">
The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible.
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index b37de09e04..50979c9b68 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -56,6 +56,7 @@
<argument index="0" name="inputs" type="Array" default="[]" />
<argument index="1" name="base_instance" type="Object" default="null" />
<argument index="2" name="show_error" type="bool" default="true" />
+ <argument index="3" name="const_calls_only" type="bool" default="false" />
<description>
Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed].
If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order.
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 0b4a8fa46e..3a2776ff21 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -115,9 +115,10 @@
</method>
<method name="get_as_text" qualifiers="const">
<return type="String" />
+ <argument index="0" name="skip_cr" type="bool" default="false" />
<description>
- Returns the whole file as a [String].
- Text is interpreted as being UTF-8 encoded.
+ Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded.
+ If [code]skip_cr[/code] is [code]true[/code], carriage return characters ([code]\r[/code], CR) will be ignored when parsing the UTF-8, so that only line feed characters ([code]\n[/code], LF) represent a new line (Unix convention).
</description>
</method>
<method name="get_buffer" qualifiers="const">
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 9d55704604..f45031cea8 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -12,10 +12,11 @@
<method name="add_filter">
<return type="void" />
<argument index="0" name="filter" type="String" />
+ <argument index="1" name="description" type="String" default="&quot;&quot;" />
<description>
- Adds [code]filter[/code] to the list of filters, which restricts what files can be picked.
- A [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
- Example filters: [code]"*.png ; PNG Images"[/code], [code]"project.godot ; Godot Project"[/code].
+ Adds a comma-delimited file name [code]filter[/code] option to the [FileDialog] with an optional [code]description[/code], which restricts what files can be picked.
+ A [code]filter[/code] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
+ For example, a [code]filter[/code] of [code]"*.png, *.jpg"[/code] and a [code]description[/code] of [code]"Images"[/code] results in filter text "Images (*.png, *.jpg)".
</description>
</method>
<method name="clear_filters">
@@ -75,6 +76,9 @@
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
</member>
+ <member name="root_subfolder" type="String" setter="set_root_subfolder" getter="get_root_subfolder" default="&quot;&quot;">
+ If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory.
+ </member>
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
If [code]true[/code], the dialog will show hidden files.
</member>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index dae42ddf34..ec2776f636 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -1,93 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Font" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Font class is set of font data sources used to draw text.
+ Base class for fonts and font variations.
</brief_description>
<description>
- Font contains a set of glyphs to represent Unicode characters, as well as the ability to draw it with variable width, ascent, descent and kerning.
- [b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
- [b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
- [b]Note:[/b] If a non of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
- [codeblocks]
- [gdscript]
- var font = Font.new()
- font.add_data(load("res://BarlowCondensed-Bold.ttf"))
- $"Label".set("custom_fonts/font", font)
- $"Label".set("custom_fonts/font_size", 64)
- [/gdscript]
- [csharp]
- var font = new Font();
- font.AddData(ResourceLoader.Load&lt;FontData&gt;("res://BarlowCondensed-Bold.ttf"));
- GetNode("Label").Set("custom_fonts/font", font);
- GetNode("Label").Set("custom_font_sizes/font_size", 64);
- [/csharp]
- [/codeblocks]
- To control font substitution priority use [FontData] language and script support.
- Use language overrides to use same [Font] stack for multiple languages:
- [codeblocks]
- [gdscript]
- # Use Naskh font for Persian and Nastaʼlīq font for Urdu text.
- var font_data_fa = load("res://NotoNaskhArabicUI_Regular.ttf");
- font_data_fa.set_language_support_override("fa", true);
- font_data_fa.set_language_support_override("ur", false);
-
- var font_data_ur = load("res://NotoNastaliqUrdu_Regular.ttf");
- font_data_ur.set_language_support_override("fa", false);
- font_data_ur.set_language_support_override("ur", true);
- [/gdscript]
- [csharp]
- // Use Naskh font for Persian and Nastaʼlīq font for Urdu text.
- var fontDataFA = ResourceLoader.Load&lt;FontData&gt;("res://NotoNaskhArabicUI_Regular.ttf");
- fontDataFA.SetLanguageSupportOverride("fa", true);
- fontDataFA.SetLanguageSupportOverride("ur", false);
-
- var fontDataUR = ResourceLoader.Load&lt;FontData&gt;("res://NotoNastaliqUrdu_Regular.ttf");
- fontDataUR.SetLanguageSupportOverride("fa", false);
- fontDataUR.SetLanguageSupportOverride("ur", true);
- [/csharp]
- [/codeblocks]
- Use script overrides to specify supported scripts for bitmap font or for less common scripts not directly supported by TrueType format:
- [codeblocks]
- [gdscript]
- # Use specified font for Egyptian hieroglyphs.
- var font_data = load("res://unifont.ttf");
- font_data.set_script_support_override("Egyp", true);
- [/gdscript]
- [csharp]
- // Use specified font for Egyptian hieroglyphs.
- var fontData = ResourceLoader.Load&lt;FontData&gt;("res://unifont.ttf");
- fontData.SetScriptSupportOverride("Egyp", true);
- [/csharp]
- [/codeblocks]
+ Font is the abstract base class for font, so it shouldn't be used directly. Other types of fonts inherit from it.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="add_data">
- <return type="void" />
- <argument index="0" name="data" type="FontData" />
- <description>
- Add font data source to the set.
- </description>
- </method>
- <method name="clear_data">
- <return type="void" />
+ <method name="draw_char" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="canvas_item" type="RID" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="char" type="int" />
+ <argument index="3" name="font_size" type="int" />
+ <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Removes all font data sourcers for the set.
+ Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
</description>
</method>
- <method name="draw_char" qualifiers="const">
+ <method name="draw_char_outline" qualifiers="const">
<return type="float" />
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="int" />
- <argument index="3" name="next" type="int" default="0" />
- <argument index="4" name="size" type="int" default="16" />
+ <argument index="3" name="font_size" type="int" />
+ <argument index="4" name="size" type="int" default="-1" />
<argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="6" name="outline_size" type="int" default="0" />
- <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
<description>
- Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Draw a single Unicode character [code]char[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
[b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
</description>
</method>
@@ -98,17 +41,38 @@
<argument index="2" name="text" type="String" />
<argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="max_lines" type="int" default="-1" />
- <argument index="6" name="size" type="int" default="16" />
+ <argument index="5" name="font_size" type="int" default="16" />
+ <argument index="6" name="max_lines" type="int" default="-1" />
<argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="8" name="outline_size" type="int" default="0" />
- <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="10" name="flags" type="int" default="99" />
+ <argument index="8" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <argument index="9" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="10" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
See also [method CanvasItem.draw_multiline_string].
</description>
</method>
+ <method name="draw_multiline_string_outline" qualifiers="const">
+ <return type="void" />
+ <argument index="0" name="canvas_item" type="RID" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="text" type="String" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <argument index="4" name="width" type="float" default="-1" />
+ <argument index="5" name="font_size" type="int" default="16" />
+ <argument index="6" name="max_lines" type="int" default="-1" />
+ <argument index="7" name="size" type="int" default="1" />
+ <argument index="8" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="9" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <argument index="10" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="11" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
+ <description>
+ Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws text outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ See also [method CanvasItem.draw_multiline_string_outline].
+ </description>
+ </method>
<method name="draw_string" qualifiers="const">
<return type="void" />
<argument index="0" name="canvas_item" type="RID" />
@@ -116,19 +80,47 @@
<argument index="2" name="text" type="String" />
<argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="size" type="int" default="16" />
+ <argument index="5" name="font_size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="7" name="outline_size" type="int" default="0" />
- <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="9" name="flags" type="int" default="3" />
+ <argument index="7" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="8" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Draw [code]text[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
See also [method CanvasItem.draw_string].
</description>
</method>
+ <method name="draw_string_outline" qualifiers="const">
+ <return type="void" />
+ <argument index="0" name="canvas_item" type="RID" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="text" type="String" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <argument index="4" name="width" type="float" default="-1" />
+ <argument index="5" name="font_size" type="int" default="16" />
+ <argument index="6" name="size" type="int" default="1" />
+ <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="8" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
+ <description>
+ Draw [code]text[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ See also [method CanvasItem.draw_string_outline].
+ </description>
+ </method>
+ <method name="find_variation" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="variation_coordinates" type="Dictionary" />
+ <argument index="1" name="face_index" type="int" default="0" />
+ <argument index="2" name="strength" type="float" default="0.0" />
+ <argument index="3" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
+ <description>
+ Returns [TextServer] RID of the font cache for specific variation.
+ </description>
+ </method>
<method name="get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <argument index="0" name="font_size" type="int" default="16" />
<description>
Returns the average font ascent (number of pixels above the baseline).
[b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line).
@@ -137,44 +129,53 @@
<method name="get_char_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="char" type="int" />
- <argument index="1" name="next" type="int" default="0" />
- <argument index="2" name="size" type="int" default="16" />
+ <argument index="1" name="font_size" type="int" />
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
[b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.
</description>
</method>
- <method name="get_data" qualifiers="const">
- <return type="FontData" />
- <argument index="0" name="idx" type="int" />
+ <method name="get_descent" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="font_size" type="int" default="16" />
<description>
- Returns the font data source at index [code]idx[/code]. If the index does not exist, returns [code]null[/code].
+ Returns the average font descent (number of pixels below the baseline).
+ [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
</description>
</method>
- <method name="get_data_count" qualifiers="const">
+ <method name="get_face_count" qualifiers="const">
<return type="int" />
<description>
- Returns the number of font data sources.
+ Returns number of faces in the TrueType / OpenType collection.
</description>
</method>
- <method name="get_data_rid" qualifiers="const">
- <return type="RID" />
- <argument index="0" name="idx" type="int" />
+ <method name="get_fallbacks" qualifiers="const">
+ <return type="Font[]" />
<description>
- Returns TextServer RID of the font data resources.
+ Returns array of fallback [Font]s.
</description>
</method>
- <method name="get_descent" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <method name="get_font_name" qualifiers="const">
+ <return type="String" />
<description>
- Returns the average font descent (number of pixels below the baseline).
- [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
+ Returns font family name.
+ </description>
+ </method>
+ <method name="get_font_style" qualifiers="const">
+ <return type="int" enum="TextServer.FontStyle" />
+ <description>
+ Returns font style flags, see [enum TextServer.FontStyle].
+ </description>
+ </method>
+ <method name="get_font_style_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns font style name.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <argument index="0" name="font_size" type="int" default="16" />
<description>
Returns the total average font height (ascent plus descent) in pixels.
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line).
@@ -183,18 +184,29 @@
<method name="get_multiline_string_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="text" type="String" />
- <argument index="1" name="width" type="float" default="-1" />
- <argument index="2" name="size" type="int" default="16" />
- <argument index="3" name="flags" type="int" default="96" />
+ <argument index="1" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <argument index="2" name="width" type="float" default="-1" />
+ <argument index="3" name="font_size" type="int" default="16" />
+ <argument index="4" name="max_lines" type="int" default="-1" />
+ <argument index="5" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <argument index="6" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="7" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="8" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account.
See also [method draw_multiline_string].
</description>
</method>
+ <method name="get_opentype_features" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns a set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
<method name="get_rids" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<description>
- Returns [Array] of valid [FontData] [RID]s, which can be passed to the [TextServer] methods.
+ Returns [Array] of valid [Font] [RID]s, which can be passed to the [TextServer] methods.
</description>
</method>
<method name="get_spacing" qualifiers="const">
@@ -207,14 +219,19 @@
<method name="get_string_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="text" type="String" />
- <argument index="1" name="size" type="int" default="16" />
- <argument index="2" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
- <argument index="3" name="width" type="float" default="-1" />
- <argument index="4" name="flags" type="int" default="3" />
+ <argument index="1" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <argument index="2" name="width" type="float" default="-1" />
+ <argument index="3" name="font_size" type="int" default="16" />
+ <argument index="4" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <argument index="5" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <argument index="6" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Returns the size of a bounding box of a string, taking kerning and advance into account.
+ Returns the size of a bounding box of a single-line string, taking kerning and advance into account. See also [method get_multiline_string_size] and [method draw_string].
+ For example, to get the string size as displayed by a single-line Label, use:
+ [codeblock]
+ var string_size = $Label.get_theme_font("font").get_string_size($Label.text, HORIZONTAL_ALIGNMENT_LEFT, -1, $Label.get_theme_font_size("font_size"))
+ [/codeblock]
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height].
- See also [method draw_string].
</description>
</method>
<method name="get_supported_chars" qualifiers="const">
@@ -224,9 +241,22 @@
If a given character is included in more than one font data source, it appears only once in the returned string.
</description>
</method>
+ <method name="get_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns list of OpenType features supported by font.
+ </description>
+ </method>
+ <method name="get_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
+ Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ </description>
+ </method>
<method name="get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <argument index="0" name="font_size" type="int" default="16" />
<description>
Returns average pixel offset of the underline below the baseline.
[b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
@@ -234,7 +264,7 @@
</method>
<method name="get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <argument index="0" name="font_size" type="int" default="16" />
<description>
Returns average thickness of the underline.
[b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
@@ -247,45 +277,34 @@
Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="remove_data">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
+ <method name="is_language_supported" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="language" type="String" />
<description>
- Removes the font data source at index [code]idx[/code]. If the index does not exist, nothing happens.
+ Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
- <method name="set_data">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="data" type="FontData" />
+ <method name="is_script_supported" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="script" type="String" />
<description>
- Sets the font data source at index [code]idx[/code]. If the index does not exist, nothing happens.
+ Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
- <method name="set_spacing">
+ <method name="set_cache_capacity">
<return type="void" />
- <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="single_line" type="int" />
+ <argument index="1" name="multi_line" type="int" />
<description>
- Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets LRU cache capacity for [code]draw_*[/code] methods.
</description>
</method>
- <method name="update_changes">
+ <method name="set_fallbacks">
<return type="void" />
+ <argument index="0" name="fallbacks" type="Font[]" />
<description>
- After editing a font (changing data sources, etc.). Call this function to propagate changes to controls that might use it.
+ Sets array of fallback [Font]s.
</description>
</method>
</methods>
- <members>
- <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing at the bottom of the line in pixels.
- </member>
- <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing at the top of the line in pixels.
- </member>
- <member name="variation_coordinates" type="Dictionary" setter="set_variation_coordinates" getter="get_variation_coordinates" default="{}">
- Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url].
- </member>
- </members>
</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontFile.xml
index a423d7a4e4..dc2cbdde63 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontFile.xml
@@ -1,13 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FontData" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="FontFile" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Font source data and prerendered glyph cache, imported from dynamic or bitmap font.
+ </brief_description>
+ <description>
+ [FontFile] contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback [Font]s to use.
+ Use [FontVariation] to access specific OpenType variation of the font, create simulated bold / slanted version, and draw lines of text.
+ For more complex text processing, use [FontVariation] in conjunction with [TextLine] or [TextParagraph].
Supported font formats:
- - Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm).
+ - Dynamic font importer: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm).
- Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
- Monospace image font importer: All supported image formats.
- </brief_description>
- <description>
+ [b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
+ [b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
+ [b]Note:[/b] If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
+
+ [codeblocks]
+ [gdscript]
+ var f = load("res://BarlowCondensed-Bold.ttf")
+ $"Label".set("custom_fonts/font", f)
+ $"Label".set("custom_fonts/font_size", 64)
+ [/gdscript]
+ [csharp]
+ var f = ResourceLoader.Load&lt;FontFile&gt;("res://BarlowCondensed-Bold.ttf");
+ GetNode("Label").Set("custom_fonts/font", f);
+ GetNode("Label").Set("custom_font_sizes/font_size", 64);
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
@@ -51,14 +70,7 @@
[b]Note:[/b] This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.
</description>
</method>
- <method name="find_cache" qualifiers="const">
- <return type="RID" />
- <argument index="0" name="variation_coordinates" type="Dictionary" />
- <description>
- Returns existing or creates a new font cache entry for the specified variation coordinates.
- </description>
- </method>
- <method name="get_ascent" qualifiers="const">
+ <method name="get_cache_ascent" qualifiers="const">
<return type="float" />
<argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="int" />
@@ -72,19 +84,46 @@
Returns number of the font cache entries.
</description>
</method>
- <method name="get_cache_rid" qualifiers="const">
- <return type="RID" />
+ <method name="get_cache_descent" qualifiers="const">
+ <return type="float" />
<argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns text server font cache entry resource id.
</description>
</method>
- <method name="get_descent" qualifiers="const">
+ <method name="get_cache_scale" qualifiers="const">
<return type="float" />
<argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="int" />
<description>
- Returns font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="get_cache_underline_position" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_cache_underline_thickness" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_embolden" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ </description>
+ </method>
+ <method name="get_face_index" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ Recturns an active face index in the TrueType / OpenType collection.
</description>
</method>
<method name="get_glyph_advance" qualifiers="const">
@@ -180,14 +219,6 @@
Returns list of language support overrides.
</description>
</method>
- <method name="get_scale" qualifiers="const">
- <return type="float" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <description>
- Returns scaling factor of the color bitmap font.
- </description>
- </method>
<method name="get_script_support_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -208,34 +239,6 @@
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
- <method name="get_spacing" qualifiers="const">
- <return type="int" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing_type" type="int" enum="TextServer.SpacingType" />
- <description>
- Returns extra spacing added between glyphs in pixels.
- </description>
- </method>
- <method name="get_supported_chars" qualifiers="const">
- <return type="String" />
- <description>
- Returns a string containing all the characters available in the font.
- </description>
- </method>
- <method name="get_supported_feature_list" qualifiers="const">
- <return type="Dictionary" />
- <description>
- Returns list of OpenType features supported by font.
- </description>
- </method>
- <method name="get_supported_variation_list" qualifiers="const">
- <return type="Dictionary" />
- <description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
- </description>
- </method>
<method name="get_texture_count" qualifiers="const">
<return type="int" />
<argument index="0" name="cache_index" type="int" />
@@ -262,48 +265,18 @@
Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
- <method name="get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <description>
- Returns pixel offset of the underline below the baseline.
- </description>
- </method>
- <method name="get_underline_thickness" qualifiers="const">
- <return type="float" />
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform2D" />
<argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
<description>
- Returns thickness of the underline in pixels.
+ Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
</description>
</method>
<method name="get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
<argument index="0" name="cache_index" type="int" />
<description>
- Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
- </description>
- </method>
- <method name="has_char" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="char" type="int" />
- <description>
- Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
- </description>
- </method>
- <method name="is_language_supported" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="language" type="String" />
- <description>
- Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
- </description>
- </method>
- <method name="is_script_supported" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="script" type="String" />
- <description>
- Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
+ Returns variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info.
</description>
</method>
<method name="load_bitmap_font">
@@ -376,8 +349,8 @@
<argument index="1" name="size" type="Vector2i" />
<argument index="2" name="texture_index" type="int" />
<description>
- Removes specified texture from font cache entry.
- [b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph].
+ Removes specified texture from the cache entry.
+ [b]Note:[/b] This function will not remove glyphs associated with the texture. Remove them manually using [method remove_glyph].
</description>
</method>
<method name="render_glyph">
@@ -386,7 +359,7 @@
<argument index="1" name="size" type="Vector2i" />
<argument index="2" name="index" type="int" />
<description>
- Renders specified glyph the the font cache texture.
+ Renders specified glyph to the font cache texture.
</description>
</method>
<method name="render_range">
@@ -399,22 +372,60 @@
Renders the range of characters to the font cache texture.
</description>
</method>
- <method name="set_ascent">
+ <method name="set_cache_ascent">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="int" />
<argument index="2" name="ascent" type="float" />
<description>
- Sets the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="set_descent">
+ <method name="set_cache_descent">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="int" />
<argument index="2" name="descent" type="float" />
<description>
- Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="set_cache_scale">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="set_cache_underline_position">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="set_cache_underline_thickness">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="set_embolden">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="strength" type="float" />
+ <description>
+ Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ </description>
+ </method>
+ <method name="set_face_index">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="face_index" type="int" />
+ <description>
+ Sets an active face index in the TrueType / OpenType collection.
</description>
</method>
<method name="set_glyph_advance">
@@ -483,16 +494,7 @@
<argument index="0" name="language" type="String" />
<argument index="1" name="supported" type="bool" />
<description>
- Adds override for [method is_language_supported].
- </description>
- </method>
- <method name="set_scale">
- <return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="scale" type="float" />
- <description>
- Sets scaling factor of the color bitmap font.
+ Adds override for [method Font.is_language_supported].
</description>
</method>
<method name="set_script_support_override">
@@ -500,17 +502,7 @@
<argument index="0" name="script" type="String" />
<argument index="1" name="supported" type="bool" />
<description>
- Adds override for [method is_script_supported].
- </description>
- </method>
- <method name="set_spacing">
- <return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing_type" type="int" enum="TextServer.SpacingType" />
- <argument index="3" name="value" type="int" />
- <description>
- Sets extra spacing added between glyphs in pixels.
+ Adds override for [method Font.is_script_supported].
</description>
</method>
<method name="set_texture_image">
@@ -533,22 +525,12 @@
Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support).
</description>
</method>
- <method name="set_underline_position">
- <return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_position" type="float" />
- <description>
- Sets pixel offset of the underline below the baseline.
- </description>
- </method>
- <method name="set_underline_thickness">
+ <method name="set_transform">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_thickness" type="float" />
+ <argument index="1" name="transform" type="Transform2D" />
<description>
- Sets thickness of the underline in pixels.
+ Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
</description>
</method>
<method name="set_variation_coordinates">
@@ -556,7 +538,7 @@
<argument index="0" name="cache_index" type="int" />
<argument index="1" name="variation_coordinates" type="Dictionary" />
<description>
- Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
+ Sets variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info.
</description>
</method>
</methods>
@@ -567,8 +549,8 @@
<member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()">
Contents of the dynamic font source file.
</member>
- <member name="embolden" type="float" setter="set_embolden" getter="get_embolden" default="0.0">
- If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ <member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
+ Array of fallback [Font]s.
</member>
<member name="fixed_size" type="int" setter="set_fixed_size" getter="get_fixed_size" default="0">
Font size, used only for the bitmap fonts.
@@ -576,7 +558,7 @@
<member name="font_name" type="String" setter="set_font_name" getter="get_font_name" default="&quot;&quot;">
Font family name.
</member>
- <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" default="0">
+ <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
Font style flags, see [enum TextServer.FontStyle].
</member>
<member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
@@ -609,9 +591,5 @@
<member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
</member>
- <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
- 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
- For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
- </member>
</members>
</class>
diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml
new file mode 100644
index 0000000000..a1b96fb137
--- /dev/null
+++ b/doc/classes/FontVariation.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FontVariation" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Variation of the [Font].
+ </brief_description>
+ <description>
+ OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing.
+
+ To use simulated bold font variant:
+ [codeblocks]
+ [gdscript]
+ var fv = FontVariation.new()
+ fv.set_base_font(load("res://BarlowCondensed-Regular.ttf"))
+ fv.set_variation_embolden(1.2);
+ $"Label".set("custom_fonts/font", fv)
+ $"Label".set("custom_fonts/font_size", 64)
+ [/gdscript]
+ [csharp]
+ var fv = new FontVariation();
+ fv.SetBaseFont(ResourceLoader.Load&lt;FontFile&gt;("res://BarlowCondensed-Regular.ttf"));
+ fv.SetVariationEmbolden(1.2);
+ GetNode("Label").Set("custom_fonts/font", fv);
+ GetNode("Label").Set("custom_font_sizes/font_size", 64);
+ [/csharp]
+ [/codeblocks]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_spacing">
+ <return type="void" />
+ <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="1" name="value" type="int" />
+ <description>
+ Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_font" type="Font" setter="set_base_font" getter="get_base_font">
+ Base font used to create a variation. If not set, default [Theme] font is used.
+ </member>
+ <member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
+ Array of fallback [Font]s. If not set [member base_font] fallback are ussed.
+ </member>
+ <member name="opentype_features" type="Dictionary" setter="set_opentype_features" getter="get_opentype_features" default="{}">
+ A set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </member>
+ <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing at the bottom of the line in pixels.
+ </member>
+ <member name="spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing between graphical glyphs
+ </member>
+ <member name="spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra width of the space glyphs.
+ </member>
+ <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing at the top of the line in pixels.
+ </member>
+ <member name="variation_embolden" type="float" setter="set_variation_embolden" getter="get_variation_embolden" default="0.0">
+ If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ [b]Note:[/b] Emboldened fonts might have self-intersecting outlines, which will prevent MSDF fonts and [TextMesh] from working correctly.
+ </member>
+ <member name="variation_face_index" type="int" setter="set_variation_face_index" getter="get_variation_face_index" default="0">
+ Active face index in the TrueType / OpenType collection file.
+ </member>
+ <member name="variation_opentype" type="Dictionary" setter="set_variation_opentype" getter="get_variation_opentype" default="{}">
+ Font OpenType variation coordinates. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]OpenType variation tags[/url].
+ </member>
+ <member name="variation_transform" type="Transform2D" setter="set_variation_transform" getter="get_variation_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
+ 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
+ For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index 53894bad87..e60ab094c6 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -63,8 +63,8 @@
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false">
+ If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [GPUParticles2D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [GPUParticles2D] node (and its parents) when it is moved or rotated.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index c4bd18db69..b415c56154 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -95,8 +95,8 @@
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false">
+ If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only [code]amount[/code] particles will be emitted.
diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml
index b84e221d1c..a4cfa1ddff 100644
--- a/doc/classes/Geometry2D.xml
+++ b/doc/classes/Geometry2D.xml
@@ -126,7 +126,7 @@
<return type="Dictionary" />
<argument index="0" name="sizes" type="PackedVector2Array" />
<description>
- Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
+ Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is an array of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
</description>
</method>
<method name="merge_polygons">
@@ -188,6 +188,16 @@
Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code].
</description>
</method>
+ <method name="segment_intersects_circle">
+ <return type="float" />
+ <argument index="0" name="segment_from" type="Vector2" />
+ <argument index="1" name="segment_to" type="Vector2" />
+ <argument index="2" name="circle_position" type="Vector2" />
+ <argument index="3" name="circle_radius" type="float" />
+ <description>
+ Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).
+ </description>
+ </method>
<method name="segment_intersects_segment">
<return type="Variant" />
<argument index="0" name="from_a" type="Vector2" />
diff --git a/doc/classes/GradientTexture1D.xml b/doc/classes/GradientTexture1D.xml
index a124753a9f..3254754ac1 100644
--- a/doc/classes/GradientTexture1D.xml
+++ b/doc/classes/GradientTexture1D.xml
@@ -4,7 +4,7 @@
Gradient-filled texture.
</brief_description>
<description>
- GradientTexture1D uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]).
+ GradientTexture1D uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]). See also [GradientTexture2D], [CurveTexture] and [CurveXYZTexture].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/GradientTexture2D.xml b/doc/classes/GradientTexture2D.xml
index 4362578932..7561f1b947 100644
--- a/doc/classes/GradientTexture2D.xml
+++ b/doc/classes/GradientTexture2D.xml
@@ -4,7 +4,7 @@
Gradient-filled 2D texture.
</brief_description>
<description>
- The texture uses a [Gradient] to fill the texture data in 2D space. The gradient is filled according to the specified [member fill] and [member repeat] types using colors obtained from the gradient. The texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width] and [member height]).
+ The texture uses a [Gradient] to fill the texture data in 2D space. The gradient is filled according to the specified [member fill] and [member repeat] types using colors obtained from the gradient. The texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width] and [member height]). See also [GradientTexture1D], [CurveTexture] and [CurveXYZTexture].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 965dbe7449..33145dccd0 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -55,6 +55,29 @@
[/codeblock]
</description>
</method>
+ <method name="_is_node_hover_valid" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="from" type="StringName" />
+ <argument index="1" name="from_slot" type="int" />
+ <argument index="2" name="to" type="StringName" />
+ <argument index="3" name="to_slot" type="int" />
+ <description>
+ This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port.
+ Return [code]true[/code] if the connection is indeed valid or return [code]false[/code] if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen.
+ In this example a connection to same node is suppressed:
+ [codeblocks]
+ [gdscript]
+ func _is_node_hover_valid(from, from_slot, to, to_slot):
+ return from != to
+ [/gdscript]
+ [csharp]
+ public override bool _IsNodeHoverValid(String from, int fromSlot, String to, int toSlot) {
+ return from != to;
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="add_valid_connection_type">
<return type="void" />
<argument index="0" name="from_type" type="int" />
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index f261da8413..36dbae1d74 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -17,12 +17,6 @@
Disables all input and output slots of the GraphNode.
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="clear_slot">
<return type="void" />
<argument index="0" name="idx" type="int" />
@@ -98,13 +92,6 @@
Returns the type of the output connection [code]idx[/code].
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
<method name="get_slot_color_left" qualifiers="const">
<return type="Color" />
<argument index="0" name="idx" type="int" />
@@ -154,14 +141,6 @@
Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_slot">
<return type="void" />
<argument index="0" name="idx" type="int" />
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 641d73e333..3d2e9449e2 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -15,7 +15,7 @@
# Create an HTTP request node and connect its completion signal.
var http_request = HTTPRequest.new()
add_child(http_request)
- http_request.connect("request_completed", self, "_http_request_completed")
+ http_request.request_completed.connect(self._http_request_completed)
# Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request("https://httpbin.org/get")
@@ -25,7 +25,7 @@
# Perform a POST request. The URL below returns JSON as of writing.
# Note: Don't make simultaneous requests using a single HTTPRequest node.
# The snippet below is provided for reference only.
- var body = {"name": "Godette"}
+ var body = JSON.new().stringify({"name": "Godette"})
error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body)
if error != OK:
push_error("An error occurred in the HTTP request.")
@@ -33,7 +33,9 @@
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
- var response = parse_json(body.get_string_from_utf8())
+ var json = JSON.new()
+ json.parse(body.get_string_from_utf8())
+ var response = json.get_data()
# Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
print(response.headers["User-Agent"])
@@ -44,7 +46,7 @@
// Create an HTTP request node and connect its completion signal.
var httpRequest = new HTTPRequest();
AddChild(httpRequest);
- httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted));
+ httpRequest.RequestCompleted += HttpRequestCompleted;
// Perform a GET request. The URL below returns JSON as of writing.
Error error = httpRequest.Request("https://httpbin.org/get");
@@ -56,21 +58,24 @@
// Perform a POST request. The URL below returns JSON as of writing.
// Note: Don't make simultaneous requests using a single HTTPRequest node.
// The snippet below is provided for reference only.
- string[] body = { "name", "Godette" };
- // GDScript to_json is non existent, so we use JSON.Print() here.
- error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, JSON.Print(body));
+ string body = new JSON().Stringify(new Godot.Collections.Dictionary
+ {
+ { "name", "Godette" }
+ });
+ error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, body);
if (error != Error.Ok)
{
GD.PushError("An error occurred in the HTTP request.");
}
}
-
// Called when the HTTP request is completed.
private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body)
{
- // GDScript parse_json is non existent so we have to use JSON.parse, which has a slightly different syntax.
- var response = JSON.Parse(body.GetStringFromUTF8()).Result as Godot.Collections.Dictionary;
+ var json = new JSON();
+ json.Parse(body.GetStringFromUTF8());
+ var response = json.GetData() as Godot.Collections.Dictionary;
+
// Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
GD.Print((response["headers"] as Godot.Collections.Dictionary)["User-Agent"]);
}
@@ -83,7 +88,7 @@
# Create an HTTP request node and connect its completion signal.
var http_request = HTTPRequest.new()
add_child(http_request)
- http_request.connect("request_completed", self, "_http_request_completed")
+ http_request.request_completed.connect(self._http_request_completed)
# Perform the HTTP request. The URL below returns a PNG image as of writing.
var error = http_request.request("https://via.placeholder.com/512")
@@ -101,8 +106,7 @@
if error != OK:
push_error("Couldn't load the image.")
- var texture = ImageTexture.new()
- texture.create_from_image(image)
+ var texture = ImageTexture.create_from_image(image)
# Display the image in a TextureRect node.
var texture_rect = TextureRect.new()
@@ -115,7 +119,7 @@
// Create an HTTP request node and connect its completion signal.
var httpRequest = new HTTPRequest();
AddChild(httpRequest);
- httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted));
+ httpRequest.RequestCompleted += HttpRequestCompleted;
// Perform the HTTP request. The URL below returns a PNG image as of writing.
Error error = httpRequest.Request("https://via.placeholder.com/512");
@@ -125,7 +129,6 @@
}
}
-
// Called when the HTTP request is completed.
private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body)
{
@@ -248,6 +251,7 @@
Maximum number of allowed redirects.
</member>
<member name="timeout" type="float" setter="set_timeout" getter="get_timeout" default="0.0">
+ If set to a value greater than [code]0.0[/code] before the request starts, the HTTP request will time out after [code]timeout[/code] seconds have passed and the request is not [i]completed[/i] yet. For small HTTP requests such as REST API usage, set [member timeout] to a value between [code]10.0[/code] and [code]30.0[/code] to prevent the application from getting stuck if the request fails to get a response in a timely manner. For file downloads, leave this to [code]0.0[/code] to prevent the download from failing if it takes too much time.
</member>
<member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads" default="false">
If [code]true[/code], multithreading is used to improve performance.
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index da5b907fab..a927345e79 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -23,8 +23,8 @@
<method name="blend_rect">
<return type="void" />
<argument index="0" name="src" type="Image" />
- <argument index="1" name="src_rect" type="Rect2" />
- <argument index="2" name="dst" type="Vector2" />
+ <argument index="1" name="src_rect" type="Rect2i" />
+ <argument index="2" name="dst" type="Vector2i" />
<description>
Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dest[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty.
</description>
@@ -33,8 +33,8 @@
<return type="void" />
<argument index="0" name="src" type="Image" />
<argument index="1" name="mask" type="Image" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="dst" type="Vector2" />
+ <argument index="2" name="src_rect" type="Rect2i" />
+ <argument index="3" name="dst" type="Vector2i" />
<description>
Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image using [code]mask[/code] image at coordinates [code]dst[/code], clipped accordingly to both image bounds. Alpha channels are required for both [code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and [code]src[/code] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty.
</description>
@@ -42,8 +42,8 @@
<method name="blit_rect">
<return type="void" />
<argument index="0" name="src" type="Image" />
- <argument index="1" name="src_rect" type="Rect2" />
- <argument index="2" name="dst" type="Vector2" />
+ <argument index="1" name="src_rect" type="Rect2i" />
+ <argument index="2" name="dst" type="Vector2i" />
<description>
Copies [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dst[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty.
</description>
@@ -52,8 +52,8 @@
<return type="void" />
<argument index="0" name="src" type="Image" />
<argument index="1" name="mask" type="Image" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="dst" type="Vector2" />
+ <argument index="2" name="src_rect" type="Rect2i" />
+ <argument index="3" name="dst" type="Vector2i" />
<description>
Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code], clipped accordingly to both image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty.
</description>
@@ -168,7 +168,7 @@
</method>
<method name="fill_rect">
<return type="void" />
- <argument index="0" name="rect" type="Rect2" />
+ <argument index="0" name="rect" type="Rect2i" />
<argument index="1" name="color" type="Color" />
<description>
Fills [code]rect[/code] with [code]color[/code].
@@ -244,7 +244,7 @@
</method>
<method name="get_rect" qualifiers="const">
<return type="Image" />
- <argument index="0" name="rect" type="Rect2" />
+ <argument index="0" name="rect" type="Rect2i" />
<description>
Returns a new image that is a copy of the image's area specified with [code]rect[/code].
</description>
@@ -256,9 +256,9 @@
</description>
</method>
<method name="get_used_rect" qualifiers="const">
- <return type="Rect2" />
+ <return type="Rect2i" />
<description>
- Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible.
+ Returns a [Rect2i] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible.
</description>
</method>
<method name="get_width" qualifiers="const">
@@ -308,6 +308,13 @@
[b]Note:[/b] Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported.
</description>
</method>
+ <method name="load_from_file" qualifiers="static">
+ <return type="Image" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Creates a new [Image] and loads data from the specified file.
+ </description>
+ </method>
<method name="load_jpg_from_buffer">
<return type="int" enum="Error" />
<argument index="0" name="buffer" type="PackedByteArray" />
@@ -371,6 +378,19 @@
Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image.
</description>
</method>
+ <method name="rotate_180">
+ <return type="void" />
+ <description>
+ Rotates the image by [code]180[/code] degrees. The width and height of the image must be greater than [code]1[/code].
+ </description>
+ </method>
+ <method name="rotate_90">
+ <return type="void" />
+ <argument index="0" name="direction" type="int" enum="ClockDirection" />
+ <description>
+ Rotates the image in the specified [code]direction[/code] by [code]90[/code] degrees. The width and height of the image must be greater than [code]1[/code]. If the width and height are not equal, the image will be resized.
+ </description>
+ </method>
<method name="save_exr" qualifiers="const">
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
@@ -380,16 +400,59 @@
[b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project.
</description>
</method>
+ <method name="save_exr_to_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <argument index="0" name="grayscale" type="bool" default="false" />
+ <description>
+ Saves the image as an EXR file to a byte array. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module.
+ [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return an empty byte array when it is called from an exported project.
+ </description>
+ </method>
+ <method name="save_jpg" qualifiers="const">
+ <return type="int" enum="Error" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="quality" type="float" default="0.75" />
+ <description>
+ Saves the image as a JPEG file to [code]path[/code] with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy.
+ [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel.
+ </description>
+ </method>
+ <method name="save_jpg_to_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <argument index="0" name="quality" type="float" default="0.75" />
+ <description>
+ Saves the image as a JPEG file to a byte array with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy.
+ [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel.
+ </description>
+ </method>
<method name="save_png" qualifiers="const">
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
- Saves the image as a PNG file to [code]path[/code].
+ Saves the image as a PNG file to the file at [code]path[/code].
</description>
</method>
<method name="save_png_to_buffer" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Saves the image as a PNG file to a byte array.
+ </description>
+ </method>
+ <method name="save_webp" qualifiers="const">
+ <return type="int" enum="Error" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="lossy" type="bool" default="false" />
+ <argument index="2" name="quality" type="float" default="0.75" />
+ <description>
+ Saves the image as a WebP (Web Picture) file to the file at [code]path[/code]. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive).
+ </description>
+ </method>
+ <method name="save_webp_to_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <argument index="0" name="lossy" type="bool" default="false" />
+ <argument index="1" name="quality" type="float" default="0.75" />
+ <description>
+ Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive).
</description>
</method>
<method name="set_pixel">
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index aecb4fc4b6..084bf7e809 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -6,10 +6,8 @@
<description>
A [Texture2D] based on an [Image]. For an image to be displayed, an [ImageTexture] has to be created from it using the [method create_from_image] method:
[codeblock]
- var texture = ImageTexture.new()
- var image = Image.new()
- image.load("res://icon.png")
- texture.create_from_image(image)
+ var image = Image.load_from_file("res://icon.png")
+ var texture = ImageTexture.create_from_image(image)
$Sprite2D.texture = texture
[/codeblock]
This way, textures can be created at run-time by loading images both from within the editor and externally.
@@ -31,11 +29,11 @@
<link title="Importing images">$DOCS_URL/tutorials/assets_pipeline/importing_images.html</link>
</tutorials>
<methods>
- <method name="create_from_image">
- <return type="void" />
+ <method name="create_from_image" qualifiers="static">
+ <return type="ImageTexture" />
<argument index="0" name="image" type="Image" />
<description>
- Initializes the texture by allocating and setting the data from an [Image].
+ Creates a new [ImageTexture] and initializes it by allocating and setting the data from an [Image].
</description>
</method>
<method name="get_format" qualifiers="const">
@@ -44,9 +42,17 @@
Returns the format of the texture, one of [enum Image.Format].
</description>
</method>
+ <method name="set_image">
+ <return type="void" />
+ <argument index="0" name="image" type="Image" />
+ <description>
+ Replaces the texture's data with a new [Image]. This will re-allocate new memory for the texture.
+ If you want to update the image, but don't need to change its parameters (format, size), use [method update] instead for better performance.
+ </description>
+ </method>
<method name="set_size_override">
<return type="void" />
- <argument index="0" name="size" type="Vector2" />
+ <argument index="0" name="size" type="Vector2i" />
<description>
Resizes the texture to the specified dimensions.
</description>
@@ -56,8 +62,8 @@
<argument index="0" name="image" type="Image" />
<description>
Replaces the texture's data with a new [Image].
- [b]Note:[/b] The texture has to be initialized first with the [method create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [method create_from_image] method.
- Use this method over [method create_from_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.
+ [b]Note:[/b] The texture has to be created using [method create_from_image] or initialized first with the [method set_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration.
+ Use this method over [method set_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.
</description>
</method>
</methods>
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index 90e7df4421..201c0ddd38 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -30,7 +30,7 @@
<description>
Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays].
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear">
@@ -39,6 +39,16 @@
Removes all surfaces and blend shapes from this [ImporterMesh].
</description>
</method>
+ <method name="generate_lods">
+ <return type="void" />
+ <argument index="0" name="normal_merge_angle" type="float" />
+ <argument index="1" name="normal_split_angle" type="float" />
+ <description>
+ Generates all lods for this ImporterMesh.
+ [code]normal_merge_angle[/code] and [code]normal_split_angle[/code] are in degrees and used in the same way as the importer settings in [code]lods[/code]. As a good default, use 25 and 60 respectively.
+ The number of generated lods can be accessed using [method get_surface_lod_count], and each LOD is available in [method get_surface_lod_size] and [method get_surface_lod_indices].
+ </description>
+ </method>
<method name="get_blend_shape_count" qualifiers="const">
<return type="int" />
<description>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 66683fa0ee..796a80873f 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -354,9 +354,11 @@
<return type="void" />
<argument index="0" name="duration_ms" type="int" default="500" />
<description>
- Vibrate Android and iOS devices.
+ Vibrate handheld devices.
+ [b]Note:[/b] This method is implemented on Android, iOS, and HTML5.
[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] permission in the export preset.
[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and later.
+ [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support this method.
</description>
</method>
<method name="warp_mouse">
@@ -375,6 +377,7 @@
<member name="use_accumulated_input" type="bool" setter="set_use_accumulated_input" getter="is_using_accumulated_input">
If [code]true[/code], similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.
Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.
+ [b]Note:[/b] Input accumulation is [i]enabled[/i] by default.
</member>
</members>
<signals>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index ad74204d82..83aad587a5 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -12,6 +12,10 @@
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<members>
+ <member name="pen_inverted" type="bool" setter="set_pen_inverted" getter="get_pen_inverted" default="false">
+ Returns [code]true[/code] when using the eraser end of a stylus pen.
+ [b]Note:[/b] This property is implemented on Linux, macOS and Windows.
+ </member>
<member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0">
Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code].
</member>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 83e7eba5e5..15c97b0838 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -8,6 +8,7 @@
Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing [kbd]Enter[/kbd].
Item text only supports single-line strings, newline characters (e.g. [code]\n[/code]) in the string won't produce a newline. Text wrapping is enabled in [constant ICON_MODE_TOP] mode, but column's width is adjusted to fully fit its content by default. You need to set [member fixed_column_width] greater than zero to wrap the text.
All [code]set_*[/code] methods allow negative item index, which makes the item accessed from the last one.
+ [b]Incremental search:[/b] Like [PopupMenu] and [Tree], [ItemList] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
</description>
<tutorials>
</tutorials>
@@ -37,13 +38,6 @@
Removes all items from the list.
</description>
</method>
- <method name="clear_item_opentype_features">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
- <description>
- Removes all OpenType features from the item's text.
- </description>
- </method>
<method name="deselect">
<return type="void" />
<argument index="0" name="idx" type="int" />
@@ -121,14 +115,6 @@
Returns the metadata value of the specified index.
</description>
</method>
- <method name="get_item_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the item's text.
- </description>
- </method>
<method name="get_item_text" qualifiers="const">
<return type="String" />
<argument index="0" name="idx" type="int" />
@@ -301,15 +287,6 @@
Sets a value (of any type) to be stored with the item associated with the specified index.
</description>
</method>
- <method name="set_item_opentype_feature">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_item_selectable">
<return type="void" />
<argument index="0" name="idx" type="int" />
@@ -402,8 +379,8 @@
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0">
Allows single or multiple item selection. See the [enum SelectMode] constants.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="3">
- Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextParagraph.OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="3">
+ Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
</members>
<signals>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index d5744bbc42..1ebf770f7e 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -11,12 +11,6 @@
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="get_line_count" qualifiers="const">
<return type="int" />
<description>
@@ -32,13 +26,6 @@
If there're no lines returns font size in pixels.
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
<method name="get_total_character_count" qualifiers="const">
<return type="int" />
<description>
@@ -51,18 +38,10 @@
Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
</methods>
<members>
- <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label.AutowrapMode" default="0">
- If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum AutowrapMode].
+ <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="0">
+ If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum TextServer.AutowrapMode].
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false">
If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally.
@@ -70,6 +49,8 @@
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
</member>
+ <member name="label_settings" type="LabelSettings" setter="set_label_settings" getter="get_label_settings">
+ </member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
@@ -97,8 +78,8 @@
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="Label.OverrunBehavior" default="0">
- Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="0">
+ Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
If [code]true[/code], all the text displays as UPPERCASE.
@@ -110,60 +91,16 @@
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 name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
</member>
</members>
- <constants>
- <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
- Autowrap is disabled.
- </constant>
- <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
- </constant>
- <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
- </constant>
- <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
- Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
- </constant>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
- No text trimming is performed.
- </constant>
- <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
- Trims the text per character.
- </constant>
- <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
- Trims the text per word.
- </constant>
- <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
- Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
- </constant>
- <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
- Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
- </constant>
- <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
- </constant>
- <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the left.
- </constant>
- <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the right.
- </constant>
- </constants>
<theme_items>
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [Label].
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The tint of [Font]'s outline.
+ The tint of text outline.
</theme_item>
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
[Color] of the text's shadow effect.
diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml
index c4d02e6101..5ba0a2d79a 100644
--- a/doc/classes/Label3D.xml
+++ b/doc/classes/Label3D.xml
@@ -9,12 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="generate_triangle_mesh" qualifiers="const">
<return type="TriangleMesh" />
<description>
@@ -28,13 +22,6 @@
Returns the value of the specified flag.
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
<method name="set_draw_flag">
<return type="void" />
<argument index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
@@ -43,14 +30,6 @@
If [code]true[/code], the specified flag will be enabled. See [enum Label3D.DrawFlags] for a list of flags.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
</methods>
<members>
<member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="Label3D.AlphaCutMode" default="0">
@@ -59,8 +38,8 @@
<member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold" default="0.5">
Threshold at which the alpha scissor will discard values.
</member>
- <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label3D.AutowrapMode" default="0">
- If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum AutowrapMode].
+ <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="0">
+ If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum TextServer.AutowrapMode].
</member>
<member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
The billboard mode to use for the label. See [enum BaseMaterial3D.BillboardMode] for possible values.
@@ -72,7 +51,7 @@
If [code]true[/code], the label is rendered at the same size regardless of distance.
</member>
<member name="font" type="Font" setter="set_font" getter="get_font">
- [Font] used for the [Label3D]'s text.
+ Font configuration used to display text.
</member>
<member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
Font size of the [Label3D]'s text.
@@ -96,11 +75,11 @@
The text drawing offset (in pixels).
</member>
<member name="outline_modulate" type="Color" setter="set_outline_modulate" getter="get_outline_modulate" default="Color(0, 0, 0, 1)">
- The tint of [Font]'s outline.
+ The tint of text outline.
</member>
<member name="outline_render_priority" type="int" setter="set_outline_render_priority" getter="get_outline_render_priority" default="-1">
Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
- [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
<member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
@@ -111,7 +90,7 @@
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
- [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
@@ -143,23 +122,11 @@
</member>
</members>
<constants>
- <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
- Autowrap is disabled.
- </constant>
- <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
- </constant>
- <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
- </constant>
- <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
- Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
- </constant>
<constant name="FLAG_SHADED" value="0" enum="DrawFlags">
If set, lights in the environment affect the label.
</constant>
<constant name="FLAG_DOUBLE_SIDED" value="1" enum="DrawFlags">
- If set, text can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
+ If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
</constant>
<constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="DrawFlags">
Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
diff --git a/doc/classes/LabelSettings.xml b/doc/classes/LabelSettings.xml
new file mode 100644
index 0000000000..aa972f2cf3
--- /dev/null
+++ b/doc/classes/LabelSettings.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LabelSettings" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="font" type="Font" setter="set_font" getter="get_font">
+ </member>
+ <member name="font_color" type="Color" setter="set_font_color" getter="get_font_color" default="Color(1, 1, 1, 1)">
+ </member>
+ <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
+ </member>
+ <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="3.0">
+ </member>
+ <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color(1, 1, 1, 1)">
+ </member>
+ <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0)">
+ </member>
+ <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(1, 1)">
+ </member>
+ <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="1">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 4d8fd63257..0ebd83c882 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -73,6 +73,7 @@
</member>
<member name="light_projector" type="Texture2D" setter="set_projector" getter="get_projector">
[Texture2D] projected by light. [member shadow_enabled] must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained-glass.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for light projector textures is set globally with [member ProjectSettings.rendering/textures/light_projectors/filter].
</member>
<member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0">
The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent.
diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml
index ee98356962..c0766cd1ec 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -4,80 +4,122 @@
Computes and stores baked lightmaps for fast global illumination.
</brief_description>
<description>
- The [LightmapGI] node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. [LightmapGI] can also provide rough reflections using spherical harmonics if [member directional] is enabled. Dynamic objects can receive indirect lighting thanks to [i]light probes[/i], which can be automatically placed by setting [member generate_probes_subdiv]. Additional lightmap probes can also be added by creating [LightmapProbe] nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a [LightmapGI] node is also slower compared to [VoxelGI].
+ The [LightmapGI] node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. [LightmapGI] can also provide rough reflections using spherical harmonics if [member directional] is enabled. Dynamic objects can receive indirect lighting thanks to [i]light probes[/i], which can be automatically placed by setting [member generate_probes_subdiv] to a value other than [constant GENERATE_PROBES_DISABLED]. Additional lightmap probes can also be added by creating [LightmapProbe] nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a [LightmapGI] node is also slower compared to [VoxelGI].
[b]Procedural generation:[/b] Lightmap baking functionality is only available in the editor. This means [LightmapGI] is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use [VoxelGI] or SDFGI instead (see [member Environment.sdfgi_enabled]).
[b]Performance:[/b] [LightmapGI] provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices.
+ [b]Note:[/b] Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again.
+ [b]Note:[/b] Lightmap baking on [CSGShape3D]s and [PrimitiveMesh]es is not supported, as these cannot store UV2 data required for baking.
+ [b]Note:[/b] If no custom lightmappers are installed, [LightmapGI] can only be baked when using the Vulkan backend (Clustered or Mobile), not OpenGL.
</description>
<tutorials>
</tutorials>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005">
+ The bias to use when computing shadows. Increasing [member bias] can fix shadow acne on the resulting baked lightmap, but can introduce peter-panning (shadows not connecting to their casters). Real-time [Light3D] shadows are not affected by this [member bias] property.
</member>
<member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="1">
+ Number of light bounces that are taken into account during baking. Higher values result in brighter, more realistic lighting, at the cost of longer bake times. If set to [code]0[/code], only environment lighting, direct light and emissive lighting is baked.
</member>
<member name="directional" type="bool" setter="set_directional" getter="is_directional" default="false">
+ If [code]true[/code], bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked ([member Light3D.light_bake_mode] set to [constant Light3D.BAKE_STATIC]). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes.
+ [b]Note:[/b] The property's name has no relationship with [DirectionalLight3D]. [member directional] works with all light types.
</member>
<member name="environment_custom_color" type="Color" setter="set_environment_custom_color" getter="get_environment_custom_color">
+ The color to use for environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_COLOR].
</member>
<member name="environment_custom_energy" type="float" setter="set_environment_custom_energy" getter="get_environment_custom_energy">
+ The color multiplier to use for environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_COLOR].
</member>
<member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky">
+ The sky to use as a source of environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_SKY].
</member>
<member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="LightmapGI.EnvironmentMode" default="0">
+ The environment mode to use when baking lightmaps.
</member>
<member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="LightmapGI.GenerateProbes" default="0">
+ The level of subdivision to use when automatically generating [LightmapProbe]s for dynamic object lighting. Higher values result in more accurate indirect lighting on dynamic objects, at the cost of longer bake times and larger file sizes.
+ [b]Note:[/b] Automatically generated [LightmapProbe]s are not visible as nodes in the Scene tree dock, and cannot be modified this way after they are generated.
+ [b]Note:[/b] Regardless of [member generate_probes_subdiv], direct lighting on dynamic objects is always applied using [Light3D] nodes in real-time.
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
+ If [code]true[/code], ignore environment lighting when baking lightmaps.
</member>
<member name="light_data" type="LightmapGIData" setter="set_light_data" getter="get_light_data">
+ The [LightmapGIData] associated to this [LightmapGI] node. This resource is automatically created after baking, and is not meant to be created manually.
</member>
<member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384">
+ The maximum texture size for the generated texture atlas. Higher values will result in fewer slices being generated, but may not work on all hardware as a result of hardware limitations on texture sizes. Leave [member max_texture_size] at its default value of [code]16384[/code] if unsure.
</member>
<member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="LightmapGI.BakeQuality" default="1">
+ The quality preset to use when baking lightmaps. This affects bake times, but output file sizes remain mostly identical across quality levels.
+ To further speed up bake times, decrease [member bounces], disable [member use_denoiser] and increase the lightmap texel size on 3D scenes in the Import doc.
</member>
<member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true">
+ If [code]true[/code], uses a CPU-based denoising algorithm on the generated lightmap. This eliminates most noise within the generated lightmap at the cost of longer bake times. File sizes are generally not impacted significantly by the use of a denoiser, although lossless compression may do a better job at compressing a denoised image.
+ [b]Note:[/b] The built-in denoiser (OpenImageDenoise) may crash when denoising lightmaps in large scenes. If you encounter a crash at the end of lightmap baking, try disabling [member use_denoiser].
</member>
</members>
<constants>
<constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
+ Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count].
</constant>
<constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
+ Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count].
</constant>
<constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality">
+ High bake quality (slow bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count].
</constant>
<constant name="BAKE_QUALITY_ULTRA" value="3" enum="BakeQuality">
+ Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count].
</constant>
<constant name="GENERATE_PROBES_DISABLED" value="0" enum="GenerateProbes">
+ Don't generate lightmap probes for lighting dynamic objects.
</constant>
<constant name="GENERATE_PROBES_SUBDIV_4" value="1" enum="GenerateProbes">
+ Lowest level of subdivision (fastest bake times, smallest file sizes).
</constant>
<constant name="GENERATE_PROBES_SUBDIV_8" value="2" enum="GenerateProbes">
+ Low level of subdivision (fast bake times, small file sizes).
</constant>
<constant name="GENERATE_PROBES_SUBDIV_16" value="3" enum="GenerateProbes">
+ High level of subdivision (slow bake times, large file sizes).
</constant>
<constant name="GENERATE_PROBES_SUBDIV_32" value="4" enum="GenerateProbes">
+ Highest level of subdivision (slowest bake times, largest file sizes).
</constant>
<constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
+ Lightmap baking was successful.
</constant>
<constant name="BAKE_ERROR_NO_LIGHTMAPPER" value="1" enum="BakeError">
+ Lightmap baking failed as there is no lightmapper available in this Godot build.
</constant>
<constant name="BAKE_ERROR_NO_SAVE_PATH" value="2" enum="BakeError">
+ Lightmap baking failed as the [LightmapGIData] save path isn't configured in the resource.
</constant>
<constant name="BAKE_ERROR_NO_MESHES" value="3" enum="BakeError">
+ Lightmap baking failed as there are no meshes whose [member GeometryInstance3D.gi_mode] is [constant GeometryInstance3D.GI_MODE_STATIC] and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly.
</constant>
<constant name="BAKE_ERROR_MESHES_INVALID" value="4" enum="BakeError">
+ Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking.
</constant>
<constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="5" enum="BakeError">
+ Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved.
</constant>
<constant name="BAKE_ERROR_USER_ABORTED" value="6" enum="BakeError">
+ The user aborted the lightmap baking operation (typically by clicking the [b]Cancel[/b] button in the progress dialog).
</constant>
<constant name="ENVIRONMENT_MODE_DISABLED" value="0" enum="EnvironmentMode">
+ Ignore environment lighting when baking lightmaps.
</constant>
<constant name="ENVIRONMENT_MODE_SCENE" value="1" enum="EnvironmentMode">
+ Use the scene's environment lighting when baking lightmaps.
+ [b]Note:[/b] If baking lightmaps in a scene with no [WorldEnvironment] node, this will act like [constant ENVIRONMENT_MODE_DISABLED]. The editor's preview sky and sun is [i]not[/i] taken into account by [LightmapGI] when baking lightmaps.
</constant>
<constant name="ENVIRONMENT_MODE_CUSTOM_SKY" value="2" enum="EnvironmentMode">
+ Use [member environment_custom_sky] as a source of environment lighting when baking lightmaps.
</constant>
<constant name="ENVIRONMENT_MODE_CUSTOM_COLOR" value="3" enum="EnvironmentMode">
+ Use [member environment_custom_color] multiplied by [member environment_custom_energy] as a constant source of environment lighting when baking lightmaps.
</constant>
</constants>
</class>
diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml
index c2423daef0..13f44150d7 100644
--- a/doc/classes/LightmapGIData.xml
+++ b/doc/classes/LightmapGIData.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapGIData" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Contains baked lightmap and dynamic object probe data for [LightmapGI].
</brief_description>
<description>
+ [LightmapGIData] contains baked lightmap and dynamic object probe data for [LightmapGI]. It is replaced every time lightmaps are baked in [LightmapGI].
</description>
<tutorials>
</tutorials>
@@ -14,38 +16,46 @@
<argument index="2" name="slice_index" type="int" />
<argument index="3" name="sub_instance" type="int" />
<description>
+ Adds an object that is considered baked within this [LightmapGIData].
</description>
</method>
<method name="clear_users">
<return type="void" />
<description>
+ Clear all objects that are considered baked within this [LightmapGIData].
</description>
</method>
<method name="get_user_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of objects that are considered baked within this [LightmapGIData].
</description>
</method>
<method name="get_user_path" qualifiers="const">
<return type="NodePath" />
<argument index="0" name="user_idx" type="int" />
<description>
+ Returns the [NodePath] of the baked object at index [code]user_idx[/code].
</description>
</method>
<method name="is_using_spherical_harmonics" qualifiers="const">
<return type="bool" />
<description>
+ If [code]true[/code], lightmaps were baked with directional information. See also [member LightmapGI.directional].
</description>
</method>
<method name="set_uses_spherical_harmonics">
<return type="void" />
<argument index="0" name="uses_spherical_harmonics" type="bool" />
<description>
+ If [code]uses_spherical_harmonics[/code] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information.
+ [b]Note:[/b] Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire [LightmapGIData] resource is replaced by the lightmapper.
</description>
</method>
</methods>
<members>
<member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture">
+ The lightmap atlas texture generated by the lightmapper.
</member>
</members>
</class>
diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml
index a5ba6294b9..cb4879b6c7 100644
--- a/doc/classes/LightmapProbe.xml
+++ b/doc/classes/LightmapProbe.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapProbe" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Represents a single manually placed probe for dynamic object lighting with [LightmapGI].
</brief_description>
<description>
+ [LightmapProbe] represents the position of a single manually placed probe for dynamic object lighting with [LightmapGI].
+ Typically, [LightmapGI] probes are placed automatically by setting [member LightmapGI.generate_probes_subdiv] to a value other than [constant LightmapGI.GENERATE_PROBES_DISABLED]. By creating [LightmapProbe] nodes before baking lightmaps, you can add more probes in specific areas for greater detail, or disable automatic generation and rely only on manually placed probes instead.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml
index f9a1e2fa99..58ef2ed0cf 100644
--- a/doc/classes/Lightmapper.xml
+++ b/doc/classes/Lightmapper.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Lightmapper" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Abstract class extended by lightmappers, for use in [LightmapGI].
</brief_description>
<description>
+ This class should be extended by custom lightmapper classes. Lightmappers can then be used with [LightmapGI] to provide fast baked global illumination in 3D.
+ Godot contains a built-in GPU-based lightmapper [LightmapperRD] that uses compute shaders, but custom lightmappers can be implemented by C++ modules.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml
index 29d95244ce..e4b68a7ef8 100644
--- a/doc/classes/LightmapperRD.xml
+++ b/doc/classes/LightmapperRD.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapperRD" inherits="Lightmapper" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ The built-in GPU-based lightmapper for use with [LightmapGI].
</brief_description>
<description>
+ LightmapperRD ("RD" stands for [RenderingDevice]) is the built-in GPU-based lightmapper for use with [LightmapGI]. On most dedicated GPUs, it can bake lightmaps much faster than most CPU-based lightmappers. LightmapperRD uses compute shaders to bake lightmaps, so it does not require CUDA or OpenCL libraries to be installed to be usable.
+ [b]Note:[/b] Only usable when using the Vulkan backend (Clustered or Mobile), not OpenGL.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 55e012ee0c..84471bafc0 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -37,12 +37,6 @@
Erases the [LineEdit]'s [member text].
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="delete_char_at_caret">
<return type="void" />
<description>
@@ -70,13 +64,6 @@
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
<method name="get_scroll_offset" qualifiers="const">
<return type="int" />
<description>
@@ -149,14 +136,6 @@
Selects the whole [String].
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
</methods>
<members>
<member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index ba80504caf..7c6ff2d4e1 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -9,29 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
- </methods>
<members>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index eeb6af24c9..48fa2754d5 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -215,12 +215,16 @@
[PackedVector2Array] for second UV coordinates.
</constant>
<constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType">
+ Contains custom color channel 0. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM0_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType">
+ Contains custom color channel 1. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM1_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType">
+ Contains custom color channel 2. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM2_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType">
+ Contains custom color channel 3. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM3_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_BONES" value="10" enum="ArrayType">
[PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element is a group of 4 numbers.
@@ -236,20 +240,28 @@
Represents the size of the [enum ArrayType] enum.
</constant>
<constant name="ARRAY_CUSTOM_RGBA8_UNORM" value="0" enum="ArrayCustomFormat">
+ Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as [PackedByteArray].
</constant>
<constant name="ARRAY_CUSTOM_RGBA8_SNORM" value="1" enum="ArrayCustomFormat">
+ Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as [PackedByteArray].
</constant>
<constant name="ARRAY_CUSTOM_RG_HALF" value="2" enum="ArrayCustomFormat">
+ Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray]. Only red and green channels are used.
</constant>
<constant name="ARRAY_CUSTOM_RGBA_HALF" value="3" enum="ArrayCustomFormat">
+ Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray].
</constant>
<constant name="ARRAY_CUSTOM_R_FLOAT" value="4" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only the red green channel is used.
</constant>
<constant name="ARRAY_CUSTOM_RG_FLOAT" value="5" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red and green channels are used.
</constant>
<constant name="ARRAY_CUSTOM_RGB_FLOAT" value="6" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red, green and blue channels are used.
</constant>
<constant name="ARRAY_CUSTOM_RGBA_FLOAT" value="7" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array].
</constant>
<constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat">
Represents the size of the [enum ArrayCustomFormat] enum.
@@ -273,12 +285,16 @@
Mesh array contains second UV.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat">
+ Mesh array contains custom channel index 0.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat">
+ Mesh array contains custom channel index 1.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat">
+ Mesh array contains custom channel index 2.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat">
+ Mesh array contains custom channel index 3.
</constant>
<constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat">
Mesh array contains bones.
@@ -290,29 +306,40 @@
Mesh array uses indices.
</constant>
<constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat">
+ Mask of mesh channels permitted in blend shapes.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
+ Shift of first custom channel.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat">
+ Number of format bits per custom channel. See [enum ArrayCustomFormat].
</constant>
<constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 0.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 1.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 2.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 3.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat">
+ Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [enum ArrayCustomFormat].
</constant>
<constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat">
+ Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit].
</constant>
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat">
Flag used to mark that the array contains 2D vertices.
</constant>
<constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat">
+ Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan.
</constant>
<constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat">
+ Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length.
</constant>
<constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
Blend shapes are normalized.
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index 96e66f850a..e9666337a1 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -4,7 +4,7 @@
Node used for displaying a [Mesh] in 2D.
</brief_description>
<description>
- Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite2D] via a tool in the editor toolbar. Select "Sprite2D" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D".
+ Node used for displaying a [Mesh] in 2D. A [MeshInstance2D] can be automatically created from an existing [Sprite2D] via a tool in the editor toolbar. Select the [Sprite2D] node, then choose [b]Sprite2D &gt; Convert to MeshInstance2D[/b] at the top of the 2D editor viewport.
</description>
<tutorials>
<link title="2D meshes">$DOCS_URL/tutorials/2d/2d_meshes.html</link>
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index f368190a29..24f1f9918b 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -4,7 +4,7 @@
Node that instances meshes into a scenario.
</brief_description>
<description>
- MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
+ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reusing geometry, which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
</description>
<tutorials>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml
new file mode 100644
index 0000000000..d47e52d7c0
--- /dev/null
+++ b/doc/classes/MovieWriter.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MovieWriter" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Abstract class for non-real-time video recording encoders.
+ </brief_description>
+ <description>
+ Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] command line argument, this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities.
+ Godot has 2 built-in [MovieWriter]s:
+ - AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/mjpeg_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most.
+ - PNG image sequence for video and WAV for audio ([code].png[/code] file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as [url=https://ffmpeg.org/]FFmpeg[/url] after recording. Transparency is currently not supported, even if the root viewport is set to be transparent.
+ If you need to encode to a different format or pipe a stream through third-party software, you can extend the [MovieWriter] class to create your own movie writers. This should typically be done using GDExtension for performance reasons.
+ [b]Editor usage:[/b] A default movie file path can be specified in [member ProjectSettings.editor/movie_writer/movie_file]. Alternatively, for running single scenes, a [code]movie_path[/code] metadata can be added to the root node, specifying the path to a movie file that will be used when recording that scene. Once a path is set, click the video reel icon in the top-right corner of the editor to enable Movie Maker mode, then run any scene as usual. The engine will start recording as soon as the splash screen is finished, and it will only stop recording when the engine quits. Click the video reel icon again to disable Movie Maker mode. Note that toggling Movie Maker mode does not affect project instances that are already running.
+ [b]Note:[/b] MovieWriter is available for use in both the editor and exported projects, but it is [i]not[/i] designed for use by end users to record videos while playing. Players wishing to record gameplay videos should install tools such as [url=https://obsproject.com/]OBS Studio[/url] or [url=https://www.maartenbaert.be/simplescreenrecorder/]SimpleScreenRecorder[/url] instead.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_audio_mix_rate" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if [method _get_audio_mix_rate] is not overridden.
+ </description>
+ </method>
+ <method name="_get_audio_speaker_mode" qualifiers="virtual const">
+ <return type="int" enum="AudioServer.SpeakerMode" />
+ <description>
+ Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to [constant AudioServer.SPEAKER_MODE_STEREO] if [method _get_audio_speaker_mode] is not overridden.
+ </description>
+ </method>
+ <method name="_handles_file" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Called when the engine determines whether this [MovieWriter] is able to handle the file at [code]path[/code]. Must return [code]true[/code] if this [MovieWriter] is able to handle the given file path, [code]false[/code] otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension:
+ [codeblock]
+ func _handles_file(path):
+ # Allows specifying an output file with a `.mkv` file extension (case-insensitive),
+ # either in the Project Settings or with the `--write-movie &lt;path&gt;` command line argument.
+ return path.get_extension().to_lower() == "mkv"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="_write_begin" qualifiers="virtual">
+ <return type="int" enum="Error" />
+ <argument index="0" name="movie_size" type="Vector2i" />
+ <argument index="1" name="fps" type="int" />
+ <argument index="2" name="base_path" type="String" />
+ <description>
+ Called once before the engine starts writing video and audio data. [code]movie_size[/code] is the width and height of the video to save. [code]fps[/code] is the number of frames per second specified in the project settings or using the [code]--fixed-fps &lt;fps&gt;[/code] command line argument.
+ </description>
+ </method>
+ <method name="_write_end" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when [method SceneTree.quit] is called.
+ [b]Note:[/b] Pressing [kbd]Ctrl + C[/kbd] on the terminal running the editor/project does [i]not[/i] result in [method _write_end] being called.
+ </description>
+ </method>
+ <method name="_write_frame" qualifiers="virtual">
+ <return type="int" enum="Error" />
+ <argument index="0" name="frame_image" type="Image" />
+ <argument index="1" name="audio_frame_block" type="const void*" />
+ <description>
+ Called at the end of every rendered frame. The [code]frame_image[/code] and [code]audio_frame_block[/code] function arguments should be written to.
+ </description>
+ </method>
+ <method name="add_writer" qualifiers="static">
+ <return type="void" />
+ <argument index="0" name="writer" type="MovieWriter" />
+ <description>
+ Adds a writer to be usable by the engine. The supported file extensions can be set by overriding [method _handles_file].
+ [b]Note:[/b] [method add_writer] must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 631b2ea050..9d8f1e1e5d 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -91,7 +91,8 @@
<member name="custom_data_array" type="PackedColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array">
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0">
- Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count].
+ Number of instances that will get drawn. This clears and (re)sizes the buffers. Setting data format or flags afterwards will have no effect.
+ By default, all instances are drawn but you can limit this with [member visible_instance_count].
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
Mesh to be drawn.
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index 059d147979..06658bf004 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -1,88 +1,108 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiplayerAPI" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- High-level multiplayer API.
+ High-level multiplayer API interface.
</brief_description>
<description>
- This class implements the high-level multiplayer API. See also [MultiplayerPeer].
- By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene.
+ Base class for high-level multiplayer API implementations. See also [MultiplayerPeer].
+ By default, [SceneTree] has a reference to an implementation of this class and uses it to provide multiplayer capabilities (i.e. RPCs) across the whole scene.
It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the [method SceneTree.set_multiplayer] method, effectively allowing to run both client and server in the same scene.
- [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
- [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
+ It is also possible to extend or replace the default implementation via scripting or native extensions. See [MultiplayerAPIExtension] for details about extensions, [SceneMultiplayer] for the details about the default implementation.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="clear">
- <return type="void" />
+ <method name="create_default_interface" qualifiers="static">
+ <return type="MultiplayerAPI" />
+ <description>
+ Returns a new instance of the default MultiplayerAPI.
+ </description>
+ </method>
+ <method name="get_default_interface" qualifiers="static">
+ <return type="StringName" />
<description>
- Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing).
+ Returns the default MultiplayerAPI implementation class name. This is usually [code]"SceneMultiplayer"[/code] when [SceneMultiplayer] is available. See [method set_default_interface].
</description>
</method>
- <method name="get_peers" qualifiers="const">
+ <method name="get_peers">
<return type="PackedInt32Array" />
<description>
Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="get_remote_sender_id" qualifiers="const">
+ <method name="get_remote_sender_id">
<return type="int" />
<description>
Returns the sender's peer ID for the RPC currently being executed.
[b]Note:[/b] If not inside an RPC this method will return 0.
</description>
</method>
- <method name="get_unique_id" qualifiers="const">
+ <method name="get_unique_id">
<return type="int" />
<description>
Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="has_multiplayer_peer" qualifiers="const">
+ <method name="has_multiplayer_peer">
<return type="bool" />
<description>
Returns [code]true[/code] if there is a [member multiplayer_peer] set.
</description>
</method>
- <method name="is_server" qualifiers="const">
+ <method name="is_server">
<return type="bool" />
<description>
Returns [code]true[/code] if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections).
</description>
</method>
+ <method name="object_configuration_add">
+ <return type="int" enum="Error" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Notifies the MultiplayerAPI of a new [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and a valid [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
+ [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].
+ </description>
+ </method>
+ <method name="object_configuration_remove">
+ <return type="int" enum="Error" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Notifies the MultiplayerAPI to remove a [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and an empty [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
+ [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].
+ </description>
+ </method>
<method name="poll">
- <return type="void" />
+ <return type="int" enum="Error" />
<description>
Method used for polling the MultiplayerAPI. You only need to worry about this if you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default, [SceneTree] will poll its MultiplayerAPI(s) for you.
[b]Note:[/b] This method results in RPCs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]).
</description>
</method>
- <method name="send_bytes">
+ <method name="rpc">
<return type="int" enum="Error" />
- <argument index="0" name="bytes" type="PackedByteArray" />
- <argument index="1" name="id" type="int" default="0" />
- <argument index="2" name="mode" type="int" enum="TransferMode" default="2" />
- <argument index="3" name="channel" type="int" default="0" />
+ <argument index="0" name="peer" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="method" type="StringName" />
+ <argument index="3" name="arguments" type="Array" default="[]" />
+ <description>
+ Sends an RPC to the target [code]peer[/code]. The given [code]method[/code] will be called on the remote [code]object[/code] with the provided [code]arguments[/code]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config].
+ [b]Note:[/b] Prefer using [method Node.rpc], [method Node.rpc_id], or [code]my_method.rpc(peer, arg1, arg2, ...)[/code] (in GDScript), since they are faster. This method is mostly useful in conjunction with [MultiplayerAPIExtension] when augmenting or replacing the multiplayer capabilities.
+ </description>
+ </method>
+ <method name="set_default_interface" qualifiers="static">
+ <return type="void" />
+ <argument index="0" name="interface_name" type="StringName" />
<description>
- Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
+ Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by [SceneTree] when the engine starts.
</description>
</method>
</methods>
<members>
- <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false">
- If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs.
- [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
- </member>
<member name="multiplayer_peer" type="MultiplayerPeer" setter="set_multiplayer_peer" getter="get_multiplayer_peer">
The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
</member>
- <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false">
- If [code]true[/code], the MultiplayerAPI's [member multiplayer_peer] refuses new incoming connections.
- </member>
- <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;&quot;)">
- The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
- This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene.
- </member>
</members>
<signals>
<signal name="connected_to_server">
@@ -107,17 +127,21 @@
Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server.
</description>
</signal>
- <signal name="peer_packet">
- <argument index="0" name="id" type="int" />
- <argument index="1" name="packet" type="PackedByteArray" />
- <description>
- Emitted when this MultiplayerAPI's [member multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
- </description>
- </signal>
<signal name="server_disconnected">
<description>
Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from server. Only emitted on clients.
</description>
</signal>
</signals>
+ <constants>
+ <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
+ Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
+ </constant>
+ <constant name="RPC_MODE_ANY_PEER" value="1" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
+ </constant>
+ <constant name="RPC_MODE_AUTHORITY" value="2" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(authority)[/code] annotation. See [method Node.set_multiplayer_authority].
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/MultiplayerAPIExtension.xml b/doc/classes/MultiplayerAPIExtension.xml
new file mode 100644
index 0000000000..c369977d57
--- /dev/null
+++ b/doc/classes/MultiplayerAPIExtension.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerAPIExtension" inherits="MultiplayerAPI" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Base class used for extending the [MultiplayerAPI].
+ </brief_description>
+ <description>
+ This class can be used to augment or replace the default [MultiplayerAPI] implementation via script or extensions.
+ The following example augment the default implemenation ([SceneMultiplayer]) by logging every RPC being made, and every object being configured for replication.
+ [codeblocks]
+ [gdscript]
+ extends MultiplayerAPIExtension
+ class_name LogMultiplayer
+
+ # We want to augment the default SceneMultiplayer.
+ var base_multiplayer = SceneMultiplayer.new()
+
+ func _init():
+ # Just passthourgh base signals (copied to var to avoid cyclic reference)
+ var cts = connected_to_server
+ var cf = connection_failed
+ var pc = peer_connected
+ var pd = peer_disconnected
+ base_multiplayer.connected_to_server.connect(func(): cts.emit())
+ base_multiplayer.connection_failed.connect(func(): cf.emit())
+ base_multiplayer.peer_connected.connect(func(id): pc.emit(id))
+ base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id))
+
+ # Log RPC being made and forward it to the default multiplayer.
+ func _rpc(peer: int, object: Object, method: StringName, args: Array) -&gt; int: # Error
+ print("Got RPC for %d: %s::%s(%s)" % [peer, object, method, args])
+ return base_multiplayer.rpc(peer, object, method, args)
+
+ # Log configuration add. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
+ func _object_configuration_add(object, config: Variant) -&gt; int: # Error
+ if config is MultiplayerSynchronizer:
+ print("Adding synchronization configuration for %s. Synchronizer: %s" % [object, config])
+ elif config is MultiplayerSpawner:
+ print("Adding node %s to the spawn list. Spawner: %s" % [object, config])
+ return base_multiplayer.object_configuration_add(object, config)
+
+ # Log configuration remove. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
+ func _object_configuration_remove(object, config: Variant) -&gt; int: # Error
+ if config is MultiplayerSynchronizer:
+ print("Removing synchronization configuration for %s. Synchronizer: %s" % [object, config])
+ elif config is MultiplayerSpawner:
+ print("Removing node %s from the spawn list. Spawner: %s" % [object, config])
+ return base_multiplayer.object_configuration_remove(object, config)
+
+ # These can be optional, but in our case we want to augment SceneMultiplayer, so forward everything.
+ func _set_multiplayer_peer(p_peer: MultiplayerPeer):
+ base_multiplayer.multiplayer_peer = p_peer
+
+ func _get_multiplayer_peer() -&gt; MultiplayerPeer:
+ return base_multiplayer.multiplayer_peer
+
+ func _get_unique_id() -&gt; int:
+ return base_multiplayer.get_unique_id()
+
+ func _get_peer_ids() -&gt; PackedInt32Array:
+ return base_multiplayer.get_peers()
+ [/gdscript]
+ [/codeblocks]
+ Then in your main scene or in an autoload call [method SceneTree.set_multiplayer] to start using your custom [MultiplayerAPI]:
+ [codeblocks]
+ [gdscript]
+ # autoload.gd
+ func _enter_tree():
+ # Sets our custom multiplayer as the main one in SceneTree.
+ get_tree().set_multiplayer(LogMultiplayer.new())
+ [/gdscript]
+ [/codeblocks]
+ Native extensions can alternatively use the [method MultiplayerAPI.set_default_interface] method during initialization to configure themselves as the default implementation.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_multiplayer_peer" qualifiers="virtual">
+ <return type="MultiplayerPeer" />
+ <description>
+ Called when the [member MultiplayerAPI.multiplayer_peer] is retrieved.
+ </description>
+ </method>
+ <method name="_get_peer_ids" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <description>
+ Callback for [method MultiplayerAPI.get_peers].
+ </description>
+ </method>
+ <method name="_get_remote_sender_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.get_remote_sender_id].
+ </description>
+ </method>
+ <method name="_get_unique_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.get_unique_id].
+ </description>
+ </method>
+ <method name="_object_configuration_add" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Callback for [method MultiplayerAPI.object_configuration_add].
+ </description>
+ </method>
+ <method name="_object_configuration_remove" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Callback for [method MultiplayerAPI.object_configuration_remove].
+ </description>
+ </method>
+ <method name="_poll" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.poll].
+ </description>
+ </method>
+ <method name="_rpc" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="peer" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="method" type="StringName" />
+ <argument index="3" name="args" type="Array" />
+ <description>
+ Callback for [method MultiplayerAPI.rpc].
+ </description>
+ </method>
+ <method name="_set_multiplayer_peer" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="multiplayer_peer" type="MultiplayerPeer" />
+ <description>
+ Called when the [member MultiplayerAPI.multiplayer_peer] is set.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 4a3559b0f7..6dde40f018 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -60,7 +60,7 @@
The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games.
[b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
</member>
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="2">
+ <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="2">
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
</member>
</members>
@@ -109,5 +109,14 @@
<constant name="TARGET_PEER_SERVER" value="1">
Packets are sent to the server alone.
</constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
+ </constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
+ </constant>
+ <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
+ Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml
index bd11c76039..f837171e2f 100644
--- a/doc/classes/MultiplayerPeerExtension.xml
+++ b/doc/classes/MultiplayerPeerExtension.xml
@@ -41,6 +41,12 @@
Called when the ID of the [MultiplayerPeer] who sent the most recent packet is requested (see [method MultiplayerPeer.get_packet_peer]).
</description>
</method>
+ <method name="_get_packet_script" qualifiers="virtual">
+ <return type="PackedByteArray" />
+ <description>
+ Called when a packet needs to be received by the [MultiplayerAPI], if [method _get_packet] isn't implemented. Use this when extending this class via GDScript.
+ </description>
+ </method>
<method name="_get_transfer_channel" qualifiers="virtual const">
<return type="int" />
<description>
@@ -85,6 +91,13 @@
Called when a packet needs to be sent by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes.
</description>
</method>
+ <method name="_put_packet_script" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_buffer" type="PackedByteArray" />
+ <description>
+ Called when a packet needs to be sent by the [MultiplayerAPI], if [method _put_packet] isn't implemented. Use this when extending this class via GDScript.
+ </description>
+ </method>
<method name="_set_refuse_new_connections" qualifiers="virtual">
<return type="void" />
<argument index="0" name="p_enable" type="bool" />
diff --git a/doc/classes/MultiplayerSpawner.xml b/doc/classes/MultiplayerSpawner.xml
deleted file mode 100644
index 4ca92728ff..0000000000
--- a/doc/classes/MultiplayerSpawner.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerSpawner" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="_spawn_custom" qualifiers="virtual">
- <return type="Object" />
- <argument index="0" name="data" type="Variant" />
- <description>
- </description>
- </method>
- <method name="add_spawnable_scene">
- <return type="void" />
- <argument index="0" name="path" type="String" />
- <description>
- </description>
- </method>
- <method name="clear_spawnable_scenes">
- <return type="void" />
- <description>
- </description>
- </method>
- <method name="get_spawnable_scene" qualifiers="const">
- <return type="String" />
- <argument index="0" name="path" type="int" />
- <description>
- </description>
- </method>
- <method name="get_spawnable_scene_count" qualifiers="const">
- <return type="int" />
- <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="spawn_limit" type="int" setter="set_spawn_limit" getter="get_spawn_limit" default="0">
- </member>
- <member name="spawn_path" type="NodePath" setter="set_spawn_path" getter="get_spawn_path" default="NodePath(&quot;&quot;)">
- </member>
- </members>
- <signals>
- <signal name="despawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- </description>
- </signal>
- <signal name="spawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- </description>
- </signal>
- </signals>
-</class>
diff --git a/doc/classes/MultiplayerSynchronizer.xml b/doc/classes/MultiplayerSynchronizer.xml
deleted file mode 100644
index ac067791e6..0000000000
--- a/doc/classes/MultiplayerSynchronizer.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerSynchronizer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="replication_config" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config">
- </member>
- <member name="replication_interval" type="float" setter="set_replication_interval" getter="get_replication_interval" default="0.0">
- </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/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index 945947ad9f..058f1032cb 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -34,6 +34,19 @@
Returns which index the agent is currently on in the navigation path's [PackedVector2Array].
</description>
</method>
+ <method name="get_navigation_layer_value" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_navigation_map" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer.
+ </description>
+ </method>
<method name="get_next_location">
<return type="Vector2" />
<description>
@@ -70,6 +83,21 @@
Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
+ <method name="set_navigation_layer_value">
+ <return type="void" />
+ <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 navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="set_navigation_map">
+ <return type="void" />
+ <argument index="0" name="navigation_map" type="RID" />
+ <description>
+ Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
+ </description>
+ </method>
<method name="set_target_location">
<return type="void" />
<argument index="0" name="location" type="Vector2" />
@@ -95,20 +123,24 @@
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="200.0">
The maximum speed that an agent can move.
</member>
- <member name="navigable_layers" type="int" setter="set_navigable_layers" getter="get_navigable_layers" default="1">
- A bitfield determining what layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new layers.
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ A bitfield determining what navigation layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers.
</member>
<member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="500.0">
The distance to search for other agents.
</member>
+ <member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="1.0">
+ The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update.
+ </member>
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0">
The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
- The radius of the agent.
+ The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_dist]).
+ Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size.
</member>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
- The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
+ The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index 7f7e058742..c689ddc345 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -34,6 +34,19 @@
Returns which index the agent is currently on in the navigation path's [PackedVector3Array].
</description>
</method>
+ <method name="get_navigation_layer_value" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_navigation_map" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer.
+ </description>
+ </method>
<method name="get_next_location">
<return type="Vector3" />
<description>
@@ -70,6 +83,21 @@
Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
+ <method name="set_navigation_layer_value">
+ <return type="void" />
+ <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 navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="set_navigation_map">
+ <return type="void" />
+ <argument index="0" name="navigation_map" type="RID" />
+ <description>
+ Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
+ </description>
+ </method>
<method name="set_target_location">
<return type="void" />
<argument index="0" name="location" type="Vector3" />
@@ -101,20 +129,24 @@
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="10.0">
The maximum speed that an agent can move.
</member>
- <member name="navigable_layers" type="int" setter="set_navigable_layers" getter="get_navigable_layers" default="1">
- A bitfield determining what layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new layers.
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ A bitfield determining what navigation layers of navigation regions this NavigationAgent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers.
</member>
<member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="50.0">
The distance to search for other agents.
</member>
+ <member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="1.0">
+ The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update.
+ </member>
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0">
The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
- The radius of the agent.
+ The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_dist]).
+ Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size.
</member>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
- The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
+ The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index 3c18b56658..33d2535ca2 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -28,6 +28,7 @@
<argument index="0" name="mesh" type="Mesh" />
<description>
Initializes the navigation mesh by setting the vertices and indices according to a [Mesh].
+ [b]Note:[/b] The given [code]mesh[/code] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array.
</description>
</method>
<method name="get_collision_mask_value" qualifiers="const">
@@ -107,6 +108,12 @@
The maximum allowed length for contour edges along the border of the mesh.
[b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size].
</member>
+ <member name="filter_baking_aabb" type="AABB" setter="set_filter_baking_aabb" getter="get_filter_baking_aabb" default="AABB(0, 0, 0, 0, 0, 0)">
+ If the baking [AABB] has a volume the navigation mesh baking will be restricted to its enclosing area.
+ </member>
+ <member name="filter_baking_aabb_offset" type="Vector3" setter="set_filter_baking_aabb_offset" getter="get_filter_baking_aabb_offset" default="Vector3(0, 0, 0)">
+ The position offset applied to the [member filter_baking_aabb] [AABB].
+ </member>
<member name="filter_ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false">
If [code]true[/code], marks spans that are ledges as non-walkable.
</member>
diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml
index b92183fda0..612ce54d34 100644
--- a/doc/classes/NavigationMeshGenerator.xml
+++ b/doc/classes/NavigationMeshGenerator.xml
@@ -8,6 +8,7 @@
The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations.
Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area.
The finalized navigation mesh is then returned and stored inside the [NavigationMesh] for use as a resource inside [NavigationRegion3D] nodes.
+ [b]Note:[/b] Using meshes to not only define walkable surfaces but also obstruct navigation baking does not always work. The navigation baking has no concept of what is a geometry "inside" when dealing with mesh source geometry and this is intentional. Depending on current baking parameters, as soon as the obstructing mesh is large enough to fit a navigation mesh area inside, the baking will generate navigation mesh areas that are inside the obstructing source geometry mesh.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index 542aa8f619..75b6544827 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -8,34 +8,49 @@
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin].
[b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge.
The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value.
- [b]Note[/b]: This value is not added to the path cost when the start position is already inside this region.
+ [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
The pathfinding cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_navigation_layer_value" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
<method name="get_region_rid" qualifiers="const">
<return type="RID" />
<description>
Returns the [RID] of this region on the [NavigationServer2D]. Combined with [method NavigationServer2D.map_get_closest_point_owner] can be used to identify the [NavigationRegion2D] closest to a point on the merged navigation map.
</description>
</method>
+ <method name="set_navigation_layer_value">
+ <return type="void" />
+ <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 navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
</methods>
<members>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Determines if the [NavigationRegion2D] is enabled or disabled.
</member>
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
- When pathfinding enters this regions navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
+ When pathfinding enters this region's navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
</member>
- <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
- A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path].
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path].
</member>
<member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon">
The [NavigationPolygon] resource to use.
</member>
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
- When pathfinding moves inside this regions navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
+ When pathfinding moves inside this region's navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
</member>
</members>
</class>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index e45bca7f8b..f5824a24fd 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -8,7 +8,7 @@
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin].
[b]Note:[/b] Overlapping two regions' navmeshes is not enough for connecting two regions. They must share a similar edge.
The cost of entering this region from another region can be controlled with the [member enter_cost] value.
- [b]Note[/b]: This value is not added to the path cost when the start position is already inside this region.
+ [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
The cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
</description>
<tutorials>
@@ -21,28 +21,43 @@
Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled).
</description>
</method>
+ <method name="get_navigation_layer_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 navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
<method name="get_region_rid" qualifiers="const">
<return type="RID" />
<description>
Returns the [RID] of this region on the [NavigationServer3D]. Combined with [method NavigationServer3D.map_get_closest_point_owner] can be used to identify the [NavigationRegion3D] closest to a point on the merged navigation map.
</description>
</method>
+ <method name="set_navigation_layer_value">
+ <return type="void" />
+ <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 navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
</methods>
<members>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Determines if the [NavigationRegion3D] is enabled or disabled.
</member>
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
- When pathfinding enters this regions navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
+ When pathfinding enters this region's navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
</member>
- <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
- A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path].
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path].
</member>
<member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
The [NavigationMesh] resource to use.
</member>
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
- When pathfinding moves inside this regions navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
+ When pathfinding moves inside this region's navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
</member>
</members>
<signals>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 7b0dac99c3..36379d2531 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -8,7 +8,7 @@
Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world.
[b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
- You may assign navigation layers to regions with [method NavigationServer2D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects.
+ You may assign navigation layers to regions with [method NavigationServer2D.region_set_navigation_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects.
To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
[b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
@@ -44,7 +44,8 @@
<argument index="2" name="method" type="StringName" />
<argument index="3" name="userdata" type="Variant" default="null" />
<description>
- Callback called at the end of the RVO process.
+ Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name.
+ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code].
</description>
</method>
<method name="agent_set_map" qualifiers="const">
@@ -126,12 +127,28 @@
Destroys the given RID.
</description>
</method>
+ <method name="get_maps" qualifiers="const">
+ <return type="Array" />
+ <description>
+ Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
+ </description>
+ </method>
<method name="map_create" qualifiers="const">
<return type="RID" />
<description>
Create a new map.
</description>
</method>
+ <method name="map_force_update">
+ <return type="void" />
+ <argument index="0" name="map" type="RID" />
+ <description>
+ This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
+ Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.
+ Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.
+ [b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight.
+ </description>
+ </method>
<method name="map_get_agents" qualifiers="const">
<return type="Array" />
<argument index="0" name="map" type="RID" />
@@ -175,9 +192,9 @@
<argument index="1" name="origin" type="Vector2" />
<argument index="2" name="destination" type="Vector2" />
<argument index="3" name="optimize" type="bool" />
- <argument index="4" name="layers" type="int" default="1" />
+ <argument index="4" name="navigation_layers" type="int" default="1" />
<description>
- Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path.
+ Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region navigation layers that are allowed to be in the path.
</description>
</method>
<method name="map_get_regions" qualifiers="const">
@@ -254,18 +271,18 @@
Returns the [code]enter_cost[/code] of this [code]region[/code].
</description>
</method>
- <method name="region_get_layers" qualifiers="const">
- <return type="int" />
+ <method name="region_get_map" qualifiers="const">
+ <return type="RID" />
<argument index="0" name="region" type="RID" />
<description>
- Returns the region's layers.
+ Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
</description>
</method>
- <method name="region_get_map" qualifiers="const">
- <return type="RID" />
+ <method name="region_get_navigation_layers" qualifiers="const">
+ <return type="int" />
<argument index="0" name="region" type="RID" />
<description>
- Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
+ Returns the region's navigation layers.
</description>
</method>
<method name="region_get_travel_cost" qualifiers="const">
@@ -275,6 +292,16 @@
Returns the [code]travel_cost[/code] of this [code]region[/code].
</description>
</method>
+ <method name="region_owns_point" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="region" type="RID" />
+ <argument index="1" name="point" type="Vector2" />
+ <description>
+ Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
+ If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
+ [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
+ </description>
+ </method>
<method name="region_set_enter_cost" qualifiers="const">
<return type="void" />
<argument index="0" name="region" type="RID" />
@@ -283,20 +310,20 @@
Sets the [code]enter_cost[/code] for this [code]region[/code].
</description>
</method>
- <method name="region_set_layers" qualifiers="const">
+ <method name="region_set_map" qualifiers="const">
<return type="void" />
<argument index="0" name="region" type="RID" />
- <argument index="1" name="layers" type="int" />
+ <argument index="1" name="map" type="RID" />
<description>
- Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]).
+ Sets the map for the region.
</description>
</method>
- <method name="region_set_map" qualifiers="const">
+ <method name="region_set_navigation_layers" qualifiers="const">
<return type="void" />
<argument index="0" name="region" type="RID" />
- <argument index="1" name="map" type="RID" />
+ <argument index="1" name="navigation_layers" type="int" />
<description>
- Sets the map for the region.
+ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]).
</description>
</method>
<method name="region_set_navpoly" qualifiers="const">
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index d6574dd69a..8600c2643a 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -8,7 +8,7 @@
Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world.
[b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
- You may assign navigation layers to regions with [method NavigationServer3D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. This allows allowing or forbidding some areas to 3D objects.
+ You may assign navigation layers to regions with [method NavigationServer3D.region_set_navigation_layers], which then can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. This allows allowing or forbidding some areas to 3D objects.
To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
[b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
@@ -44,7 +44,8 @@
<argument index="2" name="method" type="StringName" />
<argument index="3" name="userdata" type="Variant" default="null" />
<description>
- Callback called at the end of the RVO process.
+ Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name.
+ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code].
</description>
</method>
<method name="agent_set_map" qualifiers="const">
@@ -126,12 +127,28 @@
Destroys the given RID.
</description>
</method>
+ <method name="get_maps" qualifiers="const">
+ <return type="Array" />
+ <description>
+ Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
+ </description>
+ </method>
<method name="map_create" qualifiers="const">
<return type="RID" />
<description>
Create a new map.
</description>
</method>
+ <method name="map_force_update">
+ <return type="void" />
+ <argument index="0" name="map" type="RID" />
+ <description>
+ This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
+ Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.
+ Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.
+ [b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight.
+ </description>
+ </method>
<method name="map_get_agents" qualifiers="const">
<return type="Array" />
<argument index="0" name="map" type="RID" />
@@ -193,9 +210,9 @@
<argument index="1" name="origin" type="Vector3" />
<argument index="2" name="destination" type="Vector3" />
<argument index="3" name="optimize" type="bool" />
- <argument index="4" name="layers" type="int" default="1" />
+ <argument index="4" name="navigation_layers" type="int" default="1" />
<description>
- Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path.
+ Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region navigation layers that are allowed to be in the path.
</description>
</method>
<method name="map_get_regions" qualifiers="const">
@@ -304,18 +321,18 @@
Returns the [code]enter_cost[/code] of this [code]region[/code].
</description>
</method>
- <method name="region_get_layers" qualifiers="const">
- <return type="int" />
+ <method name="region_get_map" qualifiers="const">
+ <return type="RID" />
<argument index="0" name="region" type="RID" />
<description>
- Returns the region's layers.
+ Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
</description>
</method>
- <method name="region_get_map" qualifiers="const">
- <return type="RID" />
+ <method name="region_get_navigation_layers" qualifiers="const">
+ <return type="int" />
<argument index="0" name="region" type="RID" />
<description>
- Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
+ Returns the region's navigation layers.
</description>
</method>
<method name="region_get_travel_cost" qualifiers="const">
@@ -325,6 +342,16 @@
Returns the [code]travel_cost[/code] of this [code]region[/code].
</description>
</method>
+ <method name="region_owns_point" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="region" type="RID" />
+ <argument index="1" name="point" type="Vector3" />
+ <description>
+ Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
+ If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
+ [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
+ </description>
+ </method>
<method name="region_set_enter_cost" qualifiers="const">
<return type="void" />
<argument index="0" name="region" type="RID" />
@@ -333,20 +360,20 @@
Sets the [code]enter_cost[/code] for this [code]region[/code].
</description>
</method>
- <method name="region_set_layers" qualifiers="const">
+ <method name="region_set_map" qualifiers="const">
<return type="void" />
<argument index="0" name="region" type="RID" />
- <argument index="1" name="layers" type="int" />
+ <argument index="1" name="map" type="RID" />
<description>
- Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]).
+ Sets the map for the region.
</description>
</method>
- <method name="region_set_map" qualifiers="const">
+ <method name="region_set_navigation_layers" qualifiers="const">
<return type="void" />
<argument index="0" name="region" type="RID" />
- <argument index="1" name="map" type="RID" />
+ <argument index="1" name="navigation_layers" type="int" />
<description>
- Sets the map for the region.
+ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]).
</description>
</method>
<method name="region_set_navmesh" qualifiers="const">
@@ -388,5 +415,10 @@
Emitted when a navigation map is updated, when a region moves or is modified.
</description>
</signal>
+ <signal name="navigation_debug_changed">
+ <description>
+ Emitted when navigation debug settings are changed. Only available in debug builds.
+ </description>
+ </signal>
</signals>
</class>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 966e24c537..8cc8498609 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -622,7 +622,7 @@
</description>
</method>
<method name="rpc" qualifiers="vararg">
- <return type="void" />
+ <return type="int" enum="Error" />
<argument index="0" name="method" type="StringName" />
<description>
Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code].
@@ -630,18 +630,24 @@
</description>
</method>
<method name="rpc_config">
- <return type="int" />
+ <return type="void" />
<argument index="0" name="method" type="StringName" />
- <argument index="1" name="rpc_mode" type="int" enum="RPCMode" />
- <argument index="2" name="call_local" type="bool" default="false" />
- <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" />
- <argument index="4" name="channel" type="int" default="0" />
+ <argument index="1" name="config" type="Variant" />
<description>
- Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(authority)[/code]). By default, methods are not exposed to networking (and RPCs).
+ Changes the RPC mode for the given [code]method[/code] with the given [code]config[/code] which should be [code]null[/code] (to disable) or a [Dictionary] in the form:
+ [codeblock]
+ {
+ rpc_mode = MultiplayerAPI.RPCMode,
+ transfer_mode = MultiplayerPeer.TranferMode,
+ call_local = false,
+ channel = 0,
+ }
+ [/codeblock]
+ See [enum MultiplayerAPI.RPCMode] and [enum MultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(authority)[/code]). By default, methods are not exposed to networking (and RPCs).
</description>
</method>
<method name="rpc_id" qualifiers="vararg">
- <return type="void" />
+ <return type="int" enum="Error" />
<argument index="0" name="peer_id" type="int" />
<argument index="1" name="method" type="StringName" />
<description>
@@ -778,12 +784,14 @@
<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.
+ This signal is emitted [i]after[/i] the child node's own [constant NOTIFICATION_ENTER_TREE] and [signal tree_entered].
</description>
</signal>
- <signal name="child_exited_tree">
+ <signal name="child_exiting_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.
+ Emitted when a child node is about to exit the scene tree, either because it is being removed or freed directly, or because this node is exiting the tree.
+ When this signal is received, the child [code]node[/code] is still in the tree and valid. This signal is emitted [i]after[/i] the child node's own [signal tree_exiting] and [constant NOTIFICATION_EXIT_TREE].
</description>
</signal>
<signal name="ready">
@@ -799,6 +807,7 @@
<signal name="tree_entered">
<description>
Emitted when the node enters the tree.
+ This signal is emitted [i]after[/i] the related [constant NOTIFICATION_ENTER_TREE] notification.
</description>
</signal>
<signal name="tree_exited">
@@ -809,15 +818,18 @@
<signal name="tree_exiting">
<description>
Emitted when the node is still active but about to exit the tree. This is the right place for de-initialization (or a "destructor", if you will).
+ This signal is emitted [i]before[/i] the related [constant NOTIFICATION_EXIT_TREE] notification.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_ENTER_TREE" value="10">
Notification received when the node enters a [SceneTree].
+ This notification is emitted [i]before[/i] the related [signal tree_entered].
</constant>
<constant name="NOTIFICATION_EXIT_TREE" value="11">
Notification received when the node is about to exit a [SceneTree].
+ This notification is emitted [i]after[/i] the related [signal tree_exiting].
</constant>
<constant name="NOTIFICATION_MOVED_IN_PARENT" value="12">
Notification received when the node is moved in the parent.
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index e65c666900..2238be4ece 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -116,6 +116,7 @@
</member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale. Unscaled value: [code](1, 1)[/code].
+ [b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed.
</member>
<member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0">
</member>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 4444416a06..ff2afd595a 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -281,6 +281,13 @@
<member name="basis" type="Basis" setter="set_basis" getter="get_basis">
Direct access to the 3x3 basis of the [Transform3D] property.
</member>
+ <member name="global_position" type="Vector3" setter="set_global_position" getter="get_global_position">
+ Global position of this node. This is equivalent to [code]global_transform.origin[/code].
+ </member>
+ <member name="global_rotation" type="Vector3" setter="set_global_rotation" getter="get_global_rotation">
+ Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
+ [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
+ </member>
<member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform">
World3D space (global) [Transform3D] of this node.
</member>
@@ -302,6 +309,7 @@
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Scale part of the local transformation.
+ [b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
</member>
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space.
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 00c5dcaa3d..d9e0680a38 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -87,6 +87,12 @@
[/codeblocks]
</description>
</method>
+ <method name="get_concatenated_names" qualifiers="const">
+ <return type="StringName" />
+ <description>
+ Returns all paths concatenated with a slash character ([code]/[/code]) as separator without subnames.
+ </description>
+ </method>
<method name="get_concatenated_subnames" qualifiers="const">
<return type="StringName" />
<description>
diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml
index 69d238ceff..656594a3c3 100644
--- a/doc/classes/ORMMaterial3D.xml
+++ b/doc/classes/ORMMaterial3D.xml
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Physically based rendering (PBR) material that can be applied to 3D objects, can use an ORM texture.
</brief_description>
<description>
+ ORMMaterial3D's properties are inherited from [BaseMaterial3D]. Unlike [StandardMaterial3D], ORMMaterial3D uses a single texture for ambient occlusion, roughness and metallic maps, known as an ORM texture.
</description>
<tutorials>
+ <link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
</class>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 2512dec4b3..75cd52787a 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -175,6 +175,10 @@
if argument.find("=") &gt; -1:
var key_value = argument.split("=")
arguments[key_value[0].lstrip("--")] = key_value[1]
+ else:
+ # Options without an argument will be present in the dictionary,
+ # with the value set to an empty string.
+ arguments[argument.lstrip("--")] = ""
[/gdscript]
[csharp]
var arguments = new Godot.Collections.Dictionary();
@@ -185,9 +189,26 @@
string[] keyValue = argument.Split("=");
arguments[keyValue[0].LStrip("--")] = keyValue[1];
}
+ else
+ {
+ // Options without an argument will be present in the dictionary,
+ // with the value set to an empty string.
+ arguments[keyValue[0].LStrip("--")] = "";
+ }
}
[/csharp]
[/codeblocks]
+ [b]Note:[/b] Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, the best way is to use the standard UNIX double dash ([code]--[/code]) and then pass custom arguments, which the engine itself will ignore. These can be read via [method get_cmdline_user_args].
+ </description>
+ </method>
+ <method name="get_cmdline_user_args">
+ <return type="PackedStringArray" />
+ <description>
+ Similar to [method get_cmdline_args], but this returns the user arguments (any argument passed after the double dash [code]--[/code] argument). These are left untouched by Godot for the user.
+ For example, in the command line below, [code]--fullscreen[/code] will not be returned in [method get_cmdline_user_args] and [code]--level 1[/code] will only be returned in [method get_cmdline_user_args]:
+ [codeblock]
+ godot --fullscreen -- --level 1
+ [/codeblock]
</description>
</method>
<method name="get_config_dir" qualifiers="const">
@@ -353,6 +374,12 @@
[b]Note:[/b] This method is only implemented on Windows, macOS, Linux and iOS. On Android, HTML5 and UWP, [method get_processor_name] returns an empty string.
</description>
</method>
+ <method name="get_restart_on_exit_arguments" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns the list of command line arguments that will be used when the project automatically restarts using [method set_restart_on_exit]. See also [method is_restart_on_exit_set].
+ </description>
+ </method>
<method name="get_static_memory_peak_usage" qualifiers="const">
<return type="int" />
<description>
@@ -375,6 +402,23 @@
[b]Note:[/b] Shared storage is implemented on Android and allows to differentiate between app specific and shared directories. Shared directories have additional restrictions on Android.
</description>
</method>
+ <method name="get_system_font_path" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="font_name" type="String" />
+ <argument index="1" name="bold" type="bool" default="false" />
+ <argument index="2" name="italic" type="bool" default="false" />
+ <description>
+ Returns path to the system font file with [code]font_name[/code] and style. Return empty string if no matching fonts found.
+ [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ </description>
+ </method>
+ <method name="get_system_fonts" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns list of font family names available.
+ [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="get_thread_caller_id" qualifiers="const">
<return type="int" />
<description>
@@ -443,6 +487,12 @@
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
+ <method name="is_restart_on_exit_set" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the project will automatically restart when it exits for any reason, [code]false[/code] otherwise. See also [method set_restart_on_exit] and [method get_restart_on_exit_arguments].
+ </description>
+ </method>
<method name="is_stdout_verbose" qualifiers="const">
<return type="bool" />
<description>
@@ -469,7 +519,12 @@
<argument index="0" name="path" type="String" />
<description>
Moves the file or directory to the system's recycle bin. See also [method Directory.remove].
+ The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported project.
[b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.
+ [codeblock]
+ var file_to_remove = "user://slot1.sav"
+ OS.move_to_trash(ProjectSettings.globalize_path(file_to_remove))
+ [/codeblock]
</description>
</method>
<method name="open_midi_inputs">
@@ -529,6 +584,17 @@
[b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows.
</description>
</method>
+ <method name="set_restart_on_exit">
+ <return type="void" />
+ <argument index="0" name="restart" type="bool" />
+ <argument index="1" name="arguments" type="PackedStringArray" default="PackedStringArray()" />
+ <description>
+ If [code]restart[/code] is [code]true[/code], restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command line [code]arguments[/code] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [code]arguments[/code].
+ [method set_restart_on_exit] can be used to apply setting changes that require a restart. See also [method is_restart_on_exit_set] and [method get_restart_on_exit_arguments].
+ [b]Note:[/b] This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor.
+ [b]Note:[/b] If the project process crashes or is [i]killed[/i] by the user (by sending [code]SIGKILL[/code] instead of the usual [code]SIGTERM[/code]), the project won't restart automatically.
+ </description>
+ </method>
<method name="set_thread_name">
<return type="int" enum="Error" />
<argument index="0" name="name" type="String" />
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 42844794b0..061b32bfdf 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -152,11 +152,9 @@
<return type="int" enum="Error" />
<argument index="0" name="signal" type="StringName" />
<argument index="1" name="callable" type="Callable" />
- <argument index="2" name="binds" type="Array" default="[]" />
- <argument index="3" name="flags" type="int" default="0" />
+ <argument index="2" name="flags" type="int" default="0" />
<description>
- Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
- [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below.
+ Connects a [code]signal[/code] to a [code]callable[/code]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
A signal can only be connected once to a [Callable]. It will print an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the callable's target is destroyed in the game's lifecycle, the connection will be lost.
[b]Examples with recommended syntax:[/b]
@@ -325,7 +323,7 @@
</method>
<method name="get" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="property" type="String" />
+ <argument index="0" name="property" type="StringName" />
<description>
Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
[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).
@@ -399,7 +397,7 @@
</method>
<method name="get_signal_connection_list" qualifiers="const">
<return type="Array" />
- <argument index="0" name="signal" type="String" />
+ <argument index="0" name="signal" type="StringName" />
<description>
Returns an [Array] of connections for the given [code]signal[/code].
</description>
@@ -490,7 +488,7 @@
</method>
<method name="set">
<return type="void" />
- <argument index="0" name="property" type="String" />
+ <argument index="0" name="property" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
Assigns a new value to the given property. If the [code]property[/code] does not exist or the given value's type doesn't match, nothing will happen.
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index a7b1f0ea33..737662fe69 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -194,6 +194,10 @@
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
<member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="fit_to_longest_item" type="bool" setter="set_fit_to_longest_item" getter="is_fit_to_longest_item" default="true">
+ If [code]true[/code], minimum size will be determined by the longest item's text, instead of the currently selected one's.
+ [b]Note:[/b] For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items.
+ </member>
<member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
The number of items to select from.
</member>
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 5d0861bcf3..3af3bb8697 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -409,7 +409,7 @@
<return type="PackedFloat32Array" />
<description>
Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code]float[/code]).
- The size of the new array will be [code]byte_array.size() / 4[/code].
+ The size of the input array must be a multiple of 4 (size of 32-bit float). The size of the new array will be [code]byte_array.size() / 4[/code].
If the original data can't be converted to 32-bit floats, the resulting data is undefined.
</description>
</method>
@@ -417,7 +417,7 @@
<return type="PackedFloat64Array" />
<description>
Returns a copy of the data converted to a [PackedFloat64Array], where each block of 8 bytes has been converted to a 64-bit float (C++ [code]double[/code], Godot [float]).
- The size of the new array will be [code]byte_array.size() / 8[/code].
+ The size of the input array must be a multiple of 8 (size of 64-bit double). The size of the new array will be [code]byte_array.size() / 8[/code].
If the original data can't be converted to 64-bit floats, the resulting data is undefined.
</description>
</method>
@@ -425,15 +425,15 @@
<return type="PackedInt32Array" />
<description>
Returns a copy of the data converted to a [PackedInt32Array], where each block of 4 bytes has been converted to a signed 32-bit integer (C++ [code]int32_t[/code]).
- The size of the new array will be [code]byte_array.size() / 4[/code].
+ The size of the input array must be a multiple of 4 (size of 32-bit integer). The size of the new array will be [code]byte_array.size() / 4[/code].
If the original data can't be converted to signed 32-bit integers, the resulting data is undefined.
</description>
</method>
<method name="to_int64_array" qualifiers="const">
<return type="PackedInt64Array" />
<description>
- Returns a copy of the data converted to a [PackedInt64Array], where each block of 4 bytes has been converted to a signed 64-bit integer (C++ [code]int64_t[/code], Godot [int]).
- The size of the new array will be [code]byte_array.size() / 8[/code].
+ Returns a copy of the data converted to a [PackedInt64Array], where each block of 8 bytes has been converted to a signed 64-bit integer (C++ [code]int64_t[/code], Godot [int]).
+ The size of the input array must be a multiple of 8 (size of 64-bit integer). The size of the new array will be [code]byte_array.size() / 8[/code].
If the original data can't be converted to signed 64-bit integers, the resulting data is undefined.
</description>
</method>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 885bedbc04..7badd826d9 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -77,28 +77,30 @@
Each particle's rotation will be animated along this [CurveTexture].
</member>
<member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum angle.
+ Maximum initial rotation applied to each particle, in degrees.
+ Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
</member>
<member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum angle.
+ Minimum equivalent of [member angle_max].
</member>
<member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's angular velocity (rotation speed) will vary along this [CurveTexture] over its lifetime.
</member>
<member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
+ Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
+ Minimum equivalent of [member angular_velocity_max].
</member>
<member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation offset will vary along this [CurveTexture].
</member>
<member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum animation offset.
+ Maximum animation offset that corresponds to frame index in the texture. [code]0[/code] is the first frame, [code]1[/code] is the last one. See [member CanvasItemMaterial.particles_animation].
</member>
<member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum animation offset.
+ Minimum equivalent of [member anim_offset_max].
</member>
<member name="anim_speed_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation speed will vary along this [CurveTexture].
@@ -108,7 +110,7 @@
With animation speed greater than [code]1[/code], remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat.
</member>
<member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum particle animation speed.
+ Minimum equivalent of [member anim_speed_max].
</member>
<member name="attractor_interaction_enabled" type="bool" setter="set_attractor_interaction_enabled" getter="is_attractor_interaction_enabled" default="true">
True if the interaction with particle attractors is enabled.
@@ -138,8 +140,10 @@
Damping will vary along this [CurveTexture].
</member>
<member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ The maximum rate at which particles lose velocity. For example value of [code]100[/code] means that the particle will go from [code]100[/code] velocity to [code]0[/code] in [code]1[/code] second.
</member>
<member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member damping_max].
</member>
<member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)">
Unit vector specifying the particles' emission direction.
@@ -187,16 +191,16 @@
Each particle's hue will vary along this [CurveTexture].
</member>
<member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum hue variation.
+ Maximum initial hue variation applied to each particle. It will shift the particle color's hue.
</member>
<member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum hue variation.
+ Minimum equivalent of [member hue_variation_max].
</member>
<member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum initial velocity.
+ Maximum initial velocity magnitude for each particle. Direction comes from [member direction] and [member spread].
</member>
<member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum initial velocity.
+ Minimum equivalent of [member initial_velocity_max].
</member>
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between [code]1.0[/code] and a random number less than one. For example a random ratio of [code]0.4[/code] would scale the original lifetime between [code]0.4-1.0[/code] of its original value.
@@ -205,19 +209,20 @@
Each particle's linear acceleration will vary along this [CurveTexture].
</member>
<member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum linear acceleration.
+ Maximum linear acceleration applied to each particle in the direction of motion.
</member>
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum linear acceleration.
+ Minimum equivalent of [member linear_accel_min].
</member>
<member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's orbital velocity will vary along this [CurveTexture].
</member>
<member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max">
- Maximum orbit velocity.
+ Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
+ Only available when [member particle_flag_disable_z] is [code]true[/code].
</member>
<member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min">
- Minimum orbit velocity.
+ Minimum equivalent of [member orbit_velocity_max].
</member>
<member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
@@ -232,19 +237,19 @@
Each particle's radial acceleration will vary along this [CurveTexture].
</member>
<member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum radial acceleration.
+ Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative.
</member>
<member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum radial acceleration.
+ Minimum equivalent of [member radial_accel_max].
</member>
<member name="scale_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's scale will vary along this [CurveTexture]. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis.
</member>
<member name="scale_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0">
- Maximum scale.
+ Maximum initial scale applied to each particle.
</member>
<member name="scale_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0">
- Minimum scale.
+ Minimum equivalent of [member scale_max].
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
@@ -261,10 +266,46 @@
Each particle's tangential acceleration will vary along this [CurveTexture].
</member>
<member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum tangential acceleration.
+ Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
</member>
<member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum tangential acceleration.
+ Minimum equivalent of [member tangential_accel_max].
+ </member>
+ <member name="turbulence_enabled" type="bool" setter="set_turbulence_enabled" getter="get_turbulence_enabled" default="false">
+ Enables and disables Turbulence for the particle system.
+ </member>
+ <member name="turbulence_influence_max" type="float" setter="set_param_max" getter="get_param_max" default="0.1">
+ Minimum turbulence influence on each particle.
+ The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life].
+ </member>
+ <member name="turbulence_influence_min" type="float" setter="set_param_min" getter="get_param_min" default="0.1">
+ Maximum turbulence influence on each particle.
+ The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life].
+ </member>
+ <member name="turbulence_influence_over_life" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
+ Each particle's amount of turbulence will be influenced along this [CurveTexture] over its life time.
+ </member>
+ <member name="turbulence_initial_displacement_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum displacement of each particles spawn position by the turbulence.
+ The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max].
+ </member>
+ <member name="turbulence_initial_displacement_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum displacement of each particles spawn position by the turbulence.
+ The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max].
+ </member>
+ <member name="turbulence_noise_scale" type="float" setter="set_turbulence_noise_scale" getter="get_turbulence_noise_scale" default="9.0">
+ This value controls the overall scale/frequency of the turbulence noise pattern.
+ A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features.
+ </member>
+ <member name="turbulence_noise_speed" type="Vector3" setter="set_turbulence_noise_speed" getter="get_turbulence_noise_speed" default="Vector3(0.5, 0.5, 0.5)">
+ The movement speed of the turbulence pattern. This changes how quickly the noise changes over time.
+ A value of [code]Vector3(0.0, 0.0, 0.0)[/code] will freeze the turbulence pattern in place.
+ </member>
+ <member name="turbulence_noise_speed_random" type="float" setter="set_turbulence_noise_speed_random" getter="get_turbulence_noise_speed_random" default="0.0">
+ Use to influence the noise speed in a random pattern. This helps to break up visible movement patterns.
+ </member>
+ <member name="turbulence_noise_strength" type="float" setter="set_turbulence_noise_strength" getter="get_turbulence_noise_strength" default="1.0">
+ The turbulence noise strength. Increasing this will result in a stronger, more contrasting, noise pattern.
</member>
</members>
<constants>
@@ -304,7 +345,7 @@
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties.
</constant>
- <constant name="PARAM_MAX" value="12" enum="Parameter">
+ <constant name="PARAM_MAX" value="15" enum="Parameter">
Represents the size of the [enum Parameter] enum.
</constant>
<constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags">
@@ -343,6 +384,15 @@
<constant name="EMISSION_SHAPE_MAX" value="7" enum="EmissionShape">
Represents the size of the [enum EmissionShape] enum.
</constant>
+ <constant name="PARAM_TURB_VEL_INFLUENCE" value="13" enum="Parameter">
+ Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum und maximum influence on each particles velocity.
+ </constant>
+ <constant name="PARAM_TURB_INIT_DISPLACEMENT" value="14" enum="Parameter">
+ Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum and maximum displacement of the particles spawn position.
+ </constant>
+ <constant name="PARAM_TURB_INFLUENCE_OVER_LIFE" value="12" enum="Parameter">
+ Use with [method set_param_texture] to set the turbulence influence over the particles life time.
+ </constant>
<constant name="SUB_EMITTER_DISABLED" value="0" enum="SubEmitterMode">
</constant>
<constant name="SUB_EMITTER_CONSTANT" value="1" enum="SubEmitterMode">
@@ -352,6 +402,7 @@
<constant name="SUB_EMITTER_AT_COLLISION" value="3" enum="SubEmitterMode">
</constant>
<constant name="SUB_EMITTER_MAX" value="4" enum="SubEmitterMode">
+ Represents the size of the [enum SubEmitterMode] enum.
</constant>
</constants>
</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index a42ceba777..32eb71f1c7 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -77,15 +77,15 @@
<return type="float" />
<argument index="0" name="point" type="Vector3" />
<description>
- Returns the shortest distance from the plane to the position [code]point[/code].
+ Returns the shortest distance from the plane to the position [code]point[/code]. If the point is above the plane, the distance will be positive. If below, the distance will be negative.
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="point" type="Vector3" />
- <argument index="1" name="epsilon" type="float" default="1e-05" />
+ <argument index="1" name="tolerance" type="float" default="1e-05" />
<description>
- Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold.
+ Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]tolerance[/code] threshold.
</description>
</method>
<method name="intersect_3" qualifiers="const">
@@ -109,7 +109,7 @@
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="to" type="Vector3" />
<description>
- Returns the intersection point of a segment from position [code]begin[/code] to position [code]end[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
+ Returns the intersection point of a segment from position [code]from[/code] to position [code]to[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
@@ -121,7 +121,7 @@
</method>
<method name="is_point_over" qualifiers="const">
<return type="bool" />
- <argument index="0" name="plane" type="Vector3" />
+ <argument index="0" name="point" type="Vector3" />
<description>
Returns [code]true[/code] if [code]point[/code] is located above the plane.
</description>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index bf80aa94a5..5da2196f29 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -8,6 +8,7 @@
The size of a [PopupMenu] can be limited by using [member Window.max_size]. If the height of the list of items is larger than the maximum height of the [PopupMenu], a [ScrollContainer] within the popup will allow the user to scroll the contents.
If no maximum size is set, or if it is set to 0, the [PopupMenu] height will be limited by its parent rect.
All [code]set_*[/code] methods allow negative item index, which makes the item accessed from the last one.
+ [b]Incremental search:[/b] Like [ItemList] and [Tree], [PopupMenu] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
</description>
<tutorials>
</tutorials>
@@ -181,13 +182,6 @@
Removes all items from the [PopupMenu].
</description>
</method>
- <method name="clear_item_opentype_features">
- <return type="void" />
- <argument index="0" name="index" type="int" />
- <description>
- Removes all OpenType features form the item's text.
- </description>
- </method>
<method name="get_current_index" qualifiers="const">
<return type="int" />
<description>
@@ -201,6 +195,13 @@
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_horizontal_offset" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the horizontal offset of the item at the given [code]index[/code].
+ </description>
+ </method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="index" type="int" />
@@ -236,14 +237,6 @@
Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
- <method name="get_item_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the item's text.
- </description>
- </method>
<method name="get_item_shortcut" qualifiers="const">
<return type="Shortcut" />
<argument index="0" name="index" type="int" />
@@ -395,6 +388,14 @@
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_horizontal_offset">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <argument index="1" name="offset" type="int" />
+ <description>
+ Sets the horizontal offset of the item at the given [code]index[/code].
+ </description>
+ </method>
<method name="set_item_icon">
<return type="void" />
<argument index="0" name="index" type="int" />
@@ -436,15 +437,6 @@
Sets the state of a multistate item. See [method add_multistate_item] for details.
</description>
</method>
- <method name="set_item_opentype_feature">
- <return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_item_shortcut">
<return type="void" />
<argument index="0" name="index" type="int" />
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 8a3677c0b4..40477d27d4 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -203,6 +203,9 @@
Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead.
[b]Note:[/b] Only effective if [member application/boot_splash/show_image] is [code]true[/code].
</member>
+ <member name="application/boot_splash/minimum_display_time" type="int" setter="" getter="" default="0">
+ Minimum boot splash display time (in milliseconds). It is not recommended to set too high values for this setting.
+ </member>
<member name="application/boot_splash/show_image" type="bool" setter="" getter="" default="true">
If [code]true[/code], displays the image specified in [member application/boot_splash/image] when the engine starts. If [code]false[/code], only displays the plain color specified in [member application/boot_splash/bg_color].
</member>
@@ -307,6 +310,12 @@
<member name="audio/driver/output_latency.web" type="int" setter="" getter="" default="50">
Safer override for [member audio/driver/output_latency] in the Web platform, to avoid audio issues especially on mobile devices.
</member>
+ <member name="audio/general/2d_panning_strength" type="float" setter="" getter="" default="1.0">
+ The base strength of the panning effect for all AudioStreamPlayer2D nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer2D.panning_strength].
+ </member>
+ <member name="audio/general/3d_panning_strength" type="float" setter="" getter="" default="1.0">
+ The base strength of the panning effect for all AudioStreamPlayer3D nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer3D.panning_strength].
+ </member>
<member name="audio/video/video_delay_compensation_ms" type="int" setter="" getter="" default="0">
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
</member>
@@ -441,8 +450,11 @@
<member name="debug/gdscript/warnings/void_assignment" type="int" setter="" getter="" default="1">
If [code]enabled[/code], prints a warning or an error when assigning the result of a function that returns [code]void[/code] to a variable.
</member>
- <member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default="&quot;Please include this when reporting the bug on https://github.com/godotengine/godot/issues&quot;">
- Message to be displayed before the backtrace when the engine crashes.
+ <member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default="&quot;Please include this when reporting the bug to the project developer.&quot;">
+ Message to be displayed before the backtrace when the engine crashes. By default, this message is only used in exported projects due to the editor-only override applied to this setting.
+ </member>
+ <member name="debug/settings/crash_handler/message.editor" type="String" setter="" getter="" default="&quot;Please include this when reporting the bug on: https://github.com/godotengine/godot/issues&quot;">
+ Editor-only override for [member debug/settings/crash_handler/message]. Does not affect exported projects in debug or release mode.
</member>
<member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0">
Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging.
@@ -482,9 +494,45 @@
<member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color(1, 0.7, 0.1, 0.4)">
Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/navigation/edge_connection_color" type="Color" setter="" getter="" default="Color(1, 0, 1, 1)">
+ Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_connections" type="bool" setter="" getter="" default="true">
+ If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_connections_xray" type="bool" setter="" getter="" default="true">
+ If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_lines" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_lines_xray" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_geometry_face_random_color" type="bool" setter="" getter="" default="true">
+ If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu.
+ </member>
<member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/navigation/geometry_edge_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 1)">
+ Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_edge_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
+ Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_face_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 0.4)">
+ Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_face_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 0.4)">
+ Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/paths/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
+ Color of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/paths/geometry_width" type="float" setter="" getter="" default="2.0">
+ Line width of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu.
+ </member>
<member name="display/mouse_cursor/custom_image" type="String" setter="" getter="" default="&quot;&quot;">
Custom image for the mouse cursor (limited to 256×256).
</member>
@@ -540,10 +588,36 @@
[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.
+ Sets the V-Sync mode for the main game window.
See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application.
Depending on the platform and used renderer, the engine will fall back to [code]Enabled[/code], if the desired mode is not supported.
</member>
+ <member name="editor/movie_writer/disable_vsync" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], requests V-Sync to be disabled when writing a movie (similar to setting [member display/window/vsync/vsync_mode] to [b]Disabled[/b]). This can speed up video writing if the hardware is fast enough to render, encode and save the video at a framerate higher than the monitor's refresh rate.
+ [b]Note:[/b] [member editor/movie_writer/disable_vsync] has no effect if the operating system or graphics driver forces V-Sync with no way for applications to disable it.
+ </member>
+ <member name="editor/movie_writer/fps" type="int" setter="" getter="" default="60">
+ The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher [member editor/movie_writer/fps] values. Certain FPS values will require you to adjust [member editor/movie_writer/mix_rate] to prevent audio from desynchronizing over time.
+ This can be specified manually on the command line using the [code]--fixed-fps &lt;fps&gt;[/code] command line argument.
+ </member>
+ <member name="editor/movie_writer/mix_rate" type="int" setter="" getter="" default="48000">
+ The audio mix rate to use in the recorded audio when writing a movie (in Hz). This can be different from [member audio/driver/mix_rate], but this value must be divisible by [member editor/movie_writer/fps] to prevent audio from desynchronizing over time.
+ </member>
+ <member name="editor/movie_writer/mjpeg_quality" type="float" setter="" getter="" default="0.75">
+ The JPEG quality to use when writing a video to an AVI file, between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.9[/code]. Even at quality [code]1.0[/code], JPEG compression remains lossy.
+ [b]Note:[/b] This does not affect the audio quality or writing PNG image sequences.
+ </member>
+ <member name="editor/movie_writer/movie_file" type="String" setter="" getter="" default="&quot;&quot;">
+ The output path for the movie. The file extension determines the [MovieWriter] that will be used.
+ Godot has 2 built-in [MovieWriter]s:
+ - AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/mjpeg_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most.
+ - PNG image sequence for video and WAV for audio ([code].png[/code] file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as [url=https://ffmpeg.org/]FFmpeg[/url] after recording. Transparency is currently not supported, even if the root viewport is set to be transparent.
+ If you need to encode to a different format or pipe a stream through third-party software, you can extend this [MovieWriter] class to create your own movie writers.
+ When using PNG output, the frame number will be appended at the end of the file name. It starts from 0 and is padded with 8 digits to ensure correct sorting and easier processing. For example, if the output path is [code]/tmp/hello.png[/code], the first two frames will be [code]/tmp/hello00000000.png[/code] and [code]/tmp/hello00000001.png[/code]. The audio will be saved at [code]/tmp/hello.wav[/code].
+ </member>
+ <member name="editor/movie_writer/speaker_mode" type="int" setter="" getter="" default="0">
+ The speaker mode to use in the recorded audio when writing a movie. See [enum AudioServer.SpeakerMode] for possible values.
+ </member>
<member name="editor/node_naming/name_casing" type="int" setter="" getter="" default="0">
When creating node names automatically, set the type of casing in this project. This is mostly an editor setting.
</member>
@@ -587,7 +661,7 @@
Path to a custom [Font] resource to use as default for all GUI elements of the project.
</member>
<member name="gui/theme/default_font_antialiased" type="bool" setter="" getter="" default="true">
- If set to [code]true[/code], default font uses 8-bit anitialiased glyph rendering. See [member FontData.antialiased].
+ If set to [code]true[/code], default font uses 8-bit anitialiased glyph rendering. See [member FontFile.antialiased].
</member>
<member name="gui/theme/default_font_generate_mipmaps" type="bool" setter="" getter="" default="false">
If set to [code]true[/code], the default font will have mipmaps generated. This prevents text from looking grainy when a [Control] is scaled down, or when a [Label3D] is viewed from a long distance (if [member Label3D.texture_filter] is set to a mode that displays mipmaps).
@@ -595,7 +669,7 @@
[b]Note:[/b] This setting does not affect custom [Font]s used within the project.
</member>
<member name="gui/theme/default_font_hinting" type="int" setter="" getter="" default="1">
- Default font hinting mode. See [member FontData.hinting].
+ Default font hinting mode. See [member FontFile.hinting].
</member>
<member name="gui/theme/default_font_multichannel_signed_distance_field" type="bool" setter="" getter="" default="false">
If set to [code]true[/code], the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for [Control]s that are scaled down (or for [Label3D]s viewed from a long distance).
@@ -603,7 +677,7 @@
[b]Note:[/b] This setting does not affect custom [Font]s used within the project.
</member>
<member name="gui/theme/default_font_subpixel_positioning" type="int" setter="" getter="" default="1">
- Default font glyph sub-pixel positioning mode. See [member FontData.subpixel_positioning].
+ Default font glyph sub-pixel positioning mode. See [member FontFile.subpixel_positioning].
</member>
<member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0">
</member>
@@ -1588,13 +1662,13 @@
Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d [member rendering/scaling_3d/mode] for supersampling, which provides higher quality but is much more expensive.
</member>
<member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0">
- Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
+ Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. The blurriness can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled].
</member>
<member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false">
</member>
<member name="rendering/anti_aliasing/quality/use_taa" type="bool" setter="" getter="" default="false">
- Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion.
+ Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
[b]Note:[/b] The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts.
</member>
<member name="rendering/anti_aliasing/screen_space_roughness_limiter/amount" type="float" setter="" getter="" default="0.25">
@@ -1714,28 +1788,40 @@
<member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="0">
</member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
+ The maximum number of rays that can be thrown per pass when baking lightmaps with [LightmapGI]. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times.
</member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
+ The maximum number of rays that can be thrown per pass when baking dynamic object lighting in [LightmapProbe]s with [LightmapGI]. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times.
</member>
<member name="rendering/lightmapping/bake_performance/region_size" type="int" setter="" getter="" default="512">
+ The region size to use when baking lightmaps with [LightmapGI].
</member>
<member name="rendering/lightmapping/bake_quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_HIGH].
</member>
<member name="rendering/lightmapping/bake_quality/high_quality_ray_count" type="int" setter="" getter="" default="256">
+ The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_HIGH].
</member>
<member name="rendering/lightmapping/bake_quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_LOW].
</member>
<member name="rendering/lightmapping/bake_quality/low_quality_ray_count" type="int" setter="" getter="" default="16">
+ The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_LOW].
</member>
<member name="rendering/lightmapping/bake_quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_MEDIUM].
</member>
<member name="rendering/lightmapping/bake_quality/medium_quality_ray_count" type="int" setter="" getter="" default="64">
+ The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_MEDIUM].
</member>
<member name="rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_ULTRA].
</member>
<member name="rendering/lightmapping/bake_quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024">
+ The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_ULTRA].
</member>
<member name="rendering/lightmapping/probe_capture/update_speed" type="float" setter="" getter="" default="15">
+ The framerate-independent update speed when representing dynamic object lighting from [LightmapProbe]s. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area.
</member>
<member name="rendering/limits/cluster_builder/max_clustered_elements" type="float" setter="" getter="" default="512">
</member>
@@ -1800,9 +1886,6 @@
<member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/scaling_3d/fsr_mipmap_bias" type="float" setter="" getter="" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
- </member>
<member name="rendering/scaling_3d/fsr_sharpness" type="float" setter="" getter="" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
</member>
@@ -1842,53 +1925,61 @@
<member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="2">
+ <member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
</member>
- <member name="rendering/shadows/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/shadow_atlas/16_bits" type="bool" setter="" getter="" default="true">
+ <member name="rendering/shadows/positional_shadow/atlas_16_bits" type="bool" setter="" getter="" default="true">
</member>
- <member name="rendering/shadows/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="2">
+ <member name="rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv" type="int" setter="" getter="" default="2">
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/shadows/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2">
+ <member name="rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv" type="int" setter="" getter="" default="2">
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/shadows/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3">
+ <member name="rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv" type="int" setter="" getter="" default="3">
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/shadows/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4">
+ <member name="rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv" type="int" setter="" getter="" default="4">
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/shadows/shadow_atlas/size" type="int" setter="" getter="" default="4096">
+ <member name="rendering/shadows/positional_shadow/atlas_size" type="int" setter="" getter="" default="4096">
Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
</member>
- <member name="rendering/shadows/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
- Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/shadows/positional_shadow/atlas_size.mobile" type="int" setter="" getter="" default="2048">
+ Lower-end override for [member rendering/shadows/positional_shadow/atlas_size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2">
+ <member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
</member>
- <member name="rendering/shadows/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/shadows/positional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3">
+ The filtering quality to use for [Decal] nodes. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by [member rendering/textures/default_filters/anisotropic_filtering_level].
</member>
<member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2">
Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled.
+ The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See [member rendering/textures/decals/filter] and [member rendering/textures/light_projectors/filter].
[b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time.
</member>
+ <member name="rendering/textures/default_filters/texture_mipmap_bias" type="float" setter="" getter="" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ [b]Note:[/b] This property is only read when the project starts. To change the mipmap LOD bias at run-time, set [member Viewport.texture_mipmap_bias] instead.
+ </member>
<member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
[b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time.
</member>
<member name="rendering/textures/light_projectors/filter" type="int" setter="" getter="" default="3">
+ The filtering quality to use for [OmniLight3D] and [SpotLight3D] projectors. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by [member rendering/textures/default_filters/anisotropic_filtering_level].
</member>
<member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP.
@@ -1912,6 +2003,12 @@
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
[b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
</member>
+ <member name="rendering/vrs/mode" type="int" setter="" getter="" default="0">
+ Set the default Variable Rate Shading (VRS) mode for the main viewport. See [member Viewport.vrs_mode] to change this at runtime, and [enum Viewport.VRSMode] for possible values.
+ </member>
+ <member name="rendering/vrs/texture" type="String" setter="" getter="" default="&quot;&quot;">
+ If [member rendering/vrs/mode] is set to texture, this is the path to default texture loaded as the VRS image.
+ </member>
<member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
</member>
<member name="rendering/vulkan/rendering/back_end" type="int" setter="" getter="" default="0">
@@ -1924,6 +2021,12 @@
</member>
<member name="rendering/vulkan/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64">
</member>
+ <member name="threading/worker_pool/low_priority_thread_ratio" type="float" setter="" getter="" default="0.3">
+ </member>
+ <member name="threading/worker_pool/max_threads" type="int" setter="" getter="" default="-1">
+ </member>
+ <member name="threading/worker_pool/use_system_threads_for_low_priority_tasks" type="bool" setter="" getter="" default="true">
+ </member>
<member name="xr/openxr/default_action_map" type="String" setter="" getter="" default="&quot;res://openxr_action_map.tres&quot;">
Action map configuration to load by default.
</member>
diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml
new file mode 100644
index 0000000000..2bbfd04e9e
--- /dev/null
+++ b/doc/classes/Projection.xml
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Projection" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <constructors>
+ <constructor name="Projection">
+ <return type="Projection" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Projection">
+ <return type="Projection" />
+ <argument index="0" name="from" type="Projection" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Projection">
+ <return type="Projection" />
+ <argument index="0" name="from" type="Transform3D" />
+ <description>
+ </description>
+ </constructor>
+ </constructors>
+ <methods>
+ <method name="create_depth_correction" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="flip_y" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="create_fit_aabb" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="aabb" type="AABB" />
+ <description>
+ </description>
+ </method>
+ <method name="create_for_hmd" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="eye" type="int" />
+ <argument index="1" name="aspect" type="float" />
+ <argument index="2" name="intraocular_dist" type="float" />
+ <argument index="3" name="display_width" type="float" />
+ <argument index="4" name="display_to_lens" type="float" />
+ <argument index="5" name="oversample" type="float" />
+ <argument index="6" name="z_near" type="float" />
+ <argument index="7" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="create_frustum" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="left" type="float" />
+ <argument index="1" name="right" type="float" />
+ <argument index="2" name="bottom" type="float" />
+ <argument index="3" name="top" type="float" />
+ <argument index="4" name="z_near" type="float" />
+ <argument index="5" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="create_frustum_aspect" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="size" type="float" />
+ <argument index="1" name="aspect" type="float" />
+ <argument index="2" name="offset" type="Vector2" />
+ <argument index="3" name="z_near" type="float" />
+ <argument index="4" name="z_far" type="float" />
+ <argument index="5" name="flip_fov" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
+ <method name="create_light_atlas_rect" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="rect" type="Rect2" />
+ <description>
+ </description>
+ </method>
+ <method name="create_orthogonal" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="left" type="float" />
+ <argument index="1" name="right" type="float" />
+ <argument index="2" name="bottom" type="float" />
+ <argument index="3" name="top" type="float" />
+ <argument index="4" name="z_near" type="float" />
+ <argument index="5" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="create_orthogonal_aspect" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="size" type="float" />
+ <argument index="1" name="aspect" type="float" />
+ <argument index="2" name="z_near" type="float" />
+ <argument index="3" name="z_far" type="float" />
+ <argument index="4" name="flip_fov" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
+ <method name="create_perspective" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="fovy" type="float" />
+ <argument index="1" name="aspect" type="float" />
+ <argument index="2" name="z_near" type="float" />
+ <argument index="3" name="z_far" type="float" />
+ <argument index="4" name="flip_fov" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
+ <method name="create_perspective_hmd" qualifiers="static">
+ <return type="Projection" />
+ <argument index="0" name="fovy" type="float" />
+ <argument index="1" name="aspect" type="float" />
+ <argument index="2" name="z_near" type="float" />
+ <argument index="3" name="z_far" type="float" />
+ <argument index="4" name="flip_fov" type="bool" />
+ <argument index="5" name="eye" type="int" />
+ <argument index="6" name="intraocular_dist" type="float" />
+ <argument index="7" name=" convergence_dist" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="determinant" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="flipped_y" qualifiers="const">
+ <return type="Projection" />
+ <description>
+ </description>
+ </method>
+ <method name="get_aspect" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_far_plane_half_extents" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="get_fov" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_fovy" qualifiers="static">
+ <return type="float" />
+ <argument index="0" name="fovx" type="float" />
+ <argument index="1" name="aspect" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_lod_multiplier" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_pixels_per_meter" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="for_pixel_width" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_projection_plane" qualifiers="const">
+ <return type="Plane" />
+ <argument index="0" name="plane" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_viewport_half_extents" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="get_z_far" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_z_near" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="inverse" qualifiers="const">
+ <return type="Projection" />
+ <description>
+ </description>
+ </method>
+ <method name="is_orthogonal" qualifiers="const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="jitter_offseted" qualifiers="const">
+ <return type="Projection" />
+ <argument index="0" name="offset" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="perspective_znear_adjusted" qualifiers="const">
+ <return type="Projection" />
+ <argument index="0" name="new_znear" type="float" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="w" type="Vector4" setter="" getter="" default="Vector4(0, 0, 0, 1)">
+ </member>
+ <member name="x" type="Vector4" setter="" getter="" default="Vector4(1, 0, 0, 0)">
+ </member>
+ <member name="y" type="Vector4" setter="" getter="" default="Vector4(0, 1, 0, 0)">
+ </member>
+ <member name="z" type="Vector4" setter="" getter="" default="Vector4(0, 0, 1, 0)">
+ </member>
+ </members>
+ <constants>
+ <constant name="PLANE_NEAR" value="0">
+ </constant>
+ <constant name="PLANE_FAR" value="1">
+ </constant>
+ <constant name="PLANE_LEFT" value="2">
+ </constant>
+ <constant name="PLANE_TOP" value="3">
+ </constant>
+ <constant name="PLANE_RIGHT" value="4">
+ </constant>
+ <constant name="PLANE_BOTTOM" value="5">
+ </constant>
+ <constant name="IDENTITY" value="Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)">
+ </constant>
+ <constant name="ZERO" value="Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)">
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Projection" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Projection" />
+ <argument index="0" name="right" type="Projection" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Projection" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Vector4" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
+</class>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 48e6317b11..30e96607da 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -74,16 +74,6 @@
[b]Note:[/b] This method has an abnormally high amount of floating-point error, so methods such as [code]is_zero_approx[/code] will not work reliably.
</description>
</method>
- <method name="cubic_slerp" qualifiers="const">
- <return type="Quaternion" />
- <argument index="0" name="b" type="Quaternion" />
- <argument index="1" name="pre_a" type="Quaternion" />
- <argument index="2" name="post_b" type="Quaternion" />
- <argument index="3" name="weight" type="float" />
- <description>
- Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
- </description>
- </method>
<method name="dot" qualifiers="const">
<return type="float" />
<argument index="0" name="with" type="Quaternion" />
@@ -171,6 +161,16 @@
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="spherical_cubic_interpolate" qualifiers="const">
+ <return type="Quaternion" />
+ <argument index="0" name="b" type="Quaternion" />
+ <argument index="1" name="pre_a" type="Quaternion" />
+ <argument index="2" name="post_b" type="Quaternion" />
+ <argument index="3" name="weight" type="float" />
+ <description>
+ Performs a spherical cubic interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
+ </description>
+ </method>
</methods>
<members>
<member name="w" type="float" setter="" getter="" default="1.0">
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 0d121a29d2..6248394b1a 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -395,7 +395,7 @@
<description>
</description>
</method>
- <method name="limit_get">
+ <method name="limit_get" qualifiers="const">
<return type="int" />
<argument index="0" name="limit" type="int" enum="RenderingDevice.Limit" />
<description>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index d92121a950..9a398b1f33 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -890,7 +890,7 @@
<description>
</description>
</method>
- <method name="directional_shadow_quality_set">
+ <method name="directional_soft_shadow_filter_set_quality">
<return type="void" />
<argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
<description>
@@ -1293,45 +1293,45 @@
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">
+ <method name="global_shader_uniform_add">
<return type="void" />
<argument index="0" name="name" type="StringName" />
- <argument index="1" name="type" type="int" enum="RenderingServer.GlobalVariableType" />
+ <argument index="1" name="type" type="int" enum="RenderingServer.GlobalShaderUniformType" />
<argument index="2" name="default_value" type="Variant" />
<description>
</description>
</method>
- <method name="global_variable_get" qualifiers="const">
+ <method name="global_shader_uniform_get" qualifiers="const">
<return type="Variant" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_get_list" qualifiers="const">
+ <method name="global_shader_uniform_get_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
</description>
</method>
- <method name="global_variable_get_type" qualifiers="const">
- <return type="int" enum="RenderingServer.GlobalVariableType" />
+ <method name="global_shader_uniform_get_type" qualifiers="const">
+ <return type="int" enum="RenderingServer.GlobalShaderUniformType" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_remove">
+ <method name="global_shader_uniform_remove">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_set">
+ <method name="global_shader_uniform_set">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
</description>
</method>
- <method name="global_variable_set_override">
+ <method name="global_shader_uniform_set_override">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="value" type="Variant" />
@@ -2519,6 +2519,12 @@
If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member GPUParticles3D.local_coords].
</description>
</method>
+ <method name="positional_soft_shadow_filter_set_quality">
+ <return type="void" />
+ <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
+ <description>
+ </description>
+ </method>
<method name="reflection_probe_create">
<return type="RID" />
<description>
@@ -2742,6 +2748,13 @@
Returns the parameters of a shader.
</description>
</method>
+ <method name="shader_set_code">
+ <return type="void" />
+ <argument index="0" name="shader" type="RID" />
+ <argument index="1" name="code" type="String" />
+ <description>
+ </description>
+ </method>
<method name="shader_set_default_texture_param">
<return type="void" />
<argument index="0" name="shader" type="RID" />
@@ -2753,9 +2766,10 @@
[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">
+ <method name="shader_set_path_hint">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
+ <argument index="0" name="shader" type="RID" />
+ <argument index="1" name="path" type="String" />
<description>
</description>
</method>
@@ -3161,14 +3175,6 @@
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" />
@@ -3220,6 +3226,25 @@
Sets the viewport's parent to another viewport.
</description>
</method>
+ <method name="viewport_set_positional_shadow_atlas_quadrant_subdivision">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="quadrant" type="int" />
+ <argument index="2" name="subdivision" type="int" />
+ <description>
+ Sets the shadow atlas quadrant's subdivision.
+ </description>
+ </method>
+ <method name="viewport_set_positional_shadow_atlas_size">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="use_16_bits" type="bool" default="false" />
+ <description>
+ Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
+ [b]Note:[/b] If this is set to [code]0[/code], no shadows will be visible at all (including directional shadows).
+ </description>
+ </method>
<method name="viewport_set_render_direct_to_screen">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3269,24 +3294,6 @@
<description>
</description>
</method>
- <method name="viewport_set_shadow_atlas_quadrant_subdivision">
- <return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="quadrant" type="int" />
- <argument index="2" name="subdivision" type="int" />
- <description>
- Sets the shadow atlas quadrant's subdivision.
- </description>
- </method>
- <method name="viewport_set_shadow_atlas_size">
- <return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="use_16_bits" type="bool" default="false" />
- <description>
- Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
- </description>
- </method>
<method name="viewport_set_size">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3310,6 +3317,15 @@
<description>
</description>
</method>
+ <method name="viewport_set_texture_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 (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ </description>
+ </method>
<method name="viewport_set_transparent_background">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3356,6 +3372,22 @@
If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [XRInterface].
</description>
</method>
+ <method name="viewport_set_vrs_mode">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="mode" type="int" enum="RenderingServer.ViewportVRSMode" />
+ <description>
+ Sets the Variable Rate Shading (VRS) mode for the viewport. Note, if hardware does not support VRS this property is ignored.
+ </description>
+ </method>
+ <method name="viewport_set_vrs_texture">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="texture" type="RID" />
+ <description>
+ Texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE].
+ </description>
+ </method>
<method name="visibility_notifier_create">
<return type="RID" />
<description>
@@ -3715,14 +3747,22 @@
Use [Transform3D] to store MultiMesh transform.
</constant>
<constant name="LIGHT_PROJECTOR_FILTER_NEAREST" value="0" enum="LightProjectorFilter">
+ Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="1" enum="LightProjectorFilter">
+ <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="1" enum="LightProjectorFilter">
+ Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="2" enum="LightProjectorFilter">
+ <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="2" enum="LightProjectorFilter">
+ Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
</constant>
<constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS" value="3" enum="LightProjectorFilter">
+ Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
</constant>
- <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter">
+ <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter">
+ Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
+ </constant>
+ <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="5" enum="LightProjectorFilter">
+ Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType">
Is a directional (sun) light.
@@ -3864,14 +3904,22 @@
<constant name="DECAL_TEXTURE_MAX" value="4" enum="DecalTexture">
</constant>
<constant name="DECAL_FILTER_NEAREST" value="0" enum="DecalFilter">
+ Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="1" enum="DecalFilter">
+ <constant name="DECAL_FILTER_LINEAR" value="1" enum="DecalFilter">
+ Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="DECAL_FILTER_LINEAR" value="2" enum="DecalFilter">
+ <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="2" enum="DecalFilter">
+ Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
</constant>
<constant name="DECAL_FILTER_LINEAR_MIPMAPS" value="3" enum="DecalFilter">
+ Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
+ </constant>
+ <constant name="DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter">
+ Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
- <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter">
+ <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="5" enum="DecalFilter">
+ Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="VOXEL_GI_QUALITY_LOW" value="0" enum="VoxelGIQuality">
</constant>
@@ -4115,6 +4163,18 @@
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_MOTION_VECTORS" value="25" enum="ViewportDebugDraw">
</constant>
+ <constant name="VIEWPORT_VRS_DISABLED" value="0" enum="ViewportVRSMode">
+ VRS is disabled.
+ </constant>
+ <constant name="VIEWPORT_VRS_TEXTURE" value="1" enum="ViewportVRSMode">
+ VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
+ </constant>
+ <constant name="VIEWPORT_VRS_XR" value="2" enum="ViewportVRSMode">
+ VRS texture is supplied by the primary [XRInterface].
+ </constant>
+ <constant name="VIEWPORT_VRS_MAX" value="3" enum="ViewportVRSMode">
+ Represents the size of the [enum ViewportVRSMode] enum.
+ </constant>
<constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode">
</constant>
<constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode">
@@ -4493,63 +4553,63 @@
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE" value="2" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is counterclockwise.
</constant>
- <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalShaderUniformType">
</constant>
<constant name="RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME" value="0" enum="RenderingInfo">
</constant>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 36b64f5a86..fef94b5f3b 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -17,6 +17,12 @@
<description>
</description>
</method>
+ <method name="_get_classes_used" qualifiers="virtual const">
+ <return type="PackedStringArray" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ </description>
+ </method>
<method name="_get_dependencies" qualifiers="virtual const">
<return type="PackedStringArray" />
<argument index="0" name="path" type="String" />
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index c156814a1d..f9c4ca0d49 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -26,8 +26,8 @@
</method>
<method name="_save" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="resource" type="Resource" />
+ <argument index="0" name="path" type="Resource" />
+ <argument index="1" name="resource" type="String" />
<argument index="2" name="flags" type="int" />
<description>
Saves the given resource object to a file at the target [code]path[/code]. [code]flags[/code] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants.
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 1ffb0dba5c..729058c9b3 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -6,11 +6,21 @@
<description>
Singleton used to load resource files from the filesystem.
It uses the many [ResourceFormatLoader] classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine.
+ [b]Note:[/b] You have to import the files into the engine first to load them using [method load]. If you want to load [Image]s at run-time, you may use [method Image.load]. If you want to import audio files, you can use the snippet described in [member AudioStreamMP3.data].
</description>
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
+ <method name="add_resource_format_loader">
+ <return type="void" />
+ <argument index="0" name="format_loader" type="ResourceFormatLoader" />
+ <argument index="1" name="at_front" type="bool" default="false" />
+ <description>
+ Registers a new [ResourceFormatLoader]. The ResourceLoader will use the ResourceFormatLoader as described in [method load].
+ This method is performed implicitly for ResourceFormatLoaders written in GDScript (see [ResourceFormatLoader] for more information).
+ </description>
+ </method>
<method name="exists">
<return type="bool" />
<argument index="0" name="path" type="String" />
@@ -85,8 +95,17 @@
<argument index="0" name="path" type="String" />
<argument index="1" name="type_hint" type="String" default="&quot;&quot;" />
<argument index="2" name="use_sub_threads" type="bool" default="false" />
+ <argument index="3" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" />
<description>
Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns).
+ The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
+ </description>
+ </method>
+ <method name="remove_resource_format_loader">
+ <return type="void" />
+ <argument index="0" name="format_loader" type="ResourceFormatLoader" />
+ <description>
+ Unregisters the given [ResourceFormatLoader].
</description>
</method>
<method name="set_abort_on_missing_resources">
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index a029fb9acf..10387a4f14 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -10,6 +10,15 @@
<tutorials>
</tutorials>
<methods>
+ <method name="add_resource_format_saver">
+ <return type="void" />
+ <argument index="0" name="format_saver" type="ResourceFormatSaver" />
+ <argument index="1" name="at_front" type="bool" default="false" />
+ <description>
+ Registers a new [ResourceFormatSaver]. The ResourceSaver will use the ResourceFormatSaver as described in [method save].
+ This method is performed implicitly for ResourceFormatSavers written in GDScript (see [ResourceFormatSaver] for more information).
+ </description>
+ </method>
<method name="get_recognized_extensions">
<return type="PackedStringArray" />
<argument index="0" name="type" type="Resource" />
@@ -17,41 +26,48 @@
Returns the list of extensions available for saving a resource of a given type.
</description>
</method>
+ <method name="remove_resource_format_saver">
+ <return type="void" />
+ <argument index="0" name="format_saver" type="ResourceFormatSaver" />
+ <description>
+ Unregisters the given [ResourceFormatSaver].
+ </description>
+ </method>
<method name="save">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="resource" type="Resource" />
- <argument index="2" name="flags" type="int" default="0" />
+ <argument index="0" name="resource" type="Resource" />
+ <argument index="1" name="path" type="String" default="&quot;&quot;" />
+ <argument index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0" />
<description>
- Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object.
+ Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [code]path[/code] is empty, [ResourceSaver] will try to use [member Resource.resource_path].
The [code]flags[/code] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags.
Returns [constant OK] on success.
</description>
</method>
</methods>
<constants>
- <constant name="FLAG_NONE" value="0" enum="SaverFlags">
+ <constant name="FLAG_NONE" value="0" enum="SaverFlags" is_bitfield="true">
No resource saving option.
</constant>
- <constant name="FLAG_RELATIVE_PATHS" value="1" enum="SaverFlags">
+ <constant name="FLAG_RELATIVE_PATHS" value="1" enum="SaverFlags" is_bitfield="true">
Save the resource with a path relative to the scene which uses it.
</constant>
- <constant name="FLAG_BUNDLE_RESOURCES" value="2" enum="SaverFlags">
+ <constant name="FLAG_BUNDLE_RESOURCES" value="2" enum="SaverFlags" is_bitfield="true">
Bundles external resources.
</constant>
- <constant name="FLAG_CHANGE_PATH" value="4" enum="SaverFlags">
+ <constant name="FLAG_CHANGE_PATH" value="4" enum="SaverFlags" is_bitfield="true">
Changes the [member Resource.resource_path] of the saved resource to match its new location.
</constant>
- <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8" enum="SaverFlags">
+ <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8" enum="SaverFlags" is_bitfield="true">
Do not save editor-specific metadata (identified by their [code]__editor[/code] prefix).
</constant>
- <constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags">
+ <constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags" is_bitfield="true">
Save as big endian (see [member File.big_endian]).
</constant>
- <constant name="FLAG_COMPRESS" value="32" enum="SaverFlags">
+ <constant name="FLAG_COMPRESS" value="32" enum="SaverFlags" is_bitfield="true">
Compress the resource on save using [constant File.COMPRESSION_ZSTD]. Only available for binary resource types.
</constant>
- <constant name="FLAG_REPLACE_SUBRESOURCE_PATHS" value="64" enum="SaverFlags">
+ <constant name="FLAG_REPLACE_SUBRESOURCE_PATHS" value="64" enum="SaverFlags" is_bitfield="true">
Take over the paths of the saved subresources (see [method Resource.take_over_path]).
</constant>
</constants>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index c5cc343fac..8228bcc442 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -272,22 +272,15 @@
<method name="push_font">
<return type="void" />
<argument index="0" name="font" type="Font" />
+ <argument index="1" name="font_size" type="int" />
<description>
Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
</description>
</method>
- <method name="push_font_features">
- <return type="void" />
- <argument index="0" name="opentype_features" type="Dictionary" />
- <description>
- Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration.
- </description>
- </method>
<method name="push_font_size">
<return type="void" />
<argument index="0" name="font_size" type="int" />
<description>
- Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration.
</description>
</method>
<method name="push_hint">
@@ -454,8 +447,8 @@
</method>
</methods>
<members>
- <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="RichTextLabel.AutowrapMode" default="3">
- If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum AutowrapMode].
+ <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="3">
+ If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum TextServer.AutowrapMode].
</member>
<member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false">
If [code]true[/code], the label uses BBCode formatting.
@@ -530,8 +523,8 @@
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 name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
</member>
</members>
<signals>
@@ -560,18 +553,6 @@
</signal>
</signals>
<constants>
- <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
- Autowrap is disabled.
- </constant>
- <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
- </constant>
- <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
- </constant>
- <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
- Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
- </constant>
<constant name="LIST_NUMBERS" value="0" enum="ListType">
Each list item has a number marker.
</constant>
@@ -638,21 +619,6 @@
</constant>
<constant name="ITEM_CUSTOMFX" value="26" enum="ItemType">
</constant>
- <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
- Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
- </constant>
- <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
- Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
- </constant>
- <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
- </constant>
- <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the left.
- </constant>
- <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the right.
- </constant>
</constants>
<theme_items>
<theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml
index 88b8f2cd03..3f3b00e2cb 100644
--- a/doc/classes/RootMotionView.xml
+++ b/doc/classes/RootMotionView.xml
@@ -5,25 +5,25 @@
</brief_description>
<description>
[i]Root motion[/i] refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also [AnimationTree].
- [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain [Node] in the running project. This means a script attached to a [RootMotionView] node [i]must[/i] have [code]extends Node[/code] instead of [code]extends RootMotionView[/code]. Additionally, it must not be a [code]@tool[/code] script.
+ [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project.
</description>
<tutorials>
<link title="Using AnimationTree - Root motion">$DOCS_URL/tutorials/animation/animation_tree.html#root-motion</link>
</tutorials>
<members>
- <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path">
+ <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path" default="NodePath(&quot;&quot;)">
Path to an [AnimationTree] node to use as a basis for root motion.
</member>
- <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size">
+ <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0">
The grid's cell size in 3D units.
</member>
- <member name="color" type="Color" setter="set_color" getter="get_color">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0.5, 0.5, 1, 1)">
The grid's color.
</member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this [member radius] is reached.
</member>
- <member name="zero_y" type="bool" setter="set_zero_y" getter="get_zero_y">
+ <member name="zero_y" type="bool" setter="set_zero_y" getter="get_zero_y" default="true">
If [code]true[/code], the grid's points will all be on the same Y coordinate ([i]local[/i] Y = 0). If [code]false[/code], the points' original Y coordinate is preserved.
</member>
</members>
diff --git a/doc/classes/SceneReplicationConfig.xml b/doc/classes/SceneReplicationConfig.xml
deleted file mode 100644
index 62c108a477..0000000000
--- a/doc/classes/SceneReplicationConfig.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneReplicationConfig" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="add_property">
- <return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="index" type="int" default="-1" />
- <description>
- </description>
- </method>
- <method name="get_properties" qualifiers="const">
- <return type="NodePath[]" />
- <description>
- </description>
- </method>
- <method name="has_property" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="path" 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/SceneTree.xml b/doc/classes/SceneTree.xml
index c6b80f171a..9982cc0d60 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -18,8 +18,7 @@
<argument index="0" name="group" type="StringName" />
<argument index="1" name="method" type="StringName" />
<description>
- Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call.
- [b]Note:[/b] Due to design limitations, [method call_group] will fail silently if one of the arguments is [code]null[/code].
+ Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
[b]Note:[/b] [method call_group] will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. To wait for one frame after [method call_group] was called, use [method call_group_flags] with the [constant GROUP_CALL_DEFERRED] flag.
</description>
</method>
@@ -29,12 +28,11 @@
<argument index="1" name="group" type="StringName" />
<argument index="2" name="method" type="StringName" />
<description>
- Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call.
+ Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
[codeblock]
# Call the method in a deferred manner and in reverse order.
get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE)
[/codeblock]
- [b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code].
[b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred].
</description>
</method>
@@ -221,6 +219,9 @@
<member name="debug_navigation_hint" type="bool" setter="set_debug_navigation_hint" getter="is_debugging_navigation_hint" default="false">
If [code]true[/code], navigation polygons will be visible when running the game from the editor for debugging purposes.
</member>
+ <member name="debug_paths_hint" type="bool" setter="set_debug_paths_hint" getter="is_debugging_paths_hint" default="false">
+ If [code]true[/code], curves from [Path2D] and [Path3D] nodes will be visible when running the game from the editor for debugging purposes.
+ </member>
<member name="edited_scene_root" type="Node" setter="set_edited_scene_root" getter="get_edited_scene_root">
The root of the edited scene.
</member>
diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index e21fac2d32..79ee95719d 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -40,6 +40,7 @@
</methods>
<members>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
+ <member name="ok_button_text" type="String" setter="set_ok_button_text" getter="get_ok_button_text" overrides="AcceptDialog" default="&quot;Create&quot;" />
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Attach Node Script&quot;" />
</members>
<signals>
diff --git a/doc/classes/ScriptExtension.xml b/doc/classes/ScriptExtension.xml
index 91fa6206d7..4e432ca9a8 100644
--- a/doc/classes/ScriptExtension.xml
+++ b/doc/classes/ScriptExtension.xml
@@ -65,8 +65,8 @@
<description>
</description>
</method>
- <method name="_get_rpc_methods" qualifiers="virtual const">
- <return type="Dictionary[]" />
+ <method name="_get_rpc_config" qualifiers="virtual const">
+ <return type="Variant" />
<description>
</description>
</method>
diff --git a/doc/classes/ScriptLanguageExtension.xml b/doc/classes/ScriptLanguageExtension.xml
index 0f757cf806..45d4cf44fa 100644
--- a/doc/classes/ScriptLanguageExtension.xml
+++ b/doc/classes/ScriptLanguageExtension.xml
@@ -174,6 +174,11 @@
<description>
</description>
</method>
+ <method name="_get_public_annotations" qualifiers="virtual const">
+ <return type="Dictionary[]" />
+ <description>
+ </description>
+ </method>
<method name="_get_public_constants" qualifiers="virtual const">
<return type="Dictionary" />
<description>
@@ -378,7 +383,9 @@
</constant>
<constant name="LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE" value="7" enum="LookupResultType">
</constant>
- <constant name="LOOKUP_RESULT_MAX" value="8" enum="LookupResultType">
+ <constant name="LOOKUP_RESULT_CLASS_ANNOTATION" value="8" enum="LookupResultType">
+ </constant>
+ <constant name="LOOKUP_RESULT_MAX" value="9" enum="LookupResultType">
</constant>
<constant name="LOCATION_LOCAL" value="0" enum="CodeCompletionLocation">
The option is local to the location of the code completion query - e.g. a local variable.
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 658793c4c0..1bbf5cb91b 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A ScrollContainer node meant to contain a [Control] child.
- ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.minimum_size] of the Control relative to the ScrollContainer.
+ ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.custom_minimum_size] of the Control relative to the ScrollContainer.
Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
</description>
<tutorials>
diff --git a/doc/classes/ShaderInclude.xml b/doc/classes/ShaderInclude.xml
new file mode 100644
index 0000000000..40072a933b
--- /dev/null
+++ b/doc/classes/ShaderInclude.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShaderInclude" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml
index 5fcb60dd09..70da03dc6e 100644
--- a/doc/classes/ShapeCast2D.xml
+++ b/doc/classes/ShapeCast2D.xml
@@ -6,7 +6,7 @@
<description>
Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity.
- The node can detect multiple collision objects, but usually the first detected collision
+ The node can detect multiple collision objects, but it's usually used to detect the first collision.
[b]Note:[/b] shape casting is more computationally expensive compared to ray casting.
</description>
<tutorials>
@@ -42,27 +42,27 @@
<method name="get_closest_collision_safe_fraction" qualifiers="const">
<return type="float" />
<description>
- The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by [member target_position].
+ The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision.
</description>
</method>
<method name="get_closest_collision_unsafe_fraction" qualifiers="const">
<return type="float" />
<description>
- The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by [member target_position].
+ The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision.
</description>
</method>
<method name="get_collider" qualifiers="const">
<return type="Object" />
<argument index="0" name="index" type="int" />
<description>
- Returns the [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the collided [Object] of one of the multiple collisions at [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]).
+ Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
<method name="get_collision_count" qualifiers="const">
@@ -82,14 +82,14 @@
<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.
+ Returns the normal of 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.
+ Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object.
[b]Note:[/b] this point is in the [b]global[/b] coordinate system.
</description>
</method>
@@ -133,7 +133,7 @@
The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected.
</member>
<member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
- A complete collision information. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
+ Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
If [code]true[/code], collisions will be reported.
@@ -148,7 +148,7 @@
The number of intersections can be limited with this parameter, to reduce the processing time.
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
- Any [Shape2D] derived shape used for collision queries.
+ The [Shape2D]-derived shape to be used for collision queries.
</member>
<member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
The shape's destination point, relative to this node's [code]position[/code].
diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml
new file mode 100644
index 0000000000..085bc9acd1
--- /dev/null
+++ b/doc/classes/ShapeCast3D.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShapeCast3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Node for physics collision sweep and immediate overlap queries. Similar to the [RayCast3D] node.
+ </brief_description>
+ <description>
+ Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
+ Immediate collision overlaps can be done with the [member target_position] set to [code]Vector3(0, 0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area3D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area3D] nodes, and when using the signals creates unnecessary complexity.
+ The node can detect multiple collision objects, but it's usually used to detect the first collision.
+ [b]Note:[/b] Shape casting is more computationally expensive compared to ray casting.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_exception">
+ <return type="void" />
+ <argument index="0" name="node" type="Object" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [CollisionObject3D] node.
+ </description>
+ </method>
+ <method name="add_exception_rid">
+ <return type="void" />
+ <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 [ShapeCast3D].
+ </description>
+ </method>
+ <method name="force_shapecast_update">
+ <return type="void" />
+ <description>
+ Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the shape or its parent has changed state.
+ [b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
+ </description>
+ </method>
+ <method name="get_closest_collision_safe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision.
+ </description>
+ </method>
+ <method name="get_closest_collision_unsafe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision.
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </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 the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </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="Vector3" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object.
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object.
+ [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="Object" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [CollisionObject3D] node.
+ </description>
+ </method>
+ <method name="remove_exception_rid">
+ <return type="void" />
+ <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="resource_changed">
+ <return type="void" />
+ <argument index="0" name="resource" type="Resource" />
+ <description>
+ This method is used internally to update the debug gizmo in the editor. Any code placed in this function will be called whenever the [member shape] resource is modified.
+ </description>
+ </method>
+ <method name="set_collision_mask_value">
+ <return type="void" />
+ <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 [Area3D]s will be reported.
+ </member>
+ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
+ If [code]true[/code], collision with [PhysicsBody3D]s will be reported.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
+ The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ </member>
+ <member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
+ Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState3D.get_rest_info] method.
+ </member>
+ <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color(0, 0, 0, 1)">
+ The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [ShapeCast3D] is colliding with something.
+ If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used.
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ If [code]true[/code], collisions will be reported.
+ </member>
+ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
+ If [code]true[/code], the parent node will be excluded from collision detection.
+ </member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision.
+ </member>
+ <member name="max_results" type="int" setter="set_max_results" getter="get_max_results" default="32">
+ The number of intersections can be limited with this parameter, to reduce the processing time.
+ </member>
+ <member name="shape" type="Shape3D" setter="set_shape" getter="get_shape">
+ The [Shape3D]-derived shape to be used for collision queries.
+ </member>
+ <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, -1, 0)">
+ The shape's destination point, relative to this node's [code]position[/code].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index f271220989..6295724aa2 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -392,6 +392,10 @@
<members>
<member name="animate_physical_bones" type="bool" setter="set_animate_physical_bones" getter="get_animate_physical_bones" default="true">
</member>
+ <member name="motion_scale" type="float" setter="set_motion_scale" getter="get_motion_scale" default="1.0">
+ Multiplies the position 3D track animation.
+ [b]Note:[/b] Unless this value is [code]1.0[/code], the key value in animation will not match the actual position value.
+ </member>
<member name="show_rest_only" type="bool" setter="set_show_rest_only" getter="is_show_rest_only" default="false">
</member>
</members>
diff --git a/doc/classes/SkeletonProfile.xml b/doc/classes/SkeletonProfile.xml
new file mode 100644
index 0000000000..5c2d0eefb4
--- /dev/null
+++ b/doc/classes/SkeletonProfile.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonProfile" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Profile of a virtual skeleton used as a target for retargeting.
+ </brief_description>
+ <description>
+ This resource is used in [EditorScenePostImport]. Some parameters are referring to bones in [Skeleton3D], [Skin], [Animation], and some other nodes are rewritten based on the parameters of [SkeletonProfile].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="find_bone" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="bone_name" type="StringName" />
+ <description>
+ Returns the bone index that matches [code]bone_name[/code] as its name.
+ </description>
+ </method>
+ <method name="get_bone_name" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap].
+ In the retargeting process, the returned bone name is the bone name of the target skeleton.
+ </description>
+ </method>
+ <method name="get_bone_parent" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the name of the bone which is the parent to the bone at [code]bone_idx[/code]. The result is empty if the bone has no parent.
+ </description>
+ </method>
+ <method name="get_bone_tail" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the name of the bone which is the tail of the bone at [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="get_group" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the group of the bone at [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="get_group_name" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="group_idx" type="int" />
+ <description>
+ Returns the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor.
+ </description>
+ </method>
+ <method name="get_handle_offset" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor.
+ This is the offset with origin at the top left corner of the square.
+ </description>
+ </method>
+ <method name="get_reference_pose" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the reference pose transform for bone [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="get_tail_direction" qualifiers="const">
+ <return type="int" enum="SkeletonProfile.TailDirection" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the tail direction of the bone at [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture2D" />
+ <argument index="0" name="group_idx" type="int" />
+ <description>
+ Returns the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor.
+ </description>
+ </method>
+ <method name="set_bone_name">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="bone_name" type="StringName" />
+ <description>
+ Sets the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap].
+ In the retargeting process, the setting bone name is the bone name of the target skeleton.
+ </description>
+ </method>
+ <method name="set_bone_parent">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="bone_parent" type="StringName" />
+ <description>
+ Sets the bone with name [code]bone_parent[/code] as the parent of the bone at [code]bone_idx[/code]. If an empty string is passed, then the bone has no parent.
+ </description>
+ </method>
+ <method name="set_bone_tail">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="bone_tail" type="StringName" />
+ <description>
+ Sets the bone with name [code]bone_tail[/code] as the tail of the bone at [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="set_group">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="group" type="StringName" />
+ <description>
+ Sets the group of the bone at [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="set_group_name">
+ <return type="void" />
+ <argument index="0" name="group_idx" type="int" />
+ <argument index="1" name="group_name" type="StringName" />
+ <description>
+ Sets the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor.
+ </description>
+ </method>
+ <method name="set_handle_offset">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="handle_offset" type="Vector2" />
+ <description>
+ Sets the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor.
+ This is the offset with origin at the top left corner of the square.
+ </description>
+ </method>
+ <method name="set_reference_pose">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="bone_name" type="Transform3D" />
+ <description>
+ Sets the reference pose transform for bone [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="set_tail_direction">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="tail_direction" type="int" enum="SkeletonProfile.TailDirection" />
+ <description>
+ Sets the tail direction of the bone at [code]bone_idx[/code].
+ [b]Note:[/b] This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally.
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void" />
+ <argument index="0" name="group_idx" type="int" />
+ <argument index="1" name="texture" type="Texture2D" />
+ <description>
+ Sets the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bone_size" type="int" setter="set_bone_size" getter="get_bone_size" default="0">
+ </member>
+ <member name="group_size" type="int" setter="set_group_size" getter="get_group_size" default="0">
+ </member>
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="&amp;&quot;&quot;">
+ A name of bone that will be used as the root bone in [AnimationTree].
+ [b]Note:[/b] In most cases, it is the bone of the parent of the hips that exists at the world origin in the humanoid model.
+ </member>
+ <member name="scale_base_bone" type="StringName" setter="set_scale_base_bone" getter="get_scale_base_bone" default="&amp;&quot;&quot;">
+ A name of bone which height will be used as the coefficient for normalization.
+ [b]Note:[/b] In most cases, it is hips in the humanoid model.
+ </member>
+ </members>
+ <signals>
+ <signal name="profile_updated">
+ <description>
+ This signal is emitted when change the value in profile. This is used to update key name in the [BoneMap] and to redraw the [BoneMap] editor.
+ [b]Note:[/b] This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the [BoneMap].
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TAIL_DIRECTION_AVERAGE_CHILDREN" value="0" enum="TailDirection">
+ Direction to the average coordinates of bone children.
+ </constant>
+ <constant name="TAIL_DIRECTION_SPECIFIC_CHILD" value="1" enum="TailDirection">
+ Direction to the coordinates of specified bone child.
+ </constant>
+ <constant name="TAIL_DIRECTION_END" value="2" enum="TailDirection">
+ Direction is not calculated.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonProfileHumanoid.xml b/doc/classes/SkeletonProfileHumanoid.xml
new file mode 100644
index 0000000000..11f0521718
--- /dev/null
+++ b/doc/classes/SkeletonProfileHumanoid.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonProfileHumanoid" inherits="SkeletonProfile" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ A [SkeletonProfile] as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="bone_size" type="int" setter="set_bone_size" getter="get_bone_size" overrides="SkeletonProfile" default="56" />
+ <member name="group_size" type="int" setter="set_group_size" getter="get_group_size" overrides="SkeletonProfile" default="4" />
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" overrides="SkeletonProfile" default="&amp;&quot;Root&quot;" />
+ <member name="scale_base_bone" type="StringName" setter="set_scale_base_bone" getter="get_scale_base_bone" overrides="SkeletonProfile" default="&amp;&quot;Hips&quot;" />
+ </members>
+</class>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 41b02b6dc9..bc381578d9 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -77,7 +77,7 @@
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects.
- [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index b0d1e1efcf..0d423630d4 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -130,9 +130,4 @@
</description>
</method>
</methods>
- <members>
- <member name="frames" type="Array" setter="_set_frames" getter="_get_frames">
- Compatibility property, always equals to an empty array.
- </member>
- </members>
</class>
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
index 2305a9d325..bd6e5cdfa2 100644
--- a/doc/classes/StandardMaterial3D.xml
+++ b/doc/classes/StandardMaterial3D.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StandardMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Physically based rendering (PBR) material that can be applied to 3D objects.
</brief_description>
<description>
+ StandardMaterial3D's properties are inherited from [BaseMaterial3D].
</description>
<tutorials>
- <link title="Standard Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
+ <link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 1f3d5596aa..9f197dae02 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -180,7 +180,22 @@
<argument index="0" name="values" type="Variant" />
<argument index="1" name="placeholder" type="String" default="&quot;{_}&quot;" />
<description>
- Formats the string by replacing all occurrences of [code]placeholder[/code] with [code]values[/code].
+ Formats the string by replacing all occurrences of [code]placeholder[/code] with the elements of [code]values[/code].
+ [code]values[/code] can be a [Dictionary] or an [Array]. Any underscores in [code]placeholder[/code] will be replaced with the corresponding keys in advance. Array elements use their index as keys.
+ [codeblock]
+ # Prints: Waiting for Godot is a play by Samuel Beckett, and Godot Engine is named after it.
+ var use_array_values = "Waiting for {0} is a play by {1}, and {0} Engine is named after it."
+ print(use_array_values.format(["Godot", "Samuel Beckett"]))
+
+ # Prints: User 42 is Godot.
+ print("User {id} is {name}.".format({"id": 42, "name": "Godot"}))
+ [/codeblock]
+ Some additional handling is performed when [code]values[/code] is an array. If [code]placeholder[/code] does not contain an underscore, the elements of the array will be used to replace one occurrence of the placeholder in turn; If an array element is another 2-element array, it'll be interpreted as a key-value pair.
+ [codeblock]
+ # Prints: User 42 is Godot.
+ print("User {} is {}.".format([42, "Godot"], "{}"))
+ print("User {id} is {name}.".format([["id", 42], ["name", "Godot"]]))
+ [/codeblock]
</description>
</method>
<method name="get_base_dir" qualifiers="const">
@@ -412,9 +427,9 @@
</method>
<method name="left" qualifiers="const">
<return type="String" />
- <argument index="0" name="position" type="int" />
+ <argument index="0" name="length" type="int" />
<description>
- Returns a number of characters from the left of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length.
+ Returns a number of characters from the left of the string. If negative [code]length[/code] is used, the characters are counted downwards from [String]'s length.
Examples:
[codeblock]
print("sample text".left(3)) #prints "sam"
@@ -599,9 +614,9 @@
</method>
<method name="right" qualifiers="const">
<return type="String" />
- <argument index="0" name="position" type="int" />
+ <argument index="0" name="length" type="int" />
<description>
- Returns a number of characters from the right of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length.
+ Returns a number of characters from the right of the string. If negative [code]length[/code] is used, the characters are counted downwards from [String]'s length.
Examples:
[codeblock]
print("sample text".right(3)) #prints "ext"
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 74d02a84fd..d863e3c652 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -46,8 +46,8 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="rect" type="Rect2" />
<description>
- Draws this stylebox using a [CanvasItem] with given [RID].
- You can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node.
+ Draws this stylebox using a canvas item identified by the given [RID].
+ The [RID] value can either be the result of [method CanvasItem.get_canvas_item] called on an existing [CanvasItem]-derived node, or directly from creating a canvas item in the [RenderingServer] with [method RenderingServer.canvas_item_create].
</description>
</method>
<method name="get_center_size" qualifiers="const">
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 43d34d3890..ad638a680b 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -35,7 +35,7 @@
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
- Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices.
+ Adds a vertex to index array if you are using indexed vertices. Does not need to be called before adding vertices.
</description>
</method>
<method name="add_triangle_fan">
@@ -123,6 +123,8 @@
<argument index="0" name="nd_threshold" type="float" />
<argument index="1" name="target_index_count" type="int" default="3" />
<description>
+ Generates a LOD for a given [code]nd_threshold[/code] in linear units (square root of quadric error metric), using at most [code]target_index_count[/code] indices.
+ Deprecated. Unused internally and neglects to preserve normals or UVs. Consider using [method ImporterMesh.generate_lods] instead.
</description>
</method>
<method name="generate_normals">
@@ -139,25 +141,31 @@
Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see [method generate_normals]).
</description>
</method>
- <method name="get_custom_format" qualifiers="const">
- <return type="int" enum="SurfaceTool.CustomFormat" />
- <argument index="0" name="index" type="int" />
+ <method name="get_aabb" qualifiers="const">
+ <return type="AABB" />
<description>
+ Returns the axis-aligned bounding box of the vertex positions.
</description>
</method>
- <method name="get_max_axis_length" qualifiers="const">
- <return type="float" />
+ <method name="get_custom_format" qualifiers="const">
+ <return type="int" enum="SurfaceTool.CustomFormat" />
+ <argument index="0" name="channel_index" type="int" />
<description>
+ Returns the format for custom [code]channel_index[/code] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused.
</description>
</method>
- <method name="get_primitive" qualifiers="const">
+ <method name="get_primitive_type" qualifiers="const">
<return type="int" enum="Mesh.PrimitiveType" />
<description>
+ Returns the type of mesh geometry, such as [constant Mesh.PRIMITIVE_TRIANGLES].
</description>
</method>
<method name="get_skin_weight_count" qualifiers="const">
<return type="int" enum="SurfaceTool.SkinWeightCount" />
<description>
+ By default, returns [constant SKIN_4_WEIGHTS] to indicate only 4 bone influences per vertex are used.
+ Returns [constant SKIN_8_WEIGHTS] if up to 8 influences are used.
+ [b]Note:[/b] This function returns an enum, not the exact number of weights.
</description>
</method>
<method name="index">
@@ -169,6 +177,7 @@
<method name="optimize_indices_for_cache">
<return type="void" />
<description>
+ Optimizes triangle sorting for performance. Requires that [method get_primitive_type] is [constant Mesh.PRIMITIVE_TRIANGLES].
</description>
</method>
<method name="set_bones">
@@ -188,16 +197,20 @@
</method>
<method name="set_custom">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="custom" type="Color" />
+ <argument index="0" name="channel_index" type="int" />
+ <argument index="1" name="custom_color" type="Color" />
<description>
+ Sets the custom value on this vertex for [code]channel_index[/code].
+ [method set_custom_format] must be called first for this [code]channel_index[/code]. Formats which are not RGBA will ignore other color channels.
</description>
</method>
<method name="set_custom_format">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <argument index="0" name="channel_index" type="int" />
<argument index="1" name="format" type="int" enum="SurfaceTool.CustomFormat" />
<description>
+ Sets the color format for this custom [code]channel_index[/code]. Use [constant CUSTOM_MAX] to disable.
+ Must be invoked after [method begin] and should be set before [method commit] or [method commit_to_arrays].
</description>
</method>
<method name="set_material">
@@ -218,6 +231,9 @@
<return type="void" />
<argument index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount" />
<description>
+ Set to [constant SKIN_8_WEIGHTS] to indicate that up to 8 bone influences per vertex may be used.
+ By default, only 4 bone influences are used ([constant SKIN_4_WEIGHTS])
+ [b]Note:[/b] This function takes an enum, not the exact number of weights.
</description>
</method>
<method name="set_smooth_group">
@@ -258,26 +274,37 @@
</methods>
<constants>
<constant name="CUSTOM_RGBA8_UNORM" value="0" enum="CustomFormat">
+ Limits range of data passed to `set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
</constant>
<constant name="CUSTOM_RGBA8_SNORM" value="1" enum="CustomFormat">
+ Limits range of data passed to `set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
</constant>
<constant name="CUSTOM_RG_HALF" value="2" enum="CustomFormat">
+ Stores data passed to `set_custom` as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
</constant>
<constant name="CUSTOM_RGBA_HALF" value="3" enum="CustomFormat">
+ Stores data passed to `set_custom` as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
</constant>
<constant name="CUSTOM_R_FLOAT" value="4" enum="CustomFormat">
+ Stores data passed to `set_custom` as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
</constant>
<constant name="CUSTOM_RG_FLOAT" value="5" enum="CustomFormat">
+ Stores data passed to `set_custom` as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
</constant>
<constant name="CUSTOM_RGB_FLOAT" value="6" enum="CustomFormat">
+ Stores data passed to `set_custom` as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
</constant>
<constant name="CUSTOM_RGBA_FLOAT" value="7" enum="CustomFormat">
+ Stores data passed to `set_custom` as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
</constant>
<constant name="CUSTOM_MAX" value="8" enum="CustomFormat">
+ Used to indicate a disabled custom channel.
</constant>
<constant name="SKIN_4_WEIGHTS" value="0" enum="SkinWeightCount">
+ Each individual vertex can be influenced by only 4 bone weights.
</constant>
<constant name="SKIN_8_WEIGHTS" value="1" enum="SkinWeightCount">
+ Each individual vertex can be influenced by up to 8 bone weights.
</constant>
</constants>
</class>
diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml
new file mode 100644
index 0000000000..b1b78f1705
--- /dev/null
+++ b/doc/classes/SystemFont.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SystemFont" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Font loaded from a system font.
+ [b]Note:[/b] This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font.
+ </brief_description>
+ <description>
+ [SystemFont] loads a font from a system font with the first matching name from [member font_names].
+ It will attempt to match font style, but it's not guaranteed.
+ The returned font might be part of a font collection or be a variable font with OpenType "weight" and/or "italic" features set.
+ You can create [FontVariation] of the system font for fine control over its features.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
+ If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled.
+ </member>
+ <member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
+ Array of fallback [Font]s.
+ </member>
+ <member name="font_names" type="PackedStringArray" setter="set_font_names" getter="get_font_names" default="PackedStringArray()">
+ Array of font family names to search, first matching font found is used.
+ </member>
+ <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
+ Font style flags, see [enum TextServer.FontStyle].
+ </member>
+ <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
+ If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting.
+ </member>
+ <member name="generate_mipmaps" type="bool" setter="set_generate_mipmaps" getter="get_generate_mipmaps" default="false">
+ If set to [code]true[/code], generate mipmaps for the font textures.
+ </member>
+ <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1">
+ Font hinting mode.
+ </member>
+ <member name="oversampling" type="float" setter="set_oversampling" getter="get_oversampling" default="0.0">
+ Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead.
+ </member>
+ <member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
+ Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml
index a8ed0d4286..79d52b70fb 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -17,13 +17,6 @@
Adds a new tab.
</description>
</method>
- <method name="clear_tab_opentype_features">
- <return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <description>
- Removes all OpenType features from the tab title.
- </description>
- </method>
<method name="ensure_tab_visible">
<return type="void" />
<argument index="0" name="idx" type="int" />
@@ -77,14 +70,6 @@
Returns the number of hidden tabs offsetted to the left.
</description>
</method>
- <method name="get_tab_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the tab title.
- </description>
- </method>
<method name="get_tab_rect" qualifiers="const">
<return type="Rect2" />
<argument index="0" name="tab_idx" type="int" />
@@ -175,15 +160,6 @@
Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
- <method name="set_tab_opentype_feature">
- <return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="values" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the tab title. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_tab_text_direction">
<return type="void" />
<argument index="0" name="tab_idx" type="int" />
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 58fdd2d058..18a4893f03 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -85,12 +85,6 @@
Performs a full reset of [TextEdit], including undo history.
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="clear_undo_history">
<return type="void" />
<description>
@@ -355,13 +349,6 @@
Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3.
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- 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" />
@@ -859,14 +846,6 @@
Sets the text for [code]gutter[/code] on [code]line[/code].
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_overtype_mode_enabled">
<return type="void" />
<argument index="0" name="enabled" type="bool" />
@@ -956,6 +935,9 @@
<member name="deselect_on_focus_loss_enabled" type="bool" setter="set_deselect_on_focus_loss_enabled" getter="is_deselect_on_focus_loss_enabled" default="true">
If [code]true[/code], the selected text will be deselected when focus is lost.
</member>
+ <member name="drag_and_drop_selection_enabled" type="bool" setter="set_drag_and_drop_selection_enabled" getter="is_drag_and_drop_selection_enabled" default="true">
+ If [code]true[/code], allow drag and drop of selected text.
+ </member>
<member name="draw_control_chars" type="bool" setter="set_draw_control_chars" getter="get_draw_control_chars" default="false">
If [code]true[/code], control characters are displayed.
</member>
@@ -995,13 +977,16 @@
<member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default="&quot;&quot;">
Text shown when the [TextEdit] is empty. It is [b]not[/b] the [TextEdit]'s default value (see [member text]).
</member>
+ <member name="scroll_fit_content_height" type="bool" setter="set_fit_content_height_enabled" getter="is_fit_content_height_enabled" default="false">
+ If [code]true[/code], [TextEdit] will disable vertical scroll and fit minimum height to the number of visible lines.
+ </member>
<member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
</member>
<member name="scroll_past_end_of_file" type="bool" setter="set_scroll_past_end_of_file_enabled" getter="is_scroll_past_end_of_file_enabled" default="false">
Allow scrolling past the last line into "virtual" space.
</member>
- <member name="scroll_smooth" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false">
+ <member name="scroll_smooth" type="bool" setter="set_smooth_scroll_enabled" getter="is_smooth_scroll_enabled" default="false">
Scroll smoothly over the text rather then jumping to the next location.
</member>
<member name="scroll_v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0">
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index 5359937db5..601650db2e 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -22,11 +22,10 @@
<method name="add_string">
<return type="bool" />
<argument index="0" name="text" type="String" />
- <argument index="1" name="fonts" type="Font" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
- <argument index="4" name="language" type="String" default="&quot;&quot;" />
- <argument index="5" name="meta" type="Variant" default="null" />
+ <argument index="1" name="font" type="Font" />
+ <argument index="2" name="font_size" type="int" />
+ <argument index="3" name="language" type="String" default="&quot;&quot;" />
+ <argument index="4" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it.
</description>
@@ -149,8 +148,8 @@
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="3">
- Line Alignment rules. For more info see [TextServer].
+ <member name="flags" type="int" setter="set_flags" getter="get_flags" enum="TextServer.JustificationFlag" default="3">
+ Line alignment rules. For more info see [TextServer].
</member>
<member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="TextServer.Orientation" default="0">
Text orientation.
@@ -161,28 +160,11 @@
<member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true">
If set to [code]true[/code] text will display invalid characters.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextLine.OverrunBehavior" default="3">
- Sets the clipping behavior when the text exceeds the text line's set width. See [enum OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="3">
+ Sets the clipping behavior when the text exceeds the text line's set width. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
<member name="width" type="float" setter="set_width" getter="get_width" default="-1.0">
Text line width.
</member>
</members>
- <constants>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
- No text trimming is performed.
- </constant>
- <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
- Trims the text per character.
- </constant>
- <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
- Trims the text per word.
- </constant>
- <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
- </constant>
- </constants>
</class>
diff --git a/doc/classes/TextMesh.xml b/doc/classes/TextMesh.xml
index 5a1501d2ca..17a0ca32e4 100644
--- a/doc/classes/TextMesh.xml
+++ b/doc/classes/TextMesh.xml
@@ -10,29 +10,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
- </methods>
<members>
<member name="curve_step" type="float" setter="set_curve_step" getter="get_curve_step" default="0.5">
Step (in pixels) used to approximate Bézier curves.
@@ -41,7 +18,7 @@
Depths of the mesh, if set to [code]0.0[/code] only front surface, is generated, and UV layout is changed to use full texture for the front face only.
</member>
<member name="font" type="Font" setter="set_font" getter="get_font">
- [Font] used for the [TextMesh]'s text.
+ Font configuration used to display text.
</member>
<member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
Font size of the [TextMesh]'s text.
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index 964e2c771f..c733d8fcee 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -22,11 +22,10 @@
<method name="add_string">
<return type="bool" />
<argument index="0" name="text" type="String" />
- <argument index="1" name="fonts" type="Font" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
- <argument index="4" name="language" type="String" default="&quot;&quot;" />
- <argument index="5" name="meta" type="Variant" default="null" />
+ <argument index="1" name="font" type="Font" />
+ <argument index="2" name="font_size" type="int" />
+ <argument index="3" name="language" type="String" default="&quot;&quot;" />
+ <argument index="4" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it.
</description>
@@ -217,18 +216,6 @@
Returns the size of the bounding box of the paragraph.
</description>
</method>
- <method name="get_spacing_bottom" qualifiers="const">
- <return type="int" />
- <description>
- Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom].
- </description>
- </method>
- <method name="get_spacing_top" qualifiers="const">
- <return type="int" />
- <description>
- Returns extra spacing at the top of the line. See [member Font.spacing_top].
- </description>
- </method>
<method name="hit_test" qualifiers="const">
<return type="int" />
<argument index="0" name="coords" type="Vector2" />
@@ -256,11 +243,10 @@
<method name="set_dropcap">
<return type="bool" />
<argument index="0" name="text" type="String" />
- <argument index="1" name="fonts" type="Font" />
- <argument index="2" name="size" type="int" />
+ <argument index="1" name="font" type="Font" />
+ <argument index="2" name="font_size" type="int" />
<argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
- <argument index="5" name="language" type="String" default="&quot;&quot;" />
+ <argument index="4" name="language" type="String" default="&quot;&quot;" />
<description>
Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
</description>
@@ -277,14 +263,17 @@
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="HorizontalAlignment" default="0">
Paragraph horizontal alignment.
</member>
+ <member name="break_flags" type="int" setter="set_break_flags" getter="get_break_flags" enum="TextServer.LineBreakFlag" default="3">
+ Line breaking rules. For more info see [TextServer].
+ </member>
<member name="custom_punctuation" type="String" setter="set_custom_punctuation" getter="get_custom_punctuation" default="&quot;&quot;">
Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</member>
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="99">
- Line breaking and alignment rules. For more info see [TextServer].
+ <member name="justification_flags" type="int" setter="set_justification_flags" getter="get_justification_flags" enum="TextServer.JustificationFlag" default="3">
+ Line alignment rules. For more info see [TextServer].
</member>
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1">
Limits the lines of text shown.
@@ -298,28 +287,11 @@
<member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true">
If set to [code]true[/code] text will display invalid characters.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0">
- Sets the clipping behavior when the text exceeds the paragraph's set width. See [enum OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="0">
+ Sets the clipping behavior when the text exceeds the paragraph's set width. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
<member name="width" type="float" setter="set_width" getter="get_width" default="-1.0">
Paragraph width.
</member>
</members>
- <constants>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
- No text trimming is performed.
- </constant>
- <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
- Trims the text per character.
- </constant>
- <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
- Trims the text per word.
- </constant>
- <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
- </constant>
- </constants>
</class>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 2f57b76374..9f35ddc353 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -121,6 +121,20 @@
Returns font embolden strength.
</description>
</method>
+ <method name="font_get_face_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns number of faces in the TrueType / OpenType collection.
+ </description>
+ </method>
+ <method name="font_get_face_index" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Recturns an active face index in the TrueType / OpenType collection.
+ </description>
+ </method>
<method name="font_get_fixed_size" qualifiers="const">
<return type="int" />
<argument index="0" name="font_rid" type="RID" />
@@ -341,17 +355,8 @@
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
- <method name="font_get_spacing" qualifiers="const">
- <return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <description>
- Returns extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_get_style" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="TextServer.FontStyle" />
<argument index="0" name="font_rid" type="RID" />
<description>
Returns font style flags, see [enum FontStyle].
@@ -528,7 +533,7 @@
<argument index="1" name="size" type="Vector2i" />
<argument index="2" name="texture_index" type="int" />
<description>
- Removes specified texture from font cache entry.
+ Removes specified texture from the cache entry.
[b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
</description>
</method>
@@ -593,6 +598,14 @@
Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
+ <method name="font_set_face_index">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="face_index" type="int" />
+ <description>
+ Sets an active face index in the TrueType / OpenType collection.
+ </description>
+ </method>
<method name="font_set_fixed_size">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -770,20 +783,10 @@
Adds override for [method font_is_script_supported].
</description>
</method>
- <method name="font_set_spacing">
- <return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <argument index="3" name="value" type="int" />
- <description>
- Sets extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_set_style">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="style" type="int" />
+ <argument index="1" name="style" type="int" enum="TextServer.FontStyle" />
<description>
Sets the font style flags, see [enum FontStyle].
</description>
@@ -934,6 +937,16 @@
Returns [code]true[/code] if the server supports a feature.
</description>
</method>
+ <method name="is_confusable" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="dict" type="PackedStringArray" />
+ <description>
+ Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found.
+ [b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check].
+ [b]Note:[/b] Always returns [code]-1[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
+ </description>
+ </method>
<method name="is_locale_right_to_left" qualifiers="const">
<return type="bool" />
<argument index="0" name="locale" type="String" />
@@ -941,6 +954,21 @@
Returns [code]true[/code] if locale is right-to-left.
</description>
</method>
+ <method name="is_valid_identifier" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="string" type="String" />
+ <description>
+ Returns [code]true[/code] is [code]string[/code] is a valid identifier.
+ If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must:
+ - Conform to normalization form C.
+ - Begin with a Unicode character of class XID_Start or [code]"_"[/code].
+ - May contain Unicode characters of class XID_Continue in the other positions.
+ - Use UAX #31 recommended scripts only (mixed scripts are allowed).
+ If the [constant FEATURE_UNICODE_IDENTIFIERS] feature is not supported, a valid identifier must:
+ - Begin with a Unicode character of class XID_Start or [code]"_"[/code].
+ - May contain Unicode characters of class XID_Continue in the other positions.
+ </description>
+ </method>
<method name="load_support_data">
<return type="bool" />
<argument index="0" name="filename" type="String" />
@@ -1074,7 +1102,7 @@
<return type="float" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="float" />
- <argument index="2" name="jst_flags" type="int" default="3" />
+ <argument index="2" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
<description>
Adjusts text with to fit to specified width, returns new text width.
</description>
@@ -1181,7 +1209,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="float" />
<argument index="2" name="start" type="int" default="0" />
- <argument index="3" name="break_flags" type="int" default="96" />
+ <argument index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
<description>
Breaks text to the lines and returns character ranges for each line.
</description>
@@ -1192,7 +1220,7 @@
<argument index="1" name="width" type="PackedFloat32Array" />
<argument index="2" name="start" type="int" default="0" />
<argument index="3" name="once" type="bool" default="true" />
- <argument index="4" name="break_flags" type="int" default="96" />
+ <argument index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
<description>
Breaks text to the lines and columns. Returns character ranges for each segment.
</description>
@@ -1264,6 +1292,14 @@
Returns size of the text.
</description>
</method>
+ <method name="shaped_text_get_spacing" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <description>
+ Returns extra spacing added between glyphs or lines in pixels.
+ </description>
+ </method>
<method name="shaped_text_get_trim_pos" qualifiers="const">
<return type="int" />
<argument index="0" name="shaped" type="RID" />
@@ -1295,7 +1331,7 @@
<method name="shaped_text_get_word_breaks" qualifiers="const">
<return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
- <argument index="1" name="grapheme_flags" type="int" default="264" />
+ <argument index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" default="264" />
<description>
Breaks text into words and returns array of character ranges. Use [code]grapheme_flags[/code] to set what characters are used for breaking (see [enum GraphemeFlag]).
</description>
@@ -1335,7 +1371,7 @@
<return type="void" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="float" default="0" />
- <argument index="2" name="overrun_trim_flags" type="int" default="0" />
+ <argument index="2" name="overrun_trim_flags" type="int" enum="TextServer.TextOverrunFlag" default="0" />
<description>
Trims text if it exceeds the given width.
</description>
@@ -1409,6 +1445,15 @@
If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
</description>
</method>
+ <method name="shaped_text_set_spacing">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="2" name="value" type="int" />
+ <description>
+ Sets extra spacing added between glyphs or lines in pixels.
+ </description>
+ </method>
<method name="shaped_text_shape">
<return type="bool" />
<argument index="0" name="shaped" type="RID" />
@@ -1441,6 +1486,14 @@
Aligns shaped text to the given tab-stops.
</description>
</method>
+ <method name="spoof_check" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="string" type="String" />
+ <description>
+ Returns [code]true[/code] if [code]string[/code] is likely to be an attempt at confusing the reader.
+ [b]Note:[/b] Always returns [code]false[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
+ </description>
+ </method>
<method name="string_get_word_breaks" qualifiers="const">
<return type="PackedInt32Array" />
<argument index="0" name="string" type="String" />
@@ -1502,87 +1555,128 @@
Left to right text is written vertically from top to bottom.
Right to left text is written vertically from bottom to top.
</constant>
- <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag" is_bitfield="true">
Do not justify text.
</constant>
- <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag" is_bitfield="true">
Justify text by adding and removing kashidas.
</constant>
- <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag" is_bitfield="true">
Justify text by changing width of the spaces between the words.
</constant>
- <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag" is_bitfield="true">
Remove trailing and leading spaces from the justified text.
</constant>
- <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag" is_bitfield="true">
Only apply justification to the part of the text after the last tab.
</constant>
- <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag" is_bitfield="true">
Apply justification to the trimmed line with ellipsis.
</constant>
- <constant name="BREAK_NONE" value="0" enum="LineBreakFlag">
+ <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
+ Autowrap is disabled.
+ </constant>
+ <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
+ </constant>
+ <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by soft-breaking between words.
+ </constant>
+ <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
+ Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
+ </constant>
+ <constant name="BREAK_NONE" value="0" enum="LineBreakFlag" is_bitfield="true">
Do not break the line.
</constant>
- <constant name="BREAK_MANDATORY" value="32" enum="LineBreakFlag">
+ <constant name="BREAK_MANDATORY" value="1" enum="LineBreakFlag" is_bitfield="true">
Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]).
</constant>
- <constant name="BREAK_WORD_BOUND" value="64" enum="LineBreakFlag">
+ <constant name="BREAK_WORD_BOUND" value="2" enum="LineBreakFlag" is_bitfield="true">
Break the line between the words.
</constant>
- <constant name="BREAK_GRAPHEME_BOUND" value="128" enum="LineBreakFlag">
+ <constant name="BREAK_GRAPHEME_BOUND" value="4" enum="LineBreakFlag" is_bitfield="true">
Break the line between any unconnected graphemes.
</constant>
- <constant name="BREAK_WORD_BOUND_ADAPTIVE" value="320" enum="LineBreakFlag">
- Break the line between the words, or any unconnected graphemes if line is too short to fit the whole word.
+ <constant name="BREAK_ADAPTIVE" value="8" enum="LineBreakFlag" is_bitfield="true">
+ </constant>
+ <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
+ Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ Displays glyphs that are mapped to the first [member Label.visible_characters] or [member RichTextLabel.visible_characters] characters from the beginning of the text.
+ </constant>
+ <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
+ Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ </constant>
+ <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
+ Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the left.
+ </constant>
+ <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
+ Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the right.
</constant>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="TextOverrunFlag">
+ <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
+ No text trimming is performed.
+ </constant>
+ <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
+ Trims the text per character.
+ </constant>
+ <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
+ Trims the text per word.
+ </constant>
+ <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
+ Trims the text per character and adds an ellipsis to indicate that parts are hidden.
+ </constant>
+ <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
+ Trims the text per word and adds an ellipsis to indicate that parts are hidden.
+ </constant>
+ <constant name="OVERRUN_NO_TRIM" value="0" enum="TextOverrunFlag" is_bitfield="true">
No trimming is performed.
</constant>
- <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag">
+ <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag" is_bitfield="true">
Trims the text when it exceeds the given width.
</constant>
- <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag">
+ <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag" is_bitfield="true">
Trims the text per word instead of per grapheme.
</constant>
- <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag">
+ <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag" is_bitfield="true">
Determines whether an ellipsis should be added at the end of the text.
</constant>
- <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag">
+ <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag" is_bitfield="true">
Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
</constant>
- <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag">
+ <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag" is_bitfield="true">
</constant>
- <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag" is_bitfield="true">
Grapheme is supported by the font, and can be drawn.
</constant>
- <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag" is_bitfield="true">
Grapheme is part of right-to-left or bottom-to-top run.
</constant>
- <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag" is_bitfield="true">
Grapheme is not part of source text, it was added by justification process.
</constant>
- <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag" is_bitfield="true">
Grapheme is whitespace.
</constant>
- <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag" is_bitfield="true">
Grapheme is mandatory break point (e.g. [code]"\n"[/code]).
</constant>
- <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag" is_bitfield="true">
Grapheme is optional break point (e.g. space).
</constant>
- <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag" is_bitfield="true">
Grapheme is the tabulation character.
</constant>
- <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag" is_bitfield="true">
Grapheme is kashida.
</constant>
- <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag" is_bitfield="true">
Grapheme is punctuation character.
</constant>
- <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag" is_bitfield="true">
Grapheme is underscore character.
</constant>
- <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag" is_bitfield="true">
Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
</constant>
<constant name="HINTING_NONE" value="0" enum="Hinting">
@@ -1652,7 +1746,13 @@
TextServer supports locale dependent and context sensitive case conversion.
</constant>
<constant name="FEATURE_USE_SUPPORT_DATA" value="4096" enum="Feature">
- TextServer require external data file for some features.
+ TextServer require external data file for some features, see [method load_support_data].
+ </constant>
+ <constant name="FEATURE_UNICODE_IDENTIFIERS" value="8192" enum="Feature">
+ TextServer supports UAX #31 identifier validation, see [method is_valid_identifier].
+ </constant>
+ <constant name="FEATURE_UNICODE_SECURITY" value="16384" enum="Feature">
+ TextServer supports [url=https://unicode.org/reports/tr36/]Unicode Technical Report #36[/url] and [url=https://unicode.org/reports/tr39/]Unicode Technical Standard #39[/url] based spoof detection features.
</constant>
<constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag">
Contour point is on the curve.
@@ -1675,13 +1775,15 @@
<constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
Spacing at the bottom of the line.
</constant>
- <constant name="FONT_BOLD" value="1" enum="FontStyle">
+ <constant name="SPACING_MAX" value="4" enum="SpacingType">
+ </constant>
+ <constant name="FONT_BOLD" value="1" enum="FontStyle" is_bitfield="true">
Font is bold.
</constant>
- <constant name="FONT_ITALIC" value="2" enum="FontStyle">
+ <constant name="FONT_ITALIC" value="2" enum="FontStyle" is_bitfield="true">
Font is italic or oblique.
</constant>
- <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle">
+ <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle" is_bitfield="true">
Font have fixed-width characters.
</constant>
<constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 434d6f909c..c686a06e5e 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -114,6 +114,20 @@
Returns font embolden strength.
</description>
</method>
+ <method name="font_get_face_count" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns number of faces in the TrueType / OpenType collection.
+ </description>
+ </method>
+ <method name="font_get_face_index" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns an active face index in the TrueType / OpenType collection.
+ </description>
+ </method>
<method name="font_get_fixed_size" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="font_rid" type="RID" />
@@ -331,17 +345,8 @@
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
- <method name="font_get_spacing" qualifiers="virtual const">
- <return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <description>
- Returns extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_get_style" qualifiers="virtual const">
- <return type="int" />
+ <return type="int" enum="TextServer.FontStyle" />
<argument index="0" name="font_rid" type="RID" />
<description>
Returns font style flags, see [enum TextServer.FontStyle].
@@ -517,7 +522,7 @@
<argument index="1" name="size" type="Vector2i" />
<argument index="2" name="texture_index" type="int" />
<description>
- Removes specified texture from font cache entry.
+ Removes specified texture from the cache entry.
</description>
</method>
<method name="font_render_glyph" qualifiers="virtual">
@@ -590,6 +595,14 @@
Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
+ <method name="font_set_face_index" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="face_index" type="int" />
+ <description>
+ Sets an active face index in the TrueType / OpenType collection.
+ </description>
+ </method>
<method name="font_set_fixed_size" qualifiers="virtual">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -766,20 +779,10 @@
Adds override for [method font_is_script_supported].
</description>
</method>
- <method name="font_set_spacing" qualifiers="virtual">
- <return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <argument index="3" name="value" type="int" />
- <description>
- Sets extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_set_style" qualifiers="virtual">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="style" type="int" />
+ <argument index="1" name="style" type="int" enum="TextServer.FontStyle" />
<description>
Sets the font style flags, see [enum TextServer.FontStyle].
</description>
@@ -931,6 +934,14 @@
Returns [code]true[/code] if the server supports a feature.
</description>
</method>
+ <method name="is_confusable" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="dict" type="PackedStringArray" />
+ <description>
+ Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found.
+ </description>
+ </method>
<method name="is_locale_right_to_left" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="locale" type="String" />
@@ -938,6 +949,13 @@
Returns [code]true[/code] if locale is right-to-left.
</description>
</method>
+ <method name="is_valid_identifier" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="string" type="String" />
+ <description>
+ Returns [code]true[/code] is [code]string[/code] is a valid identifier.
+ </description>
+ </method>
<method name="load_support_data" qualifiers="virtual">
<return type="bool" />
<argument index="0" name="filename" type="String" />
@@ -1071,7 +1089,7 @@
<return type="float" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="float" />
- <argument index="2" name="jst_flags" type="int" />
+ <argument index="2" name="jst_flags" type="int" enum="TextServer.JustificationFlag" />
<description>
Adjusts text with to fit to specified width, returns new text width.
</description>
@@ -1180,7 +1198,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="float" />
<argument index="2" name="start" type="int" />
- <argument index="3" name="break_flags" type="int" />
+ <argument index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" />
<description>
Breaks text to the lines and returns character ranges for each line.
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
@@ -1192,7 +1210,7 @@
<argument index="1" name="width" type="PackedFloat32Array" />
<argument index="2" name="start" type="int" />
<argument index="3" name="once" type="bool" />
- <argument index="4" name="break_flags" type="int" />
+ <argument index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" />
<description>
Breaks text to the lines and columns. Returns character ranges for each segment.
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
@@ -1266,6 +1284,14 @@
Returns size of the text.
</description>
</method>
+ <method name="shaped_text_get_spacing" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <description>
+ Returns extra spacing added between glyphs or lines in pixels.
+ </description>
+ </method>
<method name="shaped_text_get_trim_pos" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="shaped" type="RID" />
@@ -1297,7 +1323,7 @@
<method name="shaped_text_get_word_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
- <argument index="1" name="grapheme_flags" type="int" />
+ <argument index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" />
<description>
Breaks text into words and returns array of character ranges.
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
@@ -1341,7 +1367,7 @@
<return type="void" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="float" />
- <argument index="2" name="trim_flags" type="int" />
+ <argument index="2" name="trim_flags" type="int" enum="TextServer.TextOverrunFlag" />
<description>
Trims text if it exceeds the given width.
</description>
@@ -1414,6 +1440,15 @@
If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
</description>
</method>
+ <method name="shaped_text_set_spacing" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="2" name="value" type="int" />
+ <description>
+ Sets extra spacing added between glyphs or lines in pixels.
+ </description>
+ </method>
<method name="shaped_text_shape" qualifiers="virtual">
<return type="bool" />
<argument index="0" name="shaped" type="RID" />
@@ -1461,6 +1496,13 @@
[b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented.
</description>
</method>
+ <method name="spoof_check" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="string" type="String" />
+ <description>
+ Returns [code]true[/code] if [code]string[/code] is likely to be an attempt at confusing the reader.
+ </description>
+ </method>
<method name="string_get_word_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<argument index="0" name="string" type="String" />
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 5270da9588..7f4e0645c8 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -334,8 +334,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the font size property defined by [code]name[/code] and [code]theme_type[/code] exists, or if the default theme font size is set up (see [method has_default_font_size]).
- Returns [code]false[/code] if neither exist. Use [method set_font_size] to define the property.
+ 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_icon" qualifiers="const">
@@ -426,8 +426,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
- Renames the font size property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
- 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.
+ 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="rename_icon">
@@ -495,7 +495,8 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="font_size" type="int" />
<description>
- Creates or changes the value of the font size property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_font_size] to remove the property.
+ 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="set_icon">
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index d78b8db052..513daff37c 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -35,10 +35,11 @@
<method name="start">
<return type="int" enum="Error" />
<argument index="0" name="callable" type="Callable" />
- <argument index="1" name="userdata" type="Variant" default="null" />
- <argument index="2" name="priority" type="int" enum="Thread.Priority" default="1" />
+ <argument index="1" name="priority" type="int" enum="Thread.Priority" default="1" />
<description>
- Starts a new [Thread] that calls [code]callable[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]callable[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
+ Starts a new [Thread] that calls [code]callable[/code].
+ If the method takes some arguments, you can pass them using [method Callable.bind].
+ The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.
</description>
</method>
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
index d5c2693f8b..66cf602e5d 100644
--- a/doc/classes/TileData.xml
+++ b/doc/classes/TileData.xml
@@ -79,7 +79,7 @@
Returns the occluder polygon of the tile for the TileSet occlusion layer with index [code]layer_id[/code].
</description>
</method>
- <method name="get_peering_bit_terrain" qualifiers="const">
+ <method name="get_terrain_peering_bit" qualifiers="const">
<return type="int" />
<argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
<description>
@@ -185,7 +185,7 @@
Sets the occluder for the TileSet occlusion layer with index [code]layer_id[/code].
</description>
</method>
- <method name="set_peering_bit_terrain">
+ <method name="set_terrain_peering_bit">
<return type="void" />
<argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
<argument index="1" name="terrain" type="int" />
@@ -199,12 +199,15 @@
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false">
</member>
- <member name="material" type="ShaderMaterial" setter="set_material" getter="get_material">
+ <member name="material" type="Material" setter="set_material" getter="get_material">
+ The [Material] to use for this [TileData]. This can be a [CanvasItemMaterial] to use the default shader, or a [ShaderMaterial] to use a custom shader.
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
</member>
<member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0">
</member>
+ <member name="terrain" type="int" setter="set_terrain" getter="get_terrain" default="-1">
+ </member>
<member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1">
</member>
<member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i(0, 0)">
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 259c800a78..d532f583e6 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -243,15 +243,30 @@
- The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource].
</description>
</method>
- <method name="set_cells_from_surrounding_terrains">
+ <method name="set_cells_terrain_connect">
<return type="void" />
<argument index="0" name="layer" type="int" />
<argument index="1" name="cells" type="Vector2i[]" />
<argument index="2" name="terrain_set" type="int" />
- <argument index="3" name="ignore_empty_terrains" type="bool" default="true" />
+ <argument index="3" name="terrain" type="int" />
+ <argument index="4" name="ignore_empty_terrains" type="bool" default="true" />
<description>
- Updates all the cells in the [code]cells[/code] coordinates array and replace them by tiles that matches the surrounding cells terrains. Only cells form the given [code]terrain_set[/code] are considered.
- If [code]ignore_empty_terrains[/code] is true, zones with no terrain defined are ignored to select the tiles.
+ Update all the cells in the [code]cells[/code] coordinates array so that they use the given [code]terrain[/code] for the given [code]terrain_set[/code]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If [code]ignore_empty_terrains[/code] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
+ If [code]ignore_empty_terrains[/code] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
+ [b]Note:[/b] To work correctly, [code]set_cells_terrain_connect[/code] requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.
+ </description>
+ </method>
+ <method name="set_cells_terrain_path">
+ <return type="void" />
+ <argument index="0" name="layer" type="int" />
+ <argument index="1" name="path" type="Vector2i[]" />
+ <argument index="2" name="terrain_set" type="int" />
+ <argument index="3" name="terrain" type="int" />
+ <argument index="4" name="ignore_empty_terrains" type="bool" default="true" />
+ <description>
+ Update all the cells in the [code]cells[/code] coordinates array so that they use the given [code]terrain[/code] for the given [code]terrain_set[/code]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions.
+ If [code]ignore_empty_terrains[/code] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
+ [b]Note:[/b] To work correctly, [code]set_cells_terrain_path[/code] requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.
</description>
</method>
<method name="set_layer_enabled">
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 10ccad973f..180e868ef8 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -117,6 +117,27 @@
If the TileSet has no proxy for the given identifiers, returns an empty Array.
</description>
</method>
+ <method name="get_custom_data_layer_by_name" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="layer_name" type="String" />
+ <description>
+ Returns the index of the custom data layer identified by the given name.
+ </description>
+ </method>
+ <method name="get_custom_data_layer_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Returns the name of the custom data layer identified by the given index.
+ </description>
+ </method>
+ <method name="get_custom_data_layer_type" qualifiers="const">
+ <return type="int" enum="Variant.Type" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Returns the type of the custom data layer identified by the given index.
+ </description>
+ </method>
<method name="get_custom_data_layers_count" qualifiers="const">
<return type="int" />
<description>
@@ -464,6 +485,22 @@
Proxied tiles can be automatically replaced in TileMap nodes using the editor.
</description>
</method>
+ <method name="set_custom_data_layer_name">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="layer_name" type="String" />
+ <description>
+ Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.
+ </description>
+ </method>
+ <method name="set_custom_data_layer_type">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="layer_type" type="int" enum="Variant.Type" />
+ <description>
+ Sets the type of the custom data layer identified by the given index.
+ </description>
+ </method>
<method name="set_navigation_layer_layers">
<return type="void" />
<argument index="0" name="layer_index" type="int" />
@@ -591,7 +628,7 @@
Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.
</constant>
<constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout">
- Same as [code]TILE_LAYOUT_STAKED[/code], but the first half-offset is negative instead of positive.
+ Same as [constant TILE_LAYOUT_STACKED], but the first half-offset is negative instead of positive.
</constant>
<constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout">
Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 8c2a5aa6d9..9979a73527 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -141,14 +141,40 @@
<return type="Transform2D" />
<argument index="0" name="angle" type="float" />
<description>
- Returns a copy of the transform rotated by the given [code]angle[/code] (in radians), using matrix multiplication.
+ Returns a copy of the transform rotated by the given [code]angle[/code] (in radians).
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code].
+ This can be seen as transforming with respect to the global/parent frame.
+ </description>
+ </method>
+ <method name="rotated_local" qualifiers="const">
+ <return type="Transform2D" />
+ <argument index="0" name="angle" type="float" />
+ <description>
+ Returns a copy of the transform rotated by the given [code]angle[/code] (in radians).
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code].
+ This can be seen as transforming with respect to the local frame.
</description>
</method>
<method name="scaled" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="scale" type="Vector2" />
<description>
- Returns a copy of the transform scaled by the given [code]scale[/code] factor, using matrix multiplication.
+ Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code].
+ This can be seen as transforming with respect to the global/parent frame.
+ </description>
+ </method>
+ <method name="scaled_local" qualifiers="const">
+ <return type="Transform2D" />
+ <argument index="0" name="scale" type="Vector2" />
+ <description>
+ Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code].
+ This can be seen as transforming with respect to the local frame.
</description>
</method>
<method name="set_rotation">
@@ -163,6 +189,7 @@
<argument index="0" name="scale" type="Vector2" />
<description>
Sets the transform's scale.
+ [b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed.
</description>
</method>
<method name="set_skew">
@@ -176,8 +203,20 @@
<return type="Transform2D" />
<argument index="0" name="offset" type="Vector2" />
<description>
- Returns a copy of the transform translated by the given [code]offset[/code], relative to the transform's basis vectors.
- Unlike [method rotated] and [method scaled], this does not use matrix multiplication.
+ Returns a copy of the transform translated by the given [code]offset[/code].
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code].
+ This can be seen as transforming with respect to the global/parent frame.
+ </description>
+ </method>
+ <method name="translated_local" qualifiers="const">
+ <return type="Transform2D" />
+ <argument index="0" name="offset" type="Vector2" />
+ <description>
+ Returns a copy of the transform translated by the given [code]offset[/code].
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code].
+ This can be seen as transforming with respect to the local frame.
</description>
</method>
</methods>
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index afd11b6c77..9b673701ae 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -39,6 +39,12 @@
</constructor>
<constructor name="Transform3D">
<return type="Transform3D" />
+ <argument index="0" name="from" type="Projection" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Transform3D">
+ <return type="Transform3D" />
<argument index="0" name="x_axis" type="Vector3" />
<argument index="1" name="y_axis" type="Vector3" />
<argument index="2" name="z_axis" type="Vector3" />
@@ -96,17 +102,46 @@
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="angle" type="float" />
<description>
- Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians), using matrix multiplication. The [code]axis[/code] must be a normalized vector.
+ Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians).
+ The [code]axis[/code] must be a normalized vector.
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code].
+ This can be seen as transforming with respect to the global/parent frame.
+ </description>
+ </method>
+ <method name="rotated_local" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="axis" type="Vector3" />
+ <argument index="1" name="angle" type="float" />
+ <description>
+ Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians).
+ The [code]axis[/code] must be a normalized vector.
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code].
+ This can be seen as transforming with respect to the local frame.
</description>
</method>
<method name="scaled" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="scale" type="Vector3" />
<description>
- Returns a copy of the transform with its basis and origin scaled by the given [code]scale[/code] factor, using matrix multiplication.
+ Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code].
+ This can be seen as transforming with respect to the global/parent frame.
</description>
</method>
- <method name="sphere_interpolate_with" qualifiers="const">
+ <method name="scaled_local" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="scale" type="Vector3" />
+ <description>
+ Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code].
+ This can be seen as transforming with respect to the local frame.
+ </description>
+ </method>
+ <method name="spherical_interpolate_with" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="xform" type="Transform3D" />
<argument index="1" name="weight" type="float" />
@@ -118,8 +153,20 @@
<return type="Transform3D" />
<argument index="0" name="offset" type="Vector3" />
<description>
- Returns a copy of the transform translated by the given [code]offset[/code], relative to the transform's basis vectors.
- Unlike [method rotated] and [method scaled], this does not use matrix multiplication.
+ Returns a copy of the transform translated by the given [code]offset[/code].
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code].
+ This can be seen as transforming with respect to the global/parent frame.
+ </description>
+ </method>
+ <method name="translated_local" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="offset" type="Vector3" />
+ <description>
+ Returns a copy of the transform translated by the given [code]offset[/code].
+ This method is an optimized version of multiplying the given transform [code]X[/code]
+ with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code].
+ This can be seen as transforming with respect to the local frame.
</description>
</method>
</methods>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 6ae85ad242..b06be0cf99 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -31,6 +31,7 @@
[/csharp]
[/codeblocks]
To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_first_child] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
+ [b]Incremental search:[/b] Like [ItemList] and [PopupMenu], [Tree] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
</description>
<tutorials>
</tutorials>
@@ -41,13 +42,6 @@
Clears the tree. This removes all items.
</description>
</method>
- <method name="clear_column_title_opentype_features">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <description>
- Removes all OpenType features from the item's text.
- </description>
- </method>
<method name="create_item">
<return type="TreeItem" />
<argument index="0" name="parent" type="TreeItem" default="null" />
@@ -113,14 +107,6 @@
Returns column title language code.
</description>
</method>
- <method name="get_column_title_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the column title.
- </description>
- </method>
<method name="get_column_width" qualifiers="const">
<return type="int" />
<argument index="0" name="column" type="int" />
@@ -307,15 +293,6 @@
Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
- <method name="set_column_title_opentype_feature">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the column title.
- </description>
- </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 0a680b9627..fbba1147a2 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -42,13 +42,6 @@
Resets the color for the given column to default.
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="create_child">
<return type="TreeItem" />
<argument index="0" name="idx" type="int" default="-1" />
@@ -230,25 +223,17 @@
<method name="get_next" qualifiers="const">
<return type="TreeItem" />
<description>
- Returns the next TreeItem in the tree or a null object if there is none.
+ Returns the next sibling TreeItem in the tree or a null object if there is none.
</description>
</method>
<method name="get_next_visible">
<return type="TreeItem" />
<argument index="0" name="wrap" type="bool" default="false" />
<description>
- Returns the next visible TreeItem in the tree or a null object if there is none.
+ Returns the next visible sibling TreeItem in the tree or a null object if there is none.
If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code].
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the item's text.
- </description>
- </method>
<method name="get_parent" qualifiers="const">
<return type="TreeItem" />
<description>
@@ -258,14 +243,14 @@
<method name="get_prev">
<return type="TreeItem" />
<description>
- Returns the previous TreeItem in the tree or a null object if there is none.
+ Returns the previous sibling TreeItem in the tree or a null object if there is none.
</description>
</method>
<method name="get_prev_visible">
<return type="TreeItem" />
<argument index="0" name="wrap" type="bool" default="false" />
<description>
- Returns the previous visible TreeItem in the tree or a null object if there is none.
+ Returns the previous visible sibling TreeItem in the tree or a null object if there is none.
If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code].
</description>
</method>
@@ -580,15 +565,6 @@
Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the item's text.
- </description>
- </method>
<method name="set_range">
<return type="void" />
<argument index="0" name="column" type="int" />
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index f9ec0d115d..b18232f5c3 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -4,41 +4,41 @@
Lightweight object used for general-purpose animation via script, using [Tweener]s.
</brief_description>
<description>
- Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
+ Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them. Animating something with a [Tween] is called tweening.
[Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween]; it would be difficult to do the same thing with an [AnimationPlayer] node. Tweens are also more light-weight than [AnimationPlayer], so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped [CallbackTweener] with a delay.
A [Tween] can be created by using either [method SceneTree.create_tween] or [method Node.create_tween]. [Tween]s created manually (i.e. by using [code]Tween.new()[/code]) are invalid and can't be used for tweening values.
- A [Tween] animation is composed of a sequence of [Tweener]s, which by default are executed one after another. You can create a sequence by appending [Tweener]s to the [Tween]. Animating something with a [Tweener] is called tweening. Example tweening sequence looks like this:
+ A tween animation is created by adding [Tweener]s to the [Tween] object, using [method tween_property], [method tween_interval], [method tween_callback] or [method tween_method]:
[codeblock]
var tween = get_tree().create_tween()
tween.tween_property($Sprite, "modulate", Color.red, 1)
tween.tween_property($Sprite, "scale", Vector2(), 1)
tween.tween_callback($Sprite.queue_free)
[/codeblock]
- This sequence will make the [code]$Sprite[/code] node turn red, then shrink and finally the [method Node.queue_free] is called to remove the sprite. See methods [method tween_property], [method tween_interval], [method tween_callback] and [method tween_method] for more usage information.
- When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set different transition type in the above example, you can do:
+ This sequence will make the [code]$Sprite[/code] node turn red, then shrink, before finally calling [method Node.queue_free] to free the sprite. [Tweener]s are executed one after another by default. This behavior can be changed using [method parallel] and [method set_parallel].
+ When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set a different transition type in the above example, you can use [method set_trans]:
[codeblock]
var tween = get_tree().create_tween()
tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE)
tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE)
tween.tween_callback($Sprite.queue_free)
[/codeblock]
- Most of the [Tween] methods can be chained this way too. In this example the [Tween] is bound and have set a default transition:
+ Most of the [Tween] methods can be chained this way too. In the following example the [Tween] is bound to the running script's node and a default transition is set for its [Tweener]s:
[codeblock]
var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC)
tween.tween_property($Sprite, "modulate", Color.red, 1)
tween.tween_property($Sprite, "scale", Vector2(), 1)
tween.tween_callback($Sprite.queue_free)
[/codeblock]
- Another interesting use for [Tween]s is animating arbitrary set of objects:
+ Another interesting use for [Tween]s is animating arbitrary sets of objects:
[codeblock]
var tween = create_tween()
for sprite in get_children():
- tween.tween_property(sprite, "position", Vector2(), 1)
+ tween.tween_property(sprite, "position", Vector2(0, 0), 1)
[/codeblock]
In the example above, all children of a node are moved one after another to position (0, 0).
- Some [Tweener]s use transitions and eases. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
+ Some [Tweener]s use transitions and eases. The first accepts a [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
- [b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it was created.
+ [b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it is created.
</description>
<tutorials>
</tutorials>
@@ -67,15 +67,15 @@
<return type="bool" />
<argument index="0" name="delta" type="float" />
<description>
- Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually. Can also be used to end the [Tween] animation immediately, by using [code]delta[/code] longer than the whole duration.
+ Processes the [Tween] by the given [code]delta[/code] value, in seconds. This is mostly useful for manual control when the [Tween] is paused. It can also be used to end the [Tween] animation immediately, by setting [code]delta[/code] longer than the whole duration of the [Tween] animation.
Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished.
- [b]Note:[/b] The [Tween] will become invalid after finished, but you can call [method stop] after the step, to keep it and reset.
+ [b]Note:[/b] The [Tween] will become invalid in the next processing frame after its animation finishes. Calling [method stop] after performing [method custom_step] instead keeps and resets the [Tween].
</description>
</method>
<method name="get_total_elapsed_time" qualifiers="const">
<return type="float" />
<description>
- Returns the total time in seconds the [Tween] has been animating (i.e. time since it started, not counting pauses etc.). The time is affected by [method set_speed_scale] and [method stop] will reset it to [code]0[/code].
+ Returns the total time in seconds the [Tween] has been animating (i.e. the time since it started, not counting pauses etc.). The time is affected by [method set_speed_scale], and [method stop] will reset it to [code]0[/code].
[b]Note:[/b] As it results from accumulating frame deltas, the time returned after the [Tween] has finished animating will be slightly greater than the actual [Tween] duration.
</description>
</method>
@@ -105,7 +105,7 @@
<method name="is_valid">
<return type="bool" />
<description>
- Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). [Tween] might become invalid when it has finished tweening or was killed, also when created with [code]Tween.new()[/code]. Invalid [Tween] can't have [Tweener]s appended, because it can't animate them.
+ Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). A [Tween] might become invalid when it has finished tweening, is killed, or when created with [code]Tween.new()[/code]. Invalid [Tween]s can't have [Tweener]s appended.
</description>
</method>
<method name="kill">
@@ -152,8 +152,8 @@
<argument index="0" name="loops" type="int" default="0" />
<description>
Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice.
- Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible).
- [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] with no delay or [PropertyTweener] with invalid node) are equivalent to infinite [code]while[/code] loops and will freeze your game. If a [Tween]'s lifetime depends on some node, always use [method bind_node].
+ Calling this method without arguments will make the [Tween] run infinitely, until either it is killed with [method kill], the [Tween]'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible).
+ [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single [CallbackTweener] with no delay) are stopped after a small number of loops, which may produce unexpected results. If a [Tween]'s lifetime depends on some node, always use [method bind_node].
</description>
</method>
<method name="set_parallel">
@@ -221,7 +221,7 @@
<return type="IntervalTweener" />
<argument index="0" name="time" type="float" />
<description>
- Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds.
+ Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative to using the delay in other [Tweener]s, or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds.
Example: creating an interval in code execution.
[codeblock]
# ... some code
@@ -271,7 +271,7 @@
<argument index="2" name="final_val" type="Variant" />
<argument index="3" name="duration" type="float" />
<description>
- Creates and appends a [PropertyTweener]. This method tweens a [code]property[/code] of an [code]object[/code] between an initial value and [code]final_val[/code] in a span of time equal to [code]duration[/code], in seconds. The initial value by default is a value at the time the tweening of the [PropertyTweener] start. For example:
+ Creates and appends a [PropertyTweener]. This method tweens a [code]property[/code] of an [code]object[/code] between an initial value and [code]final_val[/code] in a span of time equal to [code]duration[/code], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts. For example:
[codeblock]
var tween = create_tween()
tween.tween_property($Sprite, "position", Vector2(100, 200), 1)
@@ -292,19 +292,19 @@
<signal name="finished">
<description>
Emitted when the [Tween] has finished all tweening. Never emitted when the [Tween] is set to infinite looping (see [method set_loops]).
- [b]Note:[/b] The [Tween] is removed (invalidated) after this signal is emitted, but it doesn't happen immediately, but on the next processing frame. Calling [method stop] inside the signal callback will preserve the [Tween].
+ [b]Note:[/b] The [Tween] is removed (invalidated) in the next processing frame after this signal is emitted. Calling [method stop] inside the signal callback will prevent the [Tween] from being removed.
</description>
</signal>
<signal name="loop_finished">
<argument index="0" name="loop_count" type="int" />
<description>
- Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after final loop, use [signal finished] instead for this case.
+ Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after the final loop, use [signal finished] instead for this case.
</description>
</signal>
<signal name="step_finished">
<argument index="0" name="idx" type="int" />
<description>
- Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running parallelly.
+ Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running in parallel.
</description>
</signal>
</signals>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 6ccc0fc6a6..454db51919 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -85,6 +85,16 @@
Returns the aspect ratio of this vector, the ratio of [member x] to [member y].
</description>
</method>
+ <method name="bezier_interpolate" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="control_1" type="Vector2" />
+ <argument index="1" name="control_2" type="Vector2" />
+ <argument index="2" name="end" type="Vector2" />
+ <argument index="3" name="t" type="float" />
+ <description>
+ Returns the point at the given [code]t[/code] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [code]control_1[/code], [code]control_2[/code], and [code]end[/code] points.
+ </description>
+ </method>
<method name="bounce" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="n" type="Vector2" />
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index d907ceb52b..c181720a66 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -61,6 +61,16 @@
Returns the unsigned minimum angle to the given vector, in radians.
</description>
</method>
+ <method name="bezier_interpolate" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="control_1" type="Vector3" />
+ <argument index="1" name="control_2" type="Vector3" />
+ <argument index="2" name="end" type="Vector3" />
+ <argument index="3" name="t" type="float" />
+ <description>
+ Returns the point at the given [code]t[/code] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [code]control_1[/code], [code]control_2[/code], and [code]end[/code] points.
+ </description>
+ </method>
<method name="bounce" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="n" type="Vector3" />
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
new file mode 100644
index 0000000000..da0df2672e
--- /dev/null
+++ b/doc/classes/Vector4.xml
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector4" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Vector used for 4D math using floating point coordinates.
+ </brief_description>
+ <description>
+ 4-element structure that can be used to represent any quadruplet of numeric values.
+ It uses floating-point coordinates. See [Vector4i] for its integer counterpart.
+ [b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <constructors>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <description>
+ Constructs a default-initialized [Vector4] with all components set to [code]0[/code].
+ </description>
+ </constructor>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <argument index="0" name="from" type="Vector4" />
+ <description>
+ Constructs a [Vector4] as a copy of the given [Vector4].
+ </description>
+ </constructor>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <argument index="0" name="from" type="Vector4i" />
+ <description>
+ Constructs a new [Vector4] from [Vector4i].
+ </description>
+ </constructor>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <argument index="0" name="x" type="float" />
+ <argument index="1" name="y" type="float" />
+ <argument index="2" name="z" type="float" />
+ <argument index="3" name="w" type="float" />
+ <description>
+ Returns a [Vector4] with the given components.
+ </description>
+ </constructor>
+ </constructors>
+ <methods>
+ <method name="abs" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components in absolute values (i.e. positive).
+ </description>
+ </method>
+ <method name="ceil" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded up (towards positive infinity).
+ </description>
+ </method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="min" type="Vector4" />
+ <argument index="1" name="max" type="Vector4" />
+ <description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
+ <method name="dot" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="with" type="Vector4" />
+ <description>
+ Returns the dot product of this vector and [code]with[/code].
+ </description>
+ </method>
+ <method name="floor" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded down (towards negative infinity).
+ </description>
+ </method>
+ <method name="inverse" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns the inverse of the vector. This is the same as [code]Vector4(1.0 / v.x, 1.0 / v.y, 1.0 / v.z, 1.0 / v.w)[/code].
+ </description>
+ </method>
+ <method name="is_equal_approx" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="with" type="Vector4" />
+ <description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
+ </description>
+ </method>
+ <method name="is_normalized" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the vector is normalized, i.e. its length is equal to 1.
+ </description>
+ </method>
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length (magnitude) of this vector.
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length].
+ </description>
+ </method>
+ <method name="lerp" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="to" type="Vector4" />
+ <argument index="1" name="weight" type="float" />
+ <description>
+ Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation.
+ </description>
+ </method>
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ </description>
+ </method>
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W].
+ </description>
+ </method>
+ <method name="normalized" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
+ </description>
+ </method>
+ <method name="round" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
+ </description>
+ </method>
+ <method name="sign" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="w" type="float" setter="" getter="" default="0.0">
+ The vector's W component. Also accessible by using the index position [code][3][/code].
+ </member>
+ <member name="x" type="float" setter="" getter="" default="0.0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
+ </member>
+ <member name="y" type="float" setter="" getter="" default="0.0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
+ </member>
+ <member name="z" type="float" setter="" getter="" default="0.0">
+ The vector's Z component. Also accessible by using the index position [code][2][/code].
+ </member>
+ </members>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_W" value="3">
+ Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="ZERO" value="Vector4(0, 0, 0, 0)">
+ Zero vector, a vector with all components set to [code]0[/code].
+ </constant>
+ <constant name="ONE" value="Vector4(1, 1, 1, 1)">
+ One vector, a vector with all components set to [code]1[/code].
+ </constant>
+ <constant name="INF" value="Vector4(inf, inf, inf, inf)">
+ Infinity vector, a vector with all components set to [constant @GDScript.INF].
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Projection" />
+ <description>
+ Inversely transforms (multiplies) the [Vector4] by the given [Projection] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Multiplies each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Multiplies each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Multiplies each component of the [Vector4] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Adds each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator -">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Subtracts each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Divides each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Divides each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Divides each component of the [Vector4] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4" />
+ <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 []">
+ <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], [code]v[2][/code] is equivalent to [code]v.z[/code], and [code]v[3][/code] is equivalent to [code]v.w[/code].
+ </description>
+ </operator>
+ <operator name="operator unary+">
+ <return type="Vector4" />
+ <description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Vector4" />
+ <description>
+ Returns the negative value of the [Vector4]. This is the same as writing [code]Vector4(-v.x, -v.y, -v.z, -v.w)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
+ </description>
+ </operator>
+ </operators>
+</class>
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
new file mode 100644
index 0000000000..6acce12e9f
--- /dev/null
+++ b/doc/classes/Vector4i.xml
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector4i" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <constructors>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <argument index="0" name="from" type="Vector4i" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <argument index="0" name="from" type="Vector4" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <argument index="0" name="x" type="int" />
+ <argument index="1" name="y" type="int" />
+ <argument index="2" name="z" type="int" />
+ <argument index="3" name="w" type="int" />
+ <description>
+ </description>
+ </constructor>
+ </constructors>
+ <methods>
+ <method name="abs" qualifiers="const">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector4i" />
+ <argument index="0" name="min" type="Vector4i" />
+ <argument index="1" name="max" type="Vector4i" />
+ <description>
+ </description>
+ </method>
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="sign" qualifiers="const">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="w" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="x" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="y" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="z" type="int" setter="" getter="" default="0">
+ </member>
+ </members>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ </constant>
+ <constant name="AXIS_W" value="3">
+ </constant>
+ <constant name="ZERO" value="Vector4i(0, 0, 0, 0)">
+ </constant>
+ <constant name="ONE" value="Vector4i(1, 1, 1, 1)">
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator %">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator %">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator -">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
+ <return type="bool" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator unary+">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ </operators>
+</class>
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 330a405d5f..08309a8ecc 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -16,7 +16,7 @@
Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the vehicle reversing.
</member>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index 1c164d7c9a..ac126f824e 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -48,7 +48,7 @@
The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the wheel reversing.
</member>
diff --git a/doc/classes/VideoStreamPlayer.xml b/doc/classes/VideoStreamPlayer.xml
index 092a754a39..f6594ff9e7 100644
--- a/doc/classes/VideoStreamPlayer.xml
+++ b/doc/classes/VideoStreamPlayer.xml
@@ -58,7 +58,7 @@
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Audio bus to use for sound playback.
</member>
- <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true">
+ <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false">
If [code]true[/code], the video scales to the control size. Otherwise, the control minimum size will be automatically adjusted to match the video stream's dimensions.
</member>
<member name="paused" type="bool" setter="set_paused" getter="is_paused" default="false">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 4727bc389e..0808a8f1cf 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -57,6 +57,13 @@
Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport].
</description>
</method>
+ <method name="get_positional_shadow_atlas_quadrant_subdiv" qualifiers="const">
+ <return type="int" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" />
+ <argument index="0" name="quadrant" type="int" />
+ <description>
+ Returns the [enum PositionalShadowAtlasQuadrantSubdiv] of the specified quadrant.
+ </description>
+ </method>
<method name="get_render_info">
<return type="int" />
<argument index="0" name="type" type="int" enum="Viewport.RenderInfoType" />
@@ -64,13 +71,6 @@
<description>
</description>
</method>
- <method name="get_shadow_atlas_quadrant_subdiv" qualifiers="const">
- <return type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" />
- <argument index="0" name="quadrant" type="int" />
- <description>
- Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
- </description>
- </method>
<method name="get_texture" qualifiers="const">
<return type="ViewportTexture" />
<description>
@@ -158,10 +158,10 @@
Stops the input from propagating further down the [SceneTree].
</description>
</method>
- <method name="set_shadow_atlas_quadrant_subdiv">
+ <method name="set_positional_shadow_atlas_quadrant_subdiv">
<return type="void" />
<argument index="0" name="quadrant" type="int" />
- <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" />
+ <argument index="1" name="subdiv" type="int" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" />
<description>
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
</description>
@@ -196,10 +196,6 @@
<member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false">
Disable 3D rendering (but keep 2D rendering).
</member>
- <member name="fsr_mipmap_bias" type="float" setter="set_fsr_mipmap_bias" getter="get_fsr_mipmap_bias" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap when using FSR. Mipmap bias does nothing when FSR is not being used. Negative values make textures sharper, while positive values make textures blurrier. This value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]. This updates the rendering server's mipmap bias when called
- To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_mipmap_bias] project setting.
- </member>
<member name="fsr_sharpness" type="float" setter="set_fsr_sharpness" getter="get_fsr_sharpness" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_sharpness] project setting.
@@ -232,6 +228,24 @@
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
</member>
+ <member name="positional_shadow_atlas_16_bits" type="bool" setter="set_positional_shadow_atlas_16_bits" getter="get_positional_shadow_atlas_16_bits" default="true">
+ </member>
+ <member name="positional_shadow_atlas_quad_0" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="2">
+ The subdivision amount of the first quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_quad_1" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="2">
+ The subdivision amount of the second quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_quad_2" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="3">
+ The subdivision amount of the third quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_quad_3" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="4">
+ The subdivision amount of the fourth quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_size" type="int" setter="set_positional_shadow_atlas_size" getter="get_positional_shadow_atlas_size" default="2048">
+ The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
+ [b]Note:[/b] If this is set to [code]0[/code], no shadows will be visible at all (including directional shadows).
+ </member>
<member name="scaling_3d_mode" type="int" setter="set_scaling_3d_mode" getter="get_scaling_3d_mode" enum="Viewport.Scaling3DMode" default="0">
Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/mode] project setting.
@@ -248,28 +262,15 @@
</member>
<member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1">
</member>
- <member name="shadow_atlas_16_bits" type="bool" setter="set_shadow_atlas_16_bits" getter="get_shadow_atlas_16_bits" default="true">
- </member>
- <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
- The subdivision amount of the first quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
- The subdivision amount of the second quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3">
- The subdivision amount of the third quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4">
- The subdivision amount of the fourth quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="2048">
- The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
- [b]Note:[/b] If this is set to 0, shadows won't be visible.
- </member>
<member name="snap_2d_transforms_to_pixel" type="bool" setter="set_snap_2d_transforms_to_pixel" getter="is_snap_2d_transforms_to_pixel_enabled" default="false">
</member>
<member name="snap_2d_vertices_to_pixel" type="bool" setter="set_snap_2d_vertices_to_pixel" getter="is_snap_2d_vertices_to_pixel_enabled" default="false">
</member>
+ <member name="texture_mipmap_bias" type="float" setter="set_texture_mipmap_bias" getter="get_texture_mipmap_bias" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias] project setting.
+ </member>
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
If [code]true[/code], the viewport should render its background as transparent.
</member>
@@ -286,6 +287,12 @@
<member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false">
If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset.
</member>
+ <member name="vrs_mode" type="int" setter="set_vrs_mode" getter="get_vrs_mode" enum="Viewport.VRSMode" default="0">
+ The Variable Rate Shading (VRS) mode that is used for this viewport. Note, if hardware does not support VRS this property is ignored.
+ </member>
+ <member name="vrs_texture" type="Texture2D" setter="set_vrs_texture" getter="get_vrs_texture">
+ Texture to use when [member vrs_mode] is set to [constant Viewport.VRS_TEXTURE].
+ </member>
<member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d">
The custom [World2D] which can be used as 2D environment source.
</member>
@@ -307,29 +314,29 @@
</signal>
</signals>
<constants>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will not be used.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will only be used by one shadow map.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will be split in 4 and used by up to 4 shadow maps.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will be split 16 ways and used by up to 16 shadow maps.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will be split 64 ways and used by up to 64 shadow maps.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="ShadowAtlasQuadrantSubdiv">
- This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="PositionalShadowAtlasQuadrantSubdiv">
+ This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="ShadowAtlasQuadrantSubdiv">
- This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="PositionalShadowAtlasQuadrantSubdiv">
+ This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
- Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="PositionalShadowAtlasQuadrantSubdiv">
+ Represents the size of the [enum PositionalShadowAtlasQuadrantSubdiv] enum.
</constant>
<constant name="SCALING_3D_MODE_BILINEAR" value="0" enum="Scaling3DMode">
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
@@ -492,5 +499,17 @@
</constant>
<constant name="SDF_SCALE_MAX" value="3" enum="SDFScale">
</constant>
+ <constant name="VRS_DISABLED" value="0" enum="VRSMode">
+ VRS is disabled.
+ </constant>
+ <constant name="VRS_TEXTURE" value="1" enum="VRSMode">
+ VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
+ </constant>
+ <constant name="VRS_XR" value="2" enum="VRSMode">
+ VRS texture is supplied by the primary [XRInterface].
+ </constant>
+ <constant name="VRS_MAX" value="3" enum="VRSMode">
+ Represents the size of the [enum VRSMode] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index 5f13e4e7bc..64d901cd79 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -166,10 +166,6 @@
</method>
</methods>
<members>
- <member name="engine_version" type="Dictionary" setter="set_engine_version" getter="get_engine_version" default="{}">
- The Godot version this [VisualShader] was designed for, in the form of a [Dictionary] with [code]major[/code] and [code]minor[/code] keys with integer values. Example: [code]{"major": 4, "minor": 0}[/code]
- This is used by the editor to convert visual shaders from older Godot versions.
- </member>
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)">
The offset vector of the whole graph.
</member>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml
index bff6f2015d..9014f79f54 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureUniform.xml
@@ -39,12 +39,15 @@
Represents the size of the [enum TextureType] enum.
</constant>
<constant name="COLOR_DEFAULT_WHITE" value="0" enum="ColorDefault">
- Defaults to white color.
+ Defaults to fully opaque white color.
</constant>
<constant name="COLOR_DEFAULT_BLACK" value="1" enum="ColorDefault">
- Defaults to black color.
+ Defaults to fully opaque black color.
</constant>
- <constant name="COLOR_DEFAULT_MAX" value="2" enum="ColorDefault">
+ <constant name="COLOR_DEFAULT_TRANSPARENT" value="2" enum="ColorDefault">
+ Defaults to fully transparent black color.
+ </constant>
+ <constant name="COLOR_DEFAULT_MAX" value="3" enum="ColorDefault">
Represents the size of the [enum ColorDefault] enum.
</constant>
<constant name="FILTER_DEFAULT" value="0" enum="TextureFilter">
diff --git a/doc/classes/VoxelGI.xml b/doc/classes/VoxelGI.xml
index 55ba1c4934..d941185d33 100644
--- a/doc/classes/VoxelGI.xml
+++ b/doc/classes/VoxelGI.xml
@@ -37,6 +37,7 @@
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(10, 10, 10)">
The size of the area covered by the [VoxelGI]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
+ [b]Note:[/b] Extents are clamped to 1.0 unit or more on each axis.
</member>
<member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="VoxelGI.Subdiv" default="1">
Number of times to subdivide the grid that the [VoxelGI] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index b8d424b5fe..9198da4bc6 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -72,10 +72,10 @@
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also [member bias]. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
</member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
- If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
+ <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.5">
+ The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
</member>
- <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
+ <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="true">
If [code]true[/code], performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling [member use_two_bounces], adjust [member propagation] and [member energy].
</member>
</members>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index f80381acda..ea520178c7 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -12,7 +12,7 @@
<method name="get_ref" qualifiers="const">
<return type="Variant" />
<description>
- Returns the [Object] this weakref is referring to.
+ Returns the [Object] this weakref is referring to. Returns [code]null[/code] if that object no longer exists.
</description>
</method>
</methods>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 5ce870a899..f4eaaac2e1 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -4,7 +4,8 @@
Base class for all windows.
</brief_description>
<description>
- A node that creates a window.
+ A node that creates a window. The window can either be a native system window or embedded inside another [Window] (see [member Viewport.gui_embed_subwindows]).
+ At runtime, [Window]s will not close automatically when requested. You need to handle it manually using [signal close_requested] (this applies both to clicking close button and clicking outside popup).
</description>
<tutorials>
</tutorials>
@@ -18,12 +19,13 @@
<method name="child_controls_changed">
<return type="void" />
<description>
+ Requests an update of the [Window] size to fit underlying [Control] nodes.
</description>
</method>
<method name="get_contents_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the combined minimum size from the child [Control] nodes of the window.
+ Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when children nodes have changed.
</description>
</method>
<method name="get_flag" qualifiers="const">
@@ -50,6 +52,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_constant" qualifiers="const">
@@ -57,21 +61,29 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_default_base_scale" qualifiers="const">
<return type="float" />
<description>
+ Returns the default base scale defined in the attached [Theme].
+ See [member Theme.default_base_scale] for more details.
</description>
</method>
<method name="get_theme_default_font" qualifiers="const">
<return type="Font" />
<description>
+ Returns the default [Font] defined in the attached [Theme].
+ See [member Theme.default_font] for more details.
</description>
</method>
<method name="get_theme_default_font_size" qualifiers="const">
<return type="int" />
<description>
+ Returns the default font size defined in the attached [Theme].
+ See [member Theme.default_font_size] for more details.
</description>
</method>
<method name="get_theme_font" qualifiers="const">
@@ -80,6 +92,7 @@
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_font_size" qualifiers="const">
@@ -88,6 +101,7 @@
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
@@ -95,6 +109,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the icon at [code]name[/code] if the theme has [code]theme_type[/code].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_stylebox" qualifiers="const">
@@ -102,6 +118,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="grab_focus">
@@ -121,6 +139,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code].
</description>
</method>
<method name="has_theme_constant" qualifiers="const">
@@ -128,6 +147,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code].
</description>
</method>
<method name="has_theme_font" qualifiers="const">
@@ -136,7 +156,6 @@
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_theme_font_size" qualifiers="const">
@@ -145,7 +164,6 @@
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_theme_icon" qualifiers="const">
@@ -153,6 +171,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if icon with [code]name[/code] is in [code]theme_type[/code].
</description>
</method>
<method name="has_theme_stylebox" qualifiers="const">
@@ -160,11 +179,13 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code].
</description>
</method>
<method name="hide">
<return type="void" />
<description>
+ Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with [method show].
</description>
</method>
<method name="is_embedded" qualifiers="const">
@@ -182,28 +203,35 @@
<method name="is_maximize_allowed" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the window can be maximized (the maximize button is enabled).
</description>
</method>
<method name="is_using_font_oversampling" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if font oversampling is enabled. See [method set_use_font_oversampling].
</description>
</method>
<method name="move_to_foreground">
<return type="void" />
<description>
+ Moves the [Window] on top of other windows and focuses it.
</description>
</method>
<method name="popup">
<return type="void" />
<argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
<description>
+ Shows the [Window] and makes it transient (see [member transient]). If [code]rect[/code] is provided, it will be set as the [Window]'s size.
+ Fails if called on the main window.
</description>
</method>
<method name="popup_centered">
<return type="void" />
<argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
<description>
+ Popups the [Window] at the center of the current screen, with optionally given minimum size.
+ If the [Window] is embedded, it will be centered in the parent [Viewport] instead.
</description>
</method>
<method name="popup_centered_clamped">
@@ -211,23 +239,29 @@
<argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
<argument index="1" name="fallback_ratio" type="float" default="0.75" />
<description>
+ Popups the [Window] centered inside its parent [Window].
+ [code]fallback_ratio[/code] determines the maximum size of the [Window], in relation to its parent.
</description>
</method>
<method name="popup_centered_ratio">
<return type="void" />
<argument index="0" name="ratio" type="float" default="0.8" />
<description>
+ Popups the [Window] centered inside its parent [Window] and sets its size as a [code]ratio[/code] of parent's size.
</description>
</method>
<method name="popup_on_parent">
<return type="void" />
<argument index="0" name="parent_rect" type="Rect2i" />
<description>
+ Popups the [Window] with a position shifted by parent [Window]'s position.
+ If the [Window] is embedded, has the same effect as [method popup].
</description>
</method>
<method name="request_attention">
<return type="void" />
<description>
+ Tells the OS that the [Window] needs an attention. This makes the window stand out in some way depending on the system, e.g. it might blink on the task bar.
</description>
</method>
<method name="reset_size">
@@ -248,12 +282,14 @@
<return type="void" />
<argument index="0" name="active" type="bool" />
<description>
+ If [code]active[/code] is [code]true[/code], enables system's native IME (Input Method Editor).
</description>
</method>
<method name="set_ime_position">
<return type="void" />
<argument index="0" name="position" type="Vector2i" />
<description>
+ Moves IME to the given position.
</description>
</method>
<method name="set_layout_direction">
@@ -267,17 +303,19 @@
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
+ Enables font oversampling. This makes fonts look better when they are scaled up.
</description>
</method>
<method name="show">
<return type="void" />
<description>
+ Makes the [Window] appear. This enables interactions with the [Window] and doesn't change any of its property other than visibility (unlike e.g. [method popup]).
</description>
</method>
</methods>
<members>
<member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the window will be on top of all other windows.
+ If [code]true[/code], the window will be on top of all other windows. Does not work if [member transient] is enabled.
</member>
<member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true">
Toggles if any text should automatically change to its translated version depending on the current locale.
@@ -286,27 +324,36 @@
If [code]true[/code], the window will have no borders.
</member>
<member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
+ Specifies how the content's aspect behaves when the [Window] is resized. The base aspect is determined by [member content_scale_size].
</member>
<member name="content_scale_factor" type="float" setter="set_content_scale_factor" getter="get_content_scale_factor" default="1.0">
+ Specifies the base scale of [Window]'s content when its [member size] is equal to [member content_scale_size].
</member>
<member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
+ Specifies how the content is scaled when the [Window] is resized.
</member>
<member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)">
+ Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, [Window]'s content will be scaled when the window is resized to a different size.
</member>
<member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
The screen the window is currently on.
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
+ If [code]true[/code], the [Window] will be in exclusive mode. Exclusive windows are always on top of their parent and will block all input going to the parent [Window].
+ Needs [member transient] enabled to work.
</member>
<member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)">
+ If non-zero, the [Window] can't be resized to be bigger than this size.
</member>
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)">
+ If non-zero, the [Window] can't be resized to be smaller than this size.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
Set's the window's current mode.
[b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux.
</member>
<member name="popup_window" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled).
</member>
<member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)">
The window's position in pixels.
@@ -315,34 +362,46 @@
The window's size in pixels.
</member>
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
+ The [Theme] resource that determines the style of the underlying [Control] nodes.
+ [Window] styles will have no effect unless the window is embedded.
</member>
<member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&amp;&quot;&quot;">
+ The name of a theme type variation used by this [Window] to look up its own theme items. See [member Control.theme_type_variation] for more details.
</member>
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
- The window's title.
+ The window's title. If the [Window] is non-embedded, title styles set in [Theme] will have no effect.
</member>
<member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
+ If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. Transient windows can't be in fullscreen mode and will return focus to their parent when closed.
+ Note that behavior might be different depending on the platform.
</member>
<member name="transparent" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the [Window]'s background can be transparent. This is best used with embedded windows. Currently non-embedded [Window] transparency is implemented only for MacOS.
</member>
<member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the [Window] can't be focused nor interacted with. It can still be visible.
</member>
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the window can't be resized.
+ If [code]true[/code], the window can't be resized. Minimize and maximize buttons are disabled.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], the window is visible.
</member>
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false">
+ If [code]true[/code], the window's size will automatically update when a child node is added or removed.
+ If [code]false[/code], you need to call [method child_controls_changed] manually.
</member>
</members>
<signals>
<signal name="about_to_popup">
<description>
+ Emitted right after [method popup] call, before the [Window] appears or does anything.
</description>
</signal>
<signal name="close_requested">
<description>
+ Emitted when the [Window]'s close button is pressed or when [member popup_window] is enabled and user clicks outside the window.
+ This signal can be used to handle window closing, e.g. by connecting it to [method hide].
</description>
</signal>
<signal name="files_dropped">
@@ -362,49 +421,58 @@
</signal>
<signal name="focus_entered">
<description>
+ Emitted when the [Window] gains focus.
</description>
</signal>
<signal name="focus_exited">
<description>
+ Emitted when the [Window] loses its focus.
</description>
</signal>
<signal name="go_back_requested">
<description>
+ Emitted when a go back request is sent (e.g. pressing the "Back" button on Android), right after [constant Node.NOTIFICATION_WM_GO_BACK_REQUEST].
</description>
</signal>
<signal name="mouse_entered">
<description>
+ Emitted when the mouse cursor enters the [Window]'s area, regardless if it's currently focused or not.
</description>
</signal>
<signal name="mouse_exited">
<description>
+ Emitted when the mouse cursor exits the [Window]'s area (including when it's hovered over another window on top of this one).
</description>
</signal>
<signal name="theme_changed">
<description>
+ Emitted when the [member theme] is modified or changed to another [Theme].
</description>
</signal>
<signal name="visibility_changed">
<description>
+ Emitted when [Window] is made visible or disappears.
</description>
</signal>
<signal name="window_input">
<argument index="0" name="event" type="InputEvent" />
<description>
+ Emitted when the [Window] is currently focused and receives any input, passing the received event as an argument.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
+ Emitted when [Window]'s visibility changes, right before [signal visibility_changed].
</constant>
<constant name="MODE_WINDOWED" value="0" enum="Mode">
- Windowed mode.
+ Windowed mode, i.e. [Window] doesn't occupy whole screen (unless set to the size of the screen).
</constant>
<constant name="MODE_MINIMIZED" value="1" enum="Mode">
- Minimized window mode.
+ Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is presesd.
</constant>
<constant name="MODE_MAXIMIZED" value="2" enum="Mode">
- Maximized window mode.
+ Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is presesd.
</constant>
<constant name="MODE_FULLSCREEN" value="3" enum="Mode">
Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
@@ -416,37 +484,49 @@
Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
</constant>
<constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
- The window's ability to be resized.
+ The window's ability to be resized. Set with [member unresizable].
</constant>
<constant name="FLAG_BORDERLESS" value="1" enum="Flags">
- Borderless window.
+ Borderless window. Set with [member borderless].
</constant>
<constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags">
- Flag for making the window always on top of all other windows.
+ Flag for making the window always on top of all other windows. Set with [member always_on_top].
</constant>
<constant name="FLAG_TRANSPARENT" value="3" enum="Flags">
+ Flag for per-pixel transparency. Set with [member transparent].
</constant>
<constant name="FLAG_NO_FOCUS" value="4" enum="Flags">
+ The window's ability to gain focus. Set with [member unfocusable].
</constant>
<constant name="FLAG_POPUP" value="5" enum="Flags">
+ Whether the window is popup or a regular window. Set with [member popup_window].
</constant>
<constant name="FLAG_MAX" value="6" enum="Flags">
+ Max value of the [enum Flags].
</constant>
<constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">
+ The content will not be scaled to match the [Window]'s size.
</constant>
<constant name="CONTENT_SCALE_MODE_CANVAS_ITEMS" value="1" enum="ContentScaleMode">
+ The content will be rendered at the target size. This is more performance-expensive than [constant CONTENT_SCALE_MODE_VIEWPORT], but provides better results.
</constant>
<constant name="CONTENT_SCALE_MODE_VIEWPORT" value="2" enum="ContentScaleMode">
+ The content will be rendered at the base size and then scaled to the target size. More performant than [constant CONTENT_SCALE_MODE_CANVAS_ITEMS], but results in pixelated image.
</constant>
<constant name="CONTENT_SCALE_ASPECT_IGNORE" value="0" enum="ContentScaleAspect">
+ The aspect will be ignored. Scaling will simply stretch the content to fit the target size.
</constant>
<constant name="CONTENT_SCALE_ASPECT_KEEP" value="1" enum="ContentScaleAspect">
+ The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides.
</constant>
<constant name="CONTENT_SCALE_ASPECT_KEEP_WIDTH" value="2" enum="ContentScaleAspect">
+ The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.
</constant>
<constant name="CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value="3" enum="ContentScaleAspect">
+ The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.
</constant>
<constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect">
+ The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space.
</constant>
<constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection">
Automatic layout direction, determined from the parent window layout direction.
@@ -463,33 +543,41 @@
</constants>
<theme_items>
<theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ The color of the title's text.
</theme_item>
<theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The color of the title outline.
+ The color of the title's text outline.
</theme_item>
<theme_item name="close_h_offset" data_type="constant" type="int" default="18">
+ Horizontal position offset of the close button.
</theme_item>
<theme_item name="close_v_offset" data_type="constant" type="int" default="24">
+ Vertical position offset of the close button.
</theme_item>
<theme_item name="resize_margin" data_type="constant" type="int" default="4">
- </theme_item>
- <theme_item name="scaleborder_size" data_type="constant" type="int" default="4">
+ Defines the outside margin at which the window border can be grabbed with mouse and resized.
</theme_item>
<theme_item name="title_height" data_type="constant" type="int" default="36">
+ Height of the title bar.
</theme_item>
<theme_item name="title_outline_size" data_type="constant" type="int" default="0">
The size of the title outline.
</theme_item>
<theme_item name="title_font" data_type="font" type="Font">
+ The font used to draw the title.
</theme_item>
<theme_item name="title_font_size" data_type="font_size" type="int">
The size of the title font.
</theme_item>
<theme_item name="close" data_type="icon" type="Texture2D">
+ The icon for the close button.
</theme_item>
<theme_item name="close_pressed" data_type="icon" type="Texture2D">
+ The icon for the close button when it's being pressed.
</theme_item>
<theme_item name="embedded_border" data_type="style" type="StyleBox">
+ The background style used when the [Window] is embedded. Note that this is drawn only under the window's content, excluding the title. For proper borders and title bar style, you can use [code]expand_margin_*[/code] properties of [StyleBoxFlat].
+ [b]Note:[/b] The content background will not be visible unless [member transparent] is enabled.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/WorkerThreadPool.xml b/doc/classes/WorkerThreadPool.xml
new file mode 100644
index 0000000000..4f614bdadb
--- /dev/null
+++ b/doc/classes/WorkerThreadPool.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WorkerThreadPool" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_group_task">
+ <return type="int" />
+ <argument index="0" name="action" type="Callable" />
+ <argument index="1" name="elements" type="int" />
+ <argument index="2" name="tasks_needed" type="int" default="-1" />
+ <argument index="3" name="high_priority" type="bool" default="false" />
+ <argument index="4" name="description" type="String" default="&quot;&quot;" />
+ <description>
+ </description>
+ </method>
+ <method name="add_task">
+ <return type="int" />
+ <argument index="0" name="action" type="Callable" />
+ <argument index="1" name="high_priority" type="bool" default="false" />
+ <argument index="2" name="description" type="String" default="&quot;&quot;" />
+ <description>
+ </description>
+ </method>
+ <method name="get_group_processed_element_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="group_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="is_group_task_completed" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="group_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="is_task_completed" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="task_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="wait_for_group_task_completion">
+ <return type="void" />
+ <argument index="0" name="group_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="wait_for_task_completion">
+ <return type="void" />
+ <argument index="0" name="task_id" type="int" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml
index c57029a180..56a662d062 100644
--- a/doc/classes/World3D.xml
+++ b/doc/classes/World3D.xml
@@ -19,7 +19,7 @@
The World3D's [Environment].
</member>
<member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment">
- The World3D's fallback_environment will be used if the World3D's [Environment] fails or is missing.
+ The World3D's fallback environment will be used if [member environment] fails or is missing.
</member>
<member name="navigation_map" type="RID" setter="" getter="get_navigation_map">
The [RID] of this world's navigation map. Used by the [NavigationServer3D].
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index 8afe169874..ed8f0b9a04 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -16,6 +16,7 @@
</tutorials>
<members>
<member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
+ The [CameraEffects] resource used by this [WorldEnvironment], defining the default properties. This [CameraEffects] resource will be used by all [Camera3D]s that do not define their own [CameraEffects].
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] resource used by this [WorldEnvironment], defining the default properties.
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index c40a07c40a..79ab33045f 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -32,7 +32,7 @@
<method name="get_current_line" qualifiers="const">
<return type="int" />
<description>
- Gets the current line in the parsed file (currently not implemented).
+ Gets the current line in the parsed file, counting from 0.
</description>
</method>
<method name="get_named_attribute_value" qualifiers="const">
diff --git a/doc/classes/XRCamera3D.xml b/doc/classes/XRCamera3D.xml
index e0fc016a7d..4d6baa327b 100644
--- a/doc/classes/XRCamera3D.xml
+++ b/doc/classes/XRCamera3D.xml
@@ -8,6 +8,6 @@
The position and orientation of this node is automatically updated by the XR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the XR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the XRCamera3D can lag a few milliseconds behind what is used for rendering as a result.
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
</class>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index deea888b8f..ff4aec46e1 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -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">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="get_axis" qualifiers="const">
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 0f4159cbbf..26b7699af2 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -8,7 +8,7 @@
Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through [XRServer].
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="get_camera_feed_id">
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index 71f6a44724..1642ae61f7 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -106,6 +106,11 @@
Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic.
</description>
</method>
+ <method name="_get_vrs_texture" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_initialize" qualifiers="virtual">
<return type="bool" />
<description>
diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml
index b7811f4d53..7acee097e7 100644
--- a/doc/classes/XROrigin3D.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -10,7 +10,7 @@
For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index d15558c9e8..c146b27fcb 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -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">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="get_input" qualifiers="const">
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index a322a3c5c9..d3cb958cbc 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -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">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="add_interface">
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index f36b1fddeb..a7c6533ef5 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -111,6 +111,18 @@
</description>
</operator>
<operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 2eceba40fa..6b492ca923 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -158,6 +158,18 @@
</description>
</operator>
<operator name="operator *">
+ <return type="Vector4" />
+ <argument index="0" name="right" type="Vector4" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4i" />
+ <argument index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="float" />
<argument index="0" name="right" type="float" />
<description>