summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml98
-rw-r--r--doc/classes/AnimationLibrary.xml6
-rw-r--r--doc/classes/CollisionShape3D.xml6
-rw-r--r--doc/classes/Control.xml12
-rw-r--r--doc/classes/DisplayServer.xml2
-rw-r--r--doc/classes/LightmapGI.xml1
-rw-r--r--doc/classes/LookAtModifier3D.xml10
-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/RDVertexAttribute.xml5
-rw-r--r--doc/classes/RetargetModifier3D.xml34
-rw-r--r--doc/classes/Skeleton3D.xml5
-rw-r--r--doc/classes/Viewport.xml7
-rw-r--r--doc/classes/Window.xml2
15 files changed, 147 insertions, 58 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 06aec6a2f7..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.
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/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..2cf2bdf056 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>
@@ -113,7 +113,7 @@
<param index="0" name="at_position" type="Vector2" />
<description>
Virtual method to be implemented by the user. Returns the tooltip text for the position [param at_position] in control's local coordinates, which will typically appear when the cursor is resting over this control. See [method get_tooltip].
- [b]Note:[/b] If this method returns an empty [String], no tooltip is displayed.
+ [b]Note:[/b] If this method returns an empty [String] and [method _make_custom_tooltip] is not overridden, no tooltip is displayed.
</description>
</method>
<method name="_gui_input" qualifiers="virtual">
@@ -164,11 +164,12 @@
<return type="Object" />
<param index="0" name="for_text" type="String" />
<description>
- Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [param for_text] includes the contents of the [member tooltip_text] property.
+ Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. [param for_text] is the return value of [method get_tooltip].
The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead.
The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member tooltip_text] for an example).
[b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value.
[b]Note:[/b] The node (and any relevant children) should have their [member CanvasItem.visible] set to [code]true[/code] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably.
+ [b]Note:[/b] If overridden, this method is called even if [method get_tooltip] returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return [code]null[/code] in this method when [param for_text] is empty.
[b]Example:[/b] Use a constructed node as a tooltip:
[codeblocks]
[gdscript]
@@ -553,7 +554,7 @@
<description>
Returns the tooltip text for the position [param at_position] in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns [member tooltip_text].
This method can be overridden to customize its behavior. See [method _get_tooltip].
- [b]Note:[/b] If this method returns an empty [String], no tooltip is displayed.
+ [b]Note:[/b] If this method returns an empty [String] and [method _make_custom_tooltip] is not overridden, no tooltip is displayed.
</description>
</method>
<method name="grab_click_focus">
@@ -1065,7 +1066,8 @@
[b]Note:[/b] Tooltips customized using [method _make_custom_tooltip] do not use this auto translate mode automatically.
</member>
<member name="tooltip_text" type="String" setter="set_tooltip_text" getter="get_tooltip_text" default="&quot;&quot;">
- The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [member ProjectSettings.gui/timers/tooltip_delay_sec] option. See also [method get_tooltip].
+ The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [member ProjectSettings.gui/timers/tooltip_delay_sec] setting.
+ This string is the default return value of [method get_tooltip]. Override [method _get_tooltip] to generate tooltip text dynamically. Override [method _make_custom_tooltip] to customize the tooltip interface and behavior.
The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding [method _make_custom_tooltip]. The default tooltip includes a [PopupPanel] and [Label] whose theme properties can be customized using [Theme] methods with the [code]"TooltipPanel"[/code] and [code]"TooltipLabel"[/code] respectively. For example:
[codeblocks]
[gdscript]
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index e2a352de9a..47611e59df 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1135,7 +1135,7 @@
Returns the scale factor of the specified screen by index.
[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).
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland).
</description>
</method>
<method name="screen_get_size" qualifiers="const">
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 b6d106c4c5..2475de1868 100644
--- a/doc/classes/LookAtModifier3D.xml
+++ b/doc/classes/LookAtModifier3D.xml
@@ -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/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/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/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.