summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml13
-rw-r--r--doc/classes/AcceptDialog.xml6
-rw-r--r--doc/classes/Animation.xml7
-rw-r--r--doc/classes/AnimationMixer.xml8
-rw-r--r--doc/classes/AnimationNode.xml2
-rw-r--r--doc/classes/AnimationNodeSync.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml21
-rw-r--r--doc/classes/Array.xml7
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzer.xml1
-rw-r--r--doc/classes/AudioStreamWAV.xml5
-rw-r--r--doc/classes/BaseMaterial3D.xml3
-rw-r--r--doc/classes/BoneAttachment3D.xml5
-rw-r--r--doc/classes/Button.xml2
-rw-r--r--doc/classes/CanvasItem.xml19
-rw-r--r--doc/classes/ClassDB.xml17
-rw-r--r--doc/classes/CodeEdit.xml38
-rw-r--r--doc/classes/Compositor.xml2
-rw-r--r--doc/classes/ConfirmationDialog.xml4
-rw-r--r--doc/classes/Control.xml2
-rw-r--r--doc/classes/Crypto.xml109
-rw-r--r--doc/classes/CryptoKey.xml2
-rw-r--r--doc/classes/DirAccess.xml26
-rw-r--r--doc/classes/DisplayServer.xml50
-rw-r--r--doc/classes/EditorFileDialog.xml6
-rw-r--r--doc/classes/EditorInspector.xml1
-rw-r--r--doc/classes/EditorInspectorPlugin.xml3
-rw-r--r--doc/classes/EditorPlugin.xml8
-rw-r--r--doc/classes/EditorSettings.xml38
-rw-r--r--doc/classes/FileAccess.xml17
-rw-r--r--doc/classes/FileSystemDock.xml5
-rw-r--r--doc/classes/FlowContainer.xml15
-rw-r--r--doc/classes/GDExtensionManager.xml2
-rw-r--r--doc/classes/GPUParticles2D.xml2
-rw-r--r--doc/classes/Geometry2D.xml1
-rw-r--r--doc/classes/GeometryInstance3D.xml3
-rw-r--r--doc/classes/GraphNode.xml3
-rw-r--r--doc/classes/HingeJoint3D.xml4
-rw-r--r--doc/classes/Input.xml3
-rw-r--r--doc/classes/Joint2D.xml10
-rw-r--r--doc/classes/Joint3D.xml12
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/LightmapGI.xml3
-rw-r--r--doc/classes/Mesh.xml2
-rw-r--r--doc/classes/MeshInstance3D.xml8
-rw-r--r--doc/classes/MeshLibrary.xml2
-rw-r--r--doc/classes/NavigationAgent2D.xml2
-rw-r--r--doc/classes/NavigationAgent3D.xml2
-rw-r--r--doc/classes/NavigationMeshSourceGeometryData2D.xml14
-rw-r--r--doc/classes/NavigationMeshSourceGeometryData3D.xml8
-rw-r--r--doc/classes/NavigationRegion2D.xml21
-rw-r--r--doc/classes/NavigationServer2D.xml17
-rw-r--r--doc/classes/NavigationServer3D.xml17
-rw-r--r--doc/classes/Node.xml12
-rw-r--r--doc/classes/Node2D.xml3
-rw-r--r--doc/classes/NodePath.xml2
-rw-r--r--doc/classes/OS.xml23
-rw-r--r--doc/classes/Object.xml13
-rw-r--r--doc/classes/PackedScene.xml4
-rw-r--r--doc/classes/PackedVector4Array.xml225
-rw-r--r--doc/classes/ParticleProcessMaterial.xml1
-rw-r--r--doc/classes/PhysicsMaterial.xml2
-rw-r--r--doc/classes/PhysicsServer2D.xml6
-rw-r--r--doc/classes/PhysicsServer2DExtension.xml4
-rw-r--r--doc/classes/PhysicsServer3D.xml5
-rw-r--r--doc/classes/Popup.xml5
-rw-r--r--doc/classes/PopupMenu.xml3
-rw-r--r--doc/classes/PopupPanel.xml5
-rw-r--r--doc/classes/ProjectSettings.xml36
-rw-r--r--doc/classes/Rect2.xml4
-rw-r--r--doc/classes/Rect2i.xml4
-rw-r--r--doc/classes/RenderingServer.xml49
-rw-r--r--doc/classes/ResourceImporterWAV.xml1
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/RichTextLabel.xml9
-rw-r--r--doc/classes/ScriptEditor.xml29
-rw-r--r--doc/classes/ScriptEditorBase.xml6
-rw-r--r--doc/classes/Skeleton3D.xml22
-rw-r--r--doc/classes/SkeletonIK3D.xml3
-rw-r--r--doc/classes/SkeletonModifier3D.xml10
-rw-r--r--doc/classes/StatusIndicator.xml14
-rw-r--r--doc/classes/String.xml18
-rw-r--r--doc/classes/StringName.xml16
-rw-r--r--doc/classes/SurfaceTool.xml10
-rw-r--r--doc/classes/TabBar.xml16
-rw-r--r--doc/classes/TabContainer.xml31
-rw-r--r--doc/classes/TextEdit.xml200
-rw-r--r--doc/classes/TextServer.xml18
-rw-r--r--doc/classes/TextServerExtension.xml7
-rw-r--r--doc/classes/TileMapLayer.xml4
-rw-r--r--doc/classes/TileSetAtlasSource.xml9
-rw-r--r--doc/classes/Time.xml2
-rw-r--r--doc/classes/Tree.xml14
-rw-r--r--doc/classes/TreeItem.xml23
-rw-r--r--doc/classes/Variant.xml4
-rw-r--r--doc/classes/Vector2.xml43
-rw-r--r--doc/classes/Vector2i.xml43
-rw-r--r--doc/classes/Vector3.xml49
-rw-r--r--doc/classes/Vector3i.xml43
-rw-r--r--doc/classes/Vector4.xml43
-rw-r--r--doc/classes/Vector4i.xml43
-rw-r--r--doc/classes/Viewport.xml15
-rw-r--r--doc/classes/VisualShaderNodeComment.xml16
-rw-r--r--doc/classes/VisualShaderNodeFrame.xml2
-rw-r--r--doc/classes/VisualShaderNodeReroute.xml19
-rw-r--r--doc/classes/WorkerThreadPool.xml4
-rw-r--r--doc/classes/XRBodyModifier3D.xml9
-rw-r--r--doc/classes/XRBodyTracker.xml3
-rw-r--r--doc/classes/XRControllerTracker.xml17
-rw-r--r--doc/classes/XRFaceModifier3D.xml2
-rw-r--r--doc/classes/XRFaceTracker.xml3
-rw-r--r--doc/classes/XRHandModifier3D.xml6
-rw-r--r--doc/classes/XRHandTracker.xml16
-rw-r--r--doc/classes/XRNode3D.xml3
-rw-r--r--doc/classes/XRPositionalTracker.xml22
-rw-r--r--doc/classes/XRServer.xml167
-rw-r--r--doc/classes/XRTracker.xml30
-rw-r--r--doc/classes/XRVRS.xml30
117 files changed, 1624 insertions, 460 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 0307684588..bcab80ea94 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -604,7 +604,7 @@
is_same(arr_a, arr_b) # false
[/codeblock]
These are [Variant] value types: [code]null[/code], [bool], [int], [float], [String], [StringName], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i], [Rect2], [Rect2i], [Transform2D], [Transform3D], [Plane], [Quaternion], [AABB], [Basis], [Projection], [Color], [NodePath], [RID], [Callable] and [Signal].
- These are [Variant] reference types: [Object], [Dictionary], [Array], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], [PackedVector2Array], [PackedVector3Array] and [PackedColorArray].
+ These are [Variant] reference types: [Object], [Dictionary], [Array], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], [PackedVector2Array], [PackedVector3Array], [PackedVector4Array], and [PackedColorArray].
</description>
</method>
<method name="is_zero_approx">
@@ -696,6 +696,7 @@
[codeblock]
max(1, 7, 3, -6, 5) # Returns 7
[/codeblock]
+ [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise maximum, and will pick the largest value when compared using [code]x &lt; y[/code]. To perform component-wise maximum, use [method Vector2.max], [method Vector2i.max], [method Vector3.max], [method Vector3i.max], [method Vector4.max], and [method Vector4i.max].
</description>
</method>
<method name="maxf">
@@ -729,6 +730,7 @@
[codeblock]
min(1, 7, 3, -6, 5) # Returns -6
[/codeblock]
+ [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise minimum, and will pick the smallest value when compared using [code]x &lt; y[/code]. To perform component-wise minimum, use [method Vector2.min], [method Vector2i.min], [method Vector3.min], [method Vector3i.min], [method Vector4.min], and [method Vector4i.min].
</description>
</method>
<method name="minf">
@@ -1095,6 +1097,7 @@
remap(75, 0, 100, -1, 1) # Returns 0.5
[/codeblock]
For complex use cases where multiple ranges are needed, consider using [Curve] or [Gradient] instead.
+ [b]Note:[/b] If [code]istart == istop[/code], the return value is undefined (most likely NaN, INF, or -INF).
</description>
</method>
<method name="rid_allocate_id">
@@ -1568,9 +1571,6 @@
<member name="Geometry3D" type="Geometry3D" setter="" getter="">
The [Geometry3D] singleton.
</member>
- <member name="GodotSharp" type="GodotSharp" setter="" getter="">
- The [GodotSharp] singleton.
- </member>
<member name="IP" type="IP" setter="" getter="">
The [IP] singleton.
</member>
@@ -3167,7 +3167,10 @@
<constant name="TYPE_PACKED_COLOR_ARRAY" value="37" enum="Variant.Type">
Variable is of type [PackedColorArray].
</constant>
- <constant name="TYPE_MAX" value="38" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR4_ARRAY" value="38" enum="Variant.Type">
+ Variable is of type [PackedVector4Array].
+ </constant>
+ <constant name="TYPE_MAX" value="39" 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/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index 7fbdd4272d..392364425b 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -100,6 +100,12 @@
</signal>
</signals>
<theme_items>
+ <theme_item name="buttons_min_height" data_type="constant" type="int" default="0">
+ The minimum height of each button in the bottom row (such as OK/Cancel) in pixels. This can be increased to make buttons with short texts easier to click/tap.
+ </theme_item>
+ <theme_item name="buttons_min_width" data_type="constant" type="int" default="0">
+ The minimum width of each button in the bottom row (such as OK/Cancel) in pixels. This can be increased to make buttons with short texts easier to click/tap.
+ </theme_item>
<theme_item name="buttons_separation" data_type="constant" type="int" default="10">
The size of the vertical space between the dialog's content and the button row.
</theme_item>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index b00889f483..26ed881502 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -595,6 +595,9 @@
</method>
</methods>
<members>
+ <member name="capture_included" type="bool" setter="_set_capture_included" getter="is_capture_included" default="false">
+ Returns [code]true[/code] if the capture track is included. This is a cached readonly value for performance.
+ </member>
<member name="length" type="float" setter="set_length" getter="get_length" default="1.0">
The total length of the animation (in seconds).
[b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
@@ -602,7 +605,7 @@
<member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="Animation.LoopMode" default="0">
Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
</member>
- <member name="step" type="float" setter="set_step" getter="get_step" default="0.1">
+ <member name="step" type="float" setter="set_step" getter="get_step" default="0.0333333">
The animation step value.
</member>
</members>
@@ -658,7 +661,7 @@
Update at the keyframes.
</constant>
<constant name="UPDATE_CAPTURE" value="2" enum="UpdateMode">
- Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture] and [method AnimationPlayer.play_with_capture].
+ Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture], [member AnimationPlayer.playback_auto_capture], and [method AnimationPlayer.play_with_capture].
</constant>
<constant name="LOOP_NONE" value="0" enum="LoopMode">
At both ends of the animation, the animation will stop playing.
diff --git a/doc/classes/AnimationMixer.xml b/doc/classes/AnimationMixer.xml
index a77e9e28c6..c635eba2ab 100644
--- a/doc/classes/AnimationMixer.xml
+++ b/doc/classes/AnimationMixer.xml
@@ -273,7 +273,7 @@
The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers.
For example, if this value is [code]32[/code] and the animation has two audio tracks, the two [AudioStreamPlayer]s assigned can play simultaneously up to [code]32[/code] voices each.
</member>
- <member name="callback_mode_discrete" type="int" setter="set_callback_mode_discrete" getter="get_callback_mode_discrete" enum="AnimationMixer.AnimationCallbackModeDiscrete" default="0">
+ <member name="callback_mode_discrete" type="int" setter="set_callback_mode_discrete" getter="get_callback_mode_discrete" enum="AnimationMixer.AnimationCallbackModeDiscrete" default="1">
Ordinarily, tracks can be set to [constant Animation.UPDATE_DISCRETE] to update infrequently, usually when using nearest interpolation.
However, when blending with [constant Animation.UPDATE_CONTINUOUS] several results are considered. The [member callback_mode_discrete] specify it explicitly. See also [enum AnimationCallbackModeDiscrete].
To make the blended results look good, it is recommended to set this to [constant ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to update every frame during blending. Other values exist for compatibility and they are fine if there is no blending, but not so, may produce artifacts.
@@ -361,14 +361,14 @@
Make method calls immediately when reached in the animation.
</constant>
<constant name="ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT" value="0" enum="AnimationCallbackModeDiscrete">
- An [constant Animation.UPDATE_DISCRETE] track value takes precedence when blending [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and [constant Animation.UPDATE_DISCRETE] track values. This is the default behavior for [AnimationPlayer].
- [b]Note:[/b] If a value track has non-numeric type key values, it is internally converted to use [constant ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT] with [constant Animation.UPDATE_DISCRETE].
+ An [constant Animation.UPDATE_DISCRETE] track value takes precedence when blending [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and [constant Animation.UPDATE_DISCRETE] track values.
</constant>
<constant name="ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE" value="1" enum="AnimationCallbackModeDiscrete">
- An [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track value takes precedence when blending the [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and the [constant Animation.UPDATE_DISCRETE] track values.
+ An [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track value takes precedence when blending the [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and the [constant Animation.UPDATE_DISCRETE] track values. This is the default behavior for [AnimationPlayer].
</constant>
<constant name="ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS" value="2" enum="AnimationCallbackModeDiscrete">
Always treat the [constant Animation.UPDATE_DISCRETE] track value as [constant Animation.UPDATE_CONTINUOUS] with [constant Animation.INTERPOLATION_NEAREST]. This is the default behavior for [AnimationTree].
+ If a value track has non-numeric type key values, it is internally converted to use [constant ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE] with [constant Animation.UPDATE_DISCRETE].
</constant>
</constants>
</class>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index 960bbe68ad..4e093cb887 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -7,7 +7,7 @@
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
Inherit this when creating animation nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
You can access the time information as read-only parameter which is processed and stored in the previous frame for all nodes except [AnimationNodeOutput].
- [b]Note:[/b] If more than two inputs exist in the [AnimationNode], which time information takes precedence depends on the type of [AnimationNode].
+ [b]Note:[/b] If multiple inputs exist in the [AnimationNode], which time information takes precedence depends on the type of [AnimationNode].
[codeblock]
var current_length = $AnimationTree[parameters/AnimationNodeName/current_length]
var current_position = $AnimationTree[parameters/AnimationNodeName/current_position]
diff --git a/doc/classes/AnimationNodeSync.xml b/doc/classes/AnimationNodeSync.xml
index e9e1519672..57c79378c0 100644
--- a/doc/classes/AnimationNodeSync.xml
+++ b/doc/classes/AnimationNodeSync.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeSync" inherits="AnimationNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Base class for [AnimationNode]s with more than two input ports that must be synchronized.
+ Base class for [AnimationNode]s with multiple input ports that must be synchronized.
</brief_description>
<description>
An animation node used to combine, mix, or blend two or more animations together while keeping them synchronized within an [AnimationTree].
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 1b742bea28..302ca314bb 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -112,7 +112,7 @@
</method>
<method name="play_with_capture">
<return type="void" />
- <param index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" default="&amp;&quot;&quot;" />
<param index="1" name="duration" type="float" default="-1.0" />
<param index="2" name="custom_blend" type="float" default="-1" />
<param index="3" name="custom_speed" type="float" default="1.0" />
@@ -120,12 +120,13 @@
<param index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0" />
<param index="6" name="ease_type" type="int" enum="Tween.EaseType" default="0" />
<description>
- See [method AnimationMixer.capture]. It is almost the same as the following:
+ See also [method AnimationMixer.capture].
+ You can use this method to use more detailed options for capture than those performed by [member playback_auto_capture]. When [member playback_auto_capture] is [code]false[/code], this method is almost the same as the following:
[codeblock]
capture(name, duration, trans_type, ease_type)
play(name, custom_blend, custom_speed, from_end)
[/codeblock]
- If name is blank, it specifies [member assigned_animation].
+ If [param name] is blank, it specifies [member assigned_animation].
If [param duration] is a negative value, the duration is set to the interval between the current position and the first key, when [param from_end] is [code]true[/code], uses the interval between the current position and the last key instead.
[b]Note:[/b] The [param duration] takes [member speed_scale] into account, but [param custom_speed] does not, because the capture cache is interpolated with the blend result and the result may contain multiple animations.
</description>
@@ -210,6 +211,20 @@
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 AnimationMixer.animation_finished] signal, so it will not quit the engine if the animation is set to be looping.
</member>
+ <member name="playback_auto_capture" type="bool" setter="set_auto_capture" getter="is_auto_capture" default="true">
+ If [code]true[/code], performs [method AnimationMixer.capture] before playback automatically. This means just [method play_with_capture] is executed with default arguments instead of [method play].
+ [b]Note:[/b] Capture interpolation is only performed if the animation contains a capture track. See also [constant Animation.UPDATE_CAPTURE].
+ </member>
+ <member name="playback_auto_capture_duration" type="float" setter="set_auto_capture_duration" getter="get_auto_capture_duration" default="-1.0">
+ See also [method play_with_capture] and [method AnimationMixer.capture].
+ If [member playback_auto_capture_duration] is negative value, the duration is set to the interval between the current position and the first key.
+ </member>
+ <member name="playback_auto_capture_ease_type" type="int" setter="set_auto_capture_ease_type" getter="get_auto_capture_ease_type" enum="Tween.EaseType" default="0">
+ The ease type of the capture interpolation. See also [enum Tween.EaseType].
+ </member>
+ <member name="playback_auto_capture_transition_type" type="int" setter="set_auto_capture_transition_type" getter="get_auto_capture_transition_type" enum="Tween.TransitionType" default="0">
+ The transition type of the capture interpolation. See also [enum Tween.TransitionType].
+ </member>
<member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" default="0.0">
The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision.
</member>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index a72ac60536..326b71c588 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -154,6 +154,13 @@
Constructs an array from a [PackedVector3Array].
</description>
</constructor>
+ <constructor name="Array">
+ <return type="Array" />
+ <param index="0" name="from" type="PackedVector4Array" />
+ <description>
+ Constructs an array from a [PackedVector4Array].
+ </description>
+ </constructor>
</constructors>
<methods>
<method name="all" qualifiers="const">
diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml
index d9312cc87d..fbc0c2275f 100644
--- a/doc/classes/AudioEffectSpectrumAnalyzer.xml
+++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml
@@ -9,7 +9,6 @@
</description>
<tutorials>
<link title="Audio Spectrum Visualizer Demo">https://godotengine.org/asset-library/asset/2762</link>
- <link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0">
diff --git a/doc/classes/AudioStreamWAV.xml b/doc/classes/AudioStreamWAV.xml
index 206b6361cc..3df814cb7f 100644
--- a/doc/classes/AudioStreamWAV.xml
+++ b/doc/classes/AudioStreamWAV.xml
@@ -15,7 +15,7 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM format can't be saved.
+ Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM or QOA formats can't be saved.
[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [param path] if it is missing.
</description>
</method>
@@ -56,6 +56,9 @@
<constant name="FORMAT_IMA_ADPCM" value="2" enum="Format">
Audio is compressed using IMA ADPCM.
</constant>
+ <constant name="FORMAT_QOA" value="3" enum="Format">
+ Audio is compressed as QOA ([url=https://qoaformat.org/]Quite OK Audio[/url]).
+ </constant>
<constant name="LOOP_DISABLED" value="0" enum="LoopMode">
Audio does not loop.
</constant>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 1bd4183b3c..fc8af02869 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -609,6 +609,9 @@
<constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
The color of the object is multiplied by the background.
</constant>
+ <constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode">
+ The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the [code]PREMUL_ALPHA_FACTOR[/code] built-in so that lighting can be modulated as well.
+ </constant>
<constant name="ALPHA_ANTIALIASING_OFF" value="0" enum="AlphaAntiAliasing">
Disables Alpha AntiAliasing for the material.
</constant>
diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml
index bafa463f82..a51b2d9a94 100644
--- a/doc/classes/BoneAttachment3D.xml
+++ b/doc/classes/BoneAttachment3D.xml
@@ -21,11 +21,10 @@
Returns whether the BoneAttachment3D node is using an external [Skeleton3D] rather than attempting to use its parent node as the [Skeleton3D].
</description>
</method>
- <method name="on_bone_pose_update">
+ <method name="on_skeleton_update">
<return type="void" />
- <param index="0" name="bone_index" type="int" />
<description>
- A function that is called automatically when the [Skeleton3D] the BoneAttachment3D node is using has a bone that has changed its pose. This function is where the BoneAttachment3D node updates its position so it is correctly bound when it is [i]not[/i] set to override the bone pose.
+ A function that is called automatically when the [Skeleton3D] is updated. This function is where the [BoneAttachment3D] node updates its position so it is correctly bound when it is [i]not[/i] set to override the bone pose.
</description>
</method>
<method name="set_external_skeleton">
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 30df4fd10d..d2af6179d9 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -122,7 +122,7 @@
The horizontal space between [Button]'s icon and text. Negative values will be treated as [code]0[/code] when used.
</theme_item>
<theme_item name="icon_max_width" data_type="constant" type="int" default="0">
- The maximum allowed width of the [Button]'s icon. This limit is applied on top of the default size of the icon, or its expanded size if [member expand_icon] is [code]true[/code]. The height is adjusted according to the icon's ratio.
+ The maximum allowed width of the [Button]'s icon. This limit is applied on top of the default size of the icon, or its expanded size if [member expand_icon] is [code]true[/code]. The height is adjusted according to the icon's ratio. If the button has additional icons (e.g. [CheckBox]), they will also be limited.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 1cfd44467f..207045b065 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -8,6 +8,7 @@
Any [CanvasItem] can draw. For this, [method queue_redraw] is called by the engine, then [constant NOTIFICATION_DRAW] will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside [method _draw], its corresponding [method Object._notification] or methods connected to the [signal draw] signal.
Canvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis.
A [CanvasItem] can be hidden, which will also hide its children. By adjusting various other properties of a [CanvasItem], you can also modulate its color (via [member modulate] or [member self_modulate]), change its Z-index, blend mode, and more.
+ Note that properties like transform, modulation, and visibility are only propagated to [i]direct[/i] [CanvasItem] child nodes. If there is a non-[CanvasItem] node in between, like [Node] or [AnimationPlayer], the [CanvasItem] nodes below will have an independent position and [member modulate] chain. See also [member top_level].
</description>
<tutorials>
<link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
@@ -76,8 +77,15 @@
<param index="0" name="position" type="Vector2" />
<param index="1" name="radius" type="float" />
<param index="2" name="color" type="Color" />
+ <param index="3" name="filled" type="bool" default="true" />
+ <param index="4" name="width" type="float" default="-1.0" />
+ <param index="5" name="antialiased" type="bool" default="false" />
<description>
- Draws a colored, filled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon].
+ Draws a circle. See also [method draw_arc], [method draw_polyline], and [method draw_polygon].
+ If [param filled] is [code]true[/code], the circle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the circle will be drawn as a stroke with the [param color] and [param width] specified.
+ If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
+ If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth.
+ [b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].
</description>
</method>
<method name="draw_colored_polygon">
@@ -98,9 +106,12 @@
<param index="3" name="width" type="float" default="-1.0" />
<param index="4" name="dash" type="float" default="2.0" />
<param index="5" name="aligned" type="bool" default="true" />
+ <param index="6" name="antialiased" type="bool" default="false" />
<description>
Draws a dashed line from a 2D point to another, with a given color and width. See also [method draw_multiline] and [method draw_polyline].
If [param width] is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
+ If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth.
+ [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than [code]0.0[/code].
</description>
</method>
<method name="draw_end_animation">
@@ -168,9 +179,11 @@
<param index="0" name="points" type="PackedVector2Array" />
<param index="1" name="color" type="Color" />
<param index="2" name="width" type="float" default="-1.0" />
+ <param index="3" name="antialiased" type="bool" default="false" />
<description>
Draws multiple disconnected lines with a uniform [param width] and [param color]. Each line is defined by two consecutive points from [param points] array, i.e. i-th segment consists of [code]points[2 * i][/code], [code]points[2 * i + 1][/code] endpoints. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead.
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
+ [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than [code]0.0[/code].
</description>
</method>
<method name="draw_multiline_colors">
@@ -178,9 +191,11 @@
<param index="0" name="points" type="PackedVector2Array" />
<param index="1" name="colors" type="PackedColorArray" />
<param index="2" name="width" type="float" default="-1.0" />
+ <param index="3" name="antialiased" type="bool" default="false" />
<description>
Draws multiple disconnected lines with a uniform [param width] and segment-by-segment coloring. Each segment is defined by two consecutive points from [param points] array and a corresponding color from [param colors] array, i.e. i-th segment consists of [code]points[2 * i][/code], [code]points[2 * i + 1][/code] endpoints and has [code]colors[i][/code] color. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead.
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
+ [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than [code]0.0[/code].
</description>
</method>
<method name="draw_multiline_string" qualifiers="const">
@@ -276,9 +291,11 @@
<param index="1" name="color" type="Color" />
<param index="2" name="filled" type="bool" default="true" />
<param index="3" name="width" type="float" default="-1.0" />
+ <param index="4" name="antialiased" type="bool" default="false" />
<description>
Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect].
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
+ If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth.
[b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].
[b]Note:[/b] Unfilled rectangles drawn with a negative [param width] may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent [param color]).
</description>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 3f71406091..59ed0b8fe7 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -91,6 +91,14 @@
Returns the value of [param property] of [param object] or its ancestry.
</description>
</method>
+ <method name="class_get_property_default_value" qualifiers="const">
+ <return type="Variant" />
+ <param index="0" name="class" type="StringName" />
+ <param index="1" name="property" type="StringName" />
+ <description>
+ Returns the default value of [param property] of [param class] or its ancestor classes.
+ </description>
+ </method>
<method name="class_get_property_list" qualifiers="const">
<return type="Dictionary[]" />
<param index="0" name="class" type="StringName" />
@@ -192,6 +200,15 @@
Returns whether this [param class] is enabled or not.
</description>
</method>
+ <method name="is_class_enum_bitfield" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="class" type="StringName" />
+ <param index="1" name="enum" type="StringName" />
+ <param index="2" name="no_inheritance" type="bool" default="false" />
+ <description>
+ Returns whether [param class] (or its ancestor classes if [param no_inheritance] is [code]false[/code]) has an enum called [param enum] that is a bitfield.
+ </description>
+ </method>
<method name="is_parent_class" qualifiers="const">
<return type="bool" />
<param index="0" name="class" type="StringName" />
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 7c6f1a51c4..d455799c29 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -14,7 +14,7 @@
<return type="void" />
<param index="0" name="replace" type="bool" />
<description>
- Override this method to define how the selected entry should be inserted. If [param replace] is true, any existing text should be replaced.
+ Override this method to define how the selected entry should be inserted. If [param replace] is [code]true[/code], any existing text should be replaced.
</description>
</method>
<method name="_filter_code_completion_candidates" qualifiers="virtual const">
@@ -29,7 +29,7 @@
<return type="void" />
<param index="0" name="force" type="bool" />
<description>
- Override this method to define what happens when the user requests code completion. If [param force] is true, any checks should be bypassed.
+ Override this method to define what happens when the user requests code completion. If [param force] is [code]true[/code], any checks should be bypassed.
</description>
</method>
<method name="add_auto_brace_completion_pair">
@@ -123,7 +123,7 @@
<return type="void" />
<param index="0" name="replace" type="bool" default="false" />
<description>
- Inserts the selected entry into the text. If [param replace] is true, any existing text is replaced rather than merged.
+ Inserts the selected entry into the text. If [param replace] is [code]true[/code], any existing text is replaced rather than merged.
</description>
</method>
<method name="convert_indent">
@@ -144,6 +144,12 @@
Code regions are delimited using start and end tags (respectively [code]region[/code] and [code]endregion[/code] by default) preceded by one line comment delimiter. (eg. [code]#region[/code] and [code]#endregion[/code])
</description>
</method>
+ <method name="delete_lines">
+ <return type="void" />
+ <description>
+ Deletes all lines that are selected or have a caret on them.
+ </description>
+ </method>
<method name="do_indent">
<return type="void" />
<description>
@@ -156,6 +162,12 @@
Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line.
</description>
</method>
+ <method name="duplicate_selection">
+ <return type="void" />
+ <description>
+ Duplicates all selected text and duplicates all lines with a caret on them.
+ </description>
+ </method>
<method name="fold_all_lines">
<return type="void" />
<description>
@@ -379,6 +391,18 @@
Returns whether the line at the specified index is folded or not.
</description>
</method>
+ <method name="move_lines_down">
+ <return type="void" />
+ <description>
+ Moves all lines down that are selected or have a caret on them.
+ </description>
+ </method>
+ <method name="move_lines_up">
+ <return type="void" />
+ <description>
+ Moves all lines up that are selected or have a caret on them.
+ </description>
+ </method>
<method name="remove_comment_delimiter">
<return type="void" />
<param index="0" name="start_key" type="String" />
@@ -397,7 +421,7 @@
<return type="void" />
<param index="0" name="force" type="bool" default="false" />
<description>
- Emits [signal code_completion_requested], if [param force] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal.
+ Emits [signal code_completion_requested], if [param force] is [code]true[/code] will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal.
</description>
</method>
<method name="set_code_completion_selected_index">
@@ -467,6 +491,12 @@
Toggle the folding of the code block at the given line.
</description>
</method>
+ <method name="toggle_foldable_lines_at_carets">
+ <return type="void" />
+ <description>
+ Toggle the folding of the code block on all lines with a caret on them.
+ </description>
+ </method>
<method name="unfold_all_lines">
<return type="void" />
<description>
diff --git a/doc/classes/Compositor.xml b/doc/classes/Compositor.xml
index c030896b6f..7605083319 100644
--- a/doc/classes/Compositor.xml
+++ b/doc/classes/Compositor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Compositor" inherits="Resource" experimental="More customisation of the rendering pipeline will be added in the future." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="Compositor" inherits="Resource" experimental="More customization of the rendering pipeline will be added in the future." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Stores attributes used to customize how a Viewport is rendered.
</brief_description>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 8fa5dac7bf..5cdff076bd 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -8,10 +8,10 @@
To get cancel action, you can use:
[codeblocks]
[gdscript]
- get_cancel_button().pressed.connect(self.canceled)
+ get_cancel_button().pressed.connect(_on_canceled)
[/gdscript]
[csharp]
- GetCancelButton().Pressed += Canceled;
+ GetCancelButton().Pressed += OnCanceled;
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 09bc4b3412..a0c76a3ad6 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -937,7 +937,7 @@
<member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
- <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true" deprecated="Use [member Node.auto_translate_mode] instead.">
+ <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" deprecated="Use [member Node.auto_translate_mode] instead.">
Toggles if any text should automatically change to its translated version depending on the current locale.
</member>
<member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index 65abc4c641..0effd54fb9 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -8,66 +8,67 @@
Currently, this includes asymmetric key encryption/decryption, signing/verification, and generating cryptographically secure random bytes, RSA keys, HMAC digests, and self-signed [X509Certificate]s.
[codeblocks]
[gdscript]
- extends Node
-
var crypto = Crypto.new()
- var key = CryptoKey.new()
- var cert = X509Certificate.new()
-
- func _ready():
- # Generate new RSA key.
- key = crypto.generate_rsa(4096)
- # Generate new self-signed certificate with the given key.
- cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT")
- # Save key and certificate in the user folder.
- key.save("user://generated.key")
- cert.save("user://generated.crt")
- # Encryption
- var data = "Some data"
- var encrypted = crypto.encrypt(key, data.to_utf8_buffer())
- # Decryption
- var decrypted = crypto.decrypt(key, encrypted)
- # Signing
- var signature = crypto.sign(HashingContext.HASH_SHA256, data.sha256_buffer(), key)
- # Verifying
- var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key)
- # Checks
- assert(verified)
- assert(data.to_utf8_buffer() == decrypted)
+
+ # Generate new RSA key.
+ var key = crypto.generate_rsa(4096)
+
+ # Generate new self-signed certificate with the given key.
+ var cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT")
+
+ # Save key and certificate in the user folder.
+ key.save("user://generated.key")
+ cert.save("user://generated.crt")
+
+ # Encryption
+ var data = "Some data"
+ var encrypted = crypto.encrypt(key, data.to_utf8_buffer())
+
+ # Decryption
+ var decrypted = crypto.decrypt(key, encrypted)
+
+ # Signing
+ var signature = crypto.sign(HashingContext.HASH_SHA256, data.sha256_buffer(), key)
+
+ # Verifying
+ var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key)
+
+ # Checks
+ assert(verified)
+ assert(data.to_utf8_buffer() == decrypted)
[/gdscript]
[csharp]
using Godot;
using System.Diagnostics;
- public partial class MyNode : Node
- {
- private Crypto _crypto = new Crypto();
- private CryptoKey _key = new CryptoKey();
- private X509Certificate _cert = new X509Certificate();
-
- public override void _Ready()
- {
- // Generate new RSA key.
- _key = _crypto.GenerateRsa(4096);
- // Generate new self-signed certificate with the given key.
- _cert = _crypto.GenerateSelfSignedCertificate(_key, "CN=mydomain.com,O=My Game Company,C=IT");
- // Save key and certificate in the user folder.
- _key.Save("user://generated.key");
- _cert.Save("user://generated.crt");
- // Encryption
- string data = "Some data";
- byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8Buffer());
- // Decryption
- byte[] decrypted = _crypto.Decrypt(_key, encrypted);
- // Signing
- byte[] signature = _crypto.Sign(HashingContext.HashType.Sha256, Data.Sha256Buffer(), _key);
- // Verifying
- bool verified = _crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, _key);
- // Checks
- Debug.Assert(verified);
- Debug.Assert(data.ToUtf8Buffer() == decrypted);
- }
- }
+ Crypto crypto = new Crypto();
+
+ // Generate new RSA key.
+ CryptoKey key = crypto.GenerateRsa(4096);
+
+ // Generate new self-signed certificate with the given key.
+ X509Certificate cert = crypto.GenerateSelfSignedCertificate(key, "CN=mydomain.com,O=My Game Company,C=IT");
+
+ // Save key and certificate in the user folder.
+ key.Save("user://generated.key");
+ cert.Save("user://generated.crt");
+
+ // Encryption
+ string data = "Some data";
+ byte[] encrypted = crypto.Encrypt(key, data.ToUtf8Buffer());
+
+ // Decryption
+ byte[] decrypted = crypto.Decrypt(key, encrypted);
+
+ // Signing
+ byte[] signature = crypto.Sign(HashingContext.HashType.Sha256, Data.Sha256Buffer(), key);
+
+ // Verifying
+ bool verified = crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, key);
+
+ // Checks
+ Debug.Assert(verified);
+ Debug.Assert(data.ToUtf8Buffer() == decrypted);
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml
index ff826a3ae5..dd128b6806 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CryptoKey" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A cryptographic key (RSA).
+ A cryptographic key (RSA or elliptic-curve).
</brief_description>
<description>
The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource].
diff --git a/doc/classes/DirAccess.xml b/doc/classes/DirAccess.xml
index 03d7f68f43..9c71addf0c 100644
--- a/doc/classes/DirAccess.xml
+++ b/doc/classes/DirAccess.xml
@@ -94,6 +94,16 @@
Static version of [method copy]. Supports only absolute paths.
</description>
</method>
+ <method name="create_link">
+ <return type="int" enum="Error" />
+ <param index="0" name="source" type="String" />
+ <param index="1" name="target" type="String" />
+ <description>
+ Creates symbolic link between files or folders.
+ [b]Note:[/b] On Windows, this method works only if the application is running with elevated privileges or Developer Mode is enabled.
+ [b]Note:[/b] This method is implemented on macOS, Linux, and Windows.
+ </description>
+ </method>
<method name="current_is_dir" qualifiers="const">
<return type="bool" />
<description>
@@ -212,6 +222,14 @@
[b]Note:[/b] This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns [code]true[/code].
</description>
</method>
+ <method name="is_link">
+ <return type="bool" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns [code]true[/code] if the file or directory is a symbolic link, directory junction, or other reparse point.
+ [b]Note:[/b] This method is implemented on macOS, Linux, and Windows.
+ </description>
+ </method>
<method name="list_dir_begin">
<return type="int" enum="Error" />
<description>
@@ -264,6 +282,14 @@
Returns [code]null[/code] if opening the directory failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
+ <method name="read_link">
+ <return type="String" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns target of the symbolic link.
+ [b]Note:[/b] This method is implemented on macOS, Linux, and Windows.
+ </description>
+ </method>
<method name="remove">
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 42ca336a25..ff1c390b3c 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -58,11 +58,12 @@
</method>
<method name="create_status_indicator">
<return type="int" />
- <param index="0" name="icon" type="Image" />
+ <param index="0" name="icon" type="Texture2D" />
<param index="1" name="tooltip" type="String" />
<param index="2" name="callback" type="Callable" />
<description>
Creates a new application status indicator with the specified icon, tooltip, and activation callback.
+ [param callback] should take two arguments: the pressed mouse button (one of the [enum MouseButton] constants) and the click position in screen coordinates (a [Vector2i]).
</description>
</method>
<method name="cursor_get_shape" qualifiers="const">
@@ -875,7 +876,7 @@
<param index="1" name="open_callback" type="Callable" />
<param index="2" name="close_callback" type="Callable" />
<description>
- Registers callables to emit when the menu is respectively about to show or closed.
+ Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments.
</description>
</method>
<method name="has_feature" qualifiers="const">
@@ -930,6 +931,12 @@
Returns [code]true[/code] if touch events are available (Android or iOS), the capability is detected on the Web platform or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code].
</description>
</method>
+ <method name="is_window_transparency_available" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the window background can be made transparent. This method returns [code]false[/code] if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code], or if transparency is not supported by the renderer or OS compositor.
+ </description>
+ </method>
<method name="keyboard_get_current_layout" qualifiers="const">
<return type="int" />
<description>
@@ -1103,8 +1110,9 @@
<param index="0" name="screen" type="int" default="-1" />
<description>
Returns the scale factor of the specified screen by index.
- [b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases.
- [b]Note:[/b] This method is implemented only on macOS.
+ [b]Note:[/b] On macOS, the returned value is [code]2.0[/code] for hiDPI (Retina) screens, and [code]1.0[/code] for all other cases.
+ [b]Note:[/b] On Linux (Wayland), the returned value is accurate only when [param screen] is [constant SCREEN_OF_MAIN_WINDOW]. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. [code]1.25[/code] would get rounded up to [code]2.0[/code]).
+ [b]Note:[/b] This method is implemented only on macOS and Linux (Wayland).
</description>
</method>
<method name="screen_get_size" qualifiers="const">
@@ -1167,20 +1175,41 @@
[b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
</description>
</method>
+ <method name="status_indicator_get_rect" qualifiers="const">
+ <return type="Rect2" />
+ <param index="0" name="id" type="int" />
+ <description>
+ Returns the rectangle for the given status indicator [param id] in screen coordinates. If the status indicator is not visible, returns an empty [Rect2].
+ [b]Note:[/b] This method is implemented on macOS and Windows.
+ </description>
+ </method>
<method name="status_indicator_set_callback">
<return type="void" />
<param index="0" name="id" type="int" />
<param index="1" name="callback" type="Callable" />
<description>
- Sets the application status indicator activation callback.
+ Sets the application status indicator activation callback. [param callback] should take two arguments: [int] mouse button index (one of [enum MouseButton] values) and [Vector2i] click position in screen coordinates.
+ [b]Note:[/b] This method is implemented on macOS and Windows.
</description>
</method>
<method name="status_indicator_set_icon">
<return type="void" />
<param index="0" name="id" type="int" />
- <param index="1" name="icon" type="Image" />
+ <param index="1" name="icon" type="Texture2D" />
<description>
Sets the application status indicator icon.
+ [b]Note:[/b] This method is implemented on macOS and Windows.
+ </description>
+ </method>
+ <method name="status_indicator_set_menu">
+ <return type="void" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="menu_rid" type="RID" />
+ <description>
+ Sets the application status indicator native popup menu.
+ [b]Note:[/b] On macOS, the menu is activated by any mouse button. Its activation callback is [i]not[/i] triggered.
+ [b]Note:[/b] On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing [kbd]Shift + F10[/kbd], or the applications key. The menu's activation callback for the other mouse buttons is still triggered.
+ [b]Note:[/b] Native popup is only supported if [NativeMenu] supports the [constant NativeMenu.FEATURE_POPUP_MENU] feature.
</description>
</method>
<method name="status_indicator_set_tooltip">
@@ -1189,6 +1218,7 @@
<param index="1" name="tooltip" type="String" />
<description>
Sets the application status indicator tooltip.
+ [b]Note:[/b] This method is implemented on macOS and Windows.
</description>
</method>
<method name="tablet_get_current_driver" qualifiers="const">
@@ -1539,7 +1569,7 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id].
+ Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id]. [param callback] should take one [PackedStringArray] argument, which is the list of dropped files.
[b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.
[b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.
</description>
@@ -1602,7 +1632,7 @@
<param index="0" name="max_size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_max_size].
+ Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_max_size].
[b]Note:[/b] It's recommended to change this value using [member Window.max_size] instead.
[b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
</description>
@@ -1612,7 +1642,7 @@
<param index="0" name="min_size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the minimum size for the given window to [param min_size] (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_min_size].
+ Sets the minimum size for the given window to [param min_size] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_min_size].
[b]Note:[/b] It's recommended to change this value using [member Window.min_size] instead.
[b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size.
[b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
@@ -2022,7 +2052,7 @@
</constant>
<constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags">
The window background can be transparent.
- [b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
+ [b]Note:[/b] This flag has no effect if [method is_window_transparency_available] returns [code]false[/code].
[b]Note:[/b] Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
</constant>
<constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags">
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 4befcf5e69..d5c2ed55d7 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -90,6 +90,12 @@
Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update.
</description>
</method>
+ <method name="popup_file_dialog">
+ <return type="void" />
+ <description>
+ Shows the [EditorFileDialog] at the default size and position for file dialogs in the editor, and selects the file name if there is a current file.
+ </description>
+ </method>
<method name="set_option_default">
<return type="void" />
<param index="0" name="option" type="int" />
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 6b25be490e..cfdc172fd1 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -28,7 +28,6 @@
</method>
</methods>
<members>
- <member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" overrides="ScrollContainer" default="true" />
<member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
</members>
<signals>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index efa881591c..4f6ef76c4c 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -78,8 +78,11 @@
<param index="0" name="property" type="String" />
<param index="1" name="editor" type="Control" />
<param index="2" name="add_to_end" type="bool" default="false" />
+ <param index="3" name="label" type="String" default="&quot;&quot;" />
<description>
Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty].
+ There can be multiple property editors for a property. If [param add_to_end] is [code]true[/code], this newly added editor will be displayed after all the other editors of the property whose [param add_to_end] is [code]false[/code]. For example, the editor uses this parameter to add an "Edit Region" button for [member Sprite2D.region_rect] below the regular [Rect2] editor.
+ [param label] can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead.
</description>
</method>
<method name="add_property_editor_for_multiple_properties">
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index e874b44cfc..89b9e7d6c2 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -727,6 +727,14 @@
Removes a callback previously added by [method add_undo_redo_inspector_hook_callback].
</description>
</method>
+ <method name="set_dock_tab_icon">
+ <return type="void" />
+ <param index="0" name="control" type="Control" />
+ <param index="1" name="icon" type="Texture2D" />
+ <description>
+ Sets the tab icon for the given control in a dock slot. Setting to [code]null[/code] removes the icon.
+ </description>
+ </method>
<method name="set_force_draw_over_forwarding_enabled">
<return type="void" />
<description>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 87ca0536b8..3e3d2205f2 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -384,15 +384,15 @@
<member name="editors/3d/selection_box_color" type="Color" setter="" getter="">
The color to use for the selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity.
</member>
+ <member name="editors/3d_gizmos/gizmo_colors/aabb" type="Color" setter="" getter="">
+ The color to use for the AABB gizmo that displays the [GeometryInstance3D]'s custom [AABB].
+ </member>
<member name="editors/3d_gizmos/gizmo_colors/instantiated" type="Color" setter="" getter="">
The color override to use for 3D editor gizmos if the [Node3D] in question is part of an instantiated scene file (from the perspective of the current scene).
</member>
<member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
The 3D editor gizmo color for [Joint3D]s and [PhysicalBone3D]s.
</member>
- <member name="editors/3d_gizmos/gizmo_colors/shape" type="Color" setter="" getter="">
- The 3D editor gizmo color for [CollisionShape3D]s, [VehicleWheel3D]s, [RayCast3D]s and [SpringArm3D]s.
- </member>
<member name="editors/animation/autorename_animation_tracks" type="bool" setter="" getter="">
If [code]true[/code], automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock.
</member>
@@ -632,6 +632,9 @@
If set to [b]Auto[/b], the editor scale is automatically determined based on the screen resolution and reported display DPI. This heuristic is not always ideal, which means you can get better results by setting the editor scale manually.
If set to [b]Custom[/b], the scaling value in [member interface/editor/custom_display_scale] will be used.
</member>
+ <member name="interface/editor/dock_tab_style" type="int" setter="" getter="">
+ Tab style of editor docks.
+ </member>
<member name="interface/editor/editor_language" type="String" setter="" getter="">
The language to use for the editor interface.
Translations are provided by the community. If you spot a mistake, [url=$DOCS_URL/contributing/documentation/editor_and_docs_localization.html]contribute to editor translations on Weblate![/url]
@@ -646,6 +649,9 @@
<member name="interface/editor/font_antialiasing" type="int" setter="" getter="">
FreeType's font anti-aliasing mode used to render the editor fonts. Most fonts are not designed to look good with anti-aliasing disabled, so it's recommended to leave this enabled unless you're using a pixel art font.
</member>
+ <member name="interface/editor/font_disable_embedded_bitmaps" type="bool" setter="" getter="">
+ If set to [code]true[/code], embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
+ </member>
<member name="interface/editor/font_hinting" type="int" setter="" getter="">
The font hinting mode to use for the editor fonts. FreeType supports the following font hinting modes:
- [b]None:[/b] Don't use font hinting when rasterizing the font. This results in a smooth font, but it can look blurry.
@@ -656,6 +662,9 @@
<member name="interface/editor/font_subpixel_positioning" type="int" setter="" getter="">
The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. [b]Disabled[/b] is the fastest to render and uses the least memory. [b]Auto[/b] only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). [b]One Half of a Pixel[/b] and [b]One Quarter of a Pixel[/b] force the same subpixel positioning mode for all editor fonts, regardless of their size (with [b]One Quarter of a Pixel[/b] being the highest-quality option).
</member>
+ <member name="interface/editor/import_resources_when_unfocused" type="bool" setter="" getter="">
+ If [code]true[/code], (re)imports resources even if the editor window is unfocused or minimized. If [code]false[/code], resources are only (re)imported when the editor window is focused. This can be set to [code]true[/code] to speed up iteration by starting the import process earlier when saving files in the project folder. This also allows getting visual feedback on changes without having to click the editor window, which is useful with multi-monitor setups. The downside of setting this to [code]true[/code] is that it increases idle CPU usage and may steal CPU time from other applications when importing resources.
+ </member>
<member name="interface/editor/localize_settings" type="bool" setter="" getter="">
If [code]true[/code], setting names in the editor are localized when possible.
[b]Note:[/b] This setting affects most [EditorInspector]s in the editor UI, primarily Project Settings and Editor Settings. To control names displayed in the Inspector dock, use [member interface/inspector/default_property_name_style] instead.
@@ -744,6 +753,10 @@
- [b]Localized:[/b] Displays the localized string for the current editor language if a translation is available for the given property. If no translation is available, falls back to [b]Capitalized[/b].
[b]Note:[/b] To display translated setting names in Project Settings and Editor Settings, use [member interface/editor/localize_settings] instead.
</member>
+ <member name="interface/inspector/delimitate_all_container_and_resources" type="bool" setter="" getter="">
+ If [code]true[/code], add a margin around Array, Dictionary, and Resource Editors that are not already colored.
+ [b]Note:[/b] If [member interface/inspector/nested_color_mode] is set to [b]Containers &amp; Resources[/b] this parameter will have no effect since those editors will already be colored
+ </member>
<member name="interface/inspector/disable_folding" type="bool" setter="" getter="">
If [code]true[/code], forces all property groups to be expanded in the Inspector dock and prevents collapsing them.
</member>
@@ -759,6 +772,12 @@
<member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
The number of [Array] or [Dictionary] items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor.
</member>
+ <member name="interface/inspector/nested_color_mode" type="int" setter="" getter="">
+ Control which property editors are colored when they are opened.
+ - [b]Containers &amp; Resources:[/b] Color all Array, Dictionary, and Resource Editors.
+ - [b]Resources:[/b] Color all Resource Editors.
+ - [b]External Resources:[/b] Color Resource Editors that edits an external resource.
+ </member>
<member name="interface/inspector/open_resources_in_current_inspector" type="bool" setter="" getter="">
If [code]true[/code], subresources can be edited in the current inspector view. If the resource type is defined in [member interface/inspector/resources_to_open_in_new_inspector] or if this setting is [code]false[/code], attempting to edit a subresource always opens a new inspector view.
</member>
@@ -866,8 +885,16 @@
Specify the multiplier to apply to the scale for the editor gizmo handles to improve usability on touchscreen devices.
[b]Note:[/b] Defaults to [code]1[/code] on non-touchscreen devices.
</member>
+ <member name="network/connection/engine_version_update_mode" type="int" setter="" getter="">
+ Specifies how the engine should check for updates.
+ - [b]Disable Update Checks[/b] will block the engine from checking updates (see also [member network/connection/network_mode]).
+ - [b]Check Newest Preview[/b] (default for preview versions) will check for the newest available development snapshot.
+ - [b]Check Newest Stable[/b] (default for stable versions) will check for the newest available stable version.
+ - [b]Check Newest Patch[/b] will check for the latest available stable version, but only within the same minor version. E.g. if your version is [code]4.3.stable[/code], you will be notified about [code]4.3.1.stable[/code], but not [code]4.4.stable[/code].
+ All update modes will ignore builds with different major versions (e.g. Godot 4 -&gt; Godot 5).
+ </member>
<member name="network/connection/network_mode" type="int" setter="" getter="">
- Determines whether online features are enabled in the editor, such as the Asset Library. Setting this property to "Offline" is recommended to limit editor's internet activity, especially if privacy is a concern.
+ Determines whether online features are enabled in the editor, such as the Asset Library or update checks. Disabling these online features helps alleviate privacy concerns by preventing the editor from making HTTP requests to the Godot website or third-party platforms hosting assets from the Asset Library.
</member>
<member name="network/debug/remote_host" type="String" setter="" getter="">
The address to listen to when starting the remote debugger. This can be set to [code]0.0.0.0[/code] to allow external clients to connect to the remote debugger (instead of restricting the remote debugger to connections from [code]localhost[/code]).
@@ -910,6 +937,9 @@
<member name="run/output/font_size" type="int" setter="" getter="">
The size of the font in the [b]Output[/b] panel at the bottom of the editor. This setting does not impact the font size of the script editor (see [member interface/editor/code_font_size]).
</member>
+ <member name="run/output/max_lines" type="int" setter="" getter="">
+ Maximum number of lines to show at any one time in the Output panel.
+ </member>
<member name="run/platforms/linuxbsd/prefer_wayland" type="bool" setter="" getter="">
If [code]true[/code], on Linux/BSD, the editor will check for Wayland first instead of X11 (if available).
</member>
diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml
index 6b9c0bcc76..99574da808 100644
--- a/doc/classes/FileAccess.xml
+++ b/doc/classes/FileAccess.xml
@@ -8,23 +8,23 @@
Here's a sample on how to write and read from a file:
[codeblocks]
[gdscript]
- func save(content):
+ func save_to_file(content):
var file = FileAccess.open("user://save_game.dat", FileAccess.WRITE)
file.store_string(content)
- func load():
+ func load_from_file():
var file = FileAccess.open("user://save_game.dat", FileAccess.READ)
var content = file.get_as_text()
return content
[/gdscript]
[csharp]
- public void Save(string content)
+ public void SaveToFile(string content)
{
using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Write);
file.StoreString(content);
}
- public string Load()
+ public string LoadFromFile()
{
using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Read);
string content = file.GetAsText();
@@ -190,7 +190,7 @@
<method name="get_line" qualifiers="const">
<return type="String" />
<description>
- Returns the next line of the file as a [String].
+ Returns the next line of the file as a [String]. The returned string doesn't include newline ([code]\n[/code]) or carriage return ([code]\r[/code]) characters, but does include any other leading or trailing whitespace.
Text is interpreted as being UTF-8 encoded.
</description>
</method>
@@ -324,6 +324,13 @@
Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
+ <method name="resize">
+ <return type="int" enum="Error" />
+ <param index="0" name="length" type="int" />
+ <description>
+ Resizes the file to a specified length. The file must be open in a mode that permits writing. If the file is extended, NUL characters are appended. If the file is truncated, all data from the end file to the original length of the file is lost.
+ </description>
+ </method>
<method name="seek">
<return type="void" />
<param index="0" name="position" type="int" />
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
index 9028dd4b9f..b3dc51ffaa 100644
--- a/doc/classes/FileSystemDock.xml
+++ b/doc/classes/FileSystemDock.xml
@@ -51,6 +51,11 @@
Emitted when a file is moved from [param old_file] path to [param new_file] path.
</description>
</signal>
+ <signal name="folder_color_changed">
+ <description>
+ Emitted when folders change color.
+ </description>
+ </signal>
<signal name="folder_moved">
<param index="0" name="old_folder" type="String" />
<param index="1" name="new_folder" type="String" />
diff --git a/doc/classes/FlowContainer.xml b/doc/classes/FlowContainer.xml
index 5e767acf7d..2839143960 100644
--- a/doc/classes/FlowContainer.xml
+++ b/doc/classes/FlowContainer.xml
@@ -21,6 +21,9 @@
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="FlowContainer.AlignmentMode" default="0">
The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]).
</member>
+ <member name="last_wrap_alignment" type="int" setter="set_last_wrap_alignment" getter="get_last_wrap_alignment" enum="FlowContainer.LastWrapAlignmentMode" default="0">
+ The wrap behavior of the last, partially filled row or column (must be one of [constant LAST_WRAP_ALIGNMENT_INHERIT], [constant LAST_WRAP_ALIGNMENT_BEGIN], [constant LAST_WRAP_ALIGNMENT_CENTER], or [constant LAST_WRAP_ALIGNMENT_END]).
+ </member>
<member name="reverse_fill" type="bool" setter="set_reverse_fill" getter="is_reverse_fill" default="false">
If [code]true[/code], reverses fill direction. Horizontal [FlowContainer]s will fill rows bottom to top, vertical [FlowContainer]s will fill columns right to left.
When using a vertical [FlowContainer] with a right to left [member Control.layout_direction], columns will fill left to right instead.
@@ -40,6 +43,18 @@
<constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).
</constant>
+ <constant name="LAST_WRAP_ALIGNMENT_INHERIT" value="0" enum="LastWrapAlignmentMode">
+ The last partially filled row or column will wrap aligned to the previous row or column in accordance with [member alignment].
+ </constant>
+ <constant name="LAST_WRAP_ALIGNMENT_BEGIN" value="1" enum="LastWrapAlignmentMode">
+ The last partially filled row or column will wrap aligned to the beginning of the previous row or column.
+ </constant>
+ <constant name="LAST_WRAP_ALIGNMENT_CENTER" value="2" enum="LastWrapAlignmentMode">
+ The last partially filled row or column will wrap aligned to the center of the previous row or column.
+ </constant>
+ <constant name="LAST_WRAP_ALIGNMENT_END" value="3" enum="LastWrapAlignmentMode">
+ The last partially filled row or column will wrap aligned to the end of the previous row or column.
+ </constant>
</constants>
<theme_items>
<theme_item name="h_separation" data_type="constant" type="int" default="4">
diff --git a/doc/classes/GDExtensionManager.xml b/doc/classes/GDExtensionManager.xml
index 1ecb23a03b..211bc023c0 100644
--- a/doc/classes/GDExtensionManager.xml
+++ b/doc/classes/GDExtensionManager.xml
@@ -43,7 +43,7 @@
<return type="int" enum="GDExtensionManager.LoadStatus" />
<param index="0" name="path" type="String" />
<description>
- Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED].
+ Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED].
[b]Note:[/b] You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED].
</description>
</method>
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index a7d89e8596..3c48f5ba31 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -43,7 +43,7 @@
<method name="restart">
<return type="void" />
<description>
- Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling.
+ Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling.
[b]Note:[/b] The [signal finished] signal is only emitted by [member one_shot] emitters.
</description>
</method>
diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml
index dfcf299fe6..f21696d02c 100644
--- a/doc/classes/Geometry2D.xml
+++ b/doc/classes/Geometry2D.xml
@@ -116,6 +116,7 @@
<param index="0" name="polygon" type="PackedVector2Array" />
<description>
Returns [code]true[/code] if [param polygon]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code].
+ [b]Note:[/b] Assumes a Cartesian coordinate system where [code]+x[/code] is right and [code]+y[/code] is up. If using screen coordinates ([code]+y[/code] is down), the result will need to be flipped (i.e. a [code]true[/code] result will indicate counter-clockwise).
</description>
</method>
<method name="line_intersects_line">
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index e52a3d7683..f4075af186 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -66,6 +66,7 @@
The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [member transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering.
In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in.
[b]Note:[/b] [member transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are.
+ [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, [member transparency] is ignored and is considered as always being [code]0.0[/code].
</member>
<member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0" keywords="lod_begin, hlod_begin">
Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check.
@@ -130,9 +131,11 @@
</constant>
<constant name="VISIBILITY_RANGE_FADE_SELF" value="1" enum="VisibilityRangeFadeMode">
Will fade-out itself when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
+ [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled.
</constant>
<constant name="VISIBILITY_RANGE_FADE_DEPENDENCIES" value="2" enum="VisibilityRangeFadeMode">
Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
+ [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled.
</constant>
</constants>
</class>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index ad1028d7f4..cc3acad6d6 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -267,6 +267,9 @@
</method>
</methods>
<members>
+ <member name="ignore_invalid_connection_type" type="bool" setter="set_ignore_invalid_connection_type" getter="is_ignoring_valid_connection_type" default="false">
+ If [code]true[/code], you can connect ports with different types, even if the connection was not explicitly allowed in the parent [GraphEdit].
+ </member>
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="0" />
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
The text displayed in the GraphNode's title bar.
diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml
index d150c79b78..f794853caf 100644
--- a/doc/classes/HingeJoint3D.xml
+++ b/doc/classes/HingeJoint3D.xml
@@ -53,7 +53,7 @@
<member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" default="1.0">
The lower this value, the more the rotation gets slowed down.
</member>
- <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9">
+ <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9" deprecated="This property is never set by the engine and is kept for compatibility purposes.">
</member>
<member name="angular_limit/upper" type="float" setter="set_param" getter="get_param" default="1.5708">
The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
@@ -84,7 +84,7 @@
<constant name="PARAM_LIMIT_BIAS" value="3" enum="Param">
The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
</constant>
- <constant name="PARAM_LIMIT_SOFTNESS" value="4" enum="Param">
+ <constant name="PARAM_LIMIT_SOFTNESS" value="4" enum="Param" deprecated="This property is never used by the engine and is kept for compatibility purpose.">
</constant>
<constant name="PARAM_LIMIT_RELAXATION" value="5" enum="Param">
The lower this value, the more the rotation gets slowed down.
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 119ecb7f0e..642bb76e75 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -397,11 +397,14 @@
<method name="vibrate_handheld">
<return type="void" />
<param index="0" name="duration_ms" type="int" default="500" />
+ <param index="1" name="amplitude" type="float" default="-1.0" />
<description>
+ [b]Note:[/b] While [code skip-lint]amplitude[/code] expects a value between 0 and 1, -1 does the default amplitude for the device.
Vibrate the handheld device for the specified duration in milliseconds.
[b]Note:[/b] This method is implemented on Android, iOS, and Web. It has no effect on other platforms.
[b]Note:[/b] For Android, [method vibrate_handheld] requires enabling the [code]VIBRATE[/code] permission in the export preset. Otherwise, [method vibrate_handheld] will have no effect.
[b]Note:[/b] For iOS, specifying the duration is only supported in iOS 13 and later.
+ [b]Note:[/b] For Web, the amplitude cannot be changed.
[b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support [method vibrate_handheld].
</description>
</method>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index af0a54815f..0099c76d08 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -4,7 +4,7 @@
Abstract base class for all 2D physics joints.
</brief_description>
<description>
- Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies and apply a constraint.
+ Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies ([member node_a] and [member node_b]) and apply a constraint.
</description>
<tutorials>
</tutorials>
@@ -12,7 +12,7 @@
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
- Returns the joint's [RID].
+ Returns the joint's internal [RID] from the [PhysicsServer2D].
</description>
</method>
</methods>
@@ -22,13 +22,13 @@
When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used.
</member>
<member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
- If [code]true[/code], [member node_a] and [member node_b] can not collide.
+ If [code]true[/code], the two bodies bound together do not collide with each other.
</member>
<member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath(&quot;&quot;)">
- The first body attached to the joint. Must derive from [PhysicsBody2D].
+ Path to the first body (A) attached to the joint. The node must inherit [PhysicsBody2D].
</member>
<member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath(&quot;&quot;)">
- The second body attached to the joint. Must derive from [PhysicsBody2D].
+ Path to the second body (B) attached to the joint. The node must inherit [PhysicsBody2D].
</member>
</members>
</class>
diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml
index ea0dda881a..950129806a 100644
--- a/doc/classes/Joint3D.xml
+++ b/doc/classes/Joint3D.xml
@@ -4,7 +4,7 @@
Abstract base class for all 3D physics joints.
</brief_description>
<description>
- Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies and apply a constraint.
+ Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies ([member node_a] and [member node_b]) and apply a constraint. If only one body is defined, it is attached to a fixed [StaticBody3D] without collision shapes.
</description>
<tutorials>
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/2752</link>
@@ -13,19 +13,21 @@
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
- Returns the joint's [RID].
+ Returns the joint's internal [RID] from the [PhysicsServer3D].
</description>
</method>
</methods>
<members>
<member name="exclude_nodes_from_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
- If [code]true[/code], the two bodies of the nodes are not able to collide with each other.
+ If [code]true[/code], the two bodies bound together do not collide with each other.
</member>
<member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath(&quot;&quot;)">
- The node attached to the first side (A) of the joint.
+ Path to the first node (A) attached to the joint. The node must inherit [PhysicsBody3D].
+ If left empty and [member node_b] is set, the body is attached to a fixed [StaticBody3D] without collision shapes.
</member>
<member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath(&quot;&quot;)">
- The node attached to the second side (B) of the joint.
+ Path to the second node (B) attached to the joint. The node must inherit [PhysicsBody3D].
+ If left empty and [member node_a] is set, the body is attached to a fixed [StaticBody3D] without collision shapes.
</member>
<member name="solver_priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1">
The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority.
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index c1fc49cf9f..bda5fb69de 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -199,7 +199,7 @@
</constant>
<constant name="BAKE_DISABLED" value="0" enum="BakeMode">
Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights.
- [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled).
+ [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]).
</constant>
<constant name="BAKE_STATIC" value="1" enum="BakeMode">
Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.
diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml
index 13d48d8650..6fb15e4d21 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -28,6 +28,9 @@
<member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes">
The [CameraAttributes] resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the [LightmapGI] will have banding artifacts or may have over-exposure artifacts.
</member>
+ <member name="denoiser_range" type="int" setter="set_denoiser_range" getter="get_denoiser_range" default="10">
+ The distance in pixels from which the denoiser samples. Lower values preserve more details, but may give blotchy results if the lightmap quality is not high enough. Only effective if [member use_denoiser] is [code]true[/code] and [member ProjectSettings.rendering/lightmapping/denoising/denoiser] is set to JNLM.
+ </member>
<member name="denoiser_strength" type="float" setter="set_denoiser_strength" getter="get_denoiser_strength" default="0.1">
The strength of denoising step applied to the generated lightmaps. Only effective if [member use_denoiser] is [code]true[/code] and [member ProjectSettings.rendering/lightmapping/denoising/denoiser] is set to JNLM.
</member>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 966e870940..6b5a50d97b 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -4,7 +4,7 @@
A [Resource] that contains vertex array-based geometry.
</brief_description>
<description>
- Mesh is a type of [Resource] that contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
+ Mesh is a type of [Resource] that contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. The maximum number of surfaces per mesh is [constant RenderingServer.MAX_MESH_SURFACES].
</description>
<tutorials>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/2742</link>
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index e5187cf7a1..abbb4c4eeb 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -13,6 +13,14 @@
<link title="Third Person Shooter (TPS) Demo">https://godotengine.org/asset-library/asset/2710</link>
</tutorials>
<methods>
+ <method name="bake_mesh_from_current_blend_shape_mix">
+ <return type="ArrayMesh" />
+ <param index="0" name="existing" type="ArrayMesh" default="null" />
+ <description>
+ Takes a snapshot from the current [ArrayMesh] with all blend shapes applied according to their current weights and bakes it to the provided [param existing] mesh. If no [param existing] mesh is provided a new [ArrayMesh] is created, baked and returned. Mesh surface materials are not copied.
+ [b]Performance:[/b] [Mesh] data needs to be received from the GPU, stalling the [RenderingServer] in the process.
+ </description>
+ </method>
<method name="create_convex_collision">
<return type="void" />
<param index="0" name="clean" type="bool" default="true" />
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index c5e8d8cbe7..f65e29af8e 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -29,7 +29,7 @@
<return type="int" />
<param index="0" name="name" type="String" />
<description>
- Returns the first item with the given name.
+ Returns the first item with the given name, or [code]-1[/code] if no item is found.
</description>
</method>
<method name="get_item_list" qualifiers="const">
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index 6f0561e66e..94c372106b 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -261,7 +261,7 @@
<signal name="velocity_computed">
<param index="0" name="safe_velocity" type="Vector2" />
<description>
- Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true.
+ Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is [code]true[/code] and the agent has a navigation map.
</description>
</signal>
<signal name="waypoint_reached">
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index 64ee35a84b..5f9f4991d1 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -271,7 +271,7 @@
<signal name="velocity_computed">
<param index="0" name="safe_velocity" type="Vector3" />
<description>
- Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true.
+ Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is [code]true[/code] and the agent has a navigation map.
</description>
</signal>
<signal name="waypoint_reached">
diff --git a/doc/classes/NavigationMeshSourceGeometryData2D.xml b/doc/classes/NavigationMeshSourceGeometryData2D.xml
index 609877fadc..1d8689420b 100644
--- a/doc/classes/NavigationMeshSourceGeometryData2D.xml
+++ b/doc/classes/NavigationMeshSourceGeometryData2D.xml
@@ -31,6 +31,20 @@
Adds the outline points of a shape as traversable area.
</description>
</method>
+ <method name="append_obstruction_outlines">
+ <return type="void" />
+ <param index="0" name="obstruction_outlines" type="PackedVector2Array[]" />
+ <description>
+ Appends another array of [param obstruction_outlines] at the end of the existing obstruction outlines array.
+ </description>
+ </method>
+ <method name="append_traversable_outlines">
+ <return type="void" />
+ <param index="0" name="traversable_outlines" type="PackedVector2Array[]" />
+ <description>
+ Appends another array of [param traversable_outlines] at the end of the existing traversable outlines array.
+ </description>
+ </method>
<method name="clear">
<return type="void" />
<description>
diff --git a/doc/classes/NavigationMeshSourceGeometryData3D.xml b/doc/classes/NavigationMeshSourceGeometryData3D.xml
index 322e2e7c66..0b3126a63b 100644
--- a/doc/classes/NavigationMeshSourceGeometryData3D.xml
+++ b/doc/classes/NavigationMeshSourceGeometryData3D.xml
@@ -43,6 +43,14 @@
Adds a projected obstruction shape to the source geometry. The [param vertices] are considered projected on a xz-axes plane, placed at the global y-axis [param elevation] and extruded by [param height]. If [param carve] is [code]true[/code] the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.
</description>
</method>
+ <method name="append_arrays">
+ <return type="void" />
+ <param index="0" name="vertices" type="PackedFloat32Array" />
+ <param index="1" name="indices" type="PackedInt32Array" />
+ <description>
+ Appends arrays of [param vertices] and [param indices] at the end of the existing arrays. Adds the existing index as an offset to the appended indices.
+ </description>
+ </method>
<method name="clear">
<return type="void" />
<description>
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index c490620fc0..31ce1dba4a 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -23,13 +23,6 @@
Bakes the [NavigationPolygon]. If [param on_thread] is set to [code]true[/code] (default), the baking is done on a separate thread.
</description>
</method>
- <method name="get_avoidance_layer_value" qualifiers="const">
- <return type="bool" />
- <param index="0" name="layer_number" type="int" />
- <description>
- Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
- </description>
- </method>
<method name="get_navigation_layer_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />
@@ -61,14 +54,6 @@
Returns [code]true[/code] when the [NavigationPolygon] is being baked on a background thread.
</description>
</method>
- <method name="set_avoidance_layer_value">
- <return type="void" />
- <param index="0" name="layer_number" type="int" />
- <param index="1" name="value" type="bool" />
- <description>
- Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32.
- </description>
- </method>
<method name="set_navigation_layer_value">
<return type="void" />
<param index="0" name="layer_number" type="int" />
@@ -86,12 +71,6 @@
</method>
</methods>
<members>
- <member name="avoidance_layers" type="int" setter="set_avoidance_layers" getter="get_avoidance_layers" default="1">
- A bitfield determining all avoidance layers for the avoidance constrain.
- </member>
- <member name="constrain_avoidance" type="bool" setter="set_constrain_avoidance" getter="get_constrain_avoidance" default="false" experimental="When enabled, agents are known to get stuck on the navigation polygon corners and edges, especially at a high frame rate. Not recommended for use in production at this stage.">
- If [code]true[/code] constraints avoidance agent's with an avoidance mask bit that matches with a bit of the [member avoidance_layers] to the navigation polygon. Due to each navigation polygon outline creating an obstacle and each polygon edge creating an avoidance line constrain keep the navigation polygon shape as simple as possible for performance.
- </member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Determines if the [NavigationRegion2D] is enabled or disabled.
</member>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index a6f6abccbd..a0d03d7a01 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -956,6 +956,23 @@
Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields".
</description>
</method>
+ <method name="source_geometry_parser_create">
+ <return type="RID" />
+ <description>
+ Creates a new source geometry parser. If a [Callable] is set for the parser with [method source_geometry_parser_set_callback] the callback will be called for every single node that gets parsed whenever [method parse_source_geometry_data] is used.
+ </description>
+ </method>
+ <method name="source_geometry_parser_set_callback">
+ <return type="void" />
+ <param index="0" name="parser" type="RID" />
+ <param index="1" name="callback" type="Callable" />
+ <description>
+ Sets the [param callback] [Callable] for the specific source geometry [param parser]. The [Callable] will receive a call with the following parameters:
+ - [code]navigation_mesh[/code] - The [NavigationPolygon] reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh.
+ - [code]source_geometry_data[/code] - The [NavigationMeshSourceGeometryData2D] reference. Add custom source geometry for navigation mesh baking to this object.
+ - [code]node[/code] - The [Node] that is parsed.
+ </description>
+ </method>
</methods>
<signals>
<signal name="map_changed">
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index 6fcf033544..ff3e6fd8a6 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -1103,6 +1103,23 @@
Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields".
</description>
</method>
+ <method name="source_geometry_parser_create">
+ <return type="RID" />
+ <description>
+ Creates a new source geometry parser. If a [Callable] is set for the parser with [method source_geometry_parser_set_callback] the callback will be called for every single node that gets parsed whenever [method parse_source_geometry_data] is used.
+ </description>
+ </method>
+ <method name="source_geometry_parser_set_callback">
+ <return type="void" />
+ <param index="0" name="parser" type="RID" />
+ <param index="1" name="callback" type="Callable" />
+ <description>
+ Sets the [param callback] [Callable] for the specific source geometry [param parser]. The [Callable] will receive a call with the following parameters:
+ - [code]navigation_mesh[/code] - The [NavigationMesh] reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh.
+ - [code]source_geometry_data[/code] - The [NavigationMeshSourceGeometryData3D] reference. Add custom source geometry for navigation mesh baking to this object.
+ - [code]node[/code] - The [Node] that is parsed.
+ </description>
+ </method>
</methods>
<signals>
<signal name="avoidance_debug_changed">
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index aea4082dbe..176bdea4a1 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -619,6 +619,12 @@
[method request_ready] resets it back to [code]false[/code].
</description>
</method>
+ <method name="is_part_of_edited_scene" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the node is part of the scene currently opened in the editor.
+ </description>
+ </method>
<method name="is_physics_interpolated" qualifiers="const">
<return type="bool" />
<description>
@@ -970,8 +976,8 @@
</methods>
<members>
<member name="auto_translate_mode" type="int" setter="set_auto_translate_mode" getter="get_auto_translate_mode" enum="Node.AutoTranslateMode" default="0">
- Defines if any text should automatically change to its translated version depending on the current locale (for nodes such as [Label], [RichTextLabel], [Window], etc.). See [enum AutoTranslateMode].
- Also decides if the node's strings should be parsed for POT generation.
+ Defines if any text should automatically change to its translated version depending on the current locale (for nodes such as [Label], [RichTextLabel], [Window], etc.). Also decides if the node's strings should be parsed for POT generation.
+ [b]Note:[/b] For the root node, auto translate mode can also be set via [member ProjectSettings.internationalization/rendering/root_node_auto_translate].
</member>
<member name="editor_description" type="String" setter="set_editor_description" getter="get_editor_description" default="&quot;&quot;">
An optional description to the node. It will be displayed as a tooltip when hovering over the node in the editor's Scene dock.
@@ -985,7 +991,7 @@
[b]Note:[/b] When changing the name, the following characters will be replaced with an underscore: ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]"[/code] [code]%[/code]). In particular, the [code]@[/code] character is reserved for auto-generated names. See also [method String.validate_node_name].
</member>
<member name="owner" type="Node" setter="set_owner" getter="get_owner">
- The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a [PackedScene], all the nodes it owns are also saved with it.
+ The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a [PackedScene], all the nodes it owns are also saved with it.
[b]Note:[/b] In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will [b]not[/b] be saved. To prevent this, remember to set the owner after calling [method add_child]. See also (see [member unique_name_in_owner])
</member>
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" enum="Node.PhysicsInterpolationMode" default="0">
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 091acdf6f2..851290de7b 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -44,7 +44,8 @@
<return type="void" />
<param index="0" name="point" type="Vector2" />
<description>
- Rotates the node so it points towards the [param point], which is expected to use global coordinates.
+ Rotates the node so that its local +X axis points towards the [param point], which is expected to use global coordinates.
+ [param point] should not be the same as the node's position, otherwise the node always looks to the right.
</description>
</method>
<method name="move_local_x">
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index f294b64576..b4969b8906 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -30,7 +30,7 @@
[/codeblock]
Node paths cannot check whether they are valid and may point to nodes or properties that do not exist. Their meaning depends entirely on the context in which they're used.
You usually do not have to worry about the [NodePath] type, as strings are automatically converted to the type when necessary. There are still times when defining node paths is useful. For example, exported [NodePath] properties allow you to easily select any node within the currently edited scene. They are also automatically updated when moving, renaming or deleting nodes in the scene tree editor. See also [annotation @GDScript.@export_node_path].
- See also [StringName], which is a similar type designed for optimised strings.
+ See also [StringName], which is a similar type designed for optimized strings.
[b]Note:[/b] In a boolean context, a [NodePath] will evaluate to [code]false[/code] if it is empty ([code]NodePath("")[/code]). Otherwise, a [NodePath] will always evaluate to [code]true[/code].
</description>
<tutorials>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index de39901133..7c69bc6ed2 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -189,26 +189,26 @@
for argument in OS.get_cmdline_args():
if argument.contains("="):
var key_value = argument.split("=")
- arguments[key_value[0].lstrip("--")] = key_value[1]
+ arguments[key_value[0].trim_prefix("--")] = 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("--")] = ""
+ arguments[argument.trim_prefix("--")] = ""
[/gdscript]
[csharp]
- var arguments = new Godot.Collections.Dictionary();
+ var arguments = new Dictionary&lt;string, string&gt;();
foreach (var argument in OS.GetCmdlineArgs())
{
if (argument.Contains('='))
{
string[] keyValue = argument.Split("=");
- arguments[keyValue[0].LStrip("--")] = keyValue[1];
+ arguments[keyValue[0].TrimPrefix("--")] = 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("--")] = "";
+ arguments[argument.TrimPrefix("--")] = "";
}
}
[/csharp]
@@ -408,11 +408,20 @@
[b]Note:[/b] On Web platforms, it is still possible to determine the host platform's OS with feature tags. See [method has_feature].
</description>
</method>
+ <method name="get_process_exit_code" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="pid" type="int" />
+ <description>
+ Returns the exit code of a spawned process once it has finished running (see [method is_process_running]).
+ Returns [code]-1[/code] if the [param pid] is not a PID of a spawned child process, the process is still running, or the method is not implemented for the current platform.
+ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="get_process_id" qualifiers="const">
<return type="int" />
<description>
Returns the number used by the host machine to uniquely identify this application.
- [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS, and Windows.
</description>
</method>
<method name="get_processor_count" qualifiers="const">
@@ -592,7 +601,7 @@
<param index="0" name="pid" type="int" />
<description>
Returns [code]true[/code] if the child process ID ([param pid]) is still running or [code]false[/code] if it has terminated. [param pid] must be a valid ID generated from [method create_process].
- [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ [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">
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index c508591093..b0dec2d00a 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -357,7 +357,7 @@
<param index="0" name="signal" type="String" />
<param index="1" name="arguments" type="Array" default="[]" />
<description>
- Adds a user-defined [param signal]. Optional arguments for the signal can be added as an [Array] of dictionaries, each defining a [code]name[/code] [String] and a [code]type[/code] [int] (see [enum Variant.Type]). See also [method has_user_signal].
+ Adds a user-defined [param signal]. Optional arguments for the signal can be added as an [Array] of dictionaries, each defining a [code]name[/code] [String] and a [code]type[/code] [int] (see [enum Variant.Type]). See also [method has_user_signal] and [method remove_user_signal].
[codeblocks]
[gdscript]
add_user_signal("hurt", [
@@ -797,7 +797,7 @@
<return type="bool" />
<param index="0" name="signal" type="StringName" />
<description>
- Returns [code]true[/code] if the given user-defined [param signal] name exists. Only signals added with [method add_user_signal] are included.
+ Returns [code]true[/code] if the given user-defined [param signal] name exists. Only signals added with [method add_user_signal] are included. See also [method remove_user_signal].
</description>
</method>
<method name="is_blocking_signals" qualifiers="const">
@@ -905,6 +905,13 @@
[b]Note:[/b] Metadata that has a name starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.
</description>
</method>
+ <method name="remove_user_signal">
+ <return type="void" />
+ <param index="0" name="signal" type="StringName" />
+ <description>
+ Removes the given user signal [param signal] from the object. See also [method add_user_signal] and [method has_user_signal].
+ </description>
+ </method>
<method name="set">
<return type="void" />
<param index="0" name="property" type="StringName" />
@@ -1027,6 +1034,7 @@
Translates a [param message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. Note that most [Control] nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text.
If [method can_translate_messages] is [code]false[/code], or no translation is available, this method returns the [param message] without changes. See [method set_message_translation].
For detailed examples, see [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url].
+ [b]Note:[/b] This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate].
</description>
</method>
<method name="tr_n" qualifiers="const">
@@ -1041,6 +1049,7 @@
The [param n] is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language.
For detailed examples, see [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url].
[b]Note:[/b] Negative and [float] numbers may not properly apply to some countable subjects. It's recommended to handle these cases with [method tr].
+ [b]Note:[/b] This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate_plural].
</description>
</method>
</methods>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 579b4c5b9f..26d8fa8d5f 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -99,14 +99,14 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="Node" />
<description>
- Pack will ignore any sub-nodes not owned by given node. See [member Node.owner].
+ Packs the [param path] node, and all owned sub-nodes, into this [PackedScene]. Any existing data will be cleared. See [member Node.owner].
</description>
</method>
</methods>
<members>
<member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{ &quot;conn_count&quot;: 0, &quot;conns&quot;: PackedInt32Array(), &quot;editable_instances&quot;: [], &quot;names&quot;: PackedStringArray(), &quot;node_count&quot;: 0, &quot;node_paths&quot;: [], &quot;nodes&quot;: PackedInt32Array(), &quot;variants&quot;: [], &quot;version&quot;: 3 }">
A dictionary representation of the scene contents.
- Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
+ Available keys include "names" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
</member>
</members>
<constants>
diff --git a/doc/classes/PackedVector4Array.xml b/doc/classes/PackedVector4Array.xml
new file mode 100644
index 0000000000..fd0cfeb74b
--- /dev/null
+++ b/doc/classes/PackedVector4Array.xml
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedVector4Array" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A packed array of [Vector4]s.
+ </brief_description>
+ <description>
+ An array specifically designed to hold [Vector4]. Packs data tightly, so it saves memory for large array sizes.
+ [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
+ </description>
+ <tutorials>
+ </tutorials>
+ <constructors>
+ <constructor name="PackedVector4Array">
+ <return type="PackedVector4Array" />
+ <description>
+ Constructs an empty [PackedVector4Array].
+ </description>
+ </constructor>
+ <constructor name="PackedVector4Array">
+ <return type="PackedVector4Array" />
+ <param index="0" name="from" type="PackedVector4Array" />
+ <description>
+ Constructs a [PackedVector4Array] as a copy of the given [PackedVector4Array].
+ </description>
+ </constructor>
+ <constructor name="PackedVector4Array">
+ <return type="PackedVector4Array" />
+ <param index="0" name="from" type="Array" />
+ <description>
+ Constructs a new [PackedVector4Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ [b]Note:[/b] When initializing a [PackedVector4Array] with elements, it must be initialized with an [Array] of [Vector4] values:
+ [codeblock]
+ var array = PackedVector4Array([Vector4(12, 34, 56, 78), Vector4(90, 12, 34, 56)])
+ [/codeblock]
+ </description>
+ </constructor>
+ </constructors>
+ <methods>
+ <method name="append">
+ <return type="bool" />
+ <param index="0" name="value" type="Vector4" />
+ <description>
+ Appends an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <return type="void" />
+ <param index="0" name="array" type="PackedVector4Array" />
+ <description>
+ Appends a [PackedVector4Array] at the end of this array.
+ </description>
+ </method>
+ <method name="bsearch">
+ <return type="int" />
+ <param index="0" name="value" type="Vector4" />
+ <param index="1" name="before" type="bool" default="true" />
+ <description>
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
+ [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector4" />
+ <description>
+ Returns the number of times an element is in the array.
+ [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
+ </description>
+ </method>
+ <method name="duplicate">
+ <return type="PackedVector4Array" />
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="fill">
+ <return type="void" />
+ <param index="0" name="value" type="Vector4" />
+ <description>
+ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
+ </description>
+ </method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector4" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
+ </description>
+ </method>
+ <method name="has" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="value" type="Vector4" />
+ <description>
+ Returns [code]true[/code] if the array contains [param value].
+ [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="Vector4" />
+ <description>
+ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ </description>
+ </method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="push_back">
+ <return type="bool" />
+ <param index="0" name="value" type="Vector4" />
+ <description>
+ Inserts a [Vector4] at the end.
+ </description>
+ </method>
+ <method name="remove_at">
+ <return type="void" />
+ <param index="0" name="index" type="int" />
+ <description>
+ Removes an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <return type="int" />
+ <param index="0" name="new_size" type="int" />
+ <description>
+ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
+ </description>
+ </method>
+ <method name="reverse">
+ <return type="void" />
+ <description>
+ Reverses the order of the elements in the array.
+ </description>
+ </method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector4" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
+ [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
+ </description>
+ </method>
+ <method name="set">
+ <return type="void" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="Vector4" />
+ <description>
+ Changes the [Vector4] at the given index.
+ </description>
+ </method>
+ <method name="size" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the number of elements in the array.
+ </description>
+ </method>
+ <method name="slice" qualifiers="const">
+ <return type="PackedVector4Array" />
+ <param index="0" name="begin" type="int" />
+ <param index="1" name="end" type="int" default="2147483647" />
+ <description>
+ Returns the slice of the [PackedVector4Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector4Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ </description>
+ </method>
+ <method name="sort">
+ <return type="void" />
+ <description>
+ Sorts the elements of the array in ascending order.
+ [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
+ </description>
+ </method>
+ <method name="to_byte_array" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Returns a [PackedByteArray] with each vector encoded as bytes.
+ </description>
+ </method>
+ </methods>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <param index="0" name="right" type="PackedVector4Array" />
+ <description>
+ Returns [code]true[/code] if contents of the arrays differ.
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="PackedVector4Array" />
+ <param index="0" name="right" type="PackedVector4Array" />
+ <description>
+ Returns a new [PackedVector4Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <param index="0" name="right" type="PackedVector4Array" />
+ <description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector4]s at the corresponding indices.
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Vector4" />
+ <param index="0" name="index" type="int" />
+ <description>
+ Returns the [Vector4] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
+ </description>
+ </operator>
+ </operators>
+</class>
diff --git a/doc/classes/ParticleProcessMaterial.xml b/doc/classes/ParticleProcessMaterial.xml
index 8d0ae317b9..1502690b45 100644
--- a/doc/classes/ParticleProcessMaterial.xml
+++ b/doc/classes/ParticleProcessMaterial.xml
@@ -185,6 +185,7 @@
</member>
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
The box's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX].
+ [b]Note:[/b] [member emission_box_extents] starts from the center point and applies the X, Y, and Z values in both directions. The size is twice the area of the extents.
</member>
<member name="emission_color_texture" type="Texture2D" setter="set_emission_color_texture" getter="get_emission_color_texture">
Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture].
diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml
index 1601a1040e..03cbfb4ce7 100644
--- a/doc/classes/PhysicsMaterial.xml
+++ b/doc/classes/PhysicsMaterial.xml
@@ -14,7 +14,7 @@
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
- [b]Note:[/b] Even with [member bounce] set to [code]1.0[/code], some energy will be lost over time due to linear and angular damping. To have a [PhysicsBody3D] that preserves all its energy over time, set [member bounce] to [code]1.0[/code], the body's linear damp mode to [b]Replace[/b] (if applicable), its linear damp to [code]0.0[/code], its angular damp mode to [b]Replace[/b] (if applicable), and its angular damp to [code]0.0[/code].
+ [b]Note:[/b] Even with [member bounce] set to [code]1.0[/code], some energy will be lost over time due to linear and angular damping. To have a physics body that preserves all its energy over time, set [member bounce] to [code]1.0[/code], the body's linear damp mode to [b]Replace[/b] (if applicable), its linear damp to [code]0.0[/code], its angular damp mode to [b]Replace[/b] (if applicable), and its angular damp to [code]0.0[/code].
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0">
The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction).
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index d40326fa21..c0672cc503 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -52,7 +52,8 @@
<method name="area_create">
<return type="RID" />
<description>
- Creates a 2D area object in the physics server, and returns the [RID] that identifies it. Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space.
+ Creates a 2D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and [code]monitorable[/code] set to [code]false[/code].
+ Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable].
</description>
</method>
<method name="area_get_canvas_instance_id" qualifiers="const">
@@ -369,7 +370,8 @@
<method name="body_create">
<return type="RID" />
<description>
- Creates a 2D body object in the physics server, and returns the [RID] that identifies it. Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.
+ Creates a 2D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and body mode set to [constant BODY_MODE_RIGID].
+ Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.
</description>
</method>
<method name="body_get_canvas_instance_id" qualifiers="const">
diff --git a/doc/classes/PhysicsServer2DExtension.xml b/doc/classes/PhysicsServer2DExtension.xml
index 815fc742d1..41826ea7c2 100644
--- a/doc/classes/PhysicsServer2DExtension.xml
+++ b/doc/classes/PhysicsServer2DExtension.xml
@@ -185,7 +185,7 @@
<param index="1" name="pickable" type="bool" />
<description>
If set to [code]true[/code], allows the area with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it.
- Overridable version of [PhysicsServer2D]'s internal [code]area_set_pickable[/code] method. Corresponds to [member PhysicsBody2D.input_pickable].
+ Overridable version of [PhysicsServer2D]'s internal [code]area_set_pickable[/code] method. Corresponds to [member CollisionObject2D.input_pickable].
</description>
</method>
<method name="_area_set_shape" qualifiers="virtual">
@@ -650,7 +650,7 @@
<param index="1" name="pickable" type="bool" />
<description>
If set to [code]true[/code], allows the body with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it.
- Overridable version of [PhysicsServer2D]'s internal [code]body_set_pickable[/code] method. Corresponds to [member PhysicsBody2D.input_pickable].
+ Overridable version of [PhysicsServer2D]'s internal [code]body_set_pickable[/code] method. Corresponds to [member CollisionObject2D.input_pickable].
</description>
</method>
<method name="_body_set_shape" qualifiers="virtual">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 4a4a1ad025..e835724e36 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -44,7 +44,8 @@
<method name="area_create">
<return type="RID" />
<description>
- Creates an [Area3D].
+ Creates a 3D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and [code]monitorable[/code] set to [code]false[/code].
+ Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable].
</description>
</method>
<method name="area_get_collision_layer" qualifiers="const">
@@ -351,6 +352,8 @@
<method name="body_create">
<return type="RID" />
<description>
+ Creates a 3D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and body mode set to [constant BODY_MODE_RIGID].
+ Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.
</description>
</method>
<method name="body_get_collision_layer" qualifiers="const">
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index c435f3d291..29b44a98f2 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -23,9 +23,4 @@
</description>
</signal>
</signals>
- <theme_items>
- <theme_item name="panel" data_type="style" type="StyleBox">
- Default [StyleBox] for the [Popup].
- </theme_item>
- </theme_items>
</class>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 7831ebd1b9..0f5687f091 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -768,6 +768,9 @@
<theme_item name="labeled_separator_right" data_type="style" type="StyleBox">
[StyleBox] for the right side of labeled separator. See [method add_separator].
</theme_item>
+ <theme_item name="panel" data_type="style" type="StyleBox">
+ [StyleBox] for the the background panel.
+ </theme_item>
<theme_item name="separator" data_type="style" type="StyleBox">
[StyleBox] used for the separators. See [method add_separator].
</theme_item>
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
index b86972e8af..399e285402 100644
--- a/doc/classes/PopupPanel.xml
+++ b/doc/classes/PopupPanel.xml
@@ -8,4 +8,9 @@
</description>
<tutorials>
</tutorials>
+ <theme_items>
+ <theme_item name="panel" data_type="style" type="StyleBox">
+ [StyleBox] for the the background panel.
+ </theme_item>
+ </theme_items>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index a5aeee5bc4..32e71ce030 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -254,6 +254,7 @@
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].
[b]Note:[/b] The only supported format is PNG. Using another image format will result in an error.
+ [b]Note:[/b] The image will also show when opening the project in the editor. If you want to display the default splash image in the editor, add an empty override for [code]editor_hint[/code] feature.
</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.
@@ -343,7 +344,7 @@
This setting can be overridden using the [code]--frame-delay &lt;ms;&gt;[/code] command line argument.
</member>
<member name="application/run/low_processor_mode" type="bool" setter="" getter="" default="false">
- If [code]true[/code], enables low-processor usage mode. This setting only works on desktop platforms. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games.
+ If [code]true[/code], enables low-processor usage mode. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games.
</member>
<member name="application/run/low_processor_mode_sleep_usec" type="int" setter="" getter="" default="6900">
Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
@@ -488,6 +489,9 @@
<member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings.
</member>
+ <member name="debug/gdscript/warnings/enum_variable_without_default" type="int" setter="" getter="" default="1">
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a variable has an enum type but no explicit default value, but only if the enum does not contain [code]0[/code] as a valid value.
+ </member>
<member name="debug/gdscript/warnings/exclude_addons" type="bool" setter="" getter="" default="true">
If [code]true[/code], scripts in the [code]res://addons[/code] folder will not generate warnings.
</member>
@@ -550,10 +554,10 @@
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when defining a local or subclass member variable that would shadow a variable that is inherited from a parent class.
</member>
<member name="debug/gdscript/warnings/standalone_expression" type="int" setter="" getter="" default="1">
- When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling an expression that may have no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement.
</member>
<member name="debug/gdscript/warnings/standalone_ternary" type="int" setter="" getter="" default="1">
- When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a ternary expression that may have no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement.
</member>
<member name="debug/gdscript/warnings/static_called_on_instance" type="int" setter="" getter="" default="1">
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a static method from an instance of a class instead of from the class directly.
@@ -637,6 +641,9 @@
<member name="debug/shader_language/warnings/formatting_error" type="bool" setter="" getter="" default="true">
When set to [code]true[/code], produces a warning upon encountering certain formatting errors. Currently this only checks for empty statements. More formatting errors may be added over time.
</member>
+ <member name="debug/shader_language/warnings/magic_position_write" type="bool" setter="" getter="" default="true">
+ When set to [code]true[/code], produces a warning when the shader contains [code]POSITION = vec4(vertex,[/code] as this was very common code written in Godot 4.2 and earlier that was paired with a QuadMesh to produce a full screen post processes pass. With the switch to reversed z in 4.3, this trick no longer works, as it implicitly relied on the [code]VERTEX.z[/code] being 0.
+ </member>
<member name="debug/shader_language/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false">
When set to [code]true[/code], warnings are treated as errors.
</member>
@@ -791,8 +798,8 @@
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
</member>
- <member name="display/window/energy_saving/keep_screen_on.editor" type="bool" setter="" getter="" default="false">
- Editor-only override for [member display/window/energy_saving/keep_screen_on]. Does not affect exported projects in debug or release mode.
+ <member name="display/window/energy_saving/keep_screen_on.editor_hint" type="bool" setter="" getter="" default="false">
+ Editor-only override for [member display/window/energy_saving/keep_screen_on]. Does not affect running project.
</member>
<member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0">
The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values.
@@ -895,8 +902,9 @@
<member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1">
Sets the V-Sync mode for the main game window. The editor's own V-Sync mode can be set using [member EditorSettings.interface/editor/vsync_mode].
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 [b]Enabled[/b] if the desired mode is not supported.
- [b]Note:[/b] V-Sync modes other than [b]Enabled[/b] are only supported in the Forward+ and Mobile rendering methods, not Compatibility.
+ Depending on the platform and rendering method, the engine will fall back to [b]Enabled[/b] if the desired mode is not supported.
+ V-Sync can be disabled on the command line using the [code]--disable-vsync[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
+ [b]Note:[/b] The [b]Adaptive[/b] and [b]Mailbox[/b] V-Sync modes are only supported in the Forward+ and Mobile rendering methods, not Compatibility.
[b]Note:[/b] This property is only read when the project starts. To change the V-Sync mode at runtime, call [method DisplayServer.window_set_vsync_mode] instead.
</member>
<member name="dotnet/project/assembly_name" type="String" setter="" getter="" default="&quot;&quot;">
@@ -1065,6 +1073,9 @@
<member name="gui/timers/tooltip_delay_sec" type="float" setter="" getter="" default="0.5">
Default delay for tooltips (in seconds).
</member>
+ <member name="gui/timers/tooltip_delay_sec.editor_hint" type="float" setter="" getter="" default="0.5">
+ Delay for tooltips in the editor.
+ </member>
<member name="input/ui_accept" type="Dictionary" setter="" getter="">
Default [InputEventAction] to confirm a focused button, menu or list item, or validate input.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -1436,6 +1447,10 @@
<member name="internationalization/rendering/force_right_to_left_layout_direction" type="bool" setter="" getter="" default="false">
Force layout direction and text writing direction to RTL for all controls.
</member>
+ <member name="internationalization/rendering/root_node_auto_translate" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], root node will use [constant Node.AUTO_TRANSLATE_MODE_ALWAYS], otherwise [constant Node.AUTO_TRANSLATE_MODE_DISABLED] will be used.
+ [b]Note:[/b] This property is only read when the project starts. To change the auto translate mode at runtime, set [member Node.auto_translate_mode] of [member SceneTree.root] instead.
+ </member>
<member name="internationalization/rendering/root_node_layout_direction" type="int" setter="" getter="" default="0">
Root node default layout direction.
</member>
@@ -2699,8 +2714,8 @@
<member name="rendering/renderer/rendering_method.web" type="String" setter="" getter="" default="&quot;gl_compatibility&quot;">
Override for [member rendering/renderer/rendering_method] on web.
</member>
- <member name="rendering/rendering_device/d3d12/agility_sdk_version" type="int" setter="" getter="" default="610">
- Version code of the Direct3D 12 Agility SDK to use ([code]D3D12SDKVersion[/code]).
+ <member name="rendering/rendering_device/d3d12/agility_sdk_version" type="int" setter="" getter="" default="613">
+ Version code of the [url=https://devblogs.microsoft.com/directx/directx12agility/]Direct3D 12 Agility SDK[/url] to use ([code]D3D12SDKVersion[/code]). This must match the [i]minor[/i] version that is installed next to the editor binary and in the export templates directory for the current editor version. For example, if you have [code]1.613.3[/code] installed, you need to input [code]613[/code] here.
</member>
<member name="rendering/rendering_device/d3d12/max_misc_descriptors_per_frame" type="int" setter="" getter="" default="512">
The number of entries in the miscellaneous descriptors heap the Direct3D 12 rendering driver uses each frame, used for various operations like clearing a texture.
@@ -2886,6 +2901,9 @@
<member name="xr/openxr/extensions/eye_gaze_interaction" type="bool" setter="" getter="" default="false">
Specify whether to enable eye tracking for this project. Depending on the platform, additional export configuration may be needed.
</member>
+ <member name="xr/openxr/extensions/hand_interaction_profile" type="bool" setter="" getter="" default="false">
+ If true the hand interaction profile extension will be activated if supported by the platform.
+ </member>
<member name="xr/openxr/extensions/hand_tracking" type="bool" setter="" getter="" default="true">
If true we enable the hand tracking extension if available.
</member>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 0471d73749..ba7dcab2d7 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -89,13 +89,13 @@
var rect = Rect2(0, 0, 5, 2)
rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2)
- rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 10, 5)
+ rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 15, 5)
[/gdscript]
[csharp]
var rect = new Rect2(0, 0, 5, 2);
rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2)
- rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 10, 5)
+ rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 15, 5)
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index c021a1be26..cbd09f8430 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -88,13 +88,13 @@
var rect = Rect2i(0, 0, 5, 2)
rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2)
- rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 10, 5)
+ rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 15, 5)
[/gdscript]
[csharp]
var rect = new Rect2I(0, 0, 5, 2);
rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2)
- rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 10, 5)
+ rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 15, 5)
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index d7a659c255..3c9f0fc7af 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -92,13 +92,13 @@
Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene.
The normalization factor can be calculated from exposure value (EV100) as follows:
[codeblock]
- func get_exposure_normalization(float ev100):
- return 1.0 / (pow(2.0, ev100) * 1.2)
+ func get_exposure_normalization(ev100: float):
+ return 1.0 / (pow(2.0, ev100) * 1.2)
[/codeblock]
The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows:
[codeblock]
- func get_exposure(float aperture, float shutter_speed, float sensitivity):
- return log2((aperture * aperture) / shutterSpeed * (100.0 / sensitivity))
+ func get_exposure(aperture: float, shutter_speed: float, sensitivity: float):
+ return log((aperture * aperture) / shutter_speed * (100.0 / sensitivity)) / log(2)
[/codeblock]
</description>
</method>
@@ -214,6 +214,7 @@
<param index="1" name="pos" type="Vector2" />
<param index="2" name="radius" type="float" />
<param index="3" name="color" type="Color" />
+ <param index="4" name="antialiased" type="bool" default="false" />
<description>
Draws a circle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_circle].
</description>
@@ -280,6 +281,7 @@
<param index="1" name="points" type="PackedVector2Array" />
<param index="2" name="colors" type="PackedColorArray" />
<param index="3" name="width" type="float" default="-1.0" />
+ <param index="4" name="antialiased" type="bool" default="false" />
<description>
Draws a 2D multiline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multiline] and [method CanvasItem.draw_multiline_colors].
</description>
@@ -356,6 +358,7 @@
<param index="0" name="item" type="RID" />
<param index="1" name="rect" type="Rect2" />
<param index="2" name="color" type="Color" />
+ <param index="3" name="antialiased" type="bool" default="false" />
<description>
Draws a rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_rect].
</description>
@@ -634,7 +637,7 @@
<param index="1" name="transform" type="Transform2D" />
<description>
Transforms both the current and previous stored transform for a canvas item.
- This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilising a shifting origin.
+ This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.
</description>
</method>
<method name="canvas_light_attach_to_canvas">
@@ -730,7 +733,7 @@
<param index="1" name="transform" type="Transform2D" />
<description>
Transforms both the current and previous stored transform for a light occluder.
- This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilising a shifting origin.
+ This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.
</description>
</method>
<method name="canvas_light_reset_physics_interpolation">
@@ -901,7 +904,7 @@
<param index="1" name="transform" type="Transform2D" />
<description>
Transforms both the current and previous stored transform for a canvas light.
- This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilising a shifting origin.
+ This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilizing a shifting origin.
</description>
</method>
<method name="canvas_occluder_polygon_create">
@@ -1979,6 +1982,12 @@
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
+ <method name="is_on_render_thread">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if our code is currently executing on the rendering thread.
+ </description>
+ </method>
<method name="light_directional_set_blend_splits">
<return type="void" />
<param index="0" name="light" type="RID" />
@@ -4030,6 +4039,15 @@
The texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE]. Equivalent to [member ProjectSettings.rendering/vrs/texture].
</description>
</method>
+ <method name="viewport_set_vrs_update_mode">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.ViewportVRSUpdateMode" />
+ <description>
+ Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored.
+ If set to [constant RenderingServer.VIEWPORT_VRS_UPDATE_ONCE], the input texture is copied once and the mode is changed to [constant RenderingServer.VIEWPORT_VRS_UPDATE_DISABLED].
+ </description>
+ </method>
<method name="visibility_notifier_create">
<return type="RID" />
<description>
@@ -4221,6 +4239,9 @@
<constant name="MAX_2D_DIRECTIONAL_LIGHTS" value="8">
The maximum number of directional lights that can be rendered at a given time in 2D.
</constant>
+ <constant name="MAX_MESH_SURFACES" value="256">
+ The maximum number of surfaces a mesh can have.
+ </constant>
<constant name="TEXTURE_LAYERED_2D_ARRAY" value="0" enum="TextureLayeredType">
Array of 2-dimensional textures (see [Texture2DArray]).
</constant>
@@ -4970,11 +4991,23 @@
Variable rate shading 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">
- Variable rate shading texture is supplied by the primary [XRInterface].
+ Variable rate shading texture is supplied by the primary [XRInterface]. Note that this may override the update mode.
</constant>
<constant name="VIEWPORT_VRS_MAX" value="3" enum="ViewportVRSMode">
Represents the size of the [enum ViewportVRSMode] enum.
</constant>
+ <constant name="VIEWPORT_VRS_UPDATE_DISABLED" value="0" enum="ViewportVRSUpdateMode">
+ The input texture for variable rate shading will not be processed.
+ </constant>
+ <constant name="VIEWPORT_VRS_UPDATE_ONCE" value="1" enum="ViewportVRSUpdateMode">
+ The input texture for variable rate shading will be processed once.
+ </constant>
+ <constant name="VIEWPORT_VRS_UPDATE_ALWAYS" value="2" enum="ViewportVRSUpdateMode">
+ The input texture for variable rate shading will be processed each frame.
+ </constant>
+ <constant name="VIEWPORT_VRS_UPDATE_MAX" value="3" enum="ViewportVRSUpdateMode">
+ Represents the size of the [enum ViewportVRSUpdateMode] enum.
+ </constant>
<constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode">
Automatically selects the appropriate process mode based on your sky shader. If your shader uses [code]TIME[/code] or [code]POSITION[/code], this will use [constant SKY_MODE_REALTIME]. If your shader uses any of the [code]LIGHT_*[/code] variables or any custom uniforms, this uses [constant SKY_MODE_INCREMENTAL]. Otherwise, this defaults to [constant SKY_MODE_QUALITY].
</constant>
diff --git a/doc/classes/ResourceImporterWAV.xml b/doc/classes/ResourceImporterWAV.xml
index 5336c98d0f..d3dafb03b6 100644
--- a/doc/classes/ResourceImporterWAV.xml
+++ b/doc/classes/ResourceImporterWAV.xml
@@ -14,6 +14,7 @@
The compression mode to use on import.
[b]Disabled:[/b] Imports audio data without any compression. This results in the highest possible quality.
[b]RAM (Ima-ADPCM):[/b] Performs fast lossy compression on import. Low CPU cost, but quality is noticeably decreased compared to Ogg Vorbis or even MP3.
+ [b]QOA ([url=https://qoaformat.org/]Quite OK Audio[/url]):[/b] Performs lossy compression on import. CPU cost is slightly higher than IMA-ADPCM, but quality is much higher.
</member>
<member name="edit/loop_begin" type="int" setter="" getter="" default="0">
The begin loop point to use when [member edit/loop_mode] is [b]Forward[/b], [b]Ping-Pong[/b] or [b]Backward[/b]. This is set in seconds after the beginning of the audio file.
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 885c6f0478..1961ca2b0e 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -76,7 +76,7 @@
The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.
An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image].
The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
- Returns an empty resource if no [ResourceFormatLoader] could handle the file.
+ Returns an empty resource if no [ResourceFormatLoader] could handle the file, and prints an error if no file is found at the specified path.
GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios.
[b]Note:[/b] If [member ProjectSettings.editor/export/convert_text_resources_to_binary] is [code]true[/code], [method @GDScript.load] will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set [member ProjectSettings.editor/export/convert_text_resources_to_binary] to [code]false[/code].
[b]Note:[/b] Relative paths will be prefixed with [code]"res://"[/code] before loading, to avoid unexpected results make sure your paths are absolute.
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 01c4074e6d..f4e3c1209f 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -249,6 +249,13 @@
[/codeblock]
</description>
</method>
+ <method name="invalidate_paragraph">
+ <return type="bool" />
+ <param index="0" name="paragraph" type="int" />
+ <description>
+ Invalidates [param paragraph] and all subsequent paragraphs cache.
+ </description>
+ </method>
<method name="is_menu_visible" qualifiers="const">
<return type="bool" />
<description>
@@ -497,9 +504,11 @@
<method name="remove_paragraph">
<return type="bool" />
<param index="0" name="paragraph" type="int" />
+ <param index="1" name="no_invalidate" type="bool" default="false" />
<description>
Removes a paragraph of content from the label. Returns [code]true[/code] if the paragraph exists.
The [param paragraph] argument is the index of the paragraph to remove, it can take values in the interval [code][0, get_paragraph_count() - 1][/code].
+ If [param no_invalidate] is set to [code]true[/code], cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and [method invalidate_paragraph] will be called at the end of operation.
</description>
</method>
<method name="scroll_to_line">
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 2c88ecd675..43ee4dda60 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -34,6 +34,35 @@
Returns an array with all [Script] objects which are currently open in editor.
</description>
</method>
+ <method name="goto_help">
+ <return type="void" />
+ <param index="0" name="topic" type="String" />
+ <description>
+ Opens help for the given topic. The [param topic] is an encoded string that controls which class, method, constant, signal, annotation, property, or theme item should be focused.
+ The supported [param topic] formats include [code]class_name:class[/code], [code]class_method:class:method[/code], [code]class_constant:class:constant[/code], [code]class_signal:class:signal[/code], [code]class_annotation:class:@annotation[/code], [code]class_property:class:property[/code], and [code]class_theme_item:class:item[/code], where [code]class[/code] is the class name, [code]method[/code] is the method name, [code]constant[/code] is the constant name, [code]signal[/code] is the signal name, [code]annotation[/code] is the annotation name, [code]property[/code] is the property name, and [code]item[/code] is the theme item.
+ [b]Examples:[/b]
+ [codeblock]
+ # Shows help for the Node class.
+ class_name:Node
+ # Shows help for the global min function.
+ # Global objects are accessible in the `@GlobalScope` namespace, shown here.
+ class_method:@GlobalScope:min
+ # Shows help for get_viewport in the Node class.
+ class_method:Node:get_viewport
+ # Shows help for the Input constant MOUSE_BUTTON_MIDDLE.
+ class_constant:Input:MOUSE_BUTTON_MIDDLE
+ # Shows help for the BaseButton signal pressed.
+ class_signal:BaseButton:pressed
+ # Shows help for the CanvasItem property visible.
+ class_property:CanvasItem:visible
+ # Shows help for the GDScript annotation export.
+ # Annotations should be prefixed with the `@` symbol in the descriptor, as shown here.
+ class_annotation:@GDScript:@export
+ # Shows help for the GraphNode theme item named panel_selected.
+ class_theme_item:GraphNode:panel_selected
+ [/codeblock]
+ </description>
+ </method>
<method name="goto_line">
<return type="void" />
<param index="0" name="line_number" type="int" />
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index dca4fe9276..403608355a 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -71,6 +71,12 @@
Emitted when the user contextual goto and the item is in the same script.
</description>
</signal>
+ <signal name="request_save_previous_state">
+ <param index="0" name="line" type="int" />
+ <description>
+ Emitted when the user changes current script or moves caret by 10 or more columns within the same script.
+ </description>
+ </signal>
<signal name="search_in_files_requested">
<param index="0" name="text" type="String" />
<description>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index caa3097a6b..610550d8bd 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -41,7 +41,7 @@
<return type="int" />
<param index="0" name="name" type="String" />
<description>
- Returns the bone index that matches [param name] as its name.
+ Returns the bone index that matches [param name] as its name. Returns [code]-1[/code] if no bone with this name exists.
</description>
</method>
<method name="force_update_all_bone_transforms" deprecated="This method should only be called internally.">
@@ -252,7 +252,7 @@
<param index="1" name="pose" type="Transform3D" />
<description>
Sets the global pose transform, [param pose], for the bone at [param bone_idx].
- [b]Note:[/b] If other bone poses have been changed, this method executes an update process and will cause performance to deteriorate. If you know that multiple global poses will be applied, consider using [method set_bone_pose] with precalculation.
+ [b]Note:[/b] If other bone poses have been changed, this method executes a dirty poses recalculation and will cause performance to deteriorate. If you know that multiple global poses will be applied, consider using [method set_bone_pose] with precalculation.
</description>
</method>
<method name="set_bone_global_pose_override" deprecated="">
@@ -355,15 +355,10 @@
<description>
</description>
</signal>
- <signal name="bone_pose_changed">
- <param index="0" name="bone_idx" type="int" />
- <description>
- Emitted when the bone at [param bone_idx] changes its transform/pose. This can be used to update other nodes that rely on bone positions.
- </description>
- </signal>
<signal name="pose_updated">
<description>
- Emitted when the pose is updated, after [constant NOTIFICATION_UPDATE_SKELETON] is received.
+ Emitted when the pose is updated.
+ [b]Note:[/b] During the update process, this signal is not fired, so modification by [SkeletonModifier3D] is not detected.
</description>
</signal>
<signal name="show_rest_only_changed">
@@ -371,11 +366,16 @@
Emitted when the value of [member show_rest_only] changes.
</description>
</signal>
+ <signal name="skeleton_updated">
+ <description>
+ Emitted when the final pose has been calculated will be applied to the skin in the update process.
+ This means that all [SkeletonModifier3D] processing is complete. In order to detect the completion of the processing of each [SkeletonModifier3D], use [signal SkeletonModifier3D.modification_processed].
+ </description>
+ </signal>
</signals>
<constants>
<constant name="NOTIFICATION_UPDATE_SKELETON" value="50">
- Notification received when this skeleton's pose needs to be updated.
- This notification is received [i]before[/i] the related [signal pose_updated] signal.
+ Notification received when this skeleton's pose needs to be updated. In that case, this is called only once per frame in a deferred process.
</constant>
<constant name="MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS" value="0" enum="ModifierCallbackModeProcess">
Set a flag to process modification during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]).
diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml
index 6de6d9d186..4858a6ce22 100644
--- a/doc/classes/SkeletonIK3D.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -55,6 +55,9 @@
</method>
</methods>
<members>
+ <member name="interpolation" type="float" setter="set_interpolation" getter="get_interpolation" deprecated="Use [member SkeletonModifier3D.influence] instead.">
+ Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of [code]1.0[/code] will overwrite all skeleton bone transforms completely while a value of [code]0.0[/code] will visually disable the SkeletonIK.
+ </member>
<member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position" default="Vector3(0, 0, 0)">
Secondary target position (first is [member target] property or [member target_node]) for the IK chain. Use magnet position (pole target) to control the bending of the IK chain. Only works if the bone chain has more than 2 bones. The middle chain bone position will be linearly interpolated with the magnet position.
</member>
diff --git a/doc/classes/SkeletonModifier3D.xml b/doc/classes/SkeletonModifier3D.xml
index fab33750ea..c0b1b6fd53 100644
--- a/doc/classes/SkeletonModifier3D.xml
+++ b/doc/classes/SkeletonModifier3D.xml
@@ -6,9 +6,19 @@
<description>
[SkeletonModifier3D] retrieves a target [Skeleton3D] by having a [Skeleton3D] parent.
If there is [AnimationMixer], modification always performs after playback process of the [AnimationMixer].
+ This node should be used to implement custom IK solvers, constraints, or skeleton physics
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="_process_modification" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Override this virtual method to implement a custom skeleton modifier. You should do things like get the [Skeleton3D]'s current pose and apply the pose here.
+ [method _process_modification] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier.
+ </description>
+ </method>
+ </methods>
<members>
<member name="active" type="bool" setter="set_active" getter="is_active" default="true">
If [code]true[/code], the [SkeletonModifier3D] will be processing.
diff --git a/doc/classes/StatusIndicator.xml b/doc/classes/StatusIndicator.xml
index e1fcc35ad7..688840b17f 100644
--- a/doc/classes/StatusIndicator.xml
+++ b/doc/classes/StatusIndicator.xml
@@ -8,10 +8,22 @@
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="get_rect" qualifiers="const">
+ <return type="Rect2" />
+ <description>
+ Returns the status indicator rectangle in screen coordinates. If this status indicator is not visible, returns an empty [Rect2].
+ </description>
+ </method>
+ </methods>
<members>
- <member name="icon" type="Image" setter="set_icon" getter="get_icon">
+ <member name="icon" type="Texture2D" setter="set_icon" getter="get_icon">
Status indicator icon.
</member>
+ <member name="menu" type="NodePath" setter="set_menu" getter="get_menu" default="NodePath(&quot;&quot;)">
+ Status indicator native popup menu. If this is set, the [signal pressed] signal is not emitted.
+ [b]Note:[/b] Native popup is only supported if [NativeMenu] supports [constant NativeMenu.FEATURE_POPUP_MENU] feature.
+ </member>
<member name="tooltip" type="String" setter="set_tooltip" getter="get_tooltip" default="&quot;&quot;">
Status indicator tooltip.
</member>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index a33a1aea41..450e483f69 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -126,7 +126,7 @@
[/codeblock]
</description>
</method>
- <method name="contains" qualifiers="const" keywords="includes, has">
+ <method name="contains" qualifiers="const">
<return type="bool" />
<param index="0" name="what" type="String" />
<description>
@@ -142,7 +142,15 @@
GD.Print("team".Contains("I")); // Prints false
[/csharp]
[/codeblocks]
- If you need to know where [param what] is within the string, use [method find].
+ If you need to know where [param what] is within the string, use [method find]. See also [method containsn].
+ </description>
+ </method>
+ <method name="containsn" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="what" type="String" />
+ <description>
+ Returns [code]true[/code] if the string contains [param what], [b]ignoring case[/b].
+ If you need to know where [param what] is within the string, use [method findn]. See also [method contains].
</description>
</method>
<method name="count" qualifiers="const">
@@ -188,7 +196,7 @@
<return type="int" />
<param index="0" name="to" type="String" />
<description>
- Like [method naturalcasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
+ Like [method naturalcasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filenocasecmp_to], [method naturalcasecmp_to], and [method casecmp_to].
</description>
</method>
@@ -196,7 +204,7 @@
<return type="int" />
<param index="0" name="to" type="String" />
<description>
- Like [method naturalnocasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
+ Like [method naturalnocasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filecasecmp_to], [method naturalnocasecmp_to], and [method nocasecmp_to].
</description>
</method>
@@ -747,7 +755,7 @@
<method name="reverse" qualifiers="const">
<return type="String" />
<description>
- Returns the copy of this string in reverse order.
+ Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis.
</description>
</method>
<method name="rfind" qualifiers="const">
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index e837b65199..76586b7968 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -126,7 +126,15 @@
GD.Print("team".Contains("I")); // Prints false
[/csharp]
[/codeblocks]
- If you need to know where [param what] is within the string, use [method find].
+ If you need to know where [param what] is within the string, use [method find]. See also [method containsn].
+ </description>
+ </method>
+ <method name="containsn" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="what" type="String" />
+ <description>
+ Returns [code]true[/code] if the string contains [param what], [b]ignoring case[/b].
+ If you need to know where [param what] is within the string, use [method findn]. See also [method contains].
</description>
</method>
<method name="count" qualifiers="const">
@@ -172,7 +180,7 @@
<return type="int" />
<param index="0" name="to" type="String" />
<description>
- Like [method naturalcasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
+ Like [method naturalcasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filenocasecmp_to], [method naturalcasecmp_to], and [method casecmp_to].
</description>
</method>
@@ -180,7 +188,7 @@
<return type="int" />
<param index="0" name="to" type="String" />
<description>
- Like [method naturalnocasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
+ Like [method naturalnocasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names.
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filecasecmp_to], [method naturalnocasecmp_to], and [method nocasecmp_to].
</description>
</method>
@@ -648,7 +656,7 @@
<method name="reverse" qualifiers="const">
<return type="String" />
<description>
- Returns the copy of this string in reverse order.
+ Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis.
</description>
</method>
<method name="rfind" qualifiers="const">
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 576587a5df..a8bd068b1c 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -93,7 +93,7 @@
<method name="commit_to_arrays">
<return type="Array" />
<description>
- Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API.
+ Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays], [method ImporterMesh.add_surface], and [method create_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] or [ImporterMesh] APIs.
</description>
</method>
<method name="create_from">
@@ -104,6 +104,14 @@
Creates a vertex array from an existing [Mesh].
</description>
</method>
+ <method name="create_from_arrays">
+ <return type="void" />
+ <param index="0" name="arrays" type="Array" />
+ <param index="1" name="primitive_type" type="int" enum="Mesh.PrimitiveType" default="3" />
+ <description>
+ Creates this SurfaceTool from existing vertex arrays such as returned by [method commit_to_arrays], [method Mesh.surface_get_arrays], [method Mesh.surface_get_blend_shape_arrays], [method ImporterMesh.get_surface_arrays], and [method ImporterMesh.get_surface_blend_shape_arrays]. [param primitive_type] controls the type of mesh data, defaulting to [constant Mesh.PRIMITIVE_TRIANGLES].
+ </description>
+ </method>
<method name="create_from_blend_shape">
<return type="void" />
<param index="0" name="existing" type="Mesh" />
diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml
index a2beef81eb..d080294c1a 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -111,6 +111,13 @@
Returns the title of the tab at index [param tab_idx].
</description>
</method>
+ <method name="get_tab_tooltip" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="tab_idx" type="int" />
+ <description>
+ Returns the tooltip text of the tab at index [param tab_idx].
+ </description>
+ </method>
<method name="is_tab_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="tab_idx" type="int" />
@@ -224,6 +231,15 @@
Sets a [param title] for the tab at index [param tab_idx].
</description>
</method>
+ <method name="set_tab_tooltip">
+ <return type="void" />
+ <param index="0" name="tab_idx" type="int" />
+ <param index="1" name="tooltip" type="String" />
+ <description>
+ Sets a [param tooltip] for tab at index [param tab_idx].
+ [b]Note:[/b] By default, if the [param tooltip] is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign [code]" "[/code] as the [param tooltip] text.
+ </description>
+ </method>
</methods>
<members>
<member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true">
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index b0e3f67791..090afa0220 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -64,6 +64,13 @@
Returns the [Texture2D] for the tab at index [param tab_idx] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
+ <method name="get_tab_icon_max_width" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="tab_idx" type="int" />
+ <description>
+ Returns the maximum allowed width of the icon for the tab at index [param tab_idx].
+ </description>
+ </method>
<method name="get_tab_idx_at_point" qualifiers="const">
<return type="int" />
<param index="0" name="point" type="Vector2" />
@@ -92,6 +99,13 @@
Returns the title of the tab at index [param tab_idx]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
</description>
</method>
+ <method name="get_tab_tooltip" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="tab_idx" type="int" />
+ <description>
+ Returns the tooltip text of the tab at index [param tab_idx].
+ </description>
+ </method>
<method name="is_tab_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="tab_idx" type="int" />
@@ -157,6 +171,14 @@
Sets an icon for the tab at index [param tab_idx].
</description>
</method>
+ <method name="set_tab_icon_max_width">
+ <return type="void" />
+ <param index="0" name="tab_idx" type="int" />
+ <param index="1" name="width" type="int" />
+ <description>
+ Sets the maximum allowed width of the icon for the tab at index [param tab_idx]. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio.
+ </description>
+ </method>
<method name="set_tab_metadata">
<return type="void" />
<param index="0" name="tab_idx" type="int" />
@@ -173,6 +195,15 @@
Sets a custom title for the tab at index [param tab_idx] (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
</description>
</method>
+ <method name="set_tab_tooltip">
+ <return type="void" />
+ <param index="0" name="tab_idx" type="int" />
+ <param index="1" name="tooltip" type="String" />
+ <description>
+ Sets a custom tooltip text for tab at index [param tab_idx].
+ [b]Note:[/b] By default, if the [param tooltip] is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign [code]" "[/code] as the [param tooltip] text.
+ </description>
+ </method>
</methods>
<members>
<member name="all_tabs_in_front" type="bool" setter="set_all_tabs_in_front" getter="is_all_tabs_in_front" default="false">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index db0c1f17b0..75cad4d08b 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A multiline text editor. It also has limited facilities for editing code, such as syntax highlighting support. For more advanced facilities for editing code, see [CodeEdit].
- [b]Note:[/b] Most viewport, caret and edit methods contain a [code]caret_index[/code] argument for [member caret_multiple] support. The argument should be one of the following: [code]-1[/code] for all carets, [code]0[/code] for the main caret, or greater than [code]0[/code] for secondary carets.
+ [b]Note:[/b] Most viewport, caret, and edit methods contain a [code]caret_index[/code] argument for [member caret_multiple] support. The argument should be one of the following: [code]-1[/code] for all carets, [code]0[/code] for the main caret, or greater than [code]0[/code] for secondary carets in the order they were created.
[b]Note:[/b] When holding down [kbd]Alt[/kbd], the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor.
</description>
<tutorials>
@@ -58,7 +58,7 @@
<method name="add_caret">
<return type="int" />
<param index="0" name="line" type="int" />
- <param index="1" name="col" type="int" />
+ <param index="1" name="column" type="int" />
<description>
Adds a new caret at the given location. Returns the index of the new caret, or [code]-1[/code] if the location is invalid.
</description>
@@ -67,7 +67,7 @@
<return type="void" />
<param index="0" name="below" type="bool" />
<description>
- Adds an additional caret above or below every caret. If [param below] is true the new caret will be added below and above otherwise.
+ Adds an additional caret above or below every caret. If [param below] is [code]true[/code] the new caret will be added below and above otherwise.
</description>
</method>
<method name="add_gutter">
@@ -83,7 +83,7 @@
Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret.
</description>
</method>
- <method name="adjust_carets_after_edit">
+ <method name="adjust_carets_after_edit" deprecated="No longer necessary since methods now adjust carets themselves.">
<return type="void" />
<param index="0" name="caret" type="int" />
<param index="1" name="from_line" type="int" />
@@ -91,7 +91,7 @@
<param index="3" name="to_line" type="int" />
<param index="4" name="to_col" type="int" />
<description>
- Reposition the carets affected by the edit. This assumes edits are applied in edit order, see [method get_caret_index_edit_order].
+ This method does nothing.
</description>
</method>
<method name="adjust_viewport_to_caret">
@@ -120,6 +120,23 @@
Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called.
</description>
</method>
+ <method name="begin_multicaret_edit">
+ <return type="void" />
+ <description>
+ Starts an edit for multiple carets. The edit must be ended with [method end_multicaret_edit]. Multicaret edits can be used to edit text at multiple carets and delay merging the carets until the end, so the caret indexes aren't affected immediately. [method begin_multicaret_edit] and [method end_multicaret_edit] can be nested, and the merge will happen at the last [method end_multicaret_edit].
+ Example usage:
+ [codeblock]
+ begin_complex_operation()
+ begin_multicaret_edit()
+ for i in range(get_caret_count()):
+ if multicaret_edit_ignore_caret(i):
+ continue
+ # Logic here.
+ end_multicaret_edit()
+ end_complex_operation()
+ [/codeblock]
+ </description>
+ </method>
<method name="cancel_ime">
<return type="void" />
<description>
@@ -145,6 +162,20 @@
Clears the undo history.
</description>
</method>
+ <method name="collapse_carets">
+ <return type="void" />
+ <param index="0" name="from_line" type="int" />
+ <param index="1" name="from_column" type="int" />
+ <param index="2" name="to_line" type="int" />
+ <param index="3" name="to_column" type="int" />
+ <param index="4" name="inclusive" type="bool" default="false" />
+ <description>
+ Collapse all carets in the given range to the [param from_line] and [param from_column] position.
+ [param inclusive] applies to both ends.
+ If [method is_in_mulitcaret_edit] is [code]true[/code], carets that are collapsed will be [code]true[/code] for [method multicaret_edit_ignore_caret].
+ [method merge_overlapping_carets] will be called if any carets were collapsed.
+ </description>
+ </method>
<method name="copy">
<return type="void" />
<param index="0" name="caret_index" type="int" default="-1" />
@@ -185,6 +216,12 @@
Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack.
</description>
</method>
+ <method name="end_multicaret_edit">
+ <return type="void" />
+ <description>
+ Ends an edit for multiple carets, that was started with [method begin_multicaret_edit]. If this was the last [method end_multicaret_edit] and [method merge_overlapping_carets] was called, carets will be merged.
+ </description>
+ </method>
<method name="get_caret_column" qualifiers="const">
<return type="int" />
<param index="0" name="caret_index" type="int" default="0" />
@@ -205,7 +242,7 @@
Returns the caret pixel draw position.
</description>
</method>
- <method name="get_caret_index_edit_order">
+ <method name="get_caret_index_edit_order" deprecated="Carets no longer need to be edited in any specific order. If the carets need to be sorted, use [method get_sorted_carets] instead.">
<return type="PackedInt32Array" />
<description>
Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as [method insert_text_at_caret] are applied.
@@ -363,6 +400,15 @@
[b]Note:[/b] The return value is influenced by [theme_item line_spacing] and [theme_item font_size]. And it will not be less than [code]1[/code].
</description>
</method>
+ <method name="get_line_ranges_from_carets" qualifiers="const">
+ <return type="Vector2i[]" />
+ <param index="0" name="only_selections" type="bool" default="false" />
+ <param index="1" name="merge_adjacent" type="bool" default="true" />
+ <description>
+ Returns an [Array] of line ranges where [code]x[/code] is the first line and [code]y[/code] is the last line. All lines within these ranges will have a caret on them or be part of a selection. Each line will only be part of one line range, even if it has multiple carets on it.
+ If a selection's end column ([method get_selection_to_column]) is at column [code]0[/code], that line will not be included. If a selection begins on the line after another selection ends and [param merge_adjacent] is [code]true[/code], or they begin and end on the same line, one line range will include both selections.
+ </description>
+ </method>
<method name="get_line_width" qualifiers="const">
<return type="int" />
<param index="0" name="line" type="int" />
@@ -514,7 +560,18 @@
Returns the text inside the selection of a caret, or all the carets if [param caret_index] is its default value [code]-1[/code].
</description>
</method>
- <method name="get_selection_column" qualifiers="const">
+ <method name="get_selection_at_line_column" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="column" type="int" />
+ <param index="2" name="include_edges" type="bool" default="true" />
+ <param index="3" name="only_selections" type="bool" default="true" />
+ <description>
+ Returns the caret index of the selection at the given [param line] and [param column], or [code]-1[/code] if there is none.
+ If [param include_edges] is [code]false[/code], the position must be inside the selection and not at either end. If [param only_selections] is [code]false[/code], carets without a selection will also be considered.
+ </description>
+ </method>
+ <method name="get_selection_column" qualifiers="const" deprecated="Use [method get_selection_origin_column] instead.">
<return type="int" />
<param index="0" name="caret_index" type="int" default="0" />
<description>
@@ -525,17 +582,17 @@
<return type="int" />
<param index="0" name="caret_index" type="int" default="0" />
<description>
- Returns the selection begin column.
+ Returns the selection begin column. Returns the caret column if there is no selection.
</description>
</method>
<method name="get_selection_from_line" qualifiers="const">
<return type="int" />
<param index="0" name="caret_index" type="int" default="0" />
<description>
- Returns the selection begin line.
+ Returns the selection begin line. Returns the caret line if there is no selection.
</description>
</method>
- <method name="get_selection_line" qualifiers="const">
+ <method name="get_selection_line" qualifiers="const" deprecated="Use [method get_selection_origin_line] instead.">
<return type="int" />
<param index="0" name="caret_index" type="int" default="0" />
<description>
@@ -548,18 +605,40 @@
Returns the current selection mode.
</description>
</method>
+ <method name="get_selection_origin_column" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
+ <description>
+ Returns the origin column of the selection. This is the opposite end from the caret.
+ </description>
+ </method>
+ <method name="get_selection_origin_line" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
+ <description>
+ Returns the origin line of the selection. This is the opposite end from the caret.
+ </description>
+ </method>
<method name="get_selection_to_column" qualifiers="const">
<return type="int" />
<param index="0" name="caret_index" type="int" default="0" />
<description>
- Returns the selection end column.
+ Returns the selection end column. Returns the caret column if there is no selection.
</description>
</method>
<method name="get_selection_to_line" qualifiers="const">
<return type="int" />
<param index="0" name="caret_index" type="int" default="0" />
<description>
- Returns the selection end line.
+ Returns the selection end line. Returns the caret line if there is no selection.
+ </description>
+ </method>
+ <method name="get_sorted_carets" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <param index="0" name="include_ignored_carets" type="bool" default="false" />
+ <description>
+ Returns the carets sorted by selection beginning from lowest line and column to highest (from top to bottom of text).
+ If [param include_ignored_carets] is [code]false[/code], carets from [method multicaret_edit_ignore_caret] will be ignored.
</description>
</method>
<method name="get_tab_size" qualifiers="const">
@@ -653,6 +732,19 @@
Inserts a new line with [param text] at [param line].
</description>
</method>
+ <method name="insert_text">
+ <return type="void" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="line" type="int" />
+ <param index="2" name="column" type="int" />
+ <param index="3" name="before_selection_begin" type="bool" default="true" />
+ <param index="4" name="before_selection_end" type="bool" default="false" />
+ <description>
+ Inserts the [param text] at [param line] and [param column].
+ If [param before_selection_begin] is [code]true[/code], carets and selections that begin at [param line] and [param column] will moved to the end of the inserted text, along with all carets after it.
+ If [param before_selection_end] is [code]true[/code], selections that end at [param line] and [param column] will be extended to the end of the inserted text. These parameters can be used to insert text inside of or outside of selections.
+ </description>
+ </method>
<method name="insert_text_at_caret">
<return type="void" />
<param index="0" name="text" type="String" />
@@ -661,6 +753,13 @@
Insert the specified text at the caret position.
</description>
</method>
+ <method name="is_caret_after_selection_origin" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="caret_index" type="int" default="0" />
+ <description>
+ Returns [code]true[/code] if the caret of the selection is after the selection origin. This can be used to determine the direction of the selection.
+ </description>
+ </method>
<method name="is_caret_visible" qualifiers="const">
<return type="bool" />
<param index="0" name="caret_index" type="int" default="0" />
@@ -671,7 +770,7 @@
<method name="is_dragging_cursor" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the user is dragging their mouse for scrolling or selecting.
+ Returns [code]true[/code] if the user is dragging their mouse for scrolling, selecting, or text dragging.
</description>
</method>
<method name="is_gutter_clickable" qualifiers="const">
@@ -695,6 +794,12 @@
Returns whether the gutter is overwritable.
</description>
</method>
+ <method name="is_in_mulitcaret_edit" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if a [method begin_multicaret_edit] has been called and [method end_multicaret_edit] has not yet been called.
+ </description>
+ </method>
<method name="is_line_gutter_clickable" qualifiers="const">
<return type="bool" />
<param index="0" name="line" type="int" />
@@ -749,9 +854,18 @@
<return type="void" />
<description>
Merges any overlapping carets. Will favor the newest caret, or the caret with a selection.
+ If [method is_in_mulitcaret_edit] is [code]true[/code], the merge will be queued to happen at the end of the multicaret edit. See [method begin_multicaret_edit] and [method end_multicaret_edit].
[b]Note:[/b] This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap.
</description>
</method>
+ <method name="multicaret_edit_ignore_caret" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="caret_index" type="int" />
+ <description>
+ Returns [code]true[/code] if the given [param caret_index] should be ignored as part of a multicaret edit. See [method begin_multicaret_edit] and [method end_multicaret_edit]. Carets that should be ignored are ones that were part of removed text and will likely be merged at the end of the edit, or carets that were added during the edit.
+ It is recommended to [code]continue[/code] within a loop iterating on multiple carets if a caret should be ignored.
+ </description>
+ </method>
<method name="paste">
<return type="void" />
<param index="0" name="caret_index" type="int" default="-1" />
@@ -787,6 +901,15 @@
Removes the gutter from this [TextEdit].
</description>
</method>
+ <method name="remove_line_at">
+ <return type="void" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="move_carets_down" type="bool" default="true" />
+ <description>
+ Removes the line of text at [param line]. Carets on this line will attempt to match their previous visual x position.
+ If [param move_carets_down] is [code]true[/code] carets will move to the next line down, otherwise carets will move up.
+ </description>
+ </method>
<method name="remove_secondary_carets">
<return type="void" />
<description>
@@ -801,7 +924,6 @@
<param index="3" name="to_column" type="int" />
<description>
Removes text between the given positions.
- [b]Note:[/b] This does not adjust the caret or selection, which as a result it can end up in an invalid position.
</description>
</method>
<method name="search" qualifiers="const">
@@ -809,7 +931,7 @@
<param index="0" name="text" type="String" />
<param index="1" name="flags" type="int" />
<param index="2" name="from_line" type="int" />
- <param index="3" name="from_colum" type="int" />
+ <param index="3" name="from_column" type="int" />
<description>
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code].
@@ -835,14 +957,15 @@
</method>
<method name="select">
<return type="void" />
- <param index="0" name="from_line" type="int" />
- <param index="1" name="from_column" type="int" />
- <param index="2" name="to_line" type="int" />
- <param index="3" name="to_column" type="int" />
+ <param index="0" name="origin_line" type="int" />
+ <param index="1" name="origin_column" type="int" />
+ <param index="2" name="caret_line" type="int" />
+ <param index="3" name="caret_column" type="int" />
<param index="4" name="caret_index" type="int" default="0" />
<description>
- Perform selection, from line/column to line/column.
+ Selects text from [param origin_line] and [param origin_column] to [param caret_line] and [param caret_column] for the given [param caret_index]. This moves the selection origin and the caret. If the positions are the same, the selection will be deselected.
If [member selecting_enabled] is [code]false[/code], no selection will occur.
+ [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets].
</description>
</method>
<method name="select_all">
@@ -878,9 +1001,10 @@
<param index="3" name="wrap_index" type="int" default="0" />
<param index="4" name="caret_index" type="int" default="0" />
<description>
- Moves the caret to the specified [param line] index.
+ Moves the caret to the specified [param line] index. The caret column will be moved to the same visual position it was at the last time [method set_caret_column] was called, or clamped to the end of the line.
If [param adjust_viewport] is [code]true[/code], the viewport will center at the caret position after the move occurs.
If [param can_be_hidden] is [code]true[/code], the specified [param line] can be hidden.
+ If [param wrap_index] is [code]-1[/code], the caret column will be clamped to the [param line]'s length. If [param wrap_index] is greater than [code]-1[/code], the column will be moved to attempt to match the visual x position on the line's [param wrap_index] to the position from the last time [method set_caret_column] was called.
[b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets].
</description>
</method>
@@ -945,7 +1069,8 @@
<param index="0" name="line" type="int" />
<param index="1" name="new_text" type="String" />
<description>
- Sets the text for a specific line.
+ Sets the text for a specific [param line].
+ Carets on the line will attempt to keep their visual x position.
</description>
</method>
<method name="set_line_as_center_visible">
@@ -1049,13 +1174,30 @@
<method name="set_selection_mode">
<return type="void" />
<param index="0" name="mode" type="int" enum="TextEdit.SelectionMode" />
- <param index="1" name="line" type="int" default="-1" />
- <param index="2" name="column" type="int" default="-1" />
- <param index="3" name="caret_index" type="int" default="0" />
<description>
Sets the current selection mode.
</description>
</method>
+ <method name="set_selection_origin_column">
+ <return type="void" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="caret_index" type="int" default="0" />
+ <description>
+ Sets the selection origin column to the [param column] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect.
+ </description>
+ </method>
+ <method name="set_selection_origin_line">
+ <return type="void" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="can_be_hidden" type="bool" default="true" />
+ <param index="2" name="wrap_index" type="int" default="-1" />
+ <param index="3" name="caret_index" type="int" default="0" />
+ <description>
+ Sets the selection origin line to the [param line] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect.
+ If [param can_be_hidden] is [code]false[/code], The line will be set to the nearest unhidden line below or above.
+ If [param wrap_index] is [code]-1[/code], the selection origin column will be clamped to the [param line]'s length. If [param wrap_index] is greater than [code]-1[/code], the column will be moved to attempt to match the visual x position on the line's [param wrap_index] to the position from the last time [method set_selection_origin_column] or [method select] was called.
+ </description>
+ </method>
<method name="set_tab_size">
<return type="void" />
<param index="0" name="size" type="int" />
@@ -1089,7 +1231,7 @@
<param index="0" name="from_line" type="int" />
<param index="1" name="to_line" type="int" />
<description>
- Swaps the two lines.
+ Swaps the two lines. Carets will be swapped with the lines.
</description>
</method>
<method name="tag_saved_version">
@@ -1140,7 +1282,7 @@
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.
+ If [code]true[/code], allow drag and drop of selected text. Text can still be dropped from other sources.
</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.
@@ -1172,7 +1314,7 @@
[b]Note:[/b] This method is only implemented on Linux.
</member>
<member name="minimap_draw" type="bool" setter="set_draw_minimap" getter="is_drawing_minimap" default="false">
- If [code]true[/code], a minimap is shown, providing an outline of your source code.
+ If [code]true[/code], a minimap is shown, providing an outline of your source code. The minimap uses a fixed-width text size.
</member>
<member name="minimap_width" type="int" setter="set_minimap_width" getter="get_minimap_width" default="80">
The width, in pixels, of the minimap.
@@ -1231,7 +1373,7 @@
<signals>
<signal name="caret_changed">
<description>
- Emitted when the caret changes position.
+ Emitted when any caret changes position.
</description>
</signal>
<signal name="gutter_added">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index c0cd7f79e7..34137a18ef 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -5,6 +5,16 @@
</brief_description>
<description>
[TextServer] is the API backend for managing fonts and rendering text.
+ [b]Note:[/b] This is a low-level API, consider using [TextLine], [TextParagraph], and [Font] classes instead.
+ This is an abstract class, so to get the currently active [TextServer] instance, use the following code:
+ [codeblocks]
+ [gdscript]
+ var ts = TextServerManager.get_primary_interface()
+ [/gdscript]
+ [csharp]
+ var ts = TextServerManager.GetPrimaryInterface();
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
@@ -1103,6 +1113,13 @@
- May contain Unicode characters of class XID_Continue in the other positions.
</description>
</method>
+ <method name="is_valid_letter" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="unicode" type="int" />
+ <description>
+ Returns [code]true[/code] if the given code point is a valid letter, i.e. it belongs to the Unicode category "L".
+ </description>
+ </method>
<method name="load_support_data">
<return type="bool" />
<param index="0" name="filename" type="String" />
@@ -1505,6 +1522,7 @@
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" is_bitfield="true" default="264" />
+ <param index="2" name="skip_grapheme_flags" type="int" enum="TextServer.GraphemeFlag" is_bitfield="true" default="4" />
<description>
Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking (see [enum GraphemeFlag]).
</description>
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 06a0daece6..c148cdad52 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -1217,6 +1217,12 @@
Returns [code]true[/code] if [param string] is a valid identifier.
</description>
</method>
+ <method name="_is_valid_letter" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="unicode" type="int" />
+ <description>
+ </description>
+ </method>
<method name="_load_support_data" qualifiers="virtual">
<return type="bool" />
<param index="0" name="filename" type="String" />
@@ -1664,6 +1670,7 @@
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" is_bitfield="true" />
+ <param index="2" name="skip_grapheme_flags" type="int" enum="TextServer.GraphemeFlag" is_bitfield="true" />
<description>
[b]Optional.[/b]
Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking (see [enum TextServer.GraphemeFlag]).
diff --git a/doc/classes/TileMapLayer.xml b/doc/classes/TileMapLayer.xml
index da716a8fe3..1bff6d911b 100644
--- a/doc/classes/TileMapLayer.xml
+++ b/doc/classes/TileMapLayer.xml
@@ -97,7 +97,7 @@
<method name="get_navigation_map" qualifiers="const">
<return type="RID" />
<description>
- Returns the [RID] of the [NavigationServer2D] navigation used by this [TileMapLayer].
+ Returns the [RID] of the [NavigationServer2D] navigation used by this [TileMapLayer].
By default this returns the default [World2D] navigation map, unless a custom map was provided using [method set_navigation_map].
</description>
</method>
@@ -268,7 +268,7 @@
The quadrant size does not apply on a Y-sorted [TileMapLayer], as tiles are be grouped by Y position instead in that case.
[b]Note:[/b] As quadrants are created according to the map's coordinate system, the quadrant's "square shape" might not look like square in the [TileMapLayer]'s local coordinate system.
</member>
- <member name="tile_map_data" type="PackedByteArray" setter="set_tile_map_data_from_array" getter="get_tile_map_data_as_array" default="PackedByteArray(&quot;AAA=&quot;)">
+ <member name="tile_map_data" type="PackedByteArray" setter="set_tile_map_data_from_array" getter="get_tile_map_data_as_array" default="PackedByteArray()">
The raw tile map data as a byte array.
</member>
<member name="tile_set" type="TileSet" setter="set_tile_set" getter="get_tile_set">
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index 6f212274f8..a34ca0ce91 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -295,6 +295,15 @@
# If tile is not already flipped, flip it.
$TileMap.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)
[/codeblock]
+ [b]Note:[/b] These transformations can be combined to do the equivalent of 0, 90, 180, and 270 degree rotations, as shown below:
+ [codeblock]
+ enum TileTransform {
+ ROTATE_0 = 0,
+ ROTATE_90 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_H,
+ ROTATE_180 = TileSetAtlasSource.TRANSFORM_FLIP_H | TileSetAtlasSource.TRANSFORM_FLIP_V,
+ ROTATE_270 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_V,
+ }
+ [/codeblock]
</constant>
<constant name="TRANSFORM_FLIP_V" value="8192">
Represents cell's vertical flip flag. See [constant TRANSFORM_FLIP_H] for usage.
diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml
index 2948d20fbb..bf002ec6e2 100644
--- a/doc/classes/Time.xml
+++ b/doc/classes/Time.xml
@@ -152,7 +152,7 @@
<method name="get_time_zone_from_system" qualifiers="const">
<return type="Dictionary" />
<description>
- Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code].
+ Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code].
- [code]bias[/code] is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC.
- [code]name[/code] is the localized name of the time zone, according to the OS locale settings of the current user.
</description>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index d95492479c..b0cb25fafd 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -546,16 +546,16 @@
The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with [method TreeItem.set_icon_max_width]. The height is adjusted according to the icon's ratio.
</theme_item>
<theme_item name="inner_item_margin_bottom" data_type="constant" type="int" default="0">
- The inner bottom margin of an item.
+ The inner bottom margin of a cell.
</theme_item>
<theme_item name="inner_item_margin_left" data_type="constant" type="int" default="0">
- The inner left margin of an item.
+ The inner left margin of a cell.
</theme_item>
<theme_item name="inner_item_margin_right" data_type="constant" type="int" default="0">
- The inner right margin of an item.
+ The inner right margin of a cell.
</theme_item>
<theme_item name="inner_item_margin_top" data_type="constant" type="int" default="0">
- The inner top margin of an item.
+ The inner top margin of a cell.
</theme_item>
<theme_item name="item_margin" data_type="constant" type="int" default="16">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
@@ -655,13 +655,13 @@
[StyleBox] used for the cursor, when the [Tree] is not being focused.
</theme_item>
<theme_item name="custom_button" data_type="style" type="StyleBox">
- Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
+ Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when button is enabled with [method TreeItem.set_custom_as_button].
</theme_item>
<theme_item name="custom_button_hover" data_type="style" type="StyleBox">
- [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode button cell when it's hovered.
</theme_item>
<theme_item name="custom_button_pressed" data_type="style" type="StyleBox">
- [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed.
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode button cell when it's pressed.
</theme_item>
<theme_item name="focus" data_type="style" type="StyleBox">
The focused style for the [Tree], drawn on top of everything.
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index c679838ec5..78a703c213 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -318,12 +318,14 @@
<return type="int" enum="TextServer.StructuredTextParser" />
<param index="0" name="column" type="int" />
<description>
+ Returns the BiDi algorithm override set for this cell.
</description>
</method>
<method name="get_structured_text_bidi_override_options" qualifiers="const">
<return type="Array" />
<param index="0" name="column" type="int" />
<description>
+ Returns the additional BiDi options set for this cell.
</description>
</method>
<method name="get_suffix" qualifiers="const">
@@ -401,6 +403,7 @@
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
+ Returns [code]true[/code] if the cell was made into a button with [method set_custom_as_button].
</description>
</method>
<method name="is_edit_multiline" qualifiers="const">
@@ -532,7 +535,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="mode" type="int" enum="TreeItem.TreeCellMode" />
<description>
- Sets the given column's cell mode to [param mode]. See [enum TreeCellMode] constants.
+ Sets the given column's cell mode to [param mode]. This determines how the cell is displayed and edited. See [enum TreeCellMode] constants for details.
</description>
</method>
<method name="set_checked">
@@ -555,6 +558,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="enable" type="bool" />
<description>
+ Makes a cell with [constant CELL_MODE_CUSTOM] display as a non-flat button with a [StyleBox].
</description>
</method>
<method name="set_custom_bg_color">
@@ -589,7 +593,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="callback" type="Callable" />
<description>
- Sets the given column's custom draw callback. Use an empty [Callable] ([code skip-lint]Callable()[/code]) to clear the custom callback.
+ Sets the given column's custom draw callback. Use an empty [Callable] ([code skip-lint]Callable()[/code]) to clear the custom callback. The cell has to be in [constant CELL_MODE_CUSTOM] to use this feature.
The [param callback] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
</description>
</method>
@@ -639,7 +643,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="texture" type="Texture2D" />
<description>
- Sets the given column's icon [Texture2D].
+ Sets the given cell's icon [Texture2D]. The cell has to be in [constant CELL_MODE_ICON] mode.
</description>
</method>
<method name="set_icon_max_width">
@@ -724,6 +728,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="parser" type="int" enum="TextServer.StructuredTextParser" />
<description>
+ Set BiDi algorithm override for the structured text. Has effect for cells that display text.
</description>
</method>
<method name="set_structured_text_bidi_override_options">
@@ -731,6 +736,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="args" type="Array" />
<description>
+ Set additional options for BiDi override. Has effect for cells that display text.
</description>
</method>
<method name="set_suffix">
@@ -805,18 +811,21 @@
</members>
<constants>
<constant name="CELL_MODE_STRING" value="0" enum="TreeCellMode">
- Cell contains a string.
+ Cell shows a string label. When editable, the text can be edited using a [LineEdit], or a [TextEdit] popup if [method set_edit_multiline] is used.
</constant>
<constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
- Cell contains a checkbox.
+ Cell shows a checkbox, optionally with text. The checkbox can be pressed, released, or indeterminate (via [method set_indeterminate]). The checkbox can't be clicked unless the cell is editable.
</constant>
<constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
- Cell contains a range.
+ Cell shows a numeric range. When editable, it can be edited using a range slider. Use [method set_range] to set the value and [method set_range_config] to configure the range.
+ This cell can also be used in a text dropdown mode when you assign a text with [method set_text]. Separate options with a comma, e.g. [code]"Option1,Option2,Option3"[/code].
</constant>
<constant name="CELL_MODE_ICON" value="3" enum="TreeCellMode">
- Cell contains an icon.
+ Cell shows an icon. It can't be edited nor display text.
</constant>
<constant name="CELL_MODE_CUSTOM" value="4" enum="TreeCellMode">
+ Cell shows as a clickable button. It will display an arrow similar to [OptionButton], but doesn't feature a dropdown (for that you can use [constant CELL_MODE_RANGE]). Clicking the button emits the [signal Tree.item_edited] signal. The button is flat by default, you can use [method set_custom_as_button] to display it with a [StyleBox].
+ This mode also supports custom drawing using [method set_custom_draw_callback].
</constant>
</constants>
</class>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index eb837a4643..b420933285 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -42,8 +42,8 @@
# Note that Objects are their own special category.
# To get the name of the underlying Object type, you need the `get_class()` method.
print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string.
- # Note also that there is not yet any way to get a script's `class_name` string easily.
- # To fetch that value, you can use ProjectSettings.get_global_class_list().
+ # Note that this does not get the script's `class_name` global identifier.
+ # If the `class_name` is needed, use `foo.get_script().get_global_name()` instead.
[/gdscript]
[csharp]
Variant foo = 2;
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 7b166a4fb0..5fadfd0d95 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -128,6 +128,14 @@
Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
+ <method name="clampf" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="min" type="float" />
+ <param index="1" name="max" type="float" />
+ <description>
+ Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="cross" qualifiers="const">
<return type="float" />
<param index="0" name="with" type="Vector2" />
@@ -265,18 +273,46 @@
Returns the vector with a maximum length by limiting its length to [param length].
</description>
</method>
+ <method name="max" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="with" type="Vector2" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2(maxf(x, with.x), maxf(y, with.y))[/code].
+ </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="maxf" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="with" type="float" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2(maxf(x, with), maxf(y, with))[/code].
+ </description>
+ </method>
+ <method name="min" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="with" type="Vector2" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2(minf(x, with.x), minf(y, with.y))[/code].
+ </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_Y].
</description>
</method>
+ <method name="minf" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="with" type="float" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2(minf(x, with), minf(y, with))[/code].
+ </description>
+ </method>
<method name="move_toward" qualifiers="const">
<return type="Vector2" />
<param index="0" name="to" type="Vector2" />
@@ -371,6 +407,13 @@
Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals.
</description>
</method>
+ <method name="snappedf" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="step" type="float" />
+ <description>
+ Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals.
+ </description>
+ </method>
</methods>
<members>
<member name="x" type="float" setter="" getter="" default="0.0">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 18291e06a9..4afc62e038 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -64,6 +64,14 @@
Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
+ <method name="clampi" qualifiers="const">
+ <return type="Vector2i" />
+ <param index="0" name="min" type="int" />
+ <param index="1" name="max" type="int" />
+ <description>
+ Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="distance_squared_to" qualifiers="const">
<return type="int" />
<param index="0" name="to" type="Vector2i" />
@@ -92,18 +100,46 @@
This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
+ <method name="max" qualifiers="const">
+ <return type="Vector2i" />
+ <param index="0" name="with" type="Vector2i" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2i(maxi(x, with.x), maxi(y, with.y))[/code].
+ </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="maxi" qualifiers="const">
+ <return type="Vector2i" />
+ <param index="0" name="with" type="int" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2i(maxi(x, with), maxi(y, with))[/code].
+ </description>
+ </method>
+ <method name="min" qualifiers="const">
+ <return type="Vector2i" />
+ <param index="0" name="with" type="Vector2i" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2i(mini(x, with.x), mini(y, with.y))[/code].
+ </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_Y].
</description>
</method>
+ <method name="mini" qualifiers="const">
+ <return type="Vector2i" />
+ <param index="0" name="with" type="int" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2i(mini(x, with), mini(y, with))[/code].
+ </description>
+ </method>
<method name="sign" qualifiers="const">
<return type="Vector2i" />
<description>
@@ -117,6 +153,13 @@
Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step].
</description>
</method>
+ <method name="snappedi" qualifiers="const">
+ <return type="Vector2i" />
+ <param index="0" name="step" type="int" />
+ <description>
+ Returns a new vector with each component snapped to the closest multiple of [param step].
+ </description>
+ </method>
</methods>
<members>
<member name="x" type="int" setter="" getter="" default="0">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 031d91af78..387359a97f 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -104,6 +104,14 @@
Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
+ <method name="clampf" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="min" type="float" />
+ <param index="1" name="max" type="float" />
+ <description>
+ Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="cross" qualifiers="const">
<return type="Vector3" />
<param index="0" name="with" type="Vector3" />
@@ -234,18 +242,46 @@
Returns the vector with a maximum length by limiting its length to [param length].
</description>
</method>
+ <method name="max" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z))[/code].
+ </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="maxf" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="with" type="float" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3(maxf(x, with), maxf(y, with), maxf(z, with))[/code].
+ </description>
+ </method>
+ <method name="min" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3(minf(x, with.x), minf(y, with.y), minf(z, with.z))[/code].
+ </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_Z].
</description>
</method>
+ <method name="minf" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="with" type="float" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3(minf(x, with), minf(y, with), minf(z, with))[/code].
+ </description>
+ </method>
<method name="move_toward" qualifiers="const">
<return type="Vector3" />
<param index="0" name="to" type="Vector3" />
@@ -307,10 +343,10 @@
</method>
<method name="reflect" qualifiers="const">
<return type="Vector3" />
- <param index="0" name="direction" type="Vector3" />
+ <param index="0" name="n" type="Vector3" />
<description>
- Returns the result of reflecting the vector from a plane defined by the given direction vector [param direction].
- [b]Note:[/b] [method reflect] differs from what other engines and frameworks call [code skip-lint]reflect()[/code]. In other engines, [code skip-lint]reflect()[/code] takes a normal direction which is a direction perpendicular to the plane. In Godot, you specify a direction parallel to the plane. See also [method bounce] which does what most engines call [code skip-lint]reflect()[/code].
+ Returns the result of reflecting the vector through a plane defined by the given normal vector [param n].
+ [b]Note:[/b] [method reflect] differs from what other engines and frameworks call [code skip-lint]reflect()[/code]. In other engines, [code skip-lint]reflect()[/code] returns the result of the vector reflected by the given plane. The reflection thus passes through the given normal. While in Godot the reflection passes through the plane and can be thought of as bouncing off the normal. See also [method bounce] which does what most engines call [code skip-lint]reflect()[/code].
</description>
</method>
<method name="rotated" qualifiers="const">
@@ -365,6 +401,13 @@
Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals.
</description>
</method>
+ <method name="snappedf" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="step" type="float" />
+ <description>
+ Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals.
+ </description>
+ </method>
</methods>
<members>
<member name="x" type="float" setter="" getter="" default="0.0">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index ffebd3e1f3..df4624dbb1 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -59,6 +59,14 @@
Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
+ <method name="clampi" qualifiers="const">
+ <return type="Vector3i" />
+ <param index="0" name="min" type="int" />
+ <param index="1" name="max" type="int" />
+ <description>
+ Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="distance_squared_to" qualifiers="const">
<return type="int" />
<param index="0" name="to" type="Vector3i" />
@@ -87,18 +95,46 @@
This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
+ <method name="max" qualifiers="const">
+ <return type="Vector3i" />
+ <param index="0" name="with" type="Vector3i" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z))[/code].
+ </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="maxi" qualifiers="const">
+ <return type="Vector3i" />
+ <param index="0" name="with" type="int" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3i(maxi(x, with), maxi(y, with), maxi(z, with))[/code].
+ </description>
+ </method>
+ <method name="min" qualifiers="const">
+ <return type="Vector3i" />
+ <param index="0" name="with" type="Vector3i" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3i(mini(x, with.x), mini(y, with.y), mini(z, with.z))[/code].
+ </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_Z].
</description>
</method>
+ <method name="mini" qualifiers="const">
+ <return type="Vector3i" />
+ <param index="0" name="with" type="int" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3i(mini(x, with), mini(y, with), mini(z, with))[/code].
+ </description>
+ </method>
<method name="sign" qualifiers="const">
<return type="Vector3i" />
<description>
@@ -112,6 +148,13 @@
Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step].
</description>
</method>
+ <method name="snappedi" qualifiers="const">
+ <return type="Vector3i" />
+ <param index="0" name="step" type="int" />
+ <description>
+ Returns a new vector with each component snapped to the closest multiple of [param step].
+ </description>
+ </method>
</methods>
<members>
<member name="x" type="int" setter="" getter="" default="0">
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index b31cdb01c9..87af370462 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -64,6 +64,14 @@
Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
+ <method name="clampf" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="min" type="float" />
+ <param index="1" name="max" type="float" />
+ <description>
+ Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="cubic_interpolate" qualifiers="const">
<return type="Vector4" />
<param index="0" name="b" type="Vector4" />
@@ -176,18 +184,46 @@
Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation.
</description>
</method>
+ <method name="max" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="with" type="Vector4" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z), maxf(w, with.w))[/code].
+ </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="maxf" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="with" type="float" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4(maxf(x, with), maxf(y, with), maxf(z, with), maxf(w, with))[/code].
+ </description>
+ </method>
+ <method name="min" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="with" type="Vector4" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4(minf(x, with.x), minf(y, with.y), minf(z, with.z), minf(w, with.w))[/code].
+ </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="minf" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="with" type="float" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4(minf(x, with), minf(y, with), minf(z, with), minf(w, with))[/code].
+ </description>
+ </method>
<method name="normalized" qualifiers="const">
<return type="Vector4" />
<description>
@@ -228,6 +264,13 @@
Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals.
</description>
</method>
+ <method name="snappedf" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="step" type="float" />
+ <description>
+ Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals.
+ </description>
+ </method>
</methods>
<members>
<member name="w" type="float" setter="" getter="" default="0.0">
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
index f8a0026066..8f54b767e0 100644
--- a/doc/classes/Vector4i.xml
+++ b/doc/classes/Vector4i.xml
@@ -57,6 +57,14 @@
Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
+ <method name="clampi" qualifiers="const">
+ <return type="Vector4i" />
+ <param index="0" name="min" type="int" />
+ <param index="1" name="max" type="int" />
+ <description>
+ Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="distance_squared_to" qualifiers="const">
<return type="int" />
<param index="0" name="to" type="Vector4i" />
@@ -85,18 +93,46 @@
This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
+ <method name="max" qualifiers="const">
+ <return type="Vector4i" />
+ <param index="0" name="with" type="Vector4i" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z), maxi(w, with.w))[/code].
+ </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="maxi" qualifiers="const">
+ <return type="Vector4i" />
+ <param index="0" name="with" type="int" />
+ <description>
+ Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4i(maxi(x, with), maxi(y, with), maxi(z, with), maxi(w, with))[/code].
+ </description>
+ </method>
+ <method name="min" qualifiers="const">
+ <return type="Vector4i" />
+ <param index="0" name="with" type="Vector4i" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4i(mini(x, with.x), mini(y, with.y), mini(z, with.z), mini(w, with.w))[/code].
+ </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="mini" qualifiers="const">
+ <return type="Vector4i" />
+ <param index="0" name="with" type="int" />
+ <description>
+ Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4i(mini(x, with), mini(y, with), mini(z, with), mini(w, with))[/code].
+ </description>
+ </method>
<method name="sign" qualifiers="const">
<return type="Vector4i" />
<description>
@@ -110,6 +146,13 @@
Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step].
</description>
</method>
+ <method name="snappedi" qualifiers="const">
+ <return type="Vector4i" />
+ <param index="0" name="step" type="int" />
+ <description>
+ Returns a new vector with each component snapped to the closest multiple of [param step].
+ </description>
+ </method>
</methods>
<members>
<member name="w" type="int" setter="" getter="" default="0">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index cf33eac9c7..b288ee7ff6 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -407,6 +407,9 @@
- 8×8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware
[/codeblock]
</member>
+ <member name="vrs_update_mode" type="int" setter="set_vrs_update_mode" getter="get_vrs_update_mode" enum="Viewport.VRSUpdateMode" default="1">
+ Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored.
+ </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>
@@ -664,5 +667,17 @@
<constant name="VRS_MAX" value="3" enum="VRSMode">
Represents the size of the [enum VRSMode] enum.
</constant>
+ <constant name="VRS_UPDATE_DISABLED" value="0" enum="VRSUpdateMode">
+ The input texture for variable rate shading will not be processed.
+ </constant>
+ <constant name="VRS_UPDATE_ONCE" value="1" enum="VRSUpdateMode">
+ The input texture for variable rate shading will be processed once.
+ </constant>
+ <constant name="VRS_UPDATE_ALWAYS" value="2" enum="VRSUpdateMode">
+ The input texture for variable rate shading will be processed each frame.
+ </constant>
+ <constant name="VRS_UPDATE_MAX" value="3" enum="VRSUpdateMode">
+ Represents the size of the [enum VRSUpdateMode] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeComment.xml b/doc/classes/VisualShaderNodeComment.xml
new file mode 100644
index 0000000000..28496a715a
--- /dev/null
+++ b/doc/classes/VisualShaderNodeComment.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeComment" inherits="VisualShaderNodeFrame" deprecated="This class has no function anymore and only exists for compatibility." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Only exists for compatibility. Use [VisualShaderNodeFrame] as a replacement.
+ </brief_description>
+ <description>
+ This node was replaced by [VisualShaderNodeFrame] and only exists to preserve compatibility. In the [VisualShader] editor it behaves exactly like [VisualShaderNodeFrame].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="description" type="String" setter="set_description" getter="get_description" default="&quot;&quot;">
+ This property only exists to preserve data authored in earlier versions of Godot. It has currently no function.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/VisualShaderNodeFrame.xml b/doc/classes/VisualShaderNodeFrame.xml
index 3126a56abe..a86587f16a 100644
--- a/doc/classes/VisualShaderNodeFrame.xml
+++ b/doc/classes/VisualShaderNodeFrame.xml
@@ -4,7 +4,7 @@
A frame other visual shader nodes can be attached to for better organization.
</brief_description>
<description>
- A rectangular frame that can be used to group visual shader nodes together to improve organization.
+ A rectangular frame that can be used to group visual shader nodes together to improve organization.
Nodes attached to the frame will move with it when it is dragged and it can automatically resize to enclose all attached nodes.
Its title, description and color can be customized.
</description>
diff --git a/doc/classes/VisualShaderNodeReroute.xml b/doc/classes/VisualShaderNodeReroute.xml
new file mode 100644
index 0000000000..1baaa7bbb6
--- /dev/null
+++ b/doc/classes/VisualShaderNodeReroute.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeReroute" inherits="VisualShaderNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A node that allows rerouting a connection within the visual shader graph.
+ </brief_description>
+ <description>
+ Automatically adapts its port type to the type of the incoming connection and ensures valid connections.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_port_type" qualifiers="const">
+ <return type="int" enum="VisualShaderNode.PortType" />
+ <description>
+ Returns the port type of the reroute node.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/WorkerThreadPool.xml b/doc/classes/WorkerThreadPool.xml
index fa1f08b149..2b1bc136cb 100644
--- a/doc/classes/WorkerThreadPool.xml
+++ b/doc/classes/WorkerThreadPool.xml
@@ -58,6 +58,7 @@
Adds [param action] as a group task to be executed by the worker threads. The [Callable] will be called a number of times based on [param elements], with the first thread calling it with the value [code]0[/code] as a parameter, and each consecutive execution incrementing this value by 1 until it reaches [code]element - 1[/code].
The number of threads the task is distributed to is defined by [param tasks_needed], where the default value [code]-1[/code] means it is distributed to all worker threads. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging.
Returns a group task ID that can be used by other methods.
+ [b]Warning:[/b] Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up.
</description>
</method>
<method name="add_task">
@@ -68,6 +69,7 @@
<description>
Adds [param action] as a task to be executed by a worker thread. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging.
Returns a task ID that can be used by other methods.
+ [b]Warning:[/b] Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up.
</description>
</method>
<method name="get_group_processed_element_count" qualifiers="const">
@@ -83,6 +85,7 @@
<param index="0" name="group_id" type="int" />
<description>
Returns [code]true[/code] if the group task with the given ID is completed.
+ [b]Note:[/b] You should only call this method between adding the group task and awaiting its completion.
</description>
</method>
<method name="is_task_completed" qualifiers="const">
@@ -90,6 +93,7 @@
<param index="0" name="task_id" type="int" />
<description>
Returns [code]true[/code] if the task with the given ID is completed.
+ [b]Note:[/b] You should only call this method between adding the task and awaiting its completion.
</description>
</method>
<method name="wait_for_group_task_completion">
diff --git a/doc/classes/XRBodyModifier3D.xml b/doc/classes/XRBodyModifier3D.xml
index 49a226c106..d08b92a56c 100644
--- a/doc/classes/XRBodyModifier3D.xml
+++ b/doc/classes/XRBodyModifier3D.xml
@@ -4,15 +4,15 @@
A node for driving body meshes from [XRBodyTracker] data.
</brief_description>
<description>
- This node uses body tracking data from a [XRBodyTracker] to animate the skeleton of a body mesh.
- This node positions itself at the [constant XRBodyTracker.JOINT_ROOT] position and scales itself to [member XRServer.world_scale]. Adding the body model as a child of this node will result in the model being positioned and scaled correctly for XR experiences.
+ This node uses body tracking data from an [XRBodyTracker] to pose the skeleton of a body mesh.
+ Positioning of the body is performed by creating an [XRNode3D] ancestor of the body mesh driven by the same [XRBodyTracker].
The body tracking position-data is scaled by [member Skeleton3D.motion_scale] when applied to the skeleton, which can be used to adjust the tracked body to match the scale of the body model.
</description>
<tutorials>
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<members>
- <member name="body_tracker" type="StringName" setter="set_body_tracker" getter="get_body_tracker" default="&amp;&quot;/user/body&quot;">
+ <member name="body_tracker" type="StringName" setter="set_body_tracker" getter="get_body_tracker" default="&amp;&quot;/user/body_tracker&quot;">
The name of the [XRBodyTracker] registered with [XRServer] to obtain the body tracking data from.
</member>
<member name="body_update" type="int" setter="set_body_update" getter="get_body_update" enum="XRBodyModifier3D.BodyUpdate" is_bitfield="true" default="7">
@@ -21,9 +21,6 @@
<member name="bone_update" type="int" setter="set_bone_update" getter="get_bone_update" enum="XRBodyModifier3D.BoneUpdate" default="0">
Specifies the type of updates to perform on the bones.
</member>
- <member name="show_when_tracked" type="bool" setter="set_show_when_tracked" getter="get_show_when_tracked" default="true">
- If true then the nodes visibility is determined by whether tracking data is available.
- </member>
</members>
<constants>
<constant name="BODY_UPDATE_UPPER_BODY" value="1" enum="BodyUpdate" is_bitfield="true">
diff --git a/doc/classes/XRBodyTracker.xml b/doc/classes/XRBodyTracker.xml
index 9c869b4f5f..06a4879953 100644
--- a/doc/classes/XRBodyTracker.xml
+++ b/doc/classes/XRBodyTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRBodyTracker" inherits="RefCounted" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="XRBodyTracker" inherits="XRPositionalTracker" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A tracked body in XR.
</brief_description>
@@ -49,6 +49,7 @@
<member name="has_tracking_data" type="bool" setter="set_has_tracking_data" getter="get_has_tracking_data" default="false">
If [code]true[/code], the body tracking data is valid.
</member>
+ <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" overrides="XRTracker" enum="XRServer.TrackerType" default="32" />
</members>
<constants>
<constant name="BODY_FLAG_UPPER_BODY_SUPPORTED" value="1" enum="BodyFlags" is_bitfield="true">
diff --git a/doc/classes/XRControllerTracker.xml b/doc/classes/XRControllerTracker.xml
new file mode 100644
index 0000000000..50727a7633
--- /dev/null
+++ b/doc/classes/XRControllerTracker.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRControllerTracker" inherits="XRPositionalTracker" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A tracked controller.
+ </brief_description>
+ <description>
+ An instance of this object represents a controller that is tracked.
+ As controllers are turned on and the [XRInterface] detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [XRServer].
+ The [XRController3D] consumes objects of this type and should be used in your project.
+ </description>
+ <tutorials>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
+ </tutorials>
+ <members>
+ <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" overrides="XRTracker" enum="XRServer.TrackerType" default="2" />
+ </members>
+</class>
diff --git a/doc/classes/XRFaceModifier3D.xml b/doc/classes/XRFaceModifier3D.xml
index 8caa74cff7..9599051b1b 100644
--- a/doc/classes/XRFaceModifier3D.xml
+++ b/doc/classes/XRFaceModifier3D.xml
@@ -12,7 +12,7 @@
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<members>
- <member name="face_tracker" type="StringName" setter="set_face_tracker" getter="get_face_tracker" default="&amp;&quot;/user/head&quot;">
+ <member name="face_tracker" type="StringName" setter="set_face_tracker" getter="get_face_tracker" default="&amp;&quot;/user/face_tracker&quot;">
The [XRFaceTracker] path.
</member>
<member name="target" type="NodePath" setter="set_target" getter="get_target" default="NodePath(&quot;&quot;)">
diff --git a/doc/classes/XRFaceTracker.xml b/doc/classes/XRFaceTracker.xml
index 96ed137324..23a9a9cb17 100644
--- a/doc/classes/XRFaceTracker.xml
+++ b/doc/classes/XRFaceTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRFaceTracker" inherits="RefCounted" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="XRFaceTracker" inherits="XRTracker" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A tracked face.
</brief_description>
@@ -31,6 +31,7 @@
<member name="blend_shapes" type="PackedFloat32Array" setter="set_blend_shapes" getter="get_blend_shapes" default="PackedFloat32Array()">
The array of face blend shape weights with indices corresponding to the [enum BlendShapeEntry] enum.
</member>
+ <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" overrides="XRTracker" enum="XRServer.TrackerType" default="64" />
</members>
<constants>
<constant name="FT_EYE_LOOK_OUT_RIGHT" value="0" enum="BlendShapeEntry">
diff --git a/doc/classes/XRHandModifier3D.xml b/doc/classes/XRHandModifier3D.xml
index 9ff27bb982..09ff321070 100644
--- a/doc/classes/XRHandModifier3D.xml
+++ b/doc/classes/XRHandModifier3D.xml
@@ -4,8 +4,8 @@
A node for driving hand meshes from [XRHandTracker] data.
</brief_description>
<description>
- This node uses hand tracking data from a [XRHandTracker] to animate the skeleton of a hand mesh.
- This node positions itself at the [constant XRHandTracker.HAND_JOINT_PALM] position and scales itself to [member XRServer.world_scale]. Adding the hand model as a child of this node will result in the model being positioned and scaled correctly for XR experiences.
+ This node uses hand tracking data from an [XRHandTracker] to pose the skeleton of a hand mesh.
+ Positioning of hands is performed by creating an [XRNode3D] ancestor of the hand mesh driven by the same [XRHandTracker].
The hand tracking position-data is scaled by [member Skeleton3D.motion_scale] when applied to the skeleton, which can be used to adjust the tracked hand to match the scale of the hand model.
</description>
<tutorials>
@@ -15,7 +15,7 @@
<member name="bone_update" type="int" setter="set_bone_update" getter="get_bone_update" enum="XRHandModifier3D.BoneUpdate" default="0">
Specifies the type of updates to perform on the bones.
</member>
- <member name="hand_tracker" type="StringName" setter="set_hand_tracker" getter="get_hand_tracker" default="&amp;&quot;/user/left&quot;">
+ <member name="hand_tracker" type="StringName" setter="set_hand_tracker" getter="get_hand_tracker" default="&amp;&quot;/user/hand_tracker/left&quot;">
The name of the [XRHandTracker] registered with [XRServer] to obtain the hand tracking data from.
</member>
</members>
diff --git a/doc/classes/XRHandTracker.xml b/doc/classes/XRHandTracker.xml
index 932fec083a..636af6625b 100644
--- a/doc/classes/XRHandTracker.xml
+++ b/doc/classes/XRHandTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRHandTracker" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="XRHandTracker" inherits="XRPositionalTracker" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A tracked hand in XR.
</brief_description>
@@ -88,26 +88,16 @@
</method>
</methods>
<members>
- <member name="hand" type="int" setter="set_hand" getter="get_hand" enum="XRHandTracker.Hand" default="0">
- The type of hand.
- </member>
+ <member name="hand" type="int" setter="set_tracker_hand" getter="get_tracker_hand" overrides="XRPositionalTracker" enum="XRPositionalTracker.TrackerHand" default="1" />
<member name="hand_tracking_source" type="int" setter="set_hand_tracking_source" getter="get_hand_tracking_source" enum="XRHandTracker.HandTrackingSource" default="0">
The source of the hand tracking data.
</member>
<member name="has_tracking_data" type="bool" setter="set_has_tracking_data" getter="get_has_tracking_data" default="false">
If [code]true[/code], the hand tracking data is valid.
</member>
+ <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" overrides="XRTracker" enum="XRServer.TrackerType" default="16" />
</members>
<constants>
- <constant name="HAND_LEFT" value="0" enum="Hand">
- A left hand.
- </constant>
- <constant name="HAND_RIGHT" value="1" enum="Hand">
- A right hand.
- </constant>
- <constant name="HAND_MAX" value="2" enum="Hand">
- Represents the size of the [enum Hand] enum.
- </constant>
<constant name="HAND_TRACKING_SOURCE_UNKNOWN" value="0" enum="HandTrackingSource">
The source of hand tracking data is unknown.
</constant>
diff --git a/doc/classes/XRNode3D.xml b/doc/classes/XRNode3D.xml
index 3da1873ed8..dfe5600fcc 100644
--- a/doc/classes/XRNode3D.xml
+++ b/doc/classes/XRNode3D.xml
@@ -46,6 +46,9 @@
The name of the pose we're bound to. Which poses a tracker supports is not known during design time.
Godot defines number of standard pose names such as [code]aim[/code] and [code]grip[/code] but other may be configured within a given [XRInterface].
</member>
+ <member name="show_when_tracked" type="bool" setter="set_show_when_tracked" getter="get_show_when_tracked" default="false">
+ Enables showing the node when tracking starts, and hiding the node when tracking is lost.
+ </member>
<member name="tracker" type="StringName" setter="set_tracker" getter="get_tracker" default="&amp;&quot;&quot;">
The name of the tracker we're bound to. Which trackers are available is not known during design time.
Godot defines a number of standard trackers such as [code]left_hand[/code] and [code]right_hand[/code] but others may be configured within a given [XRInterface].
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index bd2432af50..2b2eae0c5e 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRPositionalTracker" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="XRPositionalTracker" inherits="XRTracker" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A tracked object.
</brief_description>
<description>
An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally.
As controllers are turned on and the [XRInterface] detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [XRServer].
- The [XRController3D] and [XRAnchor3D] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDExtension-based interfaces can interact with them.
+ The [XRNode3D] 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="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
- <method name="get_input" qualifiers="const">
+ <method name="get_input" qualifiers="const" deprecated="Use through [XRControllerTracker].">
<return type="Variant" />
<param index="0" name="name" type="StringName" />
<description>
@@ -40,7 +40,7 @@
Marks this pose as invalid, we don't clear the last reported state but it allows users to decide if trackers need to be hidden if we lose tracking or just remain at their last known position.
</description>
</method>
- <method name="set_input">
+ <method name="set_input" deprecated="Use through [XRControllerTracker].">
<return type="void" />
<param index="0" name="name" type="StringName" />
<param index="1" name="value" type="Variant" />
@@ -61,23 +61,12 @@
</method>
</methods>
<members>
- <member name="description" type="String" setter="set_tracker_desc" getter="get_tracker_desc" default="&quot;&quot;">
- The description of this tracker.
- </member>
<member name="hand" type="int" setter="set_tracker_hand" getter="get_tracker_hand" enum="XRPositionalTracker.TrackerHand" default="0">
Defines which hand this tracker relates to.
</member>
- <member name="name" type="StringName" setter="set_tracker_name" getter="get_tracker_name" default="&amp;&quot;Unknown&quot;">
- The unique name of this tracker. The trackers that are available differ between various XR runtimes and can often be configured by the user. Godot maintains a number of reserved names that it expects the [XRInterface] to implement if applicable:
- - [code]left_hand[/code] identifies the controller held in the players left hand
- - [code]right_hand[/code] identifies the controller held in the players right hand
- </member>
<member name="profile" type="String" setter="set_tracker_profile" getter="get_tracker_profile" default="&quot;&quot;">
The profile associated with this tracker, interface dependent but will indicate the type of controller being tracked.
</member>
- <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" enum="XRServer.TrackerType" default="128">
- The type of tracker.
- </member>
</members>
<signals>
<signal name="button_pressed">
@@ -135,5 +124,8 @@
<constant name="TRACKER_HAND_RIGHT" value="2" enum="TrackerHand">
This tracker is the right hand controller.
</constant>
+ <constant name="TRACKER_HAND_MAX" value="3" enum="TrackerHand">
+ Represents the size of the [enum TrackerHand] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 671cc8f15c..4179ba821c 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -10,30 +10,6 @@
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
- <method name="add_body_tracker">
- <return type="void" />
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="body_tracker" type="XRBodyTracker" />
- <description>
- Registers a new [XRBodyTracker] that tracks the joints of a body.
- </description>
- </method>
- <method name="add_face_tracker">
- <return type="void" />
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="face_tracker" type="XRFaceTracker" />
- <description>
- Registers a new [XRFaceTracker] that tracks the blend shapes of a face.
- </description>
- </method>
- <method name="add_hand_tracker">
- <return type="void" />
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="hand_tracker" type="XRHandTracker" />
- <description>
- Registers a new [XRHandTracker] that tracks the joints of a hand.
- </description>
- </method>
<method name="add_interface">
<return type="void" />
<param index="0" name="interface" type="XRInterface" />
@@ -43,9 +19,9 @@
</method>
<method name="add_tracker">
<return type="void" />
- <param index="0" name="tracker" type="XRPositionalTracker" />
+ <param index="0" name="tracker" type="XRTracker" />
<description>
- Registers a new [XRPositionalTracker] that tracks a spatial location in real space.
+ Registers a new [XRTracker] that tracks a physical object.
</description>
</method>
<method name="center_on_hmd">
@@ -61,8 +37,8 @@
You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
</description>
</method>
- <method name="clear_reference_frame" qualifiers="const">
- <return type="Transform3D" />
+ <method name="clear_reference_frame">
+ <return type="void" />
<description>
Clears the reference frame that was set by previous calls to [method center_on_hmd].
</description>
@@ -74,45 +50,6 @@
Finds an interface by its [param name]. For example, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
</description>
</method>
- <method name="get_body_tracker" qualifiers="const">
- <return type="XRBodyTracker" />
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Returns the [XRBodyTracker] with the given tracker name.
- </description>
- </method>
- <method name="get_body_trackers" qualifiers="const">
- <return type="Dictionary" />
- <description>
- Returns a dictionary of the registered body trackers. Each element of the dictionary is a tracker name mapping to the [XRBodyTracker] instance.
- </description>
- </method>
- <method name="get_face_tracker" qualifiers="const">
- <return type="XRFaceTracker" />
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Returns the [XRFaceTracker] with the given tracker name.
- </description>
- </method>
- <method name="get_face_trackers" qualifiers="const">
- <return type="Dictionary" />
- <description>
- Returns a dictionary of the registered face trackers. Each element of the dictionary is a tracker name mapping to the [XRFaceTracker] instance.
- </description>
- </method>
- <method name="get_hand_tracker" qualifiers="const">
- <return type="XRHandTracker" />
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Returns the [XRHandTracker] with the given tracker name.
- </description>
- </method>
- <method name="get_hand_trackers" qualifiers="const">
- <return type="Dictionary" />
- <description>
- Returns a dictionary of the registered hand trackers. Each element of the dictionary is a tracker name mapping to the [XRHandTracker] instance.
- </description>
- </method>
<method name="get_hmd_transform">
<return type="Transform3D" />
<description>
@@ -145,7 +82,7 @@
</description>
</method>
<method name="get_tracker" qualifiers="const">
- <return type="XRPositionalTracker" />
+ <return type="XRTracker" />
<param index="0" name="tracker_name" type="StringName" />
<description>
Returns the positional tracker with the given [param tracker_name].
@@ -158,27 +95,6 @@
Returns a dictionary of trackers for [param tracker_types].
</description>
</method>
- <method name="remove_body_tracker">
- <return type="void" />
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Removes a registered [XRBodyTracker].
- </description>
- </method>
- <method name="remove_face_tracker">
- <return type="void" />
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Removes a registered [XRFaceTracker].
- </description>
- </method>
- <method name="remove_hand_tracker">
- <return type="void" />
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Removes a registered [XRHandTracker].
- </description>
- </method>
<method name="remove_interface">
<return type="void" />
<param index="0" name="interface" type="XRInterface" />
@@ -188,9 +104,9 @@
</method>
<method name="remove_tracker">
<return type="void" />
- <param index="0" name="tracker" type="XRPositionalTracker" />
+ <param index="0" name="tracker" type="XRTracker" />
<description>
- Removes this positional [param tracker].
+ Removes this [param tracker].
</description>
</method>
</methods>
@@ -207,66 +123,6 @@
</member>
</members>
<signals>
- <signal name="body_tracker_added">
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="body_tracker" type="XRBodyTracker" />
- <description>
- Emitted when a new body tracker is added.
- </description>
- </signal>
- <signal name="body_tracker_removed">
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Emitted when a body tracker is removed.
- </description>
- </signal>
- <signal name="body_tracker_updated">
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="body_tracker" type="XRBodyTracker" />
- <description>
- Emitted when an existing body tracker is updated.
- </description>
- </signal>
- <signal name="face_tracker_added">
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="face_tracker" type="XRFaceTracker" />
- <description>
- Emitted when a new face tracker is added.
- </description>
- </signal>
- <signal name="face_tracker_removed">
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Emitted when a face tracker is removed.
- </description>
- </signal>
- <signal name="face_tracker_updated">
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="face_tracker" type="XRFaceTracker" />
- <description>
- Emitted when an existing face tracker is updated.
- </description>
- </signal>
- <signal name="hand_tracker_added">
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="hand_tracker" type="XRHandTracker" />
- <description>
- Emitted when a new hand tracker is added.
- </description>
- </signal>
- <signal name="hand_tracker_removed">
- <param index="0" name="tracker_name" type="StringName" />
- <description>
- Emitted when a hand tracker is removed.
- </description>
- </signal>
- <signal name="hand_tracker_updated">
- <param index="0" name="tracker_name" type="StringName" />
- <param index="1" name="hand_tracker" type="XRHandTracker" />
- <description>
- Emitted when an existing hand tracker is updated.
- </description>
- </signal>
<signal name="interface_added">
<param index="0" name="interface_name" type="StringName" />
<description>
@@ -314,6 +170,15 @@
<constant name="TRACKER_ANCHOR" value="8" enum="TrackerType">
The tracker tracks the location and size of an AR anchor.
</constant>
+ <constant name="TRACKER_HAND" value="16" enum="TrackerType">
+ The tracker tracks the location and joints of a hand.
+ </constant>
+ <constant name="TRACKER_BODY" value="32" enum="TrackerType">
+ The tracker tracks the location and joints of a body.
+ </constant>
+ <constant name="TRACKER_FACE" value="64" enum="TrackerType">
+ The tracker tracks the expressions of a face.
+ </constant>
<constant name="TRACKER_ANY_KNOWN" value="127" enum="TrackerType">
Used internally to filter trackers of any known type.
</constant>
diff --git a/doc/classes/XRTracker.xml b/doc/classes/XRTracker.xml
new file mode 100644
index 0000000000..00a44bd03e
--- /dev/null
+++ b/doc/classes/XRTracker.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRTracker" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A tracked object.
+ </brief_description>
+ <description>
+ This object is the base of all XR trackers.
+ </description>
+ <tutorials>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
+ </tutorials>
+ <members>
+ <member name="description" type="String" setter="set_tracker_desc" getter="get_tracker_desc" default="&quot;&quot;">
+ The description of this tracker.
+ </member>
+ <member name="name" type="StringName" setter="set_tracker_name" getter="get_tracker_name" default="&amp;&quot;Unknown&quot;">
+ The unique name of this tracker. The trackers that are available differ between various XR runtimes and can often be configured by the user. Godot maintains a number of reserved names that it expects the [XRInterface] to implement if applicable:
+ - [code]head[/code] identifies the [XRPositionalTracker] of the players head
+ - [code]left_hand[/code] identifies the [XRControllerTracker] in the players left hand
+ - [code]right_hand[/code] identifies the [XRControllerTracker] in the players right hand
+ - [code]/user/hand_tracker/left[/code] identifies the [XRHandTracker] for the players left hand
+ - [code]/user/hand_tracker/right[/code] identifies the [XRHandTracker] for the players right hand
+ - [code]/user/body_tracker[/code] identifies the [XRBodyTracker] for the players body
+ - [code]/user/face_tracker[/code] identifies the [XRFaceTracker] for the players face
+ </member>
+ <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" enum="XRServer.TrackerType" default="128">
+ The type of tracker.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/XRVRS.xml b/doc/classes/XRVRS.xml
new file mode 100644
index 0000000000..b19b461fab
--- /dev/null
+++ b/doc/classes/XRVRS.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRVRS" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Helper class for XR interfaces that generates VRS images.
+ </brief_description>
+ <description>
+ This class is used by various XR interfaces to generate VRS textures that can be used to speed up rendering.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="make_vrs_texture">
+ <return type="RID" />
+ <param index="0" name="target_size" type="Vector2" />
+ <param index="1" name="eye_foci" type="PackedVector2Array" />
+ <description>
+ Generates the VRS texture based on a render [param target_size] adjusted by our VRS tile size. For each eyes focal point passed in [param eye_foci] a layer is created. Focal point should be in NDC.
+ The result will be cached, requesting a VRS texture with unchanged parameters and settings will return the cached RID.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="vrs_min_radius" type="float" setter="set_vrs_min_radius" getter="get_vrs_min_radius" default="20.0">
+ The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size.
+ </member>
+ <member name="vrs_strength" type="float" setter="set_vrs_strength" getter="get_vrs_strength" default="1.0">
+ The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is.
+ </member>
+ </members>
+</class>