summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml103
-rw-r--r--doc/classes/AABB.xml6
-rw-r--r--doc/classes/AnimationLibrary.xml6
-rw-r--r--doc/classes/AnimationMixer.xml44
-rw-r--r--doc/classes/AnimationNodeTimeSeek.xml5
-rw-r--r--doc/classes/AudioStream.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml1
-rw-r--r--doc/classes/CollisionShape3D.xml6
-rw-r--r--doc/classes/Control.xml2
-rw-r--r--doc/classes/EditorSpinSlider.xml5
-rw-r--r--doc/classes/Engine.xml16
-rw-r--r--doc/classes/FileAccess.xml15
-rw-r--r--doc/classes/LightmapGI.xml1
-rw-r--r--doc/classes/LookAtModifier3D.xml14
-rw-r--r--doc/classes/MeshLibrary.xml15
-rw-r--r--doc/classes/OS.xml1
-rw-r--r--doc/classes/Object.xml1
-rw-r--r--doc/classes/PackedInt64Array.xml2
-rw-r--r--doc/classes/PackedVector4Array.xml1
-rw-r--r--doc/classes/Projection.xml12
-rw-r--r--doc/classes/RDVertexAttribute.xml5
-rw-r--r--doc/classes/RetargetModifier3D.xml34
-rw-r--r--doc/classes/Skeleton3D.xml5
-rw-r--r--doc/classes/StreamPeer.xml13
-rw-r--r--doc/classes/SubViewportContainer.xml4
-rw-r--r--doc/classes/TranslationServer.xml3
-rw-r--r--doc/classes/Vector2.xml4
-rw-r--r--doc/classes/Vector2i.xml4
-rw-r--r--doc/classes/Vector3.xml6
-rw-r--r--doc/classes/Vector3i.xml6
-rw-r--r--doc/classes/Vector4.xml8
-rw-r--r--doc/classes/Vector4i.xml8
-rw-r--r--doc/classes/Viewport.xml7
-rw-r--r--doc/classes/VisualShaderNodeColorFunc.xml27
-rw-r--r--doc/classes/Window.xml2
-rwxr-xr-xdoc/tools/make_rst.py4
36 files changed, 278 insertions, 120 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 1721134d08..182848db71 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -2143,49 +2143,49 @@
Space key.
</constant>
<constant name="KEY_EXCLAM" value="33" enum="Key">
- ! key.
+ Exclamation mark ([code]![/code]) key.
</constant>
<constant name="KEY_QUOTEDBL" value="34" enum="Key">
- " key.
+ Double quotation mark ([code]"[/code]) key.
</constant>
- <constant name="KEY_NUMBERSIGN" value="35" enum="Key">
- # key.
+ <constant name="KEY_NUMBERSIGN" value="35" enum="Key" keywords="pound, hash">
+ Number sign or [i]hash[/i] ([code]#[/code]) key.
</constant>
<constant name="KEY_DOLLAR" value="36" enum="Key">
- $ key.
+ Dollar sign ([code]$[/code]) key.
</constant>
<constant name="KEY_PERCENT" value="37" enum="Key">
- % key.
+ Percent sign ([code]%[/code]) key.
</constant>
<constant name="KEY_AMPERSAND" value="38" enum="Key">
- &amp; key.
+ Ampersand ([code]&amp;[/code]) key.
</constant>
<constant name="KEY_APOSTROPHE" value="39" enum="Key">
- ' key.
+ Apostrophe ([code]'[/code]) key.
</constant>
- <constant name="KEY_PARENLEFT" value="40" enum="Key">
- ( key.
+ <constant name="KEY_PARENLEFT" value="40" enum="Key" keywords="open round bracket">
+ Left parenthesis ([code]([/code]) key.
</constant>
- <constant name="KEY_PARENRIGHT" value="41" enum="Key">
- ) key.
+ <constant name="KEY_PARENRIGHT" value="41" enum="Key" keywords="close round bracket">
+ Right parenthesis ([code])[/code]) key.
</constant>
<constant name="KEY_ASTERISK" value="42" enum="Key">
- * key.
+ Asterisk ([code]*[/code]) key.
</constant>
<constant name="KEY_PLUS" value="43" enum="Key">
- + key.
+ Plus ([code]+[/code]) key.
</constant>
<constant name="KEY_COMMA" value="44" enum="Key">
- , key.
+ Comma ([code],[/code]) key.
</constant>
- <constant name="KEY_MINUS" value="45" enum="Key">
- - key.
+ <constant name="KEY_MINUS" value="45" enum="Key" keywords="hyphen">
+ Minus ([code]-[/code]) key.
</constant>
- <constant name="KEY_PERIOD" value="46" enum="Key">
- . key.
+ <constant name="KEY_PERIOD" value="46" enum="Key" keywords="dot">
+ Period ([code].[/code]) key.
</constant>
<constant name="KEY_SLASH" value="47" enum="Key">
- / key.
+ Slash ([code]/[/code]) key.
</constant>
<constant name="KEY_0" value="48" enum="Key">
Number 0 key.
@@ -2218,25 +2218,25 @@
Number 9 key.
</constant>
<constant name="KEY_COLON" value="58" enum="Key">
- : key.
+ Colon ([code]:[/code]) key.
</constant>
<constant name="KEY_SEMICOLON" value="59" enum="Key">
- ; key.
+ Semicolon ([code];[/code]) key.
</constant>
<constant name="KEY_LESS" value="60" enum="Key">
- &lt; key.
+ Less-than sign ([code]&lt;[/code]) key.
</constant>
<constant name="KEY_EQUAL" value="61" enum="Key">
- = key.
+ Equal sign ([code]=[/code]) key.
</constant>
<constant name="KEY_GREATER" value="62" enum="Key">
- &gt; key.
+ Greater-than sign ([code]&gt;[/code]) key.
</constant>
<constant name="KEY_QUESTION" value="63" enum="Key">
- ? key.
+ Question mark ([code]?[/code]) key.
</constant>
- <constant name="KEY_AT" value="64" enum="Key">
- @ key.
+ <constant name="KEY_AT" value="64" enum="Key" keywords="commercial at">
+ At sign ([code]@[/code]) key.
</constant>
<constant name="KEY_A" value="65" enum="Key">
A key.
@@ -2316,41 +2316,41 @@
<constant name="KEY_Z" value="90" enum="Key">
Z key.
</constant>
- <constant name="KEY_BRACKETLEFT" value="91" enum="Key">
- [ key.
+ <constant name="KEY_BRACKETLEFT" value="91" enum="Key" keywords="open square bracket">
+ Left bracket ([code][lb][/code]) key.
</constant>
<constant name="KEY_BACKSLASH" value="92" enum="Key">
- \ key.
+ Backslash ([code]\[/code]) key.
</constant>
- <constant name="KEY_BRACKETRIGHT" value="93" enum="Key">
- ] key.
+ <constant name="KEY_BRACKETRIGHT" value="93" enum="Key" keywords="close square bracket">
+ Right bracket ([code][rb][/code]) key.
</constant>
- <constant name="KEY_ASCIICIRCUM" value="94" enum="Key">
- ^ key.
+ <constant name="KEY_ASCIICIRCUM" value="94" enum="Key" keywords="caret">
+ Caret ([code]^[/code]) key.
</constant>
- <constant name="KEY_UNDERSCORE" value="95" enum="Key">
- _ key.
+ <constant name="KEY_UNDERSCORE" value="95" enum="Key" keywords="underline">
+ Underscore ([code]_[/code]) key.
</constant>
- <constant name="KEY_QUOTELEFT" value="96" enum="Key">
- ` key.
+ <constant name="KEY_QUOTELEFT" value="96" enum="Key" keywords="backtick, backquote">
+ Backtick ([code]`[/code]) key.
</constant>
- <constant name="KEY_BRACELEFT" value="123" enum="Key">
- { key.
+ <constant name="KEY_BRACELEFT" value="123" enum="Key" keywords="open curly bracket">
+ Left brace ([code]{[/code]) key.
</constant>
- <constant name="KEY_BAR" value="124" enum="Key">
- | key.
+ <constant name="KEY_BAR" value="124" enum="Key" keywords="pipe">
+ Vertical bar or [i]pipe[/i] ([code]|[/code]) key.
</constant>
- <constant name="KEY_BRACERIGHT" value="125" enum="Key">
- } key.
+ <constant name="KEY_BRACERIGHT" value="125" enum="Key" keywords="close curly bracket">
+ Right brace ([code]}[/code]) key.
</constant>
<constant name="KEY_ASCIITILDE" value="126" enum="Key">
- ~ key.
+ Tilde ([code]~[/code]) key.
</constant>
<constant name="KEY_YEN" value="165" enum="Key">
- ¥ key.
+ Yen symbol ([code]¥[/code]) key.
</constant>
- <constant name="KEY_SECTION" value="167" enum="Key">
- § key.
+ <constant name="KEY_SECTION" value="167" enum="Key" keywords="silcrow">
+ Section sign ([code]§[/code]) key.
</constant>
<constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask" is_bitfield="true">
Key Code mask.
@@ -2941,7 +2941,10 @@
[/codeblock]
[b]Note:[/b] A [Callable] cannot be properly serialized and stored in a file, so it is recommended to use [constant PROPERTY_USAGE_EDITOR] instead of [constant PROPERTY_USAGE_DEFAULT].
</constant>
- <constant name="PROPERTY_HINT_MAX" value="40" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_ONESHOT" value="40" enum="PropertyHint">
+ Hints that a property will be changed on its own after setting, such as [member AudioStreamPlayer.playing] or [member GPUParticles3D.emitting].
+ </constant>
+ <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint">
Represents the size of the [enum PropertyHint] enum.
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags" is_bitfield="true">
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index ae2de055cb..57ac241eb2 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -345,14 +345,14 @@
</methods>
<members>
<member name="end" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
- The ending point. This is usually the corner on the top-right and forward of the bounding box, and is equivalent to [code]position + size[/code]. Setting this point affects the [member size].
+ The ending point. This is usually the corner on the top-right and back of the bounding box, and is equivalent to [code]position + size[/code]. Setting this point affects the [member size].
</member>
<member name="position" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
- The origin point. This is usually the corner on the bottom-left and back of the bounding box.
+ The origin point. This is usually the corner on the bottom-left and forward of the bounding box.
</member>
<member name="size" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
The bounding box's width, height, and depth starting from [member position]. Setting this value also affects the [member end] point.
- [b]Note:[/b] It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the [member position] is the bottom-left-back corner, and the [member end] is the top-right-forward corner. To get an equivalent bounding box with non-negative size, use [method abs].
+ [b]Note:[/b] It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the [member position] is the bottom-left-forward corner, and the [member end] is the top-right-back corner. To get an equivalent bounding box with non-negative size, use [method abs].
</member>
</members>
<operators>
diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml
index 7f87ea4616..51588a6052 100644
--- a/doc/classes/AnimationLibrary.xml
+++ b/doc/classes/AnimationLibrary.xml
@@ -31,6 +31,12 @@
Returns the keys for the [Animation]s stored in the library.
</description>
</method>
+ <method name="get_animation_list_size" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the key count for the [Animation]s stored in the library.
+ </description>
+ </method>
<method name="has_animation" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="StringName" />
diff --git a/doc/classes/AnimationMixer.xml b/doc/classes/AnimationMixer.xml
index d762ffa5a6..36cb675776 100644
--- a/doc/classes/AnimationMixer.xml
+++ b/doc/classes/AnimationMixer.xml
@@ -112,13 +112,13 @@
The most basic example is applying position to [CharacterBody3D]:
[codeblocks]
[gdscript]
- var current_rotation: Quaternion
+ var current_rotation
func _process(delta):
if Input.is_action_just_pressed("animate"):
current_rotation = get_quaternion()
state_machine.travel("Animate")
- var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta
+ var velocity = current_rotation * animation_tree.get_root_motion_position() / delta
set_velocity(velocity)
move_and_slide()
[/gdscript]
@@ -130,7 +130,20 @@
if Input.is_action_just_pressed("animate"):
state_machine.travel("Animate")
set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation())
- var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta
+ var velocity = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta
+ set_velocity(velocity)
+ move_and_slide()
+ [/gdscript]
+ [/codeblocks]
+ If [member root_motion_local] is [code]true[/code], return the pre-multiplied translation value with the inverted rotation.
+ In this case, the code can be written as follows:
+ [codeblocks]
+ [gdscript]
+ func _process(delta):
+ if Input.is_action_just_pressed("animate"):
+ state_machine.travel("Animate")
+ set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation())
+ var velocity = get_quaternion() * animation_tree.get_root_motion_position() / delta
set_velocity(velocity)
move_and_slide()
[/gdscript]
@@ -145,13 +158,13 @@
For example, if an animation with only one key [code]Vector3(0, 0, 0)[/code] is played in the previous frame and then an animation with only one key [code]Vector3(1, 0, 1)[/code] is played in the next frame, the difference can be calculated as follows:
[codeblocks]
[gdscript]
- var prev_root_motion_position_accumulator: Vector3
+ var prev_root_motion_position_accumulator
func _process(delta):
if Input.is_action_just_pressed("animate"):
state_machine.travel("Animate")
- var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator()
- var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator
+ var current_root_motion_position_accumulator = animation_tree.get_root_motion_position_accumulator()
+ var difference = current_root_motion_position_accumulator - prev_root_motion_position_accumulator
prev_root_motion_position_accumulator = current_root_motion_position_accumulator
transform.origin += difference
[/gdscript]
@@ -185,13 +198,13 @@
For example, if an animation with only one key [code]Quaternion(0, 0, 0, 1)[/code] is played in the previous frame and then an animation with only one key [code]Quaternion(0, 0.707, 0, 0.707)[/code] is played in the next frame, the difference can be calculated as follows:
[codeblocks]
[gdscript]
- var prev_root_motion_rotation_accumulator: Quaternion
+ var prev_root_motion_rotation_accumulator
func _process(delta):
if Input.is_action_just_pressed("animate"):
state_machine.travel("Animate")
- var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_rotation_accumulator()
- var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator
+ var current_root_motion_rotation_accumulator = animation_tree.get_root_motion_rotation_accumulator()
+ var difference = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator
prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator
transform.basis *= Basis(difference)
[/gdscript]
@@ -208,8 +221,8 @@
The most basic example is applying scale to [CharacterBody3D]:
[codeblocks]
[gdscript]
- var current_scale: Vector3 = Vector3(1, 1, 1)
- var scale_accum: Vector3 = Vector3(1, 1, 1)
+ var current_scale = Vector3(1, 1, 1)
+ var scale_accum = Vector3(1, 1, 1)
func _process(delta):
if Input.is_action_just_pressed("animate"):
@@ -229,13 +242,13 @@
For example, if an animation with only one key [code]Vector3(1, 1, 1)[/code] is played in the previous frame and then an animation with only one key [code]Vector3(2, 2, 2)[/code] is played in the next frame, the difference can be calculated as follows:
[codeblocks]
[gdscript]
- var prev_root_motion_scale_accumulator: Vector3
+ var prev_root_motion_scale_accumulator
func _process(delta):
if Input.is_action_just_pressed("animate"):
state_machine.travel("Animate")
- var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator()
- var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator
+ var current_root_motion_scale_accumulator = animation_tree.get_root_motion_scale_accumulator()
+ var difference = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator
prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator
transform.basis = transform.basis.scaled(difference)
[/gdscript]
@@ -304,6 +317,9 @@
This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation (the animation with the key [code]"RESET"[/code]) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving.
This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation.
</member>
+ <member name="root_motion_local" type="bool" setter="set_root_motion_local" getter="is_root_motion_local">
+ If [code]true[/code], [method get_root_motion_position] value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation.
+ </member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. The [member root_motion_track] uses the same format as [method Animation.track_set_path], but note that a bone must be specified.
If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D], or [constant Animation.TYPE_SCALE_3D] the transformation will be canceled visually, and the animation will appear to stay in place. See also [method get_root_motion_position], [method get_root_motion_rotation], [method get_root_motion_scale], and [RootMotionView].
diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml
index d00b3fca3a..865e94ec43 100644
--- a/doc/classes/AnimationNodeTimeSeek.xml
+++ b/doc/classes/AnimationNodeTimeSeek.xml
@@ -30,4 +30,9 @@
<tutorials>
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
+ <members>
+ <member name="explicit_elapse" type="bool" setter="set_explicit_elapse" getter="is_explicit_elapse" default="true">
+ If [code]true[/code], some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key.
+ </member>
+ </members>
</class>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index 44edff122e..d11e070d89 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -48,7 +48,7 @@
<method name="_instantiate_playback" qualifiers="virtual const">
<return type="AudioStreamPlayback" />
<description>
- Override this method to customize the returned value of [method instantiate_playback]. Should returned a new [AudioStreamPlayback] created when the stream is played (such as by an [AudioStreamPlayer])..
+ Override this method to customize the returned value of [method instantiate_playback]. Should return a new [AudioStreamPlayback] created when the stream is played (such as by an [AudioStreamPlayer]).
</description>
</method>
<method name="_is_monophonic" qualifiers="virtual const">
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 93680de21e..900318e4f4 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -22,6 +22,7 @@
<description>
Returns the position in the [AudioStream] of the latest sound, in seconds. Returns [code]0.0[/code] if no sounds are playing.
[b]Note:[/b] The position is not always accurate, as the [AudioServer] does not mix audio every processed frame. To get more accurate results, add [method AudioServer.get_time_since_last_mix] to the returned position.
+ [b]Note:[/b] This method always returns [code]0.0[/code] if the [member stream] is an [AudioStreamInteractive], since it can have multiple clips playing at once.
</description>
</method>
<method name="get_stream_playback">
diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml
index a4e0ed0b28..69a7dd2b36 100644
--- a/doc/classes/CollisionShape3D.xml
+++ b/doc/classes/CollisionShape3D.xml
@@ -29,6 +29,12 @@
</method>
</methods>
<members>
+ <member name="debug_color" type="Color" setter="set_debug_color" getter="get_debug_color" default="Color(0, 0, 0, 0)">
+ The collision shape color that is displayed in the editor, or in the running project if [b]Debug &gt; Visible Collision Shapes[/b] is checked at the top of the editor. If this is reset to its default value of [code]Color(0, 0, 0, 0)[/code], the value of [member ProjectSettings.debug/shapes/collision/shape_color] will be used instead.
+ </member>
+ <member name="debug_fill" type="bool" setter="set_enable_debug_fill" getter="get_enable_debug_fill" default="true">
+ If [code]true[/code], when the shape is displayed, it will show a solid fill color in addition to its wireframe.
+ </member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false" keywords="enabled">
A disabled collision shape has no effect in the world.
</member>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 342e20759e..d22be4a52d 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -12,7 +12,7 @@
Call [method accept_event] so no other node receives the event. Once you accept an input, it becomes handled so [method Node._unhandled_input] will not process it.
Only one [Control] node can be in focus. Only the node in focus will receive events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus.
Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
- [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the Inspector.
+ [Theme] resources change the control's appearance. The [member theme] of a [Control] node affects all of its direct and indirect children (as long as a chain of controls is uninterrupted). To override some of the theme items, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can also override theme items in the Inspector.
[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class.
</description>
<tutorials>
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 83c65b736e..6cd375a46d 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -40,6 +40,11 @@
Emitted when the spinner/slider is ungrabbed.
</description>
</signal>
+ <signal name="updown_pressed">
+ <description>
+ Emitted when the updown button is pressed.
+ </description>
+ </signal>
<signal name="value_focus_entered">
<description>
Emitted when the value form gains focus.
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index bba5157053..3ae3753930 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -13,21 +13,7 @@
<return type="String" />
<description>
Returns the name of the CPU architecture the Godot binary was built for. Possible return values include [code]"x86_64"[/code], [code]"x86_32"[/code], [code]"arm64"[/code], [code]"arm32"[/code], [code]"rv64"[/code], [code]"riscv"[/code], [code]"ppc64"[/code], [code]"ppc"[/code], [code]"wasm64"[/code], and [code]"wasm32"[/code].
- To detect whether the current build is 64-bit, you can use the fact that all 64-bit architecture names contain [code]64[/code] in their name:
- [codeblocks]
- [gdscript]
- if "64" in Engine.get_architecture_name():
- print("Running a 64-bit build of Godot.")
- else:
- print("Running a 32-bit build of Godot.")
- [/gdscript]
- [csharp]
- if (Engine.GetArchitectureName().Contains("64"))
- GD.Print("Running a 64-bit build of Godot.");
- else
- GD.Print("Running a 32-bit build of Godot.");
- [/csharp]
- [/codeblocks]
+ To detect whether the current build is 64-bit, or the type of architecture, don't use the architecture name. Instead, use [method OS.has_feature] to check for the [code]"64"[/code] feature tag, or tags such as [code]"x86"[/code] or [code]"arm"[/code]. See the [url=$DOCS_URL/tutorials/export/feature_tags.html]Feature Tags[/url] documentation for more details.
[b]Note:[/b] This method does [i]not[/i] return the name of the system's CPU architecture (like [method OS.get_processor_name]). For example, when running an [code]x86_32[/code] Godot binary on an [code]x86_64[/code] system, the returned value will still be [code]"x86_32"[/code].
</description>
</method>
diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml
index 5c89b64429..846897a463 100644
--- a/doc/classes/FileAccess.xml
+++ b/doc/classes/FileAccess.xml
@@ -4,7 +4,7 @@
Provides methods for file reading and writing operations.
</brief_description>
<description>
- This class can be used to permanently store data in the user device's file system and to read from it. This is useful for store game save data or player configuration files.
+ This class can be used to permanently store data in the user device's file system and to read from it. This is useful for storing game save data or player configuration files.
Here's a sample on how to write and read from a file:
[codeblocks]
[gdscript]
@@ -173,6 +173,12 @@
Returns the next 32 bits from the file as a floating-point number.
</description>
</method>
+ <method name="get_half" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the next 16 bits from the file as a half-precision floating-point number.
+ </description>
+ </method>
<method name="get_hidden_attribute" qualifiers="static">
<return type="bool" />
<param index="0" name="file" type="String" />
@@ -471,6 +477,13 @@
Stores a floating-point number as 32 bits in the file.
</description>
</method>
+ <method name="store_half">
+ <return type="void" />
+ <param index="0" name="value" type="float" />
+ <description>
+ Stores a half-precision floating-point number as 16 bits in the file.
+ </description>
+ </method>
<method name="store_line">
<return type="void" />
<param index="0" name="line" type="String" />
diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml
index 0a492364ec..70265443a4 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -10,6 +10,7 @@
[b]Note:[/b] Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again.
[b]Note:[/b] Lightmap baking on [CSGShape3D]s and [PrimitiveMesh]es is not supported, as these cannot store UV2 data required for baking.
[b]Note:[/b] If no custom lightmappers are installed, [LightmapGI] can only be baked from devices that support the Forward+ or Mobile rendering backends.
+ [b]Note:[/b] The [LightmapGI] node only bakes light data for child nodes of its parent. Nodes further up the hierarchy of the scene will not be baked.
</description>
<tutorials>
<link title="Using Lightmap global illumination">$DOCS_URL/tutorials/3d/global_illumination/using_lightmap_gi.html</link>
diff --git a/doc/classes/LookAtModifier3D.xml b/doc/classes/LookAtModifier3D.xml
index e85da06c3a..2475de1868 100644
--- a/doc/classes/LookAtModifier3D.xml
+++ b/doc/classes/LookAtModifier3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LookAtModifier3D" inherits="SkeletonModifier3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- The [SkeletonModifier3D] rotates a bone to look a target.
+ The [LookAtModifier3D] rotates a bone to look at a target.
</brief_description>
<description>
- This [SkeletonModifier3D] rotates a bone to look a target. This is helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
+ This [SkeletonModifier3D] rotates a bone to look at a target. This is helpful for moving a character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
When applying multiple [LookAtModifier3D]s, the [LookAtModifier3D] assigned to the parent bone must be put above the [LookAtModifier3D] assigned to the child bone in the list in order for the child bone results to be correct.
</description>
<tutorials>
@@ -32,8 +32,11 @@
</method>
</methods>
<members>
- <member name="bone" type="int" setter="set_bone" getter="get_bone" default="0">
- The bone index of the [Skeleton3D] that the modification will operate on.
+ <member name="bone" type="int" setter="set_bone" getter="get_bone" default="-1">
+ Index of the [member bone_name] in the parent [Skeleton3D].
+ </member>
+ <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default="&quot;&quot;">
+ The bone name of the [Skeleton3D] that the modification will operate on.
</member>
<member name="duration" type="float" setter="set_duration" getter="get_duration" default="0.0">
The duration of the time-based interpolation. Interpolation is triggered at the following cases:
@@ -48,6 +51,9 @@
The forward axis of the bone. This [SkeletonModifier3D] modifies the bone so that this axis points toward the [member target_node].
</member>
<member name="origin_bone" type="int" setter="set_origin_bone" getter="get_origin_bone">
+ Index of the [member origin_bone_name] in the parent [Skeleton3D].
+ </member>
+ <member name="origin_bone_name" type="String" setter="set_origin_bone_name" getter="get_origin_bone_name">
If [member origin_from] is [constant ORIGIN_FROM_SPECIFIC_BONE], the bone global pose position specified for this is used as origin.
</member>
<member name="origin_external_node" type="NodePath" setter="set_origin_external_node" getter="get_origin_external_node">
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index f65e29af8e..5f51d18e4e 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -45,6 +45,13 @@
Returns the item's mesh.
</description>
</method>
+ <method name="get_item_mesh_cast_shadow" qualifiers="const">
+ <return type="int" enum="RenderingServer.ShadowCastingSetting" />
+ <param index="0" name="id" type="int" />
+ <description>
+ Returns the item's shadow casting mode. See [enum RenderingServer.ShadowCastingSetting] for possible values.
+ </description>
+ </method>
<method name="get_item_mesh_transform" qualifiers="const">
<return type="Transform3D" />
<param index="0" name="id" type="int" />
@@ -116,6 +123,14 @@
Sets the item's mesh.
</description>
</method>
+ <method name="set_item_mesh_cast_shadow">
+ <return type="void" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting" />
+ <description>
+ Sets the item's shadow casting mode. See [enum RenderingServer.ShadowCastingSetting] for possible values.
+ </description>
+ </method>
<method name="set_item_mesh_transform">
<return type="void" />
<param index="0" name="id" type="int" />
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 5ab7c27f4f..2389db1301 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -721,6 +721,7 @@
- If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]).
- If standard input is pipe, this method will block until a specific amount of data is read or pipe is closed.
- If standard input is a file, this method will read a specific amount of data (or less if end-of-file is reached) and return immediately.
+ [b]Note:[/b] This method automatically replaces [code]\r\n[/code] line breaks with [code]\n[/code] and removes them from the end of the string. Use [method read_buffer_from_stdin] to read the unprocessed data.
[b]Note:[/b] This method is implemented on Linux, macOS, and Windows.
[b]Note:[/b] On exported Windows builds, run the console wrapper executable to access the terminal. If standard input is console, calling this method without console wrapped will freeze permanently. If standard input is pipe or file, it can be used without console wrapper. If you need a single executable with full console support, use a custom build compiled with the [code]windows_subsystem=console[/code] flag.
</description>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index d0c193ea31..73fd7e1943 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -22,6 +22,7 @@
Lastly, every object can also contain metadata (data about data). [method set_meta] can be useful to store information that the object itself does not depend on. To keep your code clean, making excessive use of metadata is discouraged.
[b]Note:[/b] Unlike references to a [RefCounted], references to an object stored in a variable can become invalid without being set to [code]null[/code]. To check if an object has been deleted, do [i]not[/i] compare it against [code]null[/code]. Instead, use [method @GlobalScope.is_instance_valid]. It's also recommended to inherit from [RefCounted] for classes storing data instead of [Object].
[b]Note:[/b] The [code]script[/code] is not exposed like most properties. To set or get an object's [Script] in code, use [method set_script] and [method get_script], respectively.
+ [b]Note:[/b] In a boolean context, an [Object] will evaluate to [code]false[/code] if it is equal to [code]null[/code] or it has been freed. Otherwise, an [Object] will always evaluate to [code]true[/code]. See also [method @GlobalScope.is_instance_valid].
</description>
<tutorials>
<link title="Object class introduction">$DOCS_URL/contributing/development/core_and_modules/object_class.html</link>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index cfaf012a55..b82d0de350 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -6,7 +6,7 @@
<description>
An array specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative.
- [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedInt32Array] versus [code]Array[int][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
+ [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedInt64Array] versus [code]Array[int][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[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>
diff --git a/doc/classes/PackedVector4Array.xml b/doc/classes/PackedVector4Array.xml
index 6dbfc7413d..7bebee79c7 100644
--- a/doc/classes/PackedVector4Array.xml
+++ b/doc/classes/PackedVector4Array.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
An array specifically designed to hold [Vector4]. Packs data tightly, so it saves memory for large array sizes.
+ [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector4Array] versus [code]Array[Vector4][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[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>
diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml
index f781083abf..091e0bf54f 100644
--- a/doc/classes/Projection.xml
+++ b/doc/classes/Projection.xml
@@ -278,22 +278,22 @@
</member>
</members>
<constants>
- <constant name="PLANE_NEAR" value="0">
+ <constant name="PLANE_NEAR" value="0" enum="Planes">
The index value of the projection's near clipping plane.
</constant>
- <constant name="PLANE_FAR" value="1">
+ <constant name="PLANE_FAR" value="1" enum="Planes">
The index value of the projection's far clipping plane.
</constant>
- <constant name="PLANE_LEFT" value="2">
+ <constant name="PLANE_LEFT" value="2" enum="Planes">
The index value of the projection's left clipping plane.
</constant>
- <constant name="PLANE_TOP" value="3">
+ <constant name="PLANE_TOP" value="3" enum="Planes">
The index value of the projection's top clipping plane.
</constant>
- <constant name="PLANE_RIGHT" value="4">
+ <constant name="PLANE_RIGHT" value="4" enum="Planes">
The index value of the projection's right clipping plane.
</constant>
- <constant name="PLANE_BOTTOM" value="5">
+ <constant name="PLANE_BOTTOM" value="5" enum="Planes">
The index value of the projection bottom clipping plane.
</constant>
<constant name="IDENTITY" value="Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)">
diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml
index 31605f5471..364b82526b 100644
--- a/doc/classes/RDVertexAttribute.xml
+++ b/doc/classes/RDVertexAttribute.xml
@@ -10,14 +10,19 @@
</tutorials>
<members>
<member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="218">
+ The way that this attribute's data is interpreted when sent to a shader.
</member>
<member name="frequency" type="int" setter="set_frequency" getter="get_frequency" enum="RenderingDevice.VertexFrequency" default="0">
+ The rate at which this attribute is pulled from its vertex buffer.
</member>
<member name="location" type="int" setter="set_location" getter="get_location" default="0">
+ The location in the shader that this attribute is bound to.
</member>
<member name="offset" type="int" setter="set_offset" getter="get_offset" default="0">
+ The number of bytes between the start of the vertex buffer and the first instance of this attribute.
</member>
<member name="stride" type="int" setter="set_stride" getter="get_stride" default="0">
+ The number of bytes between the starts of consecutive instances of this attribute.
</member>
</members>
</class>
diff --git a/doc/classes/RetargetModifier3D.xml b/doc/classes/RetargetModifier3D.xml
new file mode 100644
index 0000000000..522b954aba
--- /dev/null
+++ b/doc/classes/RetargetModifier3D.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RetargetModifier3D" inherits="SkeletonModifier3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests.
+ </brief_description>
+ <description>
+ Retrieves the pose (or global pose) relative to the parent Skeleton's rest in model space and transfers it to the child Skeleton.
+ This modifier rewrites the pose of the child skeleton directly in the parent skeleton's update process. This means that it overwrites the mapped bone pose set in the normal process on the target skeleton. If you want to set the target skeleton bone pose after retargeting, you will need to add a [SkeletonModifier3D] child to the target skeleton and thereby modify the pose.
+ [b]Note:[/b] When the [member use_global_pose] is enabled, even if it is an unmapped bone, it can cause visual problems because the global pose is applied ignoring the parent bone's pose [b]if it has mapped bone children[/b]. See also [member use_global_pose].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="position_enabled" type="bool" setter="set_position_enabled" getter="is_position_enabled" default="true">
+ If [code]true[/code], allows to retarget the position.
+ </member>
+ <member name="profile" type="SkeletonProfile" setter="set_profile" getter="get_profile">
+ [SkeletonProfile] for retargeting bones with names matching the bone list.
+ </member>
+ <member name="rotation_enabled" type="bool" setter="set_rotation_enabled" getter="is_rotation_enabled" default="true">
+ If [code]true[/code], allows to retarget the rotation.
+ </member>
+ <member name="scale_enabled" type="bool" setter="set_scale_enabled" getter="is_scale_enabled" default="true">
+ If [code]true[/code], allows to retarget the scale.
+ </member>
+ <member name="use_global_pose" type="bool" setter="set_use_global_pose" getter="is_using_global_pose" default="false">
+ If [code]false[/code], in case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform will be ignored.
+ Instead, it is possible to retarget between models with different body shapes, and position, rotation, and scale can be retargeted separately.
+ If [code]true[/code], retargeting is performed taking into account global pose.
+ In case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform is taken into account. However, bone length between skeletons must match exactly, if not, the bones will be forced to expand or shrink.
+ This is useful for using dummy bone with length [code]0[/code] to match postures when retargeting between models with different number of bones.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index f5b808be8e..aa751de5f2 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -393,6 +393,11 @@
[b]Note:[/b] During the update process, this signal is not fired, so modification by [SkeletonModifier3D] is not detected.
</description>
</signal>
+ <signal name="rest_updated">
+ <description>
+ Emitted when the rest is updated.
+ </description>
+ </signal>
<signal name="show_rest_only_changed">
<description>
Emitted when the value of [member show_rest_only] changes.
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index ad5c5472b8..acff5cf604 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -59,6 +59,12 @@
Gets a single-precision float from the stream.
</description>
</method>
+ <method name="get_half">
+ <return type="float" />
+ <description>
+ Gets a half-precision float from the stream.
+ </description>
+ </method>
<method name="get_partial_data">
<return type="Array" />
<param index="0" name="bytes" type="int" />
@@ -162,6 +168,13 @@
Puts a single-precision float into the stream.
</description>
</method>
+ <method name="put_half">
+ <return type="void" />
+ <param index="0" name="value" type="float" />
+ <description>
+ Puts a half-precision float into the stream.
+ </description>
+ </method>
<method name="put_partial_data">
<return type="Array" />
<param index="0" name="data" type="PackedByteArray" />
diff --git a/doc/classes/SubViewportContainer.xml b/doc/classes/SubViewportContainer.xml
index b7d097cc91..310f235abf 100644
--- a/doc/classes/SubViewportContainer.xml
+++ b/doc/classes/SubViewportContainer.xml
@@ -20,6 +20,10 @@
</method>
</methods>
<members>
+ <member name="consume_drag_and_drop" type="bool" setter="set_consume_drag_and_drop" getter="is_consume_drag_and_drop_enabled" default="false">
+ If [code]false[/code], the [SubViewportContainer] is not available as a drop target in drag-and-drop operations, and instead the [Control] nodes inside its [Viewport] children are potential drop targets.
+ If [code]true[/code], the [SubViewportContainer] itself will be considered as a drop target in drag-and-drop operations, preventing the [Control] nodes inside its [Viewport] children from becoming drop targets.
+ </member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="1" />
<member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false">
If [code]true[/code], the sub-viewport will be automatically resized to the control's size.
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 69ca984f67..f30a1da014 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -160,8 +160,9 @@
<method name="standardize_locale" qualifiers="const">
<return type="String" />
<param index="0" name="locale" type="String" />
+ <param index="1" name="add_defaults" type="bool" default="false" />
<description>
- Returns a [param locale] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
+ Returns a [param locale] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]). If [param add_defaults] is [code]true[/code], the locale may have a default script or country added.
</description>
</method>
<method name="translate" qualifiers="const">
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 78183ae36c..c03262bb33 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -424,10 +424,10 @@
</member>
</members>
<constants>
- <constant name="AXIS_X" value="0">
+ <constant name="AXIS_X" value="0" enum="Axis">
Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Y" value="1">
+ <constant name="AXIS_Y" value="1" enum="Axis">
Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector2(0, 0)">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 4afc62e038..53c7c92ca3 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -170,10 +170,10 @@
</member>
</members>
<constants>
- <constant name="AXIS_X" value="0">
+ <constant name="AXIS_X" value="0" enum="Axis">
Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Y" value="1">
+ <constant name="AXIS_Y" value="1" enum="Axis">
Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector2i(0, 0)">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index c04fcd0b24..4ab3140eb6 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -421,13 +421,13 @@
</member>
</members>
<constants>
- <constant name="AXIS_X" value="0">
+ <constant name="AXIS_X" value="0" enum="Axis">
Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Y" value="1">
+ <constant name="AXIS_Y" value="1" enum="Axis">
Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Z" value="2">
+ <constant name="AXIS_Z" value="2" enum="Axis">
Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector3(0, 0, 0)">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index df4624dbb1..7fe469aec0 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -168,13 +168,13 @@
</member>
</members>
<constants>
- <constant name="AXIS_X" value="0">
+ <constant name="AXIS_X" value="0" enum="Axis">
Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Y" value="1">
+ <constant name="AXIS_Y" value="1" enum="Axis">
Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Z" value="2">
+ <constant name="AXIS_Z" value="2" enum="Axis">
Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector3i(0, 0, 0)">
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index f70c59fbef..8fa17b57e6 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -287,16 +287,16 @@
</member>
</members>
<constants>
- <constant name="AXIS_X" value="0">
+ <constant name="AXIS_X" value="0" enum="Axis">
Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Y" value="1">
+ <constant name="AXIS_Y" value="1" enum="Axis">
Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Z" value="2">
+ <constant name="AXIS_Z" value="2" enum="Axis">
Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_W" value="3">
+ <constant name="AXIS_W" value="3" enum="Axis">
Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector4(0, 0, 0, 0)">
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
index b351f2ccb6..e1d65eb1b5 100644
--- a/doc/classes/Vector4i.xml
+++ b/doc/classes/Vector4i.xml
@@ -169,16 +169,16 @@
</member>
</members>
<constants>
- <constant name="AXIS_X" value="0">
+ <constant name="AXIS_X" value="0" enum="Axis">
Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Y" value="1">
+ <constant name="AXIS_Y" value="1" enum="Axis">
Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_Z" value="2">
+ <constant name="AXIS_Z" value="2" enum="Axis">
Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="AXIS_W" value="3">
+ <constant name="AXIS_W" value="3" enum="Axis">
Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector4i(0, 0, 0, 0)">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 678b7690d9..3e772c4e88 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -104,6 +104,13 @@
Returns the transform from the Viewport's coordinates to the screen coordinates of the containing window manager window.
</description>
</method>
+ <method name="get_stretch_transform" qualifiers="const">
+ <return type="Transform2D" />
+ <description>
+ Returns the automatically computed 2D stretch transform, taking the [Viewport]'s stretch settings into account. The final value is multiplied by [member Window.content_scale_factor], but only for the root viewport. If this method is called on a [SubViewport] (e.g., in a scene tree with [SubViewportContainer] and [SubViewport]), the scale factor of the root window will not be applied. Using [method Transform2D.get_scale] on the returned value, this can be used to compensate for scaling when zooming a [Camera2D] node, or to scale down a [TextureRect] to be pixel-perfect regardless of the automatically computed scale factor.
+ [b]Note:[/b] Due to how pixel scaling works, the transform's X scale value may differ slightly from the Y scale, even when [member Window.content_scale_aspect] is set to a mode that preserves pixel aspect ratio. If [member Window.content_scale_aspect] is [constant Window.CONTENT_SCALE_ASPECT_IGNORE], the X value may differ [i]significantly[/i] from Y due to differences between the original aspect ratio and the window aspect ratio.
+ </description>
+ </method>
<method name="get_texture" qualifiers="const">
<return type="ViewportTexture" />
<description>
diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml
index edb5238325..aa2dcca1d5 100644
--- a/doc/classes/VisualShaderNodeColorFunc.xml
+++ b/doc/classes/VisualShaderNodeColorFunc.xml
@@ -40,7 +40,32 @@
return vec3(r, g, b);
[/codeblock]
</constant>
- <constant name="FUNC_MAX" value="4" enum="Function">
+ <constant name="FUNC_LINEAR_TO_SRGB" value="4" enum="Function">
+ Converts color from linear color space to sRGB color space using the following formula:
+ [codeblock]
+ vec3 c = clamp(c, vec3(0.0), vec3(1.0));
+ const vec3 a = vec3(0.055f);
+ return mix((vec3(1.0f) + a) * pow(c.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * c.rgb, lessThan(c.rgb, vec3(0.0031308f)));
+ [/codeblock]
+ The Compatibility renderer uses a simpler formula:
+ [codeblock]
+ vec3 c = input;
+ return max(vec3(1.055) * pow(c, vec3(0.416666667)) - vec3(0.055), vec3(0.0));
+ [/codeblock]
+ </constant>
+ <constant name="FUNC_SRGB_TO_LINEAR" value="5" enum="Function">
+ Converts color from sRGB color space to linear color space using the following formula:
+ [codeblock]
+ vec3 c = input;
+ return mix(pow((c.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), c.rgb * (1.0 / 12.92), lessThan(c.rgb, vec3(0.04045)));
+ [/codeblock]
+ The Compatibility renderer uses a simpler formula:
+ [codeblock]
+ vec3 c = input;
+ return c * (c * (c * 0.305306011 + 0.682171111) + 0.012522878);
+ [/codeblock]
+ </constant>
+ <constant name="FUNC_MAX" value="6" enum="Function">
Represents the size of the [enum Function] enum.
</constant>
</constants>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 424941b842..6e833ef25a 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -572,7 +572,7 @@
Specifies how the content's aspect behaves when the [Window] is resized. The base aspect is determined by [member content_scale_size].
</member>
<member name="content_scale_factor" type="float" setter="set_content_scale_factor" getter="get_content_scale_factor" default="1.0">
- Specifies the base scale of [Window]'s content when its [member size] is equal to [member content_scale_size].
+ Specifies the base scale of [Window]'s content when its [member size] is equal to [member content_scale_size]. See also [method Viewport.get_stretch_transform].
</member>
<member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
Specifies how the content is scaled when the [Window] is resized.
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index e1a6aa4a98..38e3edef2f 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -1555,9 +1555,7 @@ def make_enum(t: str, is_bitfield: bool, state: State) -> str:
else:
return f":ref:`{e}<enum_{c}_{e}>`"
- # Don't fail for `Vector3.Axis`, as this enum is a special case which is expected not to be resolved.
- if f"{c}.{e}" != "Vector3.Axis":
- print_error(f'{state.current_class}.xml: Unresolved enum "{t}".', state)
+ print_error(f'{state.current_class}.xml: Unresolved enum "{t}".', state)
return t