diff options
Diffstat (limited to 'doc/classes')
136 files changed, 1088 insertions, 1596 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 6b0dccd7fc..7e7cb07cef 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -494,7 +494,7 @@ <return type="bool" /> <param index="0" name="x" type="float" /> <description> - Returns whether [code]x[/code] is a finite value, i.e. it is not [constant @GDScript.NAN], positive infinity, or negative infinity. + Returns whether [param x] is a finite value, i.e. it is not [constant @GDScript.NAN], positive infinity, or negative infinity. </description> </method> <method name="is_inf"> @@ -529,7 +529,7 @@ <return type="bool" /> <param index="0" name="x" type="float" /> <description> - Returns [code]true[/code] if [param x] is zero or almost zero. + Returns [code]true[/code] if [param x] is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon. This function is faster than using [method is_equal_approx] with one value as zero. </description> </method> @@ -2319,31 +2319,31 @@ <constant name="KEY_YDIAERESIS" value="255" enum="Key"> ÿ key. </constant> - <constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask"> + <constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask" is_bitfield="true"> Key Code mask. </constant> - <constant name="KEY_MODIFIER_MASK" value="532676608" enum="KeyModifierMask"> + <constant name="KEY_MODIFIER_MASK" value="532676608" enum="KeyModifierMask" is_bitfield="true"> Modifier key mask. </constant> - <constant name="KEY_MASK_CMD_OR_CTRL" value="16777216" enum="KeyModifierMask"> + <constant name="KEY_MASK_CMD_OR_CTRL" value="16777216" enum="KeyModifierMask" is_bitfield="true"> Automatically remapped to [constant KEY_META] on macOS and [constant KEY_CTRL] on other platforms, this mask is never set in the actual events, and should be used for key mapping only. </constant> - <constant name="KEY_MASK_SHIFT" value="33554432" enum="KeyModifierMask"> + <constant name="KEY_MASK_SHIFT" value="33554432" enum="KeyModifierMask" is_bitfield="true"> Shift key mask. </constant> - <constant name="KEY_MASK_ALT" value="67108864" enum="KeyModifierMask"> + <constant name="KEY_MASK_ALT" value="67108864" enum="KeyModifierMask" is_bitfield="true"> Alt or Option (on macOS) key mask. </constant> - <constant name="KEY_MASK_META" value="134217728" enum="KeyModifierMask"> + <constant name="KEY_MASK_META" value="134217728" enum="KeyModifierMask" is_bitfield="true"> Command (on macOS) or Meta/Windows key mask. </constant> - <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask"> + <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask" is_bitfield="true"> Ctrl key mask. </constant> - <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask"> + <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask" is_bitfield="true"> Keypad key mask. </constant> - <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask"> + <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask" is_bitfield="true"> Group Switch key mask. </constant> <constant name="MOUSE_BUTTON_NONE" value="0" enum="MouseButton"> @@ -2376,19 +2376,19 @@ <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton"> Extra mouse button 2. This is sometimes present, usually to the sides of the mouse. </constant> - <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButtonMask" is_bitfield="true"> Primary mouse button mask, usually for the left button. </constant> - <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButtonMask" is_bitfield="true"> Secondary mouse button mask, usually for the right button. </constant> - <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButtonMask" is_bitfield="true"> Middle mouse button mask. </constant> - <constant name="MOUSE_BUTTON_MASK_XBUTTON1" value="128" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_MB_XBUTTON1" value="128" enum="MouseButtonMask" is_bitfield="true"> Extra mouse button 1 mask. </constant> - <constant name="MOUSE_BUTTON_MASK_XBUTTON2" value="256" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_MB_XBUTTON2" value="256" enum="MouseButtonMask" is_bitfield="true"> Extra mouse button 2 mask. </constant> <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButton"> @@ -2794,157 +2794,135 @@ </constant> <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="24" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="25" enum="PropertyHint"> + <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="25" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="26" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="26" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="27" enum="PropertyHint"> + <constant name="PROPERTY_HINT_SAVE_FILE" value="27" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="28" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="28" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="29" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="29" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="30" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="30" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="31" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ARRAY_TYPE" value="31" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="32" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="33" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="34" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_SAVE_FILE" value="35" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="36" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="37" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_INT_IS_POINTER" value="38" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_LOCALE_ID" value="40" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LOCALE_ID" value="32" enum="PropertyHint"> Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country. </constant> - <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="41" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="33" enum="PropertyHint"> Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings. </constant> - <constant name="PROPERTY_HINT_NODE_TYPE" value="42" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_TYPE" value="34" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="43" enum="PropertyHint"> + <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="35" enum="PropertyHint"> Hints that a quaternion property should disable the temporary euler editor. </constant> - <constant name="PROPERTY_HINT_PASSWORD" value="44" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PASSWORD" value="36" enum="PropertyHint"> Hints that a string property is a password, and every character is replaced with the secret character. </constant> - <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint"> + <constant name="PROPERTY_HINT_MAX" value="37" enum="PropertyHint"> </constant> - <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags" is_bitfield="true"> The property is not stored, and does not display in the editor. This is the default for non-exported properties. </constant> - <constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags" is_bitfield="true"> The property is serialized and saved in the scene file (default). </constant> - <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags" is_bitfield="true"> The property is shown in the [EditorInspector] (default). </constant> - <constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_INTERNAL" value="8" enum="PropertyUsageFlags" is_bitfield="true"> + </constant> + <constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags" is_bitfield="true"> The property can be checked in the [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CHECKED" value="32" enum="PropertyUsageFlags" is_bitfield="true"> The property is checked in the [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags"> - The property is a translatable string. - </constant> - <constant name="PROPERTY_USAGE_GROUP" value="64" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_GROUP" value="64" enum="PropertyUsageFlags" is_bitfield="true"> Used to group properties together in the editor. See [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_CATEGORY" value="128" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CATEGORY" value="128" enum="PropertyUsageFlags" is_bitfield="true"> Used to categorize properties together in the editor. </constant> - <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags" is_bitfield="true"> Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags" is_bitfield="true"> The property does not save its state in [PackedScene]. </constant> - <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="2048" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="2048" enum="PropertyUsageFlags" is_bitfield="true"> Editing the property prompts the user for restarting the editor. </constant> - <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="4096" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="4096" enum="PropertyUsageFlags" is_bitfield="true"> The property is a script variable which should be serialized and saved in the scene file. </constant> - <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="16384" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="16384" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="32768" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="32768" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="65536" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="65536" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="131072" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="131072" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_INTERNAL" value="262144" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_ARRAY" value="262144" enum="PropertyUsageFlags" is_bitfield="true"> + The property is an array. </constant> - <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="524288" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="524288" enum="PropertyUsageFlags" is_bitfield="true"> If the property is a [Resource], a new copy of it is always created when calling [method Node.duplicate] or [method Resource.duplicate]. </constant> - <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="1048576" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="1048576" enum="PropertyUsageFlags" is_bitfield="true"> The property is only shown in the editor if modern renderers are supported (GLES3 is excluded). </constant> - <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="2097152" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="2097152" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="4194304" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="4194304" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="8388608" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="8388608" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="16777216" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="16777216" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="33554432" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="33554432" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="67108864" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="67108864" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_READ_ONLY" value="134217728" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_READ_ONLY" value="134217728" enum="PropertyUsageFlags" is_bitfield="true"> The property is read-only in the [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_ARRAY" value="268435456" enum="PropertyUsageFlags"> - The property is an array. - </constant> - <constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags" is_bitfield="true"> Default usage (storage, editor and network). </constant> - <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="38" enum="PropertyUsageFlags"> - Default usage for translatable strings (storage, editor, network and internationalized). - </constant> - <constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags" is_bitfield="true"> Default usage but without showing the property in the editor (storage, network). </constant> - <constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags"> + <constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags" is_bitfield="true"> Flag for a normal method. </constant> - <constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags"> + <constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags" is_bitfield="true"> Flag for an editor method. </constant> - <constant name="METHOD_FLAG_CONST" value="4" enum="MethodFlags"> + <constant name="METHOD_FLAG_CONST" value="4" enum="MethodFlags" is_bitfield="true"> Flag for a constant method. </constant> - <constant name="METHOD_FLAG_VIRTUAL" value="8" enum="MethodFlags"> + <constant name="METHOD_FLAG_VIRTUAL" value="8" enum="MethodFlags" is_bitfield="true"> Flag for a virtual method. </constant> - <constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags"> + <constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags" is_bitfield="true"> Flag for a method with a variable number of arguments. </constant> - <constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags"> + <constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags" is_bitfield="true"> Flag for a static method. </constant> - <constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags"> + <constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags" is_bitfield="true"> Used internally. Allows to not dump core virtual methods (such as [method Object._notification]) to the JSON API. </constant> - <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags"> + <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags" is_bitfield="true"> Default method flags (normal). </constant> <constant name="TYPE_NIL" value="0" enum="Variant.Type"> diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml index cba783246f..32599d7f7d 100644 --- a/doc/classes/AStarGrid2D.xml +++ b/doc/classes/AStarGrid2D.xml @@ -140,8 +140,11 @@ <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2(1, 1)"> The size of the point cell which will be applied to calculate the resulting point position returned by [method get_point_path]. If changed, [method update] needs to be called before finding the next path. </member> - <member name="default_heuristic" type="int" setter="set_default_heuristic" getter="get_default_heuristic" enum="AStarGrid2D.Heuristic" default="0"> - The default [enum Heuristic] which will be used to calculate the path if [method _compute_cost] and/or [method _estimate_cost] were not overridden. + <member name="default_compute_heuristic" type="int" setter="set_default_compute_heuristic" getter="get_default_compute_heuristic" enum="AStarGrid2D.Heuristic" default="0"> + The default [enum Heuristic] which will be used to calculate the cost between two points if [method _compute_cost] was not overridden. + </member> + <member name="default_estimate_heuristic" type="int" setter="set_default_estimate_heuristic" getter="get_default_estimate_heuristic" enum="AStarGrid2D.Heuristic" default="0"> + The default [enum Heuristic] which will be used to calculate the cost between the point and the end point if [method _estimate_cost] was not overridden. </member> <member name="diagonal_mode" type="int" setter="set_diagonal_mode" getter="get_diagonal_mode" enum="AStarGrid2D.DiagonalMode" default="0"> A specific [enum DiagonalMode] mode which will force the path to avoid or accept the specified diagonals. diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index afbe34816a..e20fb71c7e 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -6,7 +6,7 @@ <description> [AnimatedSprite2D] is similar to the [Sprite2D] node, except it carries multiple textures as animation frames. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel. After setting up [member frames], [method play] may be called. It's also possible to select an [member animation] and toggle [member playing], even within the editor. - To pause the current animation, call [method stop] or set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. + To pause the current animation, set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. [b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps. </description> <tutorials> @@ -20,13 +20,14 @@ <param index="1" name="backwards" type="bool" default="false" /> <description> Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [param backwards] is [code]true[/code], the animation is played in reverse. + [b]Note:[/b] If [member speed_scale] is negative, the animation direction specified by [param backwards] will be inverted. </description> </method> <method name="stop"> <return type="void" /> <description> Stops the current [member animation] at the current [member frame]. - [b]Note:[/b] This method resets the current frame's elapsed time. If this behavior is undesired, consider setting [member speed_scale] to [code]0[/code], instead. + [b]Note:[/b] This method resets the current frame's elapsed time and removes the [code]backwards[/code] flag from the current [member animation] (if it was previously set by [method play]). If this behavior is undesired, set [member playing] to [code]false[/code] instead. </description> </method> </methods> @@ -53,7 +54,9 @@ The texture's drawing offset. </member> <member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false"> - If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] is the equivalent of calling [method stop]. + If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] pauses the current animation. Use [method stop] to stop the animation at the current frame instead. + [b]Note:[/b] Unlike [method stop], changing this property to [code]false[/code] preserves the current frame's elapsed time and the [code]backwards[/code] flag of the current [member animation] (if it was previously set by [method play]). + [b]Note:[/b] After a non-looping animation finishes, the property still remains [code]true[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation is paused, preserving the current frame's elapsed time. @@ -62,7 +65,7 @@ <signals> <signal name="animation_finished"> <description> - Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. + Emitted when the animation reaches the end, or the start if it is played in reverse. If the animation is looping, this signal is emitted at the end of each loop. </description> </signal> <signal name="frame_changed"> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 09baf882fb..4837ae715f 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -6,7 +6,7 @@ <description> [AnimatedSprite3D] is similar to the [Sprite3D] node, except it carries multiple textures as animation [member frames]. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel. After setting up [member frames], [method play] may be called. It's also possible to select an [member animation] and toggle [member playing], even within the editor. - To pause the current animation, call [method stop] or set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. + To pause the current animation, set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. </description> <tutorials> <link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link> @@ -18,13 +18,14 @@ <param index="1" name="backwards" type="bool" default="false" /> <description> Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [param backwards] is [code]true[/code], the animation is played in reverse. + [b]Note:[/b] If [member speed_scale] is negative, the animation direction specified by [param backwards] will be inverted. </description> </method> <method name="stop"> <return type="void" /> <description> Stops the current [member animation] at the current [member frame]. - [b]Note:[/b] This method resets the current frame's elapsed time. If this behavior is undesired, consider setting [member speed_scale] to [code]0[/code], instead. + [b]Note:[/b] This method resets the current frame's elapsed time and removes the [code]backwards[/code] flag from the current [member animation] (if it was previously set by [method play]). If this behavior is undesired, set [member playing] to [code]false[/code] instead. </description> </method> </methods> @@ -39,7 +40,9 @@ The [SpriteFrames] resource containing the animation(s). </member> <member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false"> - If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] is the equivalent of calling [method stop]. + If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] pauses the current animation. Use [method stop] to stop the animation at the current frame instead. + [b]Note:[/b] Unlike [method stop], changing this property to [code]false[/code] preserves the current frame's elapsed time and the [code]backwards[/code] flag of the current [member animation] (if it was previously set by [method play]). + [b]Note:[/b] After a non-looping animation finishes, the property still remains [code]true[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation is paused, preserving the current frame's elapsed time. @@ -48,7 +51,7 @@ <signals> <signal name="animation_finished"> <description> - Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. + Emitted when the animation reaches the end, or the start if it is played in reverse. If the animation is looping, this signal is emitted at the end of each loop. </description> </signal> <signal name="frame_changed"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index d9a1f896f1..c0626dcfe4 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -305,9 +305,9 @@ <return type="int" /> <param index="0" name="track_idx" type="int" /> <param index="1" name="time" type="float" /> - <param index="2" name="exact" type="bool" default="false" /> + <param index="2" name="find_mode" type="int" enum="Animation.FindMode" default="0" /> <description> - Finds the key index by time in a given track. Optionally, only find it if the exact time is given. + Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. </description> </method> <method name="track_get_interpolation_loop_wrap" qualifiers="const"> @@ -622,5 +622,14 @@ <constant name="LOOPED_FLAG_START" value="2" enum="LoopedFlag"> This flag indicates that the animation has reached the start of the animation and just after loop processed. </constant> + <constant name="FIND_MODE_NEAREST" value="0" enum="FindMode"> + Finds the nearest time key. + </constant> + <constant name="FIND_MODE_APPROX" value="1" enum="FindMode"> + Finds only the key with approximating the time. + </constant> + <constant name="FIND_MODE_EXACT" value="2" enum="FindMode"> + Finds only the key with matching the time. + </constant> </constants> </class> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 79deb008d2..a33ec2f6dc 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -165,11 +165,6 @@ </member> </members> <signals> - <signal name="removed_from_graph"> - <description> - Emitted when the node was removed from the graph. - </description> - </signal> <signal name="tree_changed"> <description> Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree]. diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 4c2a30030b..814b2d0052 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -22,14 +22,11 @@ <member name="advance_expression" type="String" setter="set_advance_expression" getter="get_advance_expression" default=""""> Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code. </member> - <member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false"> - Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END]. - </member> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> - Don't use this transition during [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance]. + <member name="advance_mode" type="int" setter="set_advance_mode" getter="get_advance_mode" enum="AnimationNodeStateMachineTransition.AdvanceMode" default="1"> + Determines whether the transition should disabled, enabled when using [method AnimationNodeStateMachinePlayback.travel], or traversed automatically if the [member advance_condition] and [member advance_expression] checks are true (if assigned). </member> <member name="priority" type="int" setter="set_priority" getter="get_priority" default="1"> - Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance]. + Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member advance_mode] is set to [constant ADVANCE_MODE_AUTO]. </member> <member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0"> The transition type. @@ -58,5 +55,14 @@ <constant name="SWITCH_MODE_AT_END" value="2" enum="SwitchMode"> Wait for the current state playback to end, then switch to the beginning of the next state animation. </constant> + <constant name="ADVANCE_MODE_DISABLED" value="0" enum="AdvanceMode"> + Don't use this transition. + </constant> + <constant name="ADVANCE_MODE_ENABLED" value="1" enum="AdvanceMode"> + Only use this transition during [method AnimationNodeStateMachinePlayback.travel]. + </constant> + <constant name="ADVANCE_MODE_AUTO" value="2" enum="AdvanceMode"> + Automatically use this transition if the [member advance_condition] and [member advance_expression] checks are true (if assigned). + </constant> </constants> </class> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 9efd3ac939..ca0cbf0ca1 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -137,6 +137,13 @@ Returns [code]true[/code] if playing an animation. </description> </method> + <method name="pause"> + <return type="void" /> + <description> + Pauses the currently playing animation. The [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. + See also [method stop]. + </description> + </method> <method name="play"> <return type="void" /> <param index="0" name="name" type="StringName" default="""" /> @@ -201,10 +208,9 @@ </method> <method name="stop"> <return type="void" /> - <param index="0" name="reset" type="bool" default="true" /> <description> - Stops or pauses the currently playing animation. If [param reset] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. - If [param reset] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. + Stops the currently playing animation. The animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. + See also [method pause]. </description> </method> </methods> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index 21f4b37741..a17a727d7e 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -111,11 +111,25 @@ </member> </members> <signals> + <signal name="animation_finished"> + <param index="0" name="anim_name" type="StringName" /> + <description> + Notifies when an animation finished playing. + [b]Note:[/b] This signal is not emitted if an animation is looping or aborted. Also be aware of the possibility of unseen playback by sync and xfade. + </description> + </signal> <signal name="animation_player_changed"> <description> Emitted when the [member anim_player] is changed. </description> </signal> + <signal name="animation_started"> + <param index="0" name="anim_name" type="StringName" /> + <description> + Notifies when an animation starts playing. + [b]Note:[/b] This signal is not emitted if an animation is looping or playbacked from the middle. Also be aware of the possibility of unseen playback by sync and xfade. + </description> + </signal> </signals> <constants> <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 603974d619..21ccf79fe2 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -40,6 +40,7 @@ [/codeblocks] [b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient. [b]Note:[/b] 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]. + [b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior. [b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized. </description> <tutorials> @@ -243,7 +244,7 @@ <param index="0" name="deep" type="bool" default="false" /> <description> Returns a copy of the array. - If [param deep] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. + If [param deep] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. Note that any [Object]-derived elements will be shallow copied regardless of the [param deep] setting. </description> </method> <method name="erase"> @@ -253,6 +254,7 @@ Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] This method acts in-place and doesn't return a value. [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. + [b]Note:[/b] Do not erase entries while iterating over the array. </description> </method> <method name="fill"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index b9c8ab0f6c..f7764d5e32 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -65,7 +65,7 @@ <param index="1" name="arrays" type="Array" /> <param index="2" name="blend_shapes" type="Array[]" default="[]" /> <param index="3" name="lods" type="Dictionary" default="{}" /> - <param index="4" name="compress_flags" type="int" default="0" /> + <param index="4" name="compress_flags" type="int" enum="Mesh.ArrayFormat" default="0" /> <description> Creates a new surface. Surfaces are created to be rendered using a [param primitive], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. @@ -102,13 +102,13 @@ <param index="0" name="transform" type="Transform3D" /> <param index="1" name="texel_size" type="float" /> <description> - Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. + Performs a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. </description> </method> <method name="regen_normal_maps"> <return type="void" /> <description> - Will regenerate normal maps for the [ArrayMesh]. + Regenerates tangents for each of the [ArrayMesh]'s surfaces. </description> </method> <method name="set_blend_shape_name"> @@ -141,7 +141,7 @@ </description> </method> <method name="surface_get_format" qualifiers="const"> - <return type="int" /> + <return type="int" enum="Mesh.ArrayFormat" /> <param index="0" name="surf_idx" type="int" /> <description> Returns the format mask of the requested surface (see [method add_surface_from_arrays]). diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index c92e39e08a..68f62d1c00 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -50,7 +50,7 @@ <member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group"> The [ButtonGroup] associated with the button. Not to be confused with node groups. </member> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="1"> + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButtonMask" default="1"> Binary mask to choose which mouse buttons this button will respond to. To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code]. </member> @@ -70,7 +70,7 @@ [Shortcut] associated to the button. </member> <member name="shortcut_feedback" type="bool" setter="set_shortcut_feedback" getter="is_shortcut_feedback" default="true"> - If [code]true[/code], the button will appear pressed when its shortcut is activated. If [code]false[/code] and [member toggle_mode] is [code]false[/code], the shortcut will activate the button without appearing to press the button. + If [code]true[/code], the button will highlight for a short amount of time when its shortcut is activated. If [code]false[/code] and [member toggle_mode] is [code]false[/code], the shortcut will activate without any visual feedback. </member> <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled" default="true"> If [code]true[/code], the button will add information about its shortcut in the tooltip. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 8a5048de6b..60225275f3 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -529,13 +529,13 @@ The material will use the texture's alpha values for transparency. </constant> <constant name="TRANSPARENCY_ALPHA_SCISSOR" value="2" enum="Transparency"> - The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendering in the depth prepass. + The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass. </constant> <constant name="TRANSPARENCY_ALPHA_HASH" value="3" enum="Transparency"> The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. </constant> <constant name="TRANSPARENCY_ALPHA_DEPTH_PRE_PASS" value="4" enum="Transparency"> - The material will use the texture's alpha value for transparency, but will still be rendered in the depth prepass. + The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass. </constant> <constant name="TRANSPARENCY_MAX" value="5" enum="Transparency"> Represents the size of the [enum Transparency] enum. diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml index f29525038e..dd01de3607 100644 --- a/doc/classes/BoneAttachment3D.xml +++ b/doc/classes/BoneAttachment3D.xml @@ -16,19 +16,6 @@ Returns the [NodePath] to the external [Skeleton3D] node, if one has been set. </description> </method> - <method name="get_override_mode" qualifiers="const" is_deprecated="true"> - <return type="int" /> - <description> - Deprecated. Local pose overrides will be removed. - Returns the override mode for the BoneAttachment3D node (0=global / 1=local). - </description> - </method> - <method name="get_override_pose" qualifiers="const"> - <return type="bool" /> - <description> - Returns whether the BoneAttachment3D node is overriding the bone pose of the bone it's attached to. - </description> - </method> <method name="get_use_external_skeleton" qualifiers="const"> <return type="bool" /> <description> @@ -49,21 +36,6 @@ Sets the [NodePath] to the external skeleton that the BoneAttachment3D node should use. The external [Skeleton3D] node is only used when [code]use_external_skeleton[/code] is set to [code]true[/code]. </description> </method> - <method name="set_override_mode" is_deprecated="true"> - <return type="void" /> - <param index="0" name="override_mode" type="int" /> - <description> - Deprecated. Local pose overrides will be removed. - Sets the override mode for the BoneAttachment3D node (0=global / 1=local). The override mode defines which of the bone poses the BoneAttachment3D node will override. - </description> - </method> - <method name="set_override_pose"> - <return type="void" /> - <param index="0" name="override_pose" type="bool" /> - <description> - Sets whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to [code]true[/code], the BoneAttachment3D node can change the pose of the bone. - </description> - </method> <method name="set_use_external_skeleton"> <return type="void" /> <param index="0" name="use_external_skeleton" type="bool" /> @@ -79,5 +51,8 @@ <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default=""""> The name of the attached bone. </member> + <member name="override_pose" type="bool" setter="set_override_pose" getter="get_override_pose" default="false"> + Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to [code]true[/code], the BoneAttachment3D node can change the pose of the bone. When set to [code]false[/code], the BoneAttachment3D will always be set to the bone's transform. + </member> </members> </class> diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 277bda2836..8195669b10 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -4,8 +4,8 @@ Group of Buttons. </brief_description> <description> - Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed. - [member BaseButton.toggle_mode] should be [code]true[/code]. + Group of [BaseButton]. The members of this group are treated like radio buttons in the sense that only one button can be pressed at the same time. + Every member of the ButtonGroup should have [member BaseButton.toggle_mode] set to [code]true[/code]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 1fb4f91920..d1fdaef29c 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -77,6 +77,13 @@ Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. </description> </method> + <method name="bindv"> + <return type="Callable" /> + <param index="0" name="arguments" type="Array" /> + <description> + Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. + </description> + </method> <method name="call" qualifiers="vararg const"> <return type="Variant" /> <description> @@ -100,6 +107,18 @@ Calls the method represented by this [Callable]. Unlike [method call], this method expects all arguments to be contained inside the [param arguments] [Array]. </description> </method> + <method name="get_bound_arguments" qualifiers="const"> + <return type="Array" /> + <description> + Return the bound arguments (as long as [method get_bound_arguments_count] is greater than zero), or empty (if [method get_bound_arguments_count] is less than or equal to zero). + </description> + </method> + <method name="get_bound_arguments_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the total amount of arguments bound (or unbound) via successive [method bind] or [method unbind] calls. If the amount of arguments unbound is greater than the ones bound, this function returns a value less than zero. + </description> + </method> <method name="get_method" qualifiers="const"> <return type="StringName" /> <description> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 5171e0acbe..fbab1d76a0 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -97,6 +97,7 @@ <param index="2" name="color" type="Color" /> <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" /> <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]. </description> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 309e2231a4..821117122c 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -41,10 +41,16 @@ Returns a [KinematicCollision3D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]. </description> </method> + <method name="get_platform_angular_velocity" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the angular velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. + </description> + </method> <method name="get_platform_velocity" qualifiers="const"> <return type="Vector3" /> <description> - Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. </description> </method> <method name="get_position_delta" qualifiers="const"> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index c313e6c875..3ceb8967a0 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -448,7 +448,7 @@ <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> Sets whether code completion is allowed. </member> - <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[]"> + <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_completion_prefixes" default="[]"> Sets prefixes that will trigger code completion. </member> <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[]"> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index b0351559ee..08964cf21d 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -780,67 +780,13 @@ </method> <method name="set_drag_forwarding"> <return type="void" /> - <param index="0" name="target" type="Object" /> + <param index="0" name="drag_func" type="Callable" /> + <param index="1" name="can_drop_func" type="Callable" /> + <param index="2" name="drop_func" type="Callable" /> <description> - Forwards the handling of this control's drag and drop to [param target] object. - Forwarding can be implemented in the target object similar to the methods [method _get_drag_data], [method _can_drop_data], and [method _drop_data] but with two differences: - 1. The function name must be suffixed with [b]_fw[/b] - 2. The function must take an extra argument that is the control doing the forwarding - [codeblocks] - [gdscript] - # ThisControl.gd - extends Control - export(Control) var target_control - - func _ready(): - set_drag_forwarding(target_control) - - # TargetControl.gd - extends Control - - func _can_drop_data_fw(position, data, from_control): - return true - - func _drop_data_fw(position, data, from_control): - my_handle_data(data) # Your handler method. - - func _get_drag_data_fw(position, from_control): - set_drag_preview(my_preview) - return my_data() - [/gdscript] - [csharp] - // ThisControl.cs - public class ThisControl : Control - { - [Export] - public Control TargetControl { get; set; } - public override void _Ready() - { - SetDragForwarding(TargetControl); - } - } - - // TargetControl.cs - public class TargetControl : Control - { - public void CanDropDataFw(Vector2 position, object data, Control fromControl) - { - return true; - } - - public void DropDataFw(Vector2 position, object data, Control fromControl) - { - MyHandleData(data); // Your handler method. - } - - public void GetDragDataFw(Vector2 position, Control fromControl) - { - SetDragPreview(MyPreview); - return MyData(); - } - } - [/csharp] - [/codeblocks] + Forwards the handling of this control's [method _get_drag_data], [method _can_drop_data] and [method _drop_data] virtual functions to delegate callables. + For each argument, if not empty, the delegate callable is used, otherwise the local (virtual) function is used. + The function format for each callable should be exactly the same as the virtual functions described above. </description> </method> <method name="set_drag_preview"> @@ -1064,13 +1010,13 @@ <member name="size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. </member> - <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" default="1"> + <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" enum="Control.SizeFlags" default="1"> Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. </member> <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio" default="1.0"> If the node and at least one of its neighbors uses the [constant SIZE_EXPAND] size flag, the parent [Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbor a ratio of 1, this node will take two thirds of the available space. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" default="1"> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" enum="Control.SizeFlags" default="1"> Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> @@ -1315,23 +1261,23 @@ <constant name="PRESET_MODE_KEEP_SIZE" value="3" enum="LayoutPresetMode"> The control's size will not change. </constant> - <constant name="SIZE_SHRINK_BEGIN" value="0" enum="SizeFlags"> + <constant name="SIZE_SHRINK_BEGIN" value="0" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to align the node with its start, either the top or the left edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. [b]Note:[/b] Setting this flag is equal to not having any size flags. </constant> - <constant name="SIZE_FILL" value="1" enum="SizeFlags"> + <constant name="SIZE_FILL" value="1" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> - <constant name="SIZE_EXPAND" value="2" enum="SizeFlags"> + <constant name="SIZE_EXPAND" value="2" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> - <constant name="SIZE_EXPAND_FILL" value="3" enum="SizeFlags"> + <constant name="SIZE_EXPAND_FILL" value="3" enum="SizeFlags" is_bitfield="true"> Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information. </constant> - <constant name="SIZE_SHRINK_CENTER" value="4" enum="SizeFlags"> + <constant name="SIZE_SHRINK_CENTER" value="4" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to center the node in the available space. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> - <constant name="SIZE_SHRINK_END" value="8" enum="SizeFlags"> + <constant name="SIZE_SHRINK_END" value="8" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 29135376c5..5da6cf8102 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -130,12 +130,25 @@ The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]). </description> </method> + <method name="get_primary_screen" qualifiers="const"> + <return type="int" /> + <description> + Returns index of the primary screen. + </description> + </method> <method name="get_screen_count" qualifiers="const"> <return type="int" /> <description> Returns the number of displays available. </description> </method> + <method name="get_screen_from_rect" qualifiers="const"> + <return type="int" /> + <param index="0" name="rect" type="Rect2" /> + <description> + Returns index of the screen which contains specified rectangle. + </description> + </method> <method name="get_swap_cancel_ok"> <return type="bool" /> <description> @@ -772,7 +785,7 @@ </description> </method> <method name="mouse_get_button_state" qualifiers="const"> - <return type="int" enum="MouseButton" /> + <return type="int" enum="MouseButtonMask" /> <description> Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask]. </description> @@ -1512,7 +1525,7 @@ Makes the mouse cursor hidden if it is visible. </constant> <constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode"> - Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. + Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> @@ -1521,6 +1534,9 @@ <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode"> Confines the mouse cursor to the game window, and make it hidden. </constant> + <constant name="SCREEN_PRIMARY" value="-2"> + Represents the primary screen. + </constant> <constant name="SCREEN_OF_MAIN_WINDOW" value="-1"> Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. </constant> diff --git a/doc/classes/EditorExportPlatform.xml b/doc/classes/EditorExportPlatform.xml index 1d63af9233..f2b39ab134 100644 --- a/doc/classes/EditorExportPlatform.xml +++ b/doc/classes/EditorExportPlatform.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorExportPlatform" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Identifies a supported export platform, and internally provides the functionality of exporting to that platform. </brief_description> <description> + Base resource that provides the functionality of exporting a release build of a project to a platform, from the editor. Stores platform-specific metadata such as the name and supported features of the platform, and performs the exporting of projects, PCK files, and ZIP files. Uses an export template for the platform provided at the time of project exporting. + Used in scripting by [EditorExportPlugin] to configure platform-specific customization of scenes and resources. See [method EditorExportPlugin._begin_customize_scenes] and [method EditorExportPlugin._begin_customize_resources] for more details. </description> <tutorials> </tutorials> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index adcc87d062..2124a97751 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -143,7 +143,7 @@ [gdscript] func _forward_canvas_draw_over_viewport(overlay): # Draw a circle at cursor position. - overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white) + overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE) func _forward_canvas_gui_input(event): if event is InputEventMouseMotion: @@ -347,7 +347,7 @@ [codeblock] func _set_state(data): zoom = data.get("zoom", 1.0) - preferred_color = data.get("my_color", Color.white) + preferred_color = data.get("my_color", Color.WHITE) [/codeblock] </description> </method> @@ -359,7 +359,7 @@ [codeblock] func _set_window_layout(configuration): $Window.position = configuration.get_value("MyPlugin", "window_position", Vector2()) - $Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.white) + $Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.WHITE) [/codeblock] </description> </method> @@ -664,7 +664,7 @@ <return type="void" /> <param index="0" name="callable" type="Callable" /> <description> - Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback]. + Removes a callback previously added by [method add_undo_redo_inspector_hook_callback]. </description> </method> <method name="set_force_draw_over_forwarding_enabled"> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 98f4789163..fca87f6a56 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -499,7 +499,7 @@ </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=https://docs.godotengine.org/en/latest/community/contributing/editor_and_docs_localization.html]contribute to editor translations on Weblate![/url] + 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] </member> <member name="interface/editor/expand_to_title" type="bool" setter="" getter=""> Expanding main editor window content to the title, if supported by [DisplayServer]. See [constant DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE]. @@ -741,7 +741,7 @@ </member> <member name="text_editor/behavior/indent/type" type="int" setter="" getter=""> The indentation style to use (tabs or spaces). - [b]Note:[/b] The [url=https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url] recommends using tabs for indentation. It is advised to change this setting only if you need to work on a project that currently uses spaces for indentation. + [b]Note:[/b] The [url=$DOCS_URL/getting_started/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url] recommends using tabs for indentation. It is advised to change this setting only if you need to work on a project that currently uses spaces for indentation. </member> <member name="text_editor/behavior/navigation/drag_and_drop_selection" type="bool" setter="" getter=""> If [code]true[/code], allows drag-and-dropping text in the script editor to move text. Disable this if you find yourself accidentally drag-and-dropping text in the script editor. @@ -782,7 +782,7 @@ If [code]true[/code], the code completion tooltip will appear below the current line unless there is no space on screen below the current line. If [code]false[/code], the code completion tooltip will appear above the current line. </member> <member name="text_editor/completion/use_single_quotes" type="bool" setter="" getter=""> - If [code]true[/code], performs string autocompletion with single quotes. If [code]false[/code], performs string autocompletion with double quotes (which matches the [url=https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url]). + If [code]true[/code], performs string autocompletion with single quotes. If [code]false[/code], performs string autocompletion with double quotes (which matches the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url]). </member> <member name="text_editor/help/class_reference_examples" type="int" setter="" getter=""> Controls which multi-line code blocks should be displayed in the editor help. This setting does not affect single-line code literals in the editor help. diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index de105b32e1..1aef79f6e5 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -22,10 +22,32 @@ <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> If [code]true[/code], the slider can't be interacted with. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" /> <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default=""""> The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. </member> </members> + <signals> + <signal name="grabbed"> + <description> + Emitted when the spinner/slider is grabbed. + </description> + </signal> + <signal name="ungrabbed"> + <description> + Emitted when the spinner/slider is ungrabbed. + </description> + </signal> + <signal name="value_focus_entered"> + <description> + Emitted when the value form gains focus. + </description> + </signal> + <signal name="value_focus_exited"> + <description> + Emitted when the value form loses focus. + </description> + </signal> + </signals> </class> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 1ae4718536..127c5daf95 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -21,7 +21,10 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="value" type="Variant" /> <description> - Set the value of a shader parameter for this instance only. + Set the value of a shader uniform for this instance only ([url=$DOCS_URL/tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms]per-instance uniform[/url]). See also [method ShaderMaterial.set_shader_parameter] to assign a uniform on all instances using the same [ShaderMaterial]. + [b]Note:[/b] For a shader uniform to be assignable on a per-instance basis, it [i]must[/i] be defined with [code]instance uniform ...[/code] rather than [code]uniform ...[/code] in the shader code. + [b]Note:[/b] [param name] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). + [b]Note:[/b] Per-instance shader uniforms are currently only available in 3D, so there is no 2D equivalent of this method. </description> </method> </methods> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 16386ff81b..3f0080ac15 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -280,11 +280,6 @@ Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see [member show_close]). </description> </signal> - <signal name="deselected"> - <description> - Emitted when the GraphNode is deselected. - </description> - </signal> <signal name="dragged"> <param index="0" name="from" type="Vector2" /> <param index="1" name="to" type="Vector2" /> @@ -292,6 +287,16 @@ Emitted when the GraphNode is dragged. </description> </signal> + <signal name="node_deselected"> + <description> + Emitted when the GraphNode is deselected. + </description> + </signal> + <signal name="node_selected"> + <description> + Emitted when the GraphNode is selected. + </description> + </signal> <signal name="position_offset_changed"> <description> Emitted when the GraphNode is moved. @@ -308,11 +313,6 @@ Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]). </description> </signal> - <signal name="selected"> - <description> - Emitted when the GraphNode is selected. - </description> - </signal> <signal name="slot_updated"> <param index="0" name="idx" type="int" /> <description> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index ed1b40488e..051e087611 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -489,7 +489,7 @@ var img = Image.new() img.create(img_width, img_height, false, Image.FORMAT_RGBA8) - img.set_pixel(1, 2, Color.red) # Sets the color at (1, 2) to red. + img.set_pixel(1, 2, Color.RED) # Sets the color at (1, 2) to red. [/gdscript] [csharp] int imgWidth = 10; @@ -517,7 +517,7 @@ var img = Image.new() img.create(img_width, img_height, false, Image.FORMAT_RGBA8) - img.set_pixelv(Vector2i(1, 2), Color.red) # Sets the color at (1, 2) to red. + img.set_pixelv(Vector2i(1, 2), Color.RED) # Sets the color at (1, 2) to red. [/gdscript] [csharp] int imgWidth = 10; diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index be8c8ff83f..a0d2d93a7d 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -155,7 +155,7 @@ </description> </method> <method name="get_mouse_button_mask" qualifiers="const"> - <return type="int" enum="MouseButton" /> + <return type="int" enum="MouseButtonMask" /> <description> Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state]. </description> @@ -397,7 +397,7 @@ Makes the mouse cursor hidden if it is visible. </constant> <constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode"> - Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. + Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 87e2b8ea20..3816847804 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -5,6 +5,7 @@ </brief_description> <description> Contains a generic action which can be targeted from several types of inputs. Actions can be created from the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b] menu. See [method Node._input]. + [b]Note:[/b] Unlike the other [InputEvent] subclasses which map to unique physical events, this virtual one is not emitted by the engine. This class is useful to emit actions manually with [method Input.parse_input_event], which are then received in [method Node._input]. To check if a physical event matches an action from the Input Map, use [method InputEvent.is_action] and [method InputEvent.is_action_pressed]. </description> <tutorials> <link title="InputEvent: Actions">$DOCS_URL/tutorials/inputs/inputevent.html#actions</link> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 889329d97e..0a1f3d2c1a 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -10,7 +10,7 @@ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link> </tutorials> <members> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="0"> + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButtonMask" default="0"> The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks. </member> <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)"> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index e5cc522b21..c1d126ca4a 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -13,12 +13,21 @@ <member name="index" type="int" setter="set_index" getter="get_index" default="0"> The drag event index in the case of a multi-drag event. </member> + <member name="pen_inverted" type="bool" setter="set_pen_inverted" getter="get_pen_inverted" default="false"> + Returns [code]true[/code] when using the eraser end of a stylus pen. + </member> <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> The drag position. </member> + <member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0"> + Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code]. + </member> <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)"> The drag position relative to the previous position (position at the last frame). </member> + <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2(0, 0)"> + Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes. + </member> <member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2(0, 0)"> The drag velocity. </member> diff --git a/doc/classes/JavaScriptBridge.xml b/doc/classes/JavaScriptBridge.xml index 5e36b5cc80..f79c11b334 100644 --- a/doc/classes/JavaScriptBridge.xml +++ b/doc/classes/JavaScriptBridge.xml @@ -5,7 +5,7 @@ </brief_description> <description> The JavaScriptBridge singleton is implemented only in the Web export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. - [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScriptBridge singleton is enabled. Official export templates also have the JavaScriptBridge singleton enabled. See [url=$DOCS_URL/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information. + [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScriptBridge singleton is enabled. Official export templates also have the JavaScriptBridge singleton enabled. See [url=$DOCS_URL/contributing/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information. </description> <tutorials> <link title="Exporting for the Web: Calling JavaScript from script">$DOCS_URL/tutorials/export/exporting_for_web.html#calling-javascript-from-script</link> @@ -46,6 +46,13 @@ If [param use_global_execution_context] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. </description> </method> + <method name="force_fs_sync"> + <return type="void" /> + <description> + Force synchronization of the persistent file system (when enabled). + [b]Note:[/b] This is only useful for modules or extensions that can't use [FileAccess] to write files. + </description> + </method> <method name="get_interface"> <return type="JavaScriptObject" /> <param index="0" name="interface" type="String" /> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 1a8cbf0584..a14856b9b2 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -62,7 +62,7 @@ Limits the lines of text the node shows on screen. </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" /> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="4" /> <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 4d3fb7ed5c..94e80ffb2b 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -266,79 +266,79 @@ <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat"> Represents the size of the [enum ArrayCustomFormat] enum. </constant> - <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat" is_bitfield="true"> Mesh array contains vertices. All meshes require a vertex array so this should always be present. </constant> - <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat" is_bitfield="true"> Mesh array contains normals. </constant> - <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat" is_bitfield="true"> Mesh array contains tangents. </constant> - <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat" is_bitfield="true"> Mesh array contains colors. </constant> - <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat" is_bitfield="true"> Mesh array contains UVs. </constant> - <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat" is_bitfield="true"> Mesh array contains second UV. </constant> - <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 0. </constant> - <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 1. </constant> - <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 2. </constant> - <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 3. </constant> - <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat" is_bitfield="true"> Mesh array contains bones. </constant> - <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat" is_bitfield="true"> Mesh array contains bone weights. </constant> - <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat" is_bitfield="true"> Mesh array uses indices. </constant> - <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> Mask of mesh channels permitted in blend shapes. </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat" is_bitfield="true"> Shift of first custom channel. </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat" is_bitfield="true"> Number of format bits per custom channel. See [enum ArrayCustomFormat]. </constant> - <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 0. </constant> - <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 1. </constant> - <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 2. </constant> - <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 3. </constant> - <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [enum ArrayCustomFormat]. </constant> - <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat"> + <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat" is_bitfield="true"> Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit]. </constant> - <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat" is_bitfield="true"> Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true"> Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan. </constant> - <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true"> Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index e9666337a1..7bb33fc46d 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -13,10 +13,6 @@ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> The [Mesh] that will be drawn by the [MeshInstance2D]. </member> - <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> - The normal map that will be used if using the default [CanvasItemMaterial]. - [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. - </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. </member> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index daf5ef6287..16c0f6070e 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -13,10 +13,6 @@ <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. </member> - <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> - The normal map that will be used if using the default [CanvasItemMaterial]. - [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. - </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. </member> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 31d347d76c..b561748b30 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -8,6 +8,7 @@ [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> + <link title="Using NavigationAgents">$DOCS_URL/tutorials/navigation/navigation_using_navigationagents.html</link> </tutorials> <methods> <method name="distance_to_target" qualifiers="const"> @@ -113,7 +114,7 @@ <member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10"> The maximum number of neighbors for the agent to consider. </member> - <member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="200.0"> + <member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="100.0"> The maximum speed that an agent can move. </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> @@ -122,10 +123,10 @@ <member name="neighbor_distance" type="float" setter="set_neighbor_distance" getter="get_neighbor_distance" default="500.0"> The distance to search for other agents. </member> - <member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="1.0"> + <member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="20.0"> The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update. </member> - <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> + <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="100.0"> The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. </member> <member name="path_metadata_flags" type="int" setter="set_path_metadata_flags" getter="get_path_metadata_flags" enum="NavigationPathQueryParameters2D.PathMetadataFlags" default="7"> @@ -135,13 +136,13 @@ The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]). Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size. </member> - <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0"> + <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="10.0"> The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. </member> <member name="target_location" type="Vector2" setter="set_target_location" getter="get_target_location" default="Vector2(0, 0)"> The user-defined target location. Setting this property will clear the current navigation path. </member> - <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0"> + <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="1.0"> The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. </member> </members> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index c3f4809b5e..a1b007ee56 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -8,6 +8,7 @@ [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> + <link title="Using NavigationAgents">$DOCS_URL/tutorials/navigation/navigation_using_navigationagents.html</link> </tutorials> <methods> <method name="distance_to_target" qualifiers="const"> diff --git a/doc/classes/NavigationLink2D.xml b/doc/classes/NavigationLink2D.xml index 9d75694360..44d2110a7c 100644 --- a/doc/classes/NavigationLink2D.xml +++ b/doc/classes/NavigationLink2D.xml @@ -7,6 +7,7 @@ Creates a link between two locations that [NavigationServer2D] can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps. </description> <tutorials> + <link title="Using NavigationLinks">$DOCS_URL/tutorials/navigation/navigation_using_navigationlinks.html</link> </tutorials> <methods> <method name="get_navigation_layer_value" qualifiers="const"> diff --git a/doc/classes/NavigationLink3D.xml b/doc/classes/NavigationLink3D.xml index 730c43c5a8..4aa5801afb 100644 --- a/doc/classes/NavigationLink3D.xml +++ b/doc/classes/NavigationLink3D.xml @@ -7,6 +7,7 @@ Creates a link between two locations that [NavigationServer3D] can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps. </description> <tutorials> + <link title="Using NavigationLinks">$DOCS_URL/tutorials/navigation/navigation_using_navigationlinks.html</link> </tutorials> <methods> <method name="get_navigation_layer_value" qualifiers="const"> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index ff898551d4..85af44a13e 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> + <link title="Using NavigationMeshes">$DOCS_URL/tutorials/navigation/navigation_using_navigationmeshes.html</link> </tutorials> <methods> <method name="add_polygon"> diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 15d149a229..0d4c083eb0 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -11,6 +11,7 @@ [b]Note:[/b] Using meshes to not only define walkable surfaces but also obstruct navigation baking does not always work. The navigation baking has no concept of what is a geometry "inside" when dealing with mesh source geometry and this is intentional. Depending on current baking parameters, as soon as the obstructing mesh is large enough to fit a navigation mesh area inside, the baking will generate navigation mesh areas that are inside the obstructing source geometry mesh. </description> <tutorials> + <link title="Using NavigationMeshes">$DOCS_URL/tutorials/navigation/navigation_using_navigationmeshes.html</link> </tutorials> <methods> <method name="bake"> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index ce0f05ad28..7d391bfa99 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -8,6 +8,7 @@ Obstacles [b]don't[/b] change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. </description> <tutorials> + <link title="Using NavigationObstacles">$DOCS_URL/tutorials/navigation/navigation_using_navigationobstacles.html</link> </tutorials> <methods> <method name="get_navigation_map" qualifiers="const"> diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml index 78bbb788d9..ce24d2bb0e 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -8,6 +8,7 @@ Obstacles [b]don't[/b] change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. </description> <tutorials> + <link title="Using NavigationObstacles">$DOCS_URL/tutorials/navigation/navigation_using_navigationobstacles.html</link> </tutorials> <methods> <method name="get_navigation_map" qualifiers="const"> diff --git a/doc/classes/NavigationPathQueryParameters2D.xml b/doc/classes/NavigationPathQueryParameters2D.xml index 511b2e7a8c..05d7e9f918 100644 --- a/doc/classes/NavigationPathQueryParameters2D.xml +++ b/doc/classes/NavigationPathQueryParameters2D.xml @@ -7,6 +7,7 @@ This class contains the start and target position and other parameters to be used with [method NavigationServer2D.query_path]. </description> <tutorials> + <link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.html</link> </tutorials> <members> <member name="map" type="RID" setter="set_map" getter="get_map"> diff --git a/doc/classes/NavigationPathQueryParameters3D.xml b/doc/classes/NavigationPathQueryParameters3D.xml index b5031f60f2..690d74ab70 100644 --- a/doc/classes/NavigationPathQueryParameters3D.xml +++ b/doc/classes/NavigationPathQueryParameters3D.xml @@ -7,6 +7,7 @@ This class contains the start and target position and other parameters to be used with [method NavigationServer3D.query_path]. </description> <tutorials> + <link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.html</link> </tutorials> <members> <member name="map" type="RID" setter="set_map" getter="get_map"> diff --git a/doc/classes/NavigationPathQueryResult2D.xml b/doc/classes/NavigationPathQueryResult2D.xml index 75f7cc47aa..7bc588619d 100644 --- a/doc/classes/NavigationPathQueryResult2D.xml +++ b/doc/classes/NavigationPathQueryResult2D.xml @@ -7,6 +7,7 @@ This class contains the result of a navigation path query from [method NavigationServer2D.query_path]. </description> <tutorials> + <link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.html</link> </tutorials> <methods> <method name="reset"> diff --git a/doc/classes/NavigationPathQueryResult3D.xml b/doc/classes/NavigationPathQueryResult3D.xml index 03d41cb230..118a597b6c 100644 --- a/doc/classes/NavigationPathQueryResult3D.xml +++ b/doc/classes/NavigationPathQueryResult3D.xml @@ -7,6 +7,7 @@ This class contains the result of a navigation path query from [method NavigationServer3D.query_path]. </description> <tutorials> + <link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.html</link> </tutorials> <methods> <method name="reset"> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index b30dd2703a..c223f88d6d 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -44,6 +44,7 @@ </description> <tutorials> <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> + <link title="Using NavigationMeshes">$DOCS_URL/tutorials/navigation/navigation_using_navigationmeshes.html</link> </tutorials> <methods> <method name="add_outline"> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index 8b8793b3b4..5d0fe9dae4 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -13,6 +13,7 @@ [b]Note:[/b] This node caches changes to its properties, so if you make changes to the underlying region [RID] in [NavigationServer2D], they will not be reflected in this node's properties. </description> <tutorials> + <link title="Using NavigationRegions">$DOCS_URL/tutorials/navigation/navigation_using_navigationregions.html</link> </tutorials> <methods> <method name="get_navigation_layer_value" qualifiers="const"> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 10662db869..c3e554e7d6 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -13,6 +13,7 @@ [b]Note:[/b] This node caches changes to its properties, so if you make changes to the underlying region [RID] in [NavigationServer3D], they will not be reflected in this node's properties. </description> <tutorials> + <link title="Using NavigationRegions">$DOCS_URL/tutorials/navigation/navigation_using_navigationregions.html</link> </tutorials> <methods> <method name="bake_navigation_mesh"> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 32e48cde54..1ba949b294 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -15,9 +15,10 @@ </description> <tutorials> <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> + <link title="Using NavigationServer">$DOCS_URL/tutorials/navigation/navigation_using_navigationservers.html</link> </tutorials> <methods> - <method name="agent_create" qualifiers="const"> + <method name="agent_create"> <return type="RID" /> <description> Creates the agent. @@ -37,7 +38,7 @@ Returns true if the map got changed the previous frame. </description> </method> - <method name="agent_set_callback" qualifiers="const"> + <method name="agent_set_callback"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="object_id" type="int" /> @@ -48,7 +49,7 @@ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]0[/code] ObjectID as the [param object_id]. </description> </method> - <method name="agent_set_map" qualifiers="const"> + <method name="agent_set_map"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="map" type="RID" /> @@ -56,7 +57,7 @@ Puts the agent in the map. </description> </method> - <method name="agent_set_max_neighbors" qualifiers="const"> + <method name="agent_set_max_neighbors"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="count" type="int" /> @@ -64,7 +65,7 @@ Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_max_speed" qualifiers="const"> + <method name="agent_set_max_speed"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="max_speed" type="float" /> @@ -72,7 +73,7 @@ Sets the maximum speed of the agent. Must be positive. </description> </method> - <method name="agent_set_neighbor_distance" qualifiers="const"> + <method name="agent_set_neighbor_distance"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="distance" type="float" /> @@ -80,7 +81,7 @@ Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_position" qualifiers="const"> + <method name="agent_set_position"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="position" type="Vector2" /> @@ -88,7 +89,7 @@ Sets the position of the agent in world space. </description> </method> - <method name="agent_set_radius" qualifiers="const"> + <method name="agent_set_radius"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="radius" type="float" /> @@ -96,7 +97,7 @@ Sets the radius of the agent. </description> </method> - <method name="agent_set_target_velocity" qualifiers="const"> + <method name="agent_set_target_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="target_velocity" type="Vector2" /> @@ -104,7 +105,7 @@ Sets the new target velocity. </description> </method> - <method name="agent_set_time_horizon" qualifiers="const"> + <method name="agent_set_time_horizon"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="time" type="float" /> @@ -112,7 +113,7 @@ The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. </description> </method> - <method name="agent_set_velocity" qualifiers="const"> + <method name="agent_set_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="velocity" type="Vector2" /> @@ -120,7 +121,7 @@ Sets the current velocity of the agent. </description> </method> - <method name="free_rid" qualifiers="const"> + <method name="free_rid"> <return type="void" /> <param index="0" name="rid" type="RID" /> <description> @@ -133,7 +134,7 @@ Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. </description> </method> - <method name="link_create" qualifiers="const"> + <method name="link_create"> <return type="RID" /> <description> Create a new link between two locations on a map. @@ -195,7 +196,7 @@ Returns whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_bidirectional" qualifiers="const"> + <method name="link_set_bidirectional"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="bidirectional" type="bool" /> @@ -203,7 +204,7 @@ Sets whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_end_location" qualifiers="const"> + <method name="link_set_end_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector2" /> @@ -211,7 +212,7 @@ Sets the exit location for the [code]link[/code]. </description> </method> - <method name="link_set_enter_cost" qualifiers="const"> + <method name="link_set_enter_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -219,7 +220,7 @@ Sets the [code]enter_cost[/code] for this [code]link[/code]. </description> </method> - <method name="link_set_map" qualifiers="const"> + <method name="link_set_map"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="map" type="RID" /> @@ -227,7 +228,7 @@ Sets the navigation map [RID] for the link. </description> </method> - <method name="link_set_navigation_layers" qualifiers="const"> + <method name="link_set_navigation_layers"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -235,7 +236,7 @@ Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]). </description> </method> - <method name="link_set_owner_id" qualifiers="const"> + <method name="link_set_owner_id"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -243,7 +244,7 @@ Set the [code]ObjectID[/code] of the object which manages this link. </description> </method> - <method name="link_set_start_location" qualifiers="const"> + <method name="link_set_start_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector2" /> @@ -251,7 +252,7 @@ Sets the entry location for this [code]link[/code]. </description> </method> - <method name="link_set_travel_cost" qualifiers="const"> + <method name="link_set_travel_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="travel_cost" type="float" /> @@ -259,7 +260,7 @@ Sets the [code]travel_cost[/code] for this [code]link[/code]. </description> </method> - <method name="map_create" qualifiers="const"> + <method name="map_create"> <return type="RID" /> <description> Create a new map. @@ -351,7 +352,7 @@ Returns true if the map is active. </description> </method> - <method name="map_set_active" qualifiers="const"> + <method name="map_set_active"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="active" type="bool" /> @@ -359,7 +360,7 @@ Sets the map active. </description> </method> - <method name="map_set_cell_size" qualifiers="const"> + <method name="map_set_cell_size"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="cell_size" type="float" /> @@ -367,7 +368,7 @@ Set the map cell size used to weld the navigation mesh polygons. </description> </method> - <method name="map_set_edge_connection_margin" qualifiers="const"> + <method name="map_set_edge_connection_margin"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="margin" type="float" /> @@ -375,7 +376,7 @@ Set the map edge connection margin used to weld the compatible region edges. </description> </method> - <method name="map_set_link_connection_radius" qualifiers="const"> + <method name="map_set_link_connection_radius"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="radius" type="float" /> @@ -391,7 +392,7 @@ Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters2D]. Updates the provided [NavigationPathQueryResult2D] result object with the path among other results requested by the query. </description> </method> - <method name="region_create" qualifiers="const"> + <method name="region_create"> <return type="RID" /> <description> Creates a new region. @@ -465,7 +466,7 @@ [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. </description> </method> - <method name="region_set_enter_cost" qualifiers="const"> + <method name="region_set_enter_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -473,7 +474,7 @@ Sets the [param enter_cost] for this [param region]. </description> </method> - <method name="region_set_map" qualifiers="const"> + <method name="region_set_map"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="map" type="RID" /> @@ -481,7 +482,7 @@ Sets the map for the region. </description> </method> - <method name="region_set_navigation_layers" qualifiers="const"> + <method name="region_set_navigation_layers"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -489,7 +490,7 @@ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]). </description> </method> - <method name="region_set_navigation_polygon" qualifiers="const"> + <method name="region_set_navigation_polygon"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_polygon" type="NavigationPolygon" /> @@ -497,7 +498,7 @@ Sets the [param navigation_polygon] for the region. </description> </method> - <method name="region_set_owner_id" qualifiers="const"> + <method name="region_set_owner_id"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -505,7 +506,7 @@ Set the [code]ObjectID[/code] of the object which manages this region. </description> </method> - <method name="region_set_transform" qualifiers="const"> + <method name="region_set_transform"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="transform" type="Transform2D" /> @@ -513,7 +514,7 @@ Sets the global transformation for the region. </description> </method> - <method name="region_set_travel_cost" qualifiers="const"> + <method name="region_set_travel_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="travel_cost" type="float" /> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index c156dfac16..e007c71342 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -15,9 +15,10 @@ </description> <tutorials> <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> + <link title="Using NavigationServer">$DOCS_URL/tutorials/navigation/navigation_using_navigationservers.html</link> </tutorials> <methods> - <method name="agent_create" qualifiers="const"> + <method name="agent_create"> <return type="RID" /> <description> Creates the agent. @@ -37,7 +38,7 @@ Returns true if the map got changed the previous frame. </description> </method> - <method name="agent_set_callback" qualifiers="const"> + <method name="agent_set_callback"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="object_id" type="int" /> @@ -48,7 +49,7 @@ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]0[/code] ObjectID as the [param object_id]. </description> </method> - <method name="agent_set_map" qualifiers="const"> + <method name="agent_set_map"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="map" type="RID" /> @@ -56,7 +57,7 @@ Puts the agent in the map. </description> </method> - <method name="agent_set_max_neighbors" qualifiers="const"> + <method name="agent_set_max_neighbors"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="count" type="int" /> @@ -64,7 +65,7 @@ Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_max_speed" qualifiers="const"> + <method name="agent_set_max_speed"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="max_speed" type="float" /> @@ -72,7 +73,7 @@ Sets the maximum speed of the agent. Must be positive. </description> </method> - <method name="agent_set_neighbor_distance" qualifiers="const"> + <method name="agent_set_neighbor_distance"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="distance" type="float" /> @@ -80,7 +81,7 @@ Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_position" qualifiers="const"> + <method name="agent_set_position"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="position" type="Vector3" /> @@ -88,7 +89,7 @@ Sets the position of the agent in world space. </description> </method> - <method name="agent_set_radius" qualifiers="const"> + <method name="agent_set_radius"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="radius" type="float" /> @@ -96,7 +97,7 @@ Sets the radius of the agent. </description> </method> - <method name="agent_set_target_velocity" qualifiers="const"> + <method name="agent_set_target_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="target_velocity" type="Vector3" /> @@ -104,7 +105,7 @@ Sets the new target velocity. </description> </method> - <method name="agent_set_time_horizon" qualifiers="const"> + <method name="agent_set_time_horizon"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="time" type="float" /> @@ -112,7 +113,7 @@ The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. </description> </method> - <method name="agent_set_velocity" qualifiers="const"> + <method name="agent_set_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="velocity" type="Vector3" /> @@ -120,7 +121,7 @@ Sets the current velocity of the agent. </description> </method> - <method name="free_rid" qualifiers="const"> + <method name="free_rid"> <return type="void" /> <param index="0" name="rid" type="RID" /> <description> @@ -133,7 +134,14 @@ Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. </description> </method> - <method name="link_create" qualifiers="const"> + <method name="get_process_info" qualifiers="const"> + <return type="int" /> + <param index="0" name="process_info" type="int" enum="NavigationServer3D.ProcessInfo" /> + <description> + Returns information about the current state of the NavigationServer. See [enum ProcessInfo] for a list of available states. + </description> + </method> + <method name="link_create"> <return type="RID" /> <description> Create a new link between two locations on a map. @@ -195,7 +203,7 @@ Returns whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_bidirectional" qualifiers="const"> + <method name="link_set_bidirectional"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="bidirectional" type="bool" /> @@ -203,7 +211,7 @@ Sets whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_end_location" qualifiers="const"> + <method name="link_set_end_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector3" /> @@ -211,7 +219,7 @@ Sets the exit location for the [code]link[/code]. </description> </method> - <method name="link_set_enter_cost" qualifiers="const"> + <method name="link_set_enter_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -219,7 +227,7 @@ Sets the [code]enter_cost[/code] for this [code]link[/code]. </description> </method> - <method name="link_set_map" qualifiers="const"> + <method name="link_set_map"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="map" type="RID" /> @@ -227,7 +235,7 @@ Sets the navigation map [RID] for the link. </description> </method> - <method name="link_set_navigation_layers" qualifiers="const"> + <method name="link_set_navigation_layers"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -235,7 +243,7 @@ Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer3D.map_get_path]). </description> </method> - <method name="link_set_owner_id" qualifiers="const"> + <method name="link_set_owner_id"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -243,7 +251,7 @@ Set the [code]ObjectID[/code] of the object which manages this link. </description> </method> - <method name="link_set_start_location" qualifiers="const"> + <method name="link_set_start_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector3" /> @@ -251,7 +259,7 @@ Sets the entry location for this [code]link[/code]. </description> </method> - <method name="link_set_travel_cost" qualifiers="const"> + <method name="link_set_travel_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="travel_cost" type="float" /> @@ -259,7 +267,7 @@ Sets the [code]travel_cost[/code] for this [code]link[/code]. </description> </method> - <method name="map_create" qualifiers="const"> + <method name="map_create"> <return type="RID" /> <description> Create a new map. @@ -376,7 +384,7 @@ Returns true if the map is active. </description> </method> - <method name="map_set_active" qualifiers="const"> + <method name="map_set_active"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="active" type="bool" /> @@ -384,7 +392,7 @@ Sets the map active. </description> </method> - <method name="map_set_cell_size" qualifiers="const"> + <method name="map_set_cell_size"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="cell_size" type="float" /> @@ -392,7 +400,7 @@ Set the map cell size used to weld the navigation mesh polygons. </description> </method> - <method name="map_set_edge_connection_margin" qualifiers="const"> + <method name="map_set_edge_connection_margin"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="margin" type="float" /> @@ -400,7 +408,7 @@ Set the map edge connection margin used to weld the compatible region edges. </description> </method> - <method name="map_set_link_connection_radius" qualifiers="const"> + <method name="map_set_link_connection_radius"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="radius" type="float" /> @@ -408,7 +416,7 @@ Set the map's link connection radius used to connect links to navigation polygons. </description> </method> - <method name="map_set_up" qualifiers="const"> + <method name="map_set_up"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="up" type="Vector3" /> @@ -433,7 +441,7 @@ Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters3D]. Updates the provided [NavigationPathQueryResult3D] result object with the path among other results requested by the query. </description> </method> - <method name="region_bake_navigation_mesh" qualifiers="const"> + <method name="region_bake_navigation_mesh"> <return type="void" /> <param index="0" name="navigation_mesh" type="NavigationMesh" /> <param index="1" name="root_node" type="Node" /> @@ -441,7 +449,7 @@ Bakes the [param navigation_mesh] with bake source geometry collected starting from the [param root_node]. </description> </method> - <method name="region_create" qualifiers="const"> + <method name="region_create"> <return type="RID" /> <description> Creates a new region. @@ -515,7 +523,7 @@ [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. </description> </method> - <method name="region_set_enter_cost" qualifiers="const"> + <method name="region_set_enter_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -523,7 +531,7 @@ Sets the [param enter_cost] for this [param region]. </description> </method> - <method name="region_set_map" qualifiers="const"> + <method name="region_set_map"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="map" type="RID" /> @@ -531,7 +539,7 @@ Sets the map for the region. </description> </method> - <method name="region_set_navigation_layers" qualifiers="const"> + <method name="region_set_navigation_layers"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -539,7 +547,7 @@ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]). </description> </method> - <method name="region_set_navigation_mesh" qualifiers="const"> + <method name="region_set_navigation_mesh"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_mesh" type="NavigationMesh" /> @@ -547,7 +555,7 @@ Sets the navigation mesh for the region. </description> </method> - <method name="region_set_owner_id" qualifiers="const"> + <method name="region_set_owner_id"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -555,7 +563,7 @@ Set the [code]ObjectID[/code] of the object which manages this region. </description> </method> - <method name="region_set_transform" qualifiers="const"> + <method name="region_set_transform"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="transform" type="Transform3D" /> @@ -563,7 +571,7 @@ Sets the global transformation for the region. </description> </method> - <method name="region_set_travel_cost" qualifiers="const"> + <method name="region_set_travel_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="travel_cost" type="float" /> @@ -571,7 +579,7 @@ Sets the [param travel_cost] for this [param region]. </description> </method> - <method name="set_active" qualifiers="const"> + <method name="set_active"> <return type="void" /> <param index="0" name="active" type="bool" /> <description> @@ -592,4 +600,33 @@ </description> </signal> </signals> + <constants> + <constant name="INFO_ACTIVE_MAPS" value="0" enum="ProcessInfo"> + Constant to get the number of active navigation maps. + </constant> + <constant name="INFO_REGION_COUNT" value="1" enum="ProcessInfo"> + Constant to get the number of active navigation regions. + </constant> + <constant name="INFO_AGENT_COUNT" value="2" enum="ProcessInfo"> + Constant to get the number of active navigation agents processing avoidance. + </constant> + <constant name="INFO_LINK_COUNT" value="3" enum="ProcessInfo"> + Constant to get the number of active navigation links. + </constant> + <constant name="INFO_POLYGON_COUNT" value="4" enum="ProcessInfo"> + Constant to get the number of navigation mesh polygons. + </constant> + <constant name="INFO_EDGE_COUNT" value="5" enum="ProcessInfo"> + Constant to get the number of navigation mesh polygon edges. + </constant> + <constant name="INFO_EDGE_MERGE_COUNT" value="6" enum="ProcessInfo"> + Constant to get the number of navigation mesh polygon edges that were merged due to edge key overlap. + </constant> + <constant name="INFO_EDGE_CONNECTION_COUNT" value="7" enum="ProcessInfo"> + Constant to get the number of navigation mesh polygon edges that are considered connected by edge proximity. + </constant> + <constant name="INFO_EDGE_FREE_COUNT" value="8" enum="ProcessInfo"> + Constant to get the number of navigation mesh polygon edges that could not be merged but may be still connected by edge proximity or with links. + </constant> + </constants> </class> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 24df5977f9..02fd6dae30 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -421,6 +421,12 @@ Returns the node's [Viewport]. </description> </method> + <method name="get_window" qualifiers="const"> + <return type="Window" /> + <description> + Returns the [Window] that contains this node. If the node is in the main window, this is equivalent to getting the root node ([code]get_tree().get_root()[/code]). + </description> + </method> <method name="has_node" qualifiers="const"> <return type="bool" /> <param index="0" name="path" type="NodePath" /> @@ -612,6 +618,15 @@ Removes a node from the [param group]. Does nothing if the node is not in the [param group]. See notes in the description, and the group methods in [SceneTree]. </description> </method> + <method name="reparent"> + <return type="void" /> + <param index="0" name="new_parent" type="Node" /> + <param index="1" name="keep_global_transform" type="bool" default="true" /> + <description> + Changes the parent of this [Node] to the [param new_parent]. The node needs to already have a parent. + If [param keep_global_transform] is [code]true[/code], the node's global transform will be preserved if supported. [Node2D], [Node3D] and [Control] support this argument (but [Control] keeps only position). + </description> + </method> <method name="replace_by"> <return type="void" /> <param index="0" name="node" type="Node" /> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 0efc6ab399..6dab7b4ebe 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -572,10 +572,9 @@ </method> <method name="read_string_from_stdin"> <return type="String" /> - <param index="0" name="block" type="bool" default="true" /> <description> - Reads a user input string from the standard input (usually the terminal). - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Non-blocking reads are not currently supported on any platform. + Reads a user input string from the standard input (usually the terminal). This operation is [i]blocking[/i], which causes the window to freeze if [method read_string_from_stdin] is called on the main thread. The thread calling [method read_string_from_stdin] will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]). + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="request_permission"> @@ -654,63 +653,6 @@ <constant name="RENDERING_DRIVER_OPENGL3" value="1" enum="RenderingDriver"> The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. </constant> - <constant name="DAY_SUNDAY" value="0" enum="Weekday"> - Sunday. - </constant> - <constant name="DAY_MONDAY" value="1" enum="Weekday"> - Monday. - </constant> - <constant name="DAY_TUESDAY" value="2" enum="Weekday"> - Tuesday. - </constant> - <constant name="DAY_WEDNESDAY" value="3" enum="Weekday"> - Wednesday. - </constant> - <constant name="DAY_THURSDAY" value="4" enum="Weekday"> - Thursday. - </constant> - <constant name="DAY_FRIDAY" value="5" enum="Weekday"> - Friday. - </constant> - <constant name="DAY_SATURDAY" value="6" enum="Weekday"> - Saturday. - </constant> - <constant name="MONTH_JANUARY" value="1" enum="Month"> - January. - </constant> - <constant name="MONTH_FEBRUARY" value="2" enum="Month"> - February. - </constant> - <constant name="MONTH_MARCH" value="3" enum="Month"> - March. - </constant> - <constant name="MONTH_APRIL" value="4" enum="Month"> - April. - </constant> - <constant name="MONTH_MAY" value="5" enum="Month"> - May. - </constant> - <constant name="MONTH_JUNE" value="6" enum="Month"> - June. - </constant> - <constant name="MONTH_JULY" value="7" enum="Month"> - July. - </constant> - <constant name="MONTH_AUGUST" value="8" enum="Month"> - August. - </constant> - <constant name="MONTH_SEPTEMBER" value="9" enum="Month"> - September. - </constant> - <constant name="MONTH_OCTOBER" value="10" enum="Month"> - October. - </constant> - <constant name="MONTH_NOVEMBER" value="11" enum="Month"> - November. - </constant> - <constant name="MONTH_DECEMBER" value="12" enum="Month"> - December. - </constant> <constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir"> Desktop directory path. </constant> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index e015bec134..a9e17f4666 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -24,6 +24,7 @@ [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. </description> <tutorials> + <link title="Object class introduction">$DOCS_URL/contributing/development/core_and_modules/object_class.html</link> <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link> <link title="Object notifications">$DOCS_URL/tutorials/best_practices/godot_notifications.html</link> </tutorials> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index a58a6249ae..fdf0fff0fb 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -94,6 +94,8 @@ <return type="int" /> <param index="0" name="from_last" type="bool" default="false" /> <description> + Returns the index of the first item which is not disabled, or marked as a separator. If [param from_last] is [code]true[/code], the items will be searched in reverse order. + Returns [code]-1[/code] if no item is found. </description> </method> <method name="get_selected_id" qualifiers="const"> @@ -111,6 +113,7 @@ <method name="has_selectable_items" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if this button contains at least one item which is not disabled, or marked as a separator. </description> </method> <method name="is_item_disabled" qualifiers="const"> @@ -124,6 +127,7 @@ <return type="bool" /> <param index="0" name="idx" type="int" /> <description> + Returns [code]true[/code] if the item at index [param idx] is marked as a separator. </description> </method> <method name="remove_item"> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 381fa3e9ef..6b7daa534e 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -131,67 +131,97 @@ <constant name="TIME_PHYSICS_PROCESS" value="2" enum="Monitor"> Time it took to complete one physics frame, in seconds. [i]Lower is better.[/i] </constant> - <constant name="MEMORY_STATIC" value="3" enum="Monitor"> + <constant name="TIME_NAVIGATION_PROCESS" value="3" enum="Monitor"> + Time it took to complete one navigation step, in seconds. This includes navigation map updates as well as agent avoidance calculations. [i]Lower is better.[/i] + </constant> + <constant name="MEMORY_STATIC" value="4" enum="Monitor"> Static memory currently used, in bytes. Not available in release builds. [i]Lower is better.[/i] </constant> - <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor"> + <constant name="MEMORY_STATIC_MAX" value="5" enum="Monitor"> Available static memory. Not available in release builds. [i]Lower is better.[/i] </constant> - <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor"> + <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="6" enum="Monitor"> Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. [i]Lower is better.[/i] </constant> - <constant name="OBJECT_COUNT" value="6" enum="Monitor"> + <constant name="OBJECT_COUNT" value="7" enum="Monitor"> Number of objects currently instantiated (including nodes). [i]Lower is better.[/i] </constant> - <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor"> + <constant name="OBJECT_RESOURCE_COUNT" value="8" enum="Monitor"> Number of resources currently used. [i]Lower is better.[/i] </constant> - <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor"> + <constant name="OBJECT_NODE_COUNT" value="9" enum="Monitor"> Number of nodes currently instantiated in the scene tree. This also includes the root node. [i]Lower is better.[/i] </constant> - <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> + <constant name="OBJECT_ORPHAN_NODE_COUNT" value="10" enum="Monitor"> Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. [i]Lower is better.[/i] </constant> - <constant name="RENDER_TOTAL_OBJECTS_IN_FRAME" value="10" enum="Monitor"> + <constant name="RENDER_TOTAL_OBJECTS_IN_FRAME" value="11" enum="Monitor"> The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). [i]Lower is better.[/i] </constant> - <constant name="RENDER_TOTAL_PRIMITIVES_IN_FRAME" value="11" enum="Monitor"> + <constant name="RENDER_TOTAL_PRIMITIVES_IN_FRAME" value="12" enum="Monitor"> The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). [i]Lower is better.[/i] </constant> - <constant name="RENDER_TOTAL_DRAW_CALLS_IN_FRAME" value="12" enum="Monitor"> + <constant name="RENDER_TOTAL_DRAW_CALLS_IN_FRAME" value="13" enum="Monitor"> The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. [i]Lower is better.[/i] </constant> - <constant name="RENDER_VIDEO_MEM_USED" value="13" enum="Monitor"> + <constant name="RENDER_VIDEO_MEM_USED" value="14" enum="Monitor"> The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of [constant RENDER_TEXTURE_MEM_USED] and [constant RENDER_BUFFER_MEM_USED]. [i]Lower is better.[/i] </constant> - <constant name="RENDER_TEXTURE_MEM_USED" value="14" enum="Monitor"> + <constant name="RENDER_TEXTURE_MEM_USED" value="15" enum="Monitor"> The amount of texture memory used (in bytes). [i]Lower is better.[/i] </constant> - <constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor"> + <constant name="RENDER_BUFFER_MEM_USED" value="16" enum="Monitor"> The amount of render buffer memory used (in bytes). [i]Lower is better.[/i] </constant> - <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor"> + <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="17" enum="Monitor"> Number of active [RigidBody2D] nodes in the game. [i]Lower is better.[/i] </constant> - <constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor"> + <constant name="PHYSICS_2D_COLLISION_PAIRS" value="18" enum="Monitor"> Number of collision pairs in the 2D physics engine. [i]Lower is better.[/i] </constant> - <constant name="PHYSICS_2D_ISLAND_COUNT" value="18" enum="Monitor"> + <constant name="PHYSICS_2D_ISLAND_COUNT" value="19" enum="Monitor"> Number of islands in the 2D physics engine. [i]Lower is better.[/i] </constant> - <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor"> + <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="20" enum="Monitor"> Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game. [i]Lower is better.[/i] </constant> - <constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor"> + <constant name="PHYSICS_3D_COLLISION_PAIRS" value="21" enum="Monitor"> Number of collision pairs in the 3D physics engine. [i]Lower is better.[/i] </constant> - <constant name="PHYSICS_3D_ISLAND_COUNT" value="21" enum="Monitor"> + <constant name="PHYSICS_3D_ISLAND_COUNT" value="22" enum="Monitor"> Number of islands in the 3D physics engine. [i]Lower is better.[/i] </constant> - <constant name="AUDIO_OUTPUT_LATENCY" value="22" enum="Monitor"> + <constant name="AUDIO_OUTPUT_LATENCY" value="23" enum="Monitor"> Output latency of the [AudioServer]. [i]Lower is better.[/i] </constant> - <constant name="MONITOR_MAX" value="23" enum="Monitor"> + <constant name="NAVIGATION_ACTIVE_MAPS" value="24" enum="Monitor"> + Number of active navigation maps in the [NavigationServer3D]. This also includes the two empty default navigation maps created by World2D and World3D. + </constant> + <constant name="NAVIGATION_REGION_COUNT" value="25" enum="Monitor"> + Number of active navigation regions in the [NavigationServer3D]. + </constant> + <constant name="NAVIGATION_AGENT_COUNT" value="26" enum="Monitor"> + Number of active navigation agents processing avoidance in the [NavigationServer3D]. + </constant> + <constant name="NAVIGATION_LINK_COUNT" value="27" enum="Monitor"> + Number of active navigation links in the [NavigationServer3D]. + </constant> + <constant name="NAVIGATION_POLYGON_COUNT" value="28" enum="Monitor"> + Number of navigation mesh polygons in the [NavigationServer3D]. + </constant> + <constant name="NAVIGATION_EDGE_COUNT" value="29" enum="Monitor"> + Number of navigation mesh polygon edges in the [NavigationServer3D]. + </constant> + <constant name="NAVIGATION_EDGE_MERGE_COUNT" value="30" enum="Monitor"> + Number of navigation mesh polygon edges that were merged due to edge key overlap in the [NavigationServer3D]. + </constant> + <constant name="NAVIGATION_EDGE_CONNECTION_COUNT" value="31" enum="Monitor"> + Number of polygon edges that are considered connected by edge proximity [NavigationServer3D]. + </constant> + <constant name="NAVIGATION_EDGE_FREE_COUNT" value="32" enum="Monitor"> + Number of navigation mesh polygon edges that could not be merged in the [NavigationServer3D]. The edges still may be connected by edge proximity or with links. + </constant> + <constant name="MONITOR_MAX" value="33" enum="Monitor"> Represents the size of the [enum Monitor] enum. </constant> </constants> diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index eca6a1cbc7..a46de4c189 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -151,6 +151,13 @@ [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor]. </description> </method> + <method name="get_contact_impulse" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="contact_idx" type="int" /> + <description> + Returns the impulse created by the contact. + </description> + </method> <method name="get_contact_local_normal" qualifiers="const"> <return type="Vector2" /> <param index="0" name="contact_idx" type="int" /> diff --git a/doc/classes/PhysicsDirectBodyState2DExtension.xml b/doc/classes/PhysicsDirectBodyState2DExtension.xml index 8fd34c1243..496cbf9136 100644 --- a/doc/classes/PhysicsDirectBodyState2DExtension.xml +++ b/doc/classes/PhysicsDirectBodyState2DExtension.xml @@ -130,6 +130,12 @@ <description> </description> </method> + <method name="_get_contact_impulse" qualifiers="virtual const"> + <return type="Vector2" /> + <param index="0" name="contact_idx" type="int" /> + <description> + </description> + </method> <method name="_get_contact_local_normal" qualifiers="virtual const"> <return type="Vector2" /> <param index="0" name="contact_idx" type="int" /> diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index a809384642..edd219e66e 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -152,10 +152,10 @@ </description> </method> <method name="get_contact_impulse" qualifiers="const"> - <return type="float" /> + <return type="Vector3" /> <param index="0" name="contact_idx" type="int" /> <description> - Impulse created by the contact. Only implemented for Bullet physics. + Impulse created by the contact. </description> </method> <method name="get_contact_local_normal" qualifiers="const"> diff --git a/doc/classes/PhysicsDirectBodyState3DExtension.xml b/doc/classes/PhysicsDirectBodyState3DExtension.xml index 4432f89b9d..35cf4d4dd5 100644 --- a/doc/classes/PhysicsDirectBodyState3DExtension.xml +++ b/doc/classes/PhysicsDirectBodyState3DExtension.xml @@ -131,7 +131,7 @@ </description> </method> <method name="_get_contact_impulse" qualifiers="virtual const"> - <return type="float" /> + <return type="Vector3" /> <param index="0" name="contact_idx" type="int" /> <description> </description> diff --git a/doc/classes/PhysicsDirectSpaceState2DExtension.xml b/doc/classes/PhysicsDirectSpaceState2DExtension.xml index 3235793853..fbbb98a959 100644 --- a/doc/classes/PhysicsDirectSpaceState2DExtension.xml +++ b/doc/classes/PhysicsDirectSpaceState2DExtension.xml @@ -87,5 +87,11 @@ <description> </description> </method> + <method name="is_body_excluded_from_query" qualifiers="const"> + <return type="bool" /> + <param index="0" name="body" type="RID" /> + <description> + </description> + </method> </methods> </class> diff --git a/doc/classes/PhysicsDirectSpaceState3DExtension.xml b/doc/classes/PhysicsDirectSpaceState3DExtension.xml index 98593012db..4297846e53 100644 --- a/doc/classes/PhysicsDirectSpaceState3DExtension.xml +++ b/doc/classes/PhysicsDirectSpaceState3DExtension.xml @@ -95,5 +95,11 @@ <description> </description> </method> + <method name="is_body_excluded_from_query" qualifiers="const"> + <return type="bool" /> + <param index="0" name="body" type="RID" /> + <description> + </description> + </method> </methods> </class> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 18ac8a11df..f1316fa991 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -736,6 +736,14 @@ <description> </description> </method> + <method name="joint_disable_collisions_between_bodies"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + Sets whether the bodies attached to the [Joint2D] will collide with each other. + </description> + </method> <method name="joint_get_param" qualifiers="const"> <return type="float" /> <param index="0" name="joint" type="RID" /> @@ -751,6 +759,13 @@ Returns a joint's type (see [enum JointType]). </description> </method> + <method name="joint_is_disabled_collisions_between_bodies" qualifiers="const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + Returns whether the bodies attached to the [Joint2D] will collide with each other. + </description> + </method> <method name="joint_make_damped_spring"> <return type="void" /> <param index="0" name="joint" type="RID" /> @@ -790,6 +805,23 @@ Sets a joint parameter. See [enum JointParam] for a list of available parameters. </description> </method> + <method name="pin_joint_get_param" qualifiers="const"> + <return type="float" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" /> + <description> + Returns the value of a pin joint parameter. See [enum PinJointParam] for a list of available parameters. + </description> + </method> + <method name="pin_joint_set_param"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" /> + <param index="2" name="value" type="float" /> + <description> + Sets a pin joint parameter. See [enum PinJointParam] for a list of available parameters. + </description> + </method> <method name="rectangle_shape_create"> <return type="RID" /> <description> diff --git a/doc/classes/PhysicsServer2DExtension.xml b/doc/classes/PhysicsServer2DExtension.xml index 9bb11e0d89..7ae27c3f32 100644 --- a/doc/classes/PhysicsServer2DExtension.xml +++ b/doc/classes/PhysicsServer2DExtension.xml @@ -933,5 +933,17 @@ <description> </description> </method> + <method name="body_test_motion_is_excluding_body" qualifiers="const"> + <return type="bool" /> + <param index="0" name="body" type="RID" /> + <description> + </description> + </method> + <method name="body_test_motion_is_excluding_object" qualifiers="const"> + <return type="bool" /> + <param index="0" name="object" type="int" /> + <description> + </description> + </method> </methods> </class> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 95f7fb69a2..e62bda0dd3 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -815,6 +815,14 @@ <description> </description> </method> + <method name="joint_disable_collisions_between_bodies"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + Sets whether the bodies attached to the [Joint3D] will collide with each other. + </description> + </method> <method name="joint_get_solver_priority" qualifiers="const"> <return type="int" /> <param index="0" name="joint" type="RID" /> @@ -829,6 +837,13 @@ Returns the type of the Joint3D. </description> </method> + <method name="joint_is_disabled_collisions_between_bodies" qualifiers="const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + Returns whether the bodies attached to the [Joint3D] will collide with each other. + </description> + </method> <method name="joint_make_cone_twist"> <return type="void" /> <param index="0" name="joint" type="RID" /> diff --git a/doc/classes/PhysicsServer3DExtension.xml b/doc/classes/PhysicsServer3DExtension.xml index 1e9df54de5..5fe616b948 100644 --- a/doc/classes/PhysicsServer3DExtension.xml +++ b/doc/classes/PhysicsServer3DExtension.xml @@ -772,6 +772,13 @@ <description> </description> </method> + <method name="_joint_disable_collisions_between_bodies" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + </description> + </method> <method name="_joint_get_solver_priority" qualifiers="virtual const"> <return type="int" /> <param index="0" name="joint" type="RID" /> @@ -784,6 +791,12 @@ <description> </description> </method> + <method name="_joint_is_disabled_collisions_between_bodies" qualifiers="virtual const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + </description> + </method> <method name="_joint_make_cone_twist" qualifiers="virtual"> <return type="void" /> <param index="0" name="joint" type="RID" /> @@ -1271,5 +1284,17 @@ <description> </description> </method> + <method name="body_test_motion_is_excluding_body" qualifiers="const"> + <return type="bool" /> + <param index="0" name="body" type="RID" /> + <description> + </description> + </method> + <method name="body_test_motion_is_excluding_object" qualifiers="const"> + <return type="bool" /> + <param index="0" name="object" type="int" /> + <description> + </description> + </method> </methods> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 67b692a7a0..9e1c751662 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -84,6 +84,25 @@ GD.Print(ProjectSettings.GetSetting("application/config/custom_description", "No description specified.")); [/csharp] [/codeblocks] + [b]Note:[/b] This method doesn't take potential feature overrides into account automatically. Use [method get_setting_with_override] to handle seamlessly. + </description> + </method> + <method name="get_setting_with_override" qualifiers="const"> + <return type="Variant" /> + <param index="0" name="name" type="StringName" /> + <description> + Similar to [method get_setting], but applies feature tag overrides if any exists and is valid. + [b]Example:[/b] + If the following setting override exists "application/config/name.windows", and the following code is executed: + [codeblocks] + [gdscript] + print(ProjectSettings.get_setting_with_override("application/config/name")) + [/gdscript] + [csharp] + GD.Print(ProjectSettings.GetSettingWithOverride("application/config/name")); + [/csharp] + [/codeblocks] + Then the overridden setting will be returned instead if the project is running on the [i]Windows[/i] operating system. </description> </method> <method name="globalize_path" qualifiers="const"> @@ -464,9 +483,6 @@ <member name="debug/gdscript/warnings/unused_variable" 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 local variable is unused. </member> - <member name="debug/gdscript/warnings/void_assignment" type="int" setter="" getter="" default="1"> - When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when assigning the result of a function that returns [code]void[/code] to a variable. - </member> <member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default=""Please include this when reporting the bug to the project developer.""> Message to be displayed before the backtrace when the engine crashes. By default, this message is only used in exported projects due to the editor-only override applied to this setting. </member> @@ -599,6 +615,9 @@ Main window content is expanded to the full size of the window. Unlike a borderless window, the frame is left intact and can be used to resize the window, and the title bar is transparent, but has minimize/maximize/close buttons. [b]Note:[/b] This setting is implemented only on macOS. </member> + <member name="display/window/size/initial_screen" type="int" setter="" getter="" default="-2"> + Main window initial screen. + </member> <member name="display/window/size/mode" type="int" setter="" getter="" default="0"> Main window mode. See [enum DisplayServer.WindowMode] for possible values and how each mode behaves. </member> @@ -741,6 +760,9 @@ <member name="gui/theme/lcd_subpixel_layout" type="int" setter="" getter="" default="1"> LCD subpixel layout used for font anti-aliasing. See [enum TextServer.FontLCDSubpixelLayout]. </member> + <member name="gui/timers/button_shortcut_feedback_highlight_time" type="float" setter="" getter="" default="0.2"> + When [member BaseButton.shortcut_feedback] is enabled, this is the time the [BaseButton] will remain highlighted after a shortcut. + </member> <member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000"> Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds). </member> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 2dcfc90955..4803ea9bfb 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -62,7 +62,7 @@ <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values" default="false"> If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="0" /> <member name="step" type="float" setter="set_step" getter="get_step" default="0.01"> If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. </member> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 1cc52e6837..7675a37cbd 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1262,6 +1262,12 @@ Tries to free an object in the RenderingServer. </description> </method> + <method name="get_default_clear_color"> + <return type="Color" /> + <description> + Returns the default clear color which is used when a specific clear color has not been selected. + </description> + </method> <method name="get_frame_setup_time_cpu" qualifiers="const"> <return type="float" /> <description> @@ -1586,6 +1592,15 @@ Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers]. </description> </method> + <method name="instance_set_pivot_data"> + <return type="void" /> + <param index="0" name="instance" type="RID" /> + <param index="1" name="sorting_offset" type="float" /> + <param index="2" name="use_aabb_center" type="bool" /> + <description> + Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. + </description> + </method> <method name="instance_set_scenario"> <return type="void" /> <param index="0" name="instance" type="RID" /> @@ -1921,7 +1936,7 @@ <param index="2" name="arrays" type="Array" /> <param index="3" name="blend_shapes" type="Array" default="[]" /> <param index="4" name="lods" type="Dictionary" default="{}" /> - <param index="5" name="compress_format" type="int" default="0" /> + <param index="5" name="compress_format" type="int" enum="RenderingServer.ArrayFormat" default="0" /> <description> </description> </method> @@ -2023,14 +2038,14 @@ </method> <method name="mesh_surface_get_format_attribute_stride" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <description> </description> </method> <method name="mesh_surface_get_format_offset" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <param index="2" name="array_index" type="int" /> <description> @@ -2038,14 +2053,14 @@ </method> <method name="mesh_surface_get_format_skin_stride" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <description> </description> </method> <method name="mesh_surface_get_format_vertex_stride" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <description> </description> @@ -3736,65 +3751,65 @@ </constant> <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat"> </constant> - <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a vertex array. </constant> - <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a normal array. </constant> - <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a tangent array. </constant> - <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a color array. </constant> - <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat" is_bitfield="true"> Flag used to mark an UV coordinates array. </constant> - <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat" is_bitfield="true"> Flag used to mark an UV coordinates array for the second UV coordinates. </constant> - <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a bone information array. </constant> - <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a weights array. </constant> - <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat" is_bitfield="true"> Flag used to mark an index array. </constant> - <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat"> + <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat" is_bitfield="true"> Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true"> </constant> <constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType"> Primitive to draw consists of points. diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index 1f2af6d157..b0c57bc7cb 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -43,5 +43,13 @@ Returns [constant OK] on success, or an [enum Error] constant in case of failure. </description> </method> + <method name="_set_uid" qualifiers="virtual"> + <return type="int" enum="Error" /> + <param index="0" name="path" type="String" /> + <param index="1" name="uid" type="int" /> + <description> + Sets a new UID for the resource at the given [param path]. Returns [constant OK] on success, or an [enum Error] constant in case of failure. + </description> + </method> </methods> </class> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index e4bc2db104..dd291a425d 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -378,12 +378,12 @@ Adds a [code][u][/code] tag to the tag stack. </description> </method> - <method name="remove_line"> + <method name="remove_paragraph"> <return type="bool" /> - <param index="0" name="line" type="int" /> + <param index="0" name="paragraph" type="int" /> <description> - Removes a line of content from the label. Returns [code]true[/code] if the line exists. - The [param line] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code]. + 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]. </description> </method> <method name="scroll_to_line"> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index bd5b656e1a..bf19ebc23a 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -42,15 +42,15 @@ <description> Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance. Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated. - [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene_to_file] call. + [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. This ensures that both scenes are never loaded at the same time, which can exhaust system resources if the scenes are too large or if running in a memory constrained environment. As such, you won't be able to access the loaded scene immediately after the [method change_scene_to_file] call. </description> </method> <method name="change_scene_to_packed"> <return type="int" enum="Error" /> <param index="0" name="packed_scene" type="PackedScene" /> <description> - Changes the running scene to a new instance of the given [PackedScene]. - Returns [constant OK] on success or [constant ERR_CANT_CREATE] if the scene cannot be instantiated. + Changes the running scene to a new instance of the given [PackedScene] (which must be valid). + Returns [constant OK] on success, [constant ERR_CANT_CREATE] if the scene cannot be instantiated, or [constant ERR_INVALID_PARAMETER] if the scene is invalid. [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene_to_packed] call. </description> </method> @@ -209,6 +209,12 @@ Sets a custom [MultiplayerAPI] with the given [param root_path] (controlling also the relative subpaths), or override the default one if [param root_path] is empty. </description> </method> + <method name="unload_current_scene"> + <return type="void" /> + <description> + If a current scene is loaded, calling this method will unload it. + </description> + </method> </methods> <members> <member name="auto_accept_quit" type="bool" setter="set_auto_accept_quit" getter="is_auto_accept_quit" default="true"> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 1af7ac4fc5..a2346822e5 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -23,7 +23,8 @@ <param index="1" name="value" type="Variant" /> <description> Changes the value set for this material of a uniform in the shader. - [b]Note:[/b] [param param] must match the name of the uniform in the code exactly. + [b]Note:[/b] [param param] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). + [b]Note:[/b] Changes to the shader uniform will be effective on all instances using this [ShaderMaterial]. To prevent this, use per-instance uniforms with [method GeometryInstance3D.set_instance_shader_parameter] or duplicate the [ShaderMaterial] resource using [method Resource.duplicate]. Per-instance uniforms allow for better shader reuse and are therefore faster, so they should be preferred over duplicating the [ShaderMaterial] when possible. </description> </method> </methods> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 3bd0e04b92..70986ba06a 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -7,6 +7,7 @@ Skeleton3D provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). It can also use ragdoll physics. The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. + To setup different types of inverse kinematics, consider using [SkeletonIK3D], or add a custom IK implementation in [method Node._process] as a child node. </description> <tutorials> <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link> @@ -32,26 +33,11 @@ Removes the global pose override on all bones in the skeleton. </description> </method> - <method name="clear_bones_local_pose_override" is_deprecated="true"> - <return type="void" /> - <description> - Deprecated. Local pose overrides will be removed. - Removes the local pose override on all bones in the skeleton. - </description> - </method> <method name="create_skin_from_rest_transforms"> <return type="Skin" /> <description> </description> </method> - <method name="execute_modifications" is_deprecated="true"> - <return type="void" /> - <param index="0" name="delta" type="float" /> - <param index="1" name="execution_mode" type="int" /> - <description> - Executes all the modifications on the [SkeletonModificationStack3D], if the Skeleton3D has one assigned. - </description> - </method> <method name="find_bone" qualifiers="const"> <return type="int" /> <param index="0" name="name" type="String" /> @@ -113,13 +99,6 @@ Returns the global rest transform for [param bone_idx]. </description> </method> - <method name="get_bone_local_pose_override" qualifiers="const"> - <return type="Transform3D" /> - <param index="0" name="bone_idx" type="int" /> - <description> - Returns the local pose override transform for [param bone_idx]. - </description> - </method> <method name="get_bone_name" qualifiers="const"> <return type="String" /> <param index="0" name="bone_idx" type="int" /> @@ -167,43 +146,18 @@ Returns the rest transform for a bone [param bone_idx]. </description> </method> - <method name="get_modification_stack" is_deprecated="true"> - <return type="SkeletonModificationStack3D" /> - <description> - Returns the modification stack attached to this skeleton, if one exists. - </description> - </method> <method name="get_parentless_bones" qualifiers="const"> <return type="PackedInt32Array" /> <description> Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton. </description> </method> - <method name="global_pose_to_local_pose" is_deprecated="true"> - <return type="Transform3D" /> - <param index="0" name="bone_idx" type="int" /> - <param index="1" name="global_pose" type="Transform3D" /> - <description> - Takes the passed-in global pose and converts it to local pose transform. - This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform in [method set_bone_local_pose_override]. - </description> - </method> - <method name="global_pose_to_world_transform" is_deprecated="true"> - <return type="Transform3D" /> - <param index="0" name="global_pose" type="Transform3D" /> - <description> - Deprecated. Use [Node3D] apis instead. - Takes the passed-in global pose and converts it to a world transform. - This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform usable with a node's transform, like [member Node3D.global_transform] for example. - </description> - </method> - <method name="global_pose_z_forward_to_bone_forward" is_deprecated="true"> - <return type="Basis" /> - <param index="0" name="bone_idx" type="int" /> - <param index="1" name="basis" type="Basis" /> + <method name="get_version" qualifiers="const"> + <return type="int" /> <description> - Rotates the given [Basis] so that the forward axis of the Basis is facing in the forward direction of the bone at [param bone_idx]. - This is helper function to make using [method Transform3D.looking_at] easier with bone poses. + Returns the number of times the bone hierarchy has changed within this skeleton, including renames. + The Skeleton version is not serialized: only use within a single instance of Skeleton3D. + Use for invalidating caches in IK solvers and other nodes which process bones. </description> </method> <method name="is_bone_enabled" qualifiers="const"> @@ -213,15 +167,6 @@ Returns whether the bone pose for the bone at [param bone_idx] is enabled. </description> </method> - <method name="local_pose_to_global_pose" is_deprecated="true"> - <return type="Transform3D" /> - <param index="0" name="bone_idx" type="int" /> - <param index="1" name="local_pose" type="Transform3D" /> - <description> - Converts the passed-in local pose to a global pose relative to the inputted bone, [param bone_idx]. - This could be used to convert [method get_bone_pose] for use with the [method set_bone_global_pose_override] function. - </description> - </method> <method name="localize_rests"> <return type="void" /> <description> @@ -298,19 +243,6 @@ [b]Note:[/b] The pose transform needs to be a global pose! To convert a world transform from a [Node3D] to a global bone pose, multiply the [method Transform3D.affine_inverse] of the node's [member Node3D.global_transform] by the desired world transform </description> </method> - <method name="set_bone_local_pose_override" is_deprecated="true"> - <return type="void" /> - <param index="0" name="bone_idx" type="int" /> - <param index="1" name="pose" type="Transform3D" /> - <param index="2" name="amount" type="float" /> - <param index="3" name="persistent" type="bool" default="false" /> - <description> - Deprecated. Local pose overrides will be removed. - Sets the local pose transform, [param pose], for the bone at [param bone_idx]. - [param amount] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain. - [b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose. - </description> - </method> <method name="set_bone_name"> <return type="void" /> <param index="0" name="bone_idx" type="int" /> @@ -356,13 +288,6 @@ Sets the rest transform for bone [param bone_idx]. </description> </method> - <method name="set_modification_stack" is_deprecated="true"> - <return type="void" /> - <param index="0" name="modification_stack" type="SkeletonModificationStack3D" /> - <description> - Sets the modification stack for this skeleton to the passed-in modification stack, [param modification_stack]. - </description> - </method> <method name="unparent_bone_and_rest"> <return type="void" /> <param index="0" name="bone_idx" type="int" /> @@ -370,15 +295,6 @@ Unparents the bone at [param bone_idx] and sets its rest position to that of its parent prior to being reset. </description> </method> - <method name="world_transform_to_global_pose" is_deprecated="true"> - <return type="Transform3D" /> - <param index="0" name="world_transform" type="Transform3D" /> - <description> - Deprecated. Use [Node3D] apis instead. - Takes the passed-in global transform and converts it to a global pose. - This can be used to easily convert a global transform from [member Node3D.global_transform] to a global pose usable with [method set_bone_global_pose_override], for example. - </description> - </method> </methods> <members> <member name="animate_physical_bones" type="bool" setter="set_animate_physical_bones" getter="get_animate_physical_bones" default="true"> diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml deleted file mode 100644 index 25431ea96f..0000000000 --- a/doc/classes/SkeletonModification3D.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModification3D" inherits="Resource" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A resource that operates on bones in a [Skeleton3D]. - </brief_description> - <description> - This resource provides an interface that can be expanded so code that operates on bones in a [Skeleton3D] can be mixed and matched together to create complex interactions. - This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses. - </description> - <tutorials> - </tutorials> - <methods> - <method name="_execute" qualifiers="virtual"> - <return type="void" /> - <param index="0" name="delta" type="float" /> - <description> - Executes the given modification. This is where the modification performs whatever function it is designed to do. - </description> - </method> - <method name="_setup_modification" qualifiers="virtual"> - <return type="void" /> - <param index="0" name="modification_stack" type="SkeletonModificationStack3D" /> - <description> - Sets up the modification so it can be executed. This function should be called automatically by the [SkeletonModificationStack3D] containing this modification. - If you need to initialize a modification before use, this is the place to do it! - </description> - </method> - <method name="clamp_angle"> - <return type="float" /> - <param index="0" name="angle" type="float" /> - <param index="1" name="min" type="float" /> - <param index="2" name="max" type="float" /> - <param index="3" name="invert" type="bool" /> - <description> - Takes a angle and clamps it so it is within the passed-in [param min] and [param max] range. [param invert] will inversely clamp the angle, clamping it to the range outside of the given bounds. - </description> - </method> - <method name="get_is_setup" qualifiers="const"> - <return type="bool" /> - <description> - Returns whether this modification has been successfully setup or not. - </description> - </method> - <method name="get_modification_stack"> - <return type="SkeletonModificationStack3D" /> - <description> - Returns the [SkeletonModificationStack3D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on. - </description> - </method> - <method name="set_is_setup"> - <return type="void" /> - <param index="0" name="is_setup" type="bool" /> - <description> - Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack3D] the modification is bound to should handle setting the modification up. - </description> - </method> - </methods> - <members> - <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true"> - When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D]. - </member> - <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0"> - The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes. - </member> - </members> -</class> diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml deleted file mode 100644 index 90b2e78449..0000000000 --- a/doc/classes/SkeletonModification3DCCDIK.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModification3DCCDIK" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A modification that uses CCDIK to manipulate a series of bones to reach a target. - </brief_description> - <description> - This [SkeletonModification3D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to manipulate a chain of bones in a Skeleton so it reaches a defined target. - CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers. - [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK. - CCDIK also fully supports angle constraints, allowing for more control over how a solution is met. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_ccdik_joint_bone_index" qualifiers="const"> - <return type="int" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the bone index of the bone assigned to the CCDIK joint at [param joint_idx]. - </description> - </method> - <method name="get_ccdik_joint_bone_name" qualifiers="const"> - <return type="String" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the name of the bone that is assigned to the CCDIK joint at [param joint_idx]. - </description> - </method> - <method name="get_ccdik_joint_ccdik_axis" qualifiers="const"> - <return type="int" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the integer representing the joint axis of the CCDIK joint at [param joint_idx]. - </description> - </method> - <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const"> - <return type="float" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the maximum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle is in degrees! - </description> - </method> - <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const"> - <return type="float" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the minimum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle is in degrees! - </description> - </method> - <method name="get_ccdik_joint_constraint_invert" qualifiers="const"> - <return type="bool" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_invert] for details. - </description> - </method> - <method name="get_ccdik_joint_enable_joint_constraint" qualifiers="const"> - <return type="bool" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Enables angle constraints to the CCDIK joint at [param joint_idx]. - </description> - </method> - <method name="set_ccdik_joint_bone_index"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="bone_index" type="int" /> - <description> - Sets the bone index, [param bone_index], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the CCDIK joint based on data provided by the linked skeleton. - </description> - </method> - <method name="set_ccdik_joint_bone_name"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="bone_name" type="String" /> - <description> - Sets the bone name, [param bone_name], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the CCDIK joint based on data provided by the linked skeleton. - </description> - </method> - <method name="set_ccdik_joint_ccdik_axis"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="axis" type="int" /> - <description> - Sets the joint axis of the CCDIK joint at [param joint_idx] to the passed-in joint axis, [param axis]. - </description> - </method> - <method name="set_ccdik_joint_constraint_angle_max"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="max_angle" type="float" /> - <description> - Sets the maximum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle must be in radians! - </description> - </method> - <method name="set_ccdik_joint_constraint_angle_min"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="min_angle" type="float" /> - <description> - Sets the minimum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle must be in radians! - </description> - </method> - <method name="set_ccdik_joint_constraint_invert"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="invert" type="bool" /> - <description> - Sets whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. - An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. - </description> - </method> - <method name="set_ccdik_joint_enable_joint_constraint"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="enable" type="bool" /> - <description> - Sets whether joint constraints are enabled for the CCDIK joint at [param joint_idx]. - </description> - </method> - </methods> - <members> - <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0"> - The number of CCDIK joints in the CCDIK modification. - </member> - <member name="high_quality_solve" type="bool" setter="set_use_high_quality_solve" getter="get_use_high_quality_solve" default="true"> - When true, the CCDIK algorithm will perform a higher quality solve that returns more natural results. A high quality solve requires more computation power to solve though, and therefore can be disabled to save performance. - </member> - <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> - The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to. - </member> - <member name="tip_nodepath" type="NodePath" setter="set_tip_node" getter="get_tip_node" default="NodePath("")"> - The end position of the CCDIK chain. Typically, this should be a child of a [BoneAttachment3D] node attached to the final bone in the CCDIK chain, where the child node is offset so it is at the end of the final bone. - </member> - </members> -</class> diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml deleted file mode 100644 index a2bec2b559..0000000000 --- a/doc/classes/SkeletonModification3DFABRIK.xml +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModification3DFABRIK" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A modification that uses FABRIK to manipulate a series of bones to reach a target. - </brief_description> - <description> - This [SkeletonModification3D] uses an algorithm called Forward And Backward Reaching Inverse Kinematics, or FABRIK, to rotate a bone chain so that it reaches a target. - FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. - Because of how FABRIK works, it often gives more natural results than those seen in [SkeletonModification3DCCDIK], though FABRIK currently does not support joint constraints. - [b]Note:[/b] The FABRIK modifier has [code]fabrik_joints[/code], which are the data objects that hold the data for each joint in the FABRIK chain. This is different from a bone! FABRIK joints hold the data needed for each bone in the bone chain used by FABRIK. - To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result. - </description> - <tutorials> - </tutorials> - <methods> - <method name="fabrik_joint_auto_calculate_length"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="get_fabrik_joint_auto_calculate_length" qualifiers="const"> - <return type="bool" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="get_fabrik_joint_bone_index" qualifiers="const"> - <return type="int" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the bone index of the bone assigned to the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="get_fabrik_joint_bone_name" qualifiers="const"> - <return type="String" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the name of the bone that is assigned to the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="get_fabrik_joint_length" qualifiers="const"> - <return type="float" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the length of the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="get_fabrik_joint_magnet" qualifiers="const"> - <return type="Vector3" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the magnet vector of the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="get_fabrik_joint_tip_node" qualifiers="const"> - <return type="NodePath" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the [Node3D]-based node placed at the tip of the FABRIK joint at [param joint_idx], if one has been set. - </description> - </method> - <method name="get_fabrik_joint_use_target_basis" qualifiers="const"> - <return type="bool" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns a boolean indicating whether the FABRIK joint uses the target's [Basis] for its rotation. - [b]Note:[/b] This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. - </description> - </method> - <method name="get_fabrik_joint_use_tip_node" qualifiers="const"> - <return type="bool" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Sets the [Node3D]-based node that will be used as the tip of the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="set_fabrik_joint_auto_calculate_length"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="auto_calculate_length" type="bool" /> - <description> - When [code]true[/code], this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at [param joint_idx]. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification [b]cannot[/b] autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned. - </description> - </method> - <method name="set_fabrik_joint_bone_index"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="bone_index" type="int" /> - <description> - Sets the bone index, [param bone_index], of the FABRIK joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_fabrik_joint_bone_name"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="bone_name" type="String" /> - <description> - Sets the bone name, [param bone_name], of the FABRIK joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_fabrik_joint_length"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="length" type="float" /> - <description> - Sets the joint length, [param length], of the FABRIK joint at [param joint_idx]. - </description> - </method> - <method name="set_fabrik_joint_magnet"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="magnet_position" type="Vector3" /> - <description> - Sets the magenet position to [param magnet_position] for the joint at [param joint_idx]. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved. - </description> - </method> - <method name="set_fabrik_joint_tip_node"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="tip_node" type="NodePath" /> - <description> - Sets the nodepath of the FARIK joint at [param joint_idx] to [param tip_node]. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length. - [b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the bone that this FABRIK joint operates on, with the child node being offset so it is at the end of the bone. - </description> - </method> - <method name="set_fabrik_joint_use_target_basis"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="use_target_basis" type="bool" /> - <description> - Sets whether the FABRIK joint at [param joint_idx] uses the target's [Basis] for its rotation. - [b]Note:[/b] This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. - </description> - </method> - <method name="set_fabrik_joint_use_tip_node"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="use_tip_node" type="bool" /> - <description> - Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at [param joint_idx]. This will only work if there is a node assigned to the tip nodepath for this joint. - </description> - </method> - </methods> - <members> - <member name="chain_max_iterations" type="int" setter="set_chain_max_iterations" getter="get_chain_max_iterations" default="10"> - The number of times FABRIK will try to solve each time the [code]execute[/code] function is called. Setting this value to a lower number will be result in better performance, but this can also result in harsher movements and slower solves. - </member> - <member name="chain_tolerance" type="float" setter="set_chain_tolerance" getter="get_chain_tolerance" default="0.01"> - The minimum distance the target has to be from the tip of the final bone in the bone chain. Setting this value to a higher number allows for greater performance, but less accurate solves. - </member> - <member name="fabrik_data_chain_length" type="int" setter="set_fabrik_data_chain_length" getter="get_fabrik_data_chain_length" default="0"> - The amount of FABRIK joints in the FABRIK modification. - </member> - <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> - The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to. - </member> - </members> -</class> diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml deleted file mode 100644 index 304f08bb20..0000000000 --- a/doc/classes/SkeletonModification3DJiggle.xml +++ /dev/null @@ -1,199 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModification3DJiggle" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A modification that jiggles bones as they move towards a target. - </brief_description> - <description> - This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might. - This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves. - [b]Note:[/b] The Jiggle modifier has [code]jiggle_joints[/code], which are the data objects that hold the data for each joint in the Jiggle chain. This is different from a bone! Jiggle joints hold the data needed for each bone in the bone chain used by the Jiggle modification. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_collision_mask" qualifiers="const"> - <return type="int" /> - <description> - Returns the collision mask that the Jiggle modifier will take into account when performing physics calculations. - </description> - </method> - <method name="get_jiggle_joint_bone_index" qualifiers="const"> - <return type="int" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the bone index of the bone assigned to the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="get_jiggle_joint_bone_name" qualifiers="const"> - <return type="String" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the name of the bone that is assigned to the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="get_jiggle_joint_damping" qualifiers="const"> - <return type="float" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the amount of dampening of the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="get_jiggle_joint_gravity" qualifiers="const"> - <return type="Vector3" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns a [Vector3] representign the amount of gravity the Jiggle joint at [param joint_idx] is influenced by. - </description> - </method> - <method name="get_jiggle_joint_mass" qualifiers="const"> - <return type="float" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the amount of mass of the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="get_jiggle_joint_override" qualifiers="const"> - <return type="bool" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns a boolean that indicates whether the joint at [param joint_idx] is overriding the default jiggle joint data defined in the modification. - </description> - </method> - <method name="get_jiggle_joint_roll" qualifiers="const"> - <return type="float" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the amount of roll/twist applied to the bone that the Jiggle joint is applied to. - </description> - </method> - <method name="get_jiggle_joint_stiffness" qualifiers="const"> - <return type="float" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns the stiffness of the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="get_jiggle_joint_use_gravity" qualifiers="const"> - <return type="bool" /> - <param index="0" name="joint_idx" type="int" /> - <description> - Returns a boolean that indicates whether the joint at [param joint_idx] is using gravity or not. - </description> - </method> - <method name="get_use_colliders" qualifiers="const"> - <return type="bool" /> - <description> - Returns whether the Jiggle modifier is taking physics colliders into account when solving. - </description> - </method> - <method name="set_collision_mask"> - <return type="void" /> - <param index="0" name="mask" type="int" /> - <description> - Sets the collision mask that the Jiggle modifier takes into account when performing physics calculations. - </description> - </method> - <method name="set_jiggle_joint_bone_index"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="bone_idx" type="int" /> - <description> - Sets the bone index, [param bone_idx], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_jiggle_joint_bone_name"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="name" type="String" /> - <description> - Sets the bone name, [param name], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_jiggle_joint_damping"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="damping" type="float" /> - <description> - Sets the amount of dampening of the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="set_jiggle_joint_gravity"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="gravity" type="Vector3" /> - <description> - Sets the gravity vector of the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="set_jiggle_joint_mass"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="mass" type="float" /> - <description> - Sets the of mass of the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="set_jiggle_joint_override"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="override" type="bool" /> - <description> - Sets whether the Jiggle joint at [param joint_idx] should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification. - </description> - </method> - <method name="set_jiggle_joint_roll"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="roll" type="float" /> - <description> - Sets the amount of roll/twist on the bone the Jiggle joint is attached to. - </description> - </method> - <method name="set_jiggle_joint_stiffness"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="stiffness" type="float" /> - <description> - Sets the of stiffness of the Jiggle joint at [param joint_idx]. - </description> - </method> - <method name="set_jiggle_joint_use_gravity"> - <return type="void" /> - <param index="0" name="joint_idx" type="int" /> - <param index="1" name="use_gravity" type="bool" /> - <description> - Sets whether the Jiggle joint at [param joint_idx] should use gravity. - </description> - </method> - <method name="set_use_colliders"> - <return type="void" /> - <param index="0" name="use_colliders" type="bool" /> - <description> - When [code]true[/code], the Jiggle modifier will use raycasting to prevent the Jiggle joints from rotating themselves into collision objects when solving. - </description> - </method> - </methods> - <members> - <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75"> - The default amount of dampening applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied. - </member> - <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -6, 0)"> - The default amount of gravity applied to the Jiggle joints, if they are not overridden. - </member> - <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0"> - The amount of Jiggle joints in the Jiggle modification. - </member> - <member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75"> - The default amount of mass assigned to the Jiggle joints, if they are not overridden. Higher values lead to faster movements and more overshooting. - </member> - <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0"> - The default amount of stiffness assigned to the Jiggle joints, if they are not overridden. Higher values act more like springs, quickly moving into the correct position. - </member> - <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> - The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to. - </member> - <member name="use_gravity" type="bool" setter="set_use_gravity" getter="get_use_gravity" default="false"> - Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings. - </member> - </members> -</class> diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml deleted file mode 100644 index aeed953ca9..0000000000 --- a/doc/classes/SkeletonModification3DLookAt.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A modification that rotates a bone to look at a target. - </brief_description> - <description> - This [SkeletonModification3D] rotates a bone to look a target. This is extremely helpful for moving character's heads 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. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_additional_rotation" qualifiers="const"> - <return type="Vector3" /> - <description> - Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes. - </description> - </method> - <method name="get_lock_rotation_plane" qualifiers="const"> - <return type="int" /> - <description> - Returns the plane that the LookAt modification is limiting rotation to. - </description> - </method> - <method name="get_lock_rotation_to_plane" qualifiers="const"> - <return type="bool" /> - <description> - Returns whether the LookAt modification is limiting rotation to a single plane in 3D space. - </description> - </method> - <method name="set_additional_rotation"> - <return type="void" /> - <param index="0" name="additional_rotation" type="Vector3" /> - <description> - Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result. - </description> - </method> - <method name="set_lock_rotation_plane"> - <return type="void" /> - <param index="0" name="plane" type="int" /> - <description> - </description> - </method> - <method name="set_lock_rotation_to_plane"> - <return type="void" /> - <param index="0" name="lock_to_plane" type="bool" /> - <description> - When [code]true[/code], the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the [code]set_lock_rotation_plane[/code] function. - </description> - </method> - </methods> - <members> - <member name="bone_index" type="int" setter="set_bone_index" getter="get_bone_index" default="-2"> - The bone index of the bone that should be operated on by this modification. - When possible, this will also update the [member bone_name] based on data provided by the [Skeleton3D]. - </member> - <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default=""""> - The name of the bone that should be operated on by this modification. - When possible, this will also update the [member bone_index] based on data provided by the [Skeleton3D]. - </member> - <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> - The NodePath to the node that is the target for the modification. - </member> - </members> -</class> diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml deleted file mode 100644 index 9448e2c783..0000000000 --- a/doc/classes/SkeletonModification3DStackHolder.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModification3DStackHolder" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A modification that holds and executes a [SkeletonModificationStack3D]. - </brief_description> - <description> - This [SkeletonModification3D] holds a reference to a [SkeletonModificationStack3D], allowing you to use multiple modification stacks on a single [Skeleton3D]. - [b]Note:[/b] The modifications in the held [SkeletonModificationStack3D] will only be executed if their execution mode matches the execution mode of the SkeletonModification3DStackHolder. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_held_modification_stack" qualifiers="const"> - <return type="SkeletonModificationStack3D" /> - <description> - Returns the [SkeletonModificationStack3D] that this modification is holding. - </description> - </method> - <method name="set_held_modification_stack"> - <return type="void" /> - <param index="0" name="held_modification_stack" type="SkeletonModificationStack3D" /> - <description> - Sets the [SkeletonModificationStack3D] that this modification is holding. This modification stack will then be executed when this modification is executed. - </description> - </method> - </methods> -</class> diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml deleted file mode 100644 index 0e7ffd5c80..0000000000 --- a/doc/classes/SkeletonModification3DTwoBoneIK.xml +++ /dev/null @@ -1,191 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModification3DTwoBoneIK" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A modification that moves two bones to reach the target. - </brief_description> - <description> - This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones. - TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification3DFABRIK], but gives similar, natural looking results. - A [Node3D]-based node can be used to define the pole, or bend direction, allowing control over which direction the joint takes when bending to reach the target when the target is within reach. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_auto_calculate_joint_length" qualifiers="const"> - <return type="bool" /> - <description> - Returns whether the TwoBoneIK modification will attempt to autocalculate the lengths of the two bones. - </description> - </method> - <method name="get_joint_one_bone_idx" qualifiers="const"> - <return type="int" /> - <description> - Returns the bone index of the first bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_joint_one_bone_name" qualifiers="const"> - <return type="String" /> - <description> - Returns the name of the first bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_joint_one_length" qualifiers="const"> - <return type="float" /> - <description> - Returns the length of the first bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_joint_one_roll" qualifiers="const"> - <return type="float" /> - <description> - Returns the amount of roll/twist applied to the first bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_joint_two_bone_idx" qualifiers="const"> - <return type="int" /> - <description> - Returns the bone index of the second bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_joint_two_bone_name" qualifiers="const"> - <return type="String" /> - <description> - Returns the name of the second bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_joint_two_length" qualifiers="const"> - <return type="float" /> - <description> - Returns the length of the second bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_joint_two_roll" qualifiers="const"> - <return type="float" /> - <description> - Returns the amount of roll/twist applied to the second bone in the TwoBoneIK modification. - </description> - </method> - <method name="get_pole_node" qualifiers="const"> - <return type="NodePath" /> - <description> - Returns the node that is being used as the pole node for the TwoBoneIK modification, if a pole node has been set. - </description> - </method> - <method name="get_tip_node" qualifiers="const"> - <return type="NodePath" /> - <description> - Returns the node that is being used to calculate the tip position of the second bone in the TwoBoneIK modification, if a tip node has been set. - </description> - </method> - <method name="get_use_pole_node" qualifiers="const"> - <return type="bool" /> - <description> - Returns whether the TwoBoneIK modification will attempt to use the pole node to figure out which direction to bend, if a pole node has been set. - </description> - </method> - <method name="get_use_tip_node" qualifiers="const"> - <return type="bool" /> - <description> - Returns whether the TwoBoneIK modification will attempt to use the tip node to figure out the length and position of the tip of the second bone. - </description> - </method> - <method name="set_auto_calculate_joint_length"> - <return type="void" /> - <param index="0" name="auto_calculate_joint_length" type="bool" /> - <description> - If true, the TwoBoneIK modification will attempt to autocalculate the lengths of the bones being used. The first bone will be calculated by using the distance from the origin of the first bone to the origin of the second bone. - The second bone will be calculated either using the tip node if that setting is enabled, or by using the distances of the second bone's children. If the tip node is not enabled and the bone has no children, then the length cannot be autocalculated. In this case, the length will either have to be manually inputted or a tip node used to calculate the length. - </description> - </method> - <method name="set_joint_one_bone_idx"> - <return type="void" /> - <param index="0" name="bone_idx" type="int" /> - <description> - Sets the bone index, [param bone_idx], of the first bone. When possible, this will also update the [code]bone_name[/code] of the first bone based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_joint_one_bone_name"> - <return type="void" /> - <param index="0" name="bone_name" type="String" /> - <description> - Sets the bone name, [param bone_name], of the first bone. When possible, this will also update the [code]bone_index[/code] of the first bone based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_joint_one_length"> - <return type="void" /> - <param index="0" name="bone_length" type="float" /> - <description> - Sets the length of the first bone in the TwoBoneIK modification. - </description> - </method> - <method name="set_joint_one_roll"> - <return type="void" /> - <param index="0" name="roll" type="float" /> - <description> - Sets the amount of roll/twist applied to the first bone in the TwoBoneIK modification. - </description> - </method> - <method name="set_joint_two_bone_idx"> - <return type="void" /> - <param index="0" name="bone_idx" type="int" /> - <description> - Sets the bone index, [param bone_idx], of the second bone. When possible, this will also update the [code]bone_name[/code] of the second bone based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_joint_two_bone_name"> - <return type="void" /> - <param index="0" name="bone_name" type="String" /> - <description> - Sets the bone name, [param bone_name], of the second bone. When possible, this will also update the [code]bone_index[/code] of the second bone based on data provided by the [Skeleton3D]. - </description> - </method> - <method name="set_joint_two_length"> - <return type="void" /> - <param index="0" name="bone_length" type="float" /> - <description> - Sets the length of the second bone in the TwoBoneIK modification. - </description> - </method> - <method name="set_joint_two_roll"> - <return type="void" /> - <param index="0" name="roll" type="float" /> - <description> - Sets the amount of roll/twist applied to the second bone in the TwoBoneIK modification. - </description> - </method> - <method name="set_pole_node"> - <return type="void" /> - <param index="0" name="pole_nodepath" type="NodePath" /> - <description> - Sets the node to be used as the for the pole of the TwoBoneIK. When a node is set and the modification is set to use the pole node, the TwoBoneIK modification will bend the nodes in the direction towards this node when the bones need to bend. - </description> - </method> - <method name="set_tip_node"> - <return type="void" /> - <param index="0" name="tip_nodepath" type="NodePath" /> - <description> - Sets the node to be used as the tip for the second bone. This is used to calculate the length and position of the end of the second bone in the TwoBoneIK modification. - [b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the second bone, with the child node being offset so it is at the end of the bone. - </description> - </method> - <method name="set_use_pole_node"> - <return type="void" /> - <param index="0" name="use_pole_node" type="bool" /> - <description> - When [code]true[/code], the TwoBoneIK modification will bend the bones towards the pole node, if one has been set. This gives control over the direction the TwoBoneIK solver will bend, which is helpful for joints like elbows that only bend in certain directions. - </description> - </method> - <method name="set_use_tip_node"> - <return type="void" /> - <param index="0" name="use_tip_node" type="bool" /> - <description> - When [code]true[/code], the TwoBoneIK modification will use the tip node to calculate the distance and position of the end/tip of the second bone. This is the most stable solution for knowing the tip position and length of the second bone. - </description> - </method> - </methods> - <members> - <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> - The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will attempt to rotate the bones to reach. - </member> - </members> -</class> diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml deleted file mode 100644 index 9eaeeefd8e..0000000000 --- a/doc/classes/SkeletonModificationStack3D.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonModificationStack3D" inherits="Resource" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - A resource that holds a stack of [SkeletonModification3D]s. - </brief_description> - <description> - This resource is used by the Skeleton and holds a stack of [SkeletonModification3D]s. The SkeletonModificationStack3D controls the order of the modifications, which controls how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton. - Additionally, the SkeletonModificationStack3D also controls how strongly the modifications are applied to the [Skeleton3D] node. - </description> - <tutorials> - </tutorials> - <methods> - <method name="add_modification"> - <return type="void" /> - <param index="0" name="modification" type="SkeletonModification3D" /> - <description> - Adds the passed-in [SkeletonModification3D] to the stack. - </description> - </method> - <method name="delete_modification"> - <return type="void" /> - <param index="0" name="mod_idx" type="int" /> - <description> - Deletes the [SkeletonModification3D] at the index position [param mod_idx], if it exists. - </description> - </method> - <method name="enable_all_modifications"> - <return type="void" /> - <param index="0" name="enabled" type="bool" /> - <description> - Enables all [SkeletonModification3D]s in the stack. - </description> - </method> - <method name="execute"> - <return type="void" /> - <param index="0" name="delta" type="float" /> - <param index="1" name="execution_mode" type="int" /> - <description> - Executes all of the [SkeletonModification3D]s in the stack that use the same execution mode as the passed-in [param execution_mode], starting from index [code]0[/code] to [member modification_count]. - [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. - </description> - </method> - <method name="get_is_setup" qualifiers="const"> - <return type="bool" /> - <description> - Returns a boolean that indicates whether the modification stack is setup and can execute. - </description> - </method> - <method name="get_modification" qualifiers="const"> - <return type="SkeletonModification3D" /> - <param index="0" name="mod_idx" type="int" /> - <description> - Returns the [SkeletonModification3D] at the passed-in index, [param mod_idx]. - </description> - </method> - <method name="get_skeleton" qualifiers="const"> - <return type="Skeleton3D" /> - <description> - Returns the [Skeleton3D] node that the SkeletonModificationStack3D is bound to. - </description> - </method> - <method name="set_modification"> - <return type="void" /> - <param index="0" name="mod_idx" type="int" /> - <param index="1" name="modification" type="SkeletonModification3D" /> - <description> - Sets the modification at [param mod_idx] to the passed-in modification, [param modification]. - </description> - </method> - <method name="setup"> - <return type="void" /> - <description> - Sets up the modification stack so it can execute. This function should be called by [Skeleton3D] and shouldn't be called unless you know what you are doing. - </description> - </method> - </methods> - <members> - <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false"> - When true, the modification's in the stack will be called. This is handled automatically through the [Skeleton3D] node. - </member> - <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0"> - The number of modifications in the stack. - </member> - <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> - The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the skeleton bone poses. - </member> - </members> -</class> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 7d63747bd2..e2db2166ed 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -60,7 +60,7 @@ <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false"> If [code]true[/code], the [SpinBox] will select the whole text when the [LineEdit] gains focus. Clicking the up and down arrows won't trigger this behavior. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" /> <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default=""""> Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox]. diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index e9721495dd..87b823bd2a 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -20,8 +20,9 @@ <method name="add_frame"> <return type="void" /> <param index="0" name="anim" type="StringName" /> - <param index="1" name="frame" type="Texture2D" /> - <param index="2" name="at_position" type="int" default="-1" /> + <param index="1" name="texture" type="Texture2D" /> + <param index="2" name="duration" type="float" default="1.0" /> + <param index="3" name="at_position" type="int" default="-1" /> <description> Adds a frame to the given animation. </description> @@ -56,22 +57,34 @@ <return type="float" /> <param index="0" name="anim" type="StringName" /> <description> - The animation's speed in frames per second. + Returns the speed in frames per second for the [param anim] animation. </description> </method> - <method name="get_frame" qualifiers="const"> - <return type="Texture2D" /> + <method name="get_frame_count" qualifiers="const"> + <return type="int" /> + <param index="0" name="anim" type="StringName" /> + <description> + Returns the number of frames for the [param anim] animation. + </description> + </method> + <method name="get_frame_duration" qualifiers="const"> + <return type="float" /> <param index="0" name="anim" type="StringName" /> <param index="1" name="idx" type="int" /> <description> - Returns the animation's selected frame. + Returns a relative duration of the frame [param idx] in the [param anim] animation (defaults to [code]1.0[/code]). For example, a frame with a duration of [code]2.0[/code] is displayed twice as long as a frame with a duration of [code]1.0[/code]. You can calculate the absolute duration (in seconds) of a frame using the following formula: + [codeblock] + absolute_duration = relative_duration / (animation_fps * abs(speed_scale)) + [/codeblock] + In this example, [code]speed_scale[/code] refers to either [member AnimatedSprite2D.speed_scale] or [member AnimatedSprite3D.speed_scale]. </description> </method> - <method name="get_frame_count" qualifiers="const"> - <return type="int" /> + <method name="get_frame_texture" qualifiers="const"> + <return type="Texture2D" /> <param index="0" name="anim" type="StringName" /> + <param index="1" name="idx" type="int" /> <description> - Returns the number of frames in the animation. + Returns the texture of the frame [param idx] in the [param anim] animation. </description> </method> <method name="has_animation" qualifiers="const"> @@ -115,18 +128,19 @@ <method name="set_animation_speed"> <return type="void" /> <param index="0" name="anim" type="StringName" /> - <param index="1" name="speed" type="float" /> + <param index="1" name="fps" type="float" /> <description> - The animation's speed in frames per second. + Sets the speed for the [param anim] animation in frames per second. </description> </method> <method name="set_frame"> <return type="void" /> <param index="0" name="anim" type="StringName" /> <param index="1" name="idx" type="int" /> - <param index="2" name="txt" type="Texture2D" /> + <param index="2" name="texture" type="Texture2D" /> + <param index="3" name="duration" type="float" default="1.0" /> <description> - Sets the texture of the given frame. + Sets the texture and the duration of the frame [param idx] in the [param anim] animation. </description> </method> </methods> diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index 8d56cbda13..3c7191392a 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -17,6 +17,12 @@ Adds a new tab. </description> </method> + <method name="clear_tabs"> + <return type="void" /> + <description> + Clears all tabs. + </description> + </method> <method name="ensure_tab_visible"> <return type="void" /> <param index="0" name="idx" type="int" /> diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml index d7a9d06a15..f381ee771e 100644 --- a/doc/classes/TextureProgressBar.xml +++ b/doc/classes/TextureProgressBar.xml @@ -43,7 +43,7 @@ <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle" default="0.0"> Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees]. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" /> <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0"> The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 348b4a5837..460ffbbb80 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -10,15 +10,15 @@ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <members> + <member name="expand_mode" type="int" setter="set_expand_mode" getter="get_expand_mode" enum="TextureRect.ExpandMode" default="0"> + Defines how minimum size is determined based on the texture's size. See [enum ExpandMode] for options. + </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false"> If [code]true[/code], texture is flipped horizontally. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false"> If [code]true[/code], texture is flipped vertically. </member> - <member name="ignore_texture_size" type="bool" setter="set_ignore_texture_size" getter="get_ignore_texture_size" default="false"> - If [code]true[/code], the size of the texture won't be considered for minimum size calculation, so the [TextureRect] can be shrunk down past the texture size. Useful for preventing [TextureRect]s from breaking GUI layout regardless of their texture size. - </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" /> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode" default="0"> Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]. @@ -28,6 +28,24 @@ </member> </members> <constants> + <constant name="EXPAND_KEEP_SIZE" value="0" enum="ExpandMode"> + The minimum size will be equal to texture size, i.e. [TextureRect] can't be smaller than the texture. + </constant> + <constant name="EXPAND_IGNORE_SIZE" value="1" enum="ExpandMode"> + The size of the texture won't be considered for minimum size calculation, so the [TextureRect] can be shrunk down past the texture size. + </constant> + <constant name="EXPAND_FIT_WIDTH" value="2" enum="ExpandMode"> + The height of the texture will be ignored. Minimum width will be equal to the current height. Useful for horizontal layouts, e.g. inside [HBoxContainer]. + </constant> + <constant name="EXPAND_FIT_WIDTH_PROPORTIONAL" value="3" enum="ExpandMode"> + Same as [constant EXPAND_FIT_WIDTH], but keeps texture's aspect ratio. + </constant> + <constant name="EXPAND_FIT_HEIGHT" value="4" enum="ExpandMode"> + The width of the texture will be ignored. Minimum height will be equal to the current width. Useful for vertical layouts, e.g. inside [VBoxContainer]. + </constant> + <constant name="EXPAND_FIT_HEIGHT_PROPORTIONAL" value="5" enum="ExpandMode"> + Same as [constant EXPAND_FIT_HEIGHT], but keeps texture's aspect ratio. + </constant> <constant name="STRETCH_SCALE" value="0" enum="StretchMode"> Scale to fit the node's bounding rectangle. </constant> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 8b537545bc..8176901ff7 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -321,7 +321,7 @@ <param index="1" name="y_sort_enabled" type="bool" /> <description> Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted. - Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behvaior. + Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behavior. If [code]layer[/code] is negative, the layers are accessed from the last one. </description> </method> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index d171797e80..1b6c05284e 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -48,7 +48,7 @@ </member> <member name="time_left" type="float" setter="" getter="get_time_left"> The timer's remaining time in seconds. Returns 0 if the timer is inactive. - [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [method start]. + [b]Note:[/b] This value is read-only and cannot be set. It is based on [member wait_time], which can be set using [method start]. </member> <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" default="1.0"> The wait time in seconds. diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 23d20a5a75..f3ed90a015 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -183,28 +183,6 @@ This can be seen as transforming with respect to the local frame. </description> </method> - <method name="set_rotation"> - <return type="void" /> - <param index="0" name="rotation" type="float" /> - <description> - Sets the transform's rotation (in radians). - </description> - </method> - <method name="set_scale"> - <return type="void" /> - <param index="0" name="scale" type="Vector2" /> - <description> - Sets the transform's scale. - [b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. - </description> - </method> - <method name="set_skew"> - <return type="void" /> - <param index="0" name="skew" type="float" /> - <description> - Sets the transform's skew (in radians). - </description> - </method> <method name="translated" qualifiers="const"> <return type="Transform2D" /> <param index="0" name="offset" type="Vector2" /> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index bcc87a583b..ff5a665bfd 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -52,6 +52,12 @@ The new item will be the [param index]-th child of parent, or it will be the last child if there are not enough siblings. </description> </method> + <method name="deselect_all"> + <return type="void" /> + <description> + Deselects all tree items (rows and columns). In [constant SELECT_MULTI] mode also removes selection cursor. + </description> + </method> <method name="edit_selected"> <return type="bool" /> <description> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index eef35049e5..fc0dd9f05d 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -11,7 +11,7 @@ [codeblocks] [gdscript] var tween = get_tree().create_tween() - tween.tween_property($Sprite, "modulate", Color.red, 1) + tween.tween_property($Sprite, "modulate", Color.RED, 1) tween.tween_property($Sprite, "scale", Vector2(), 1) tween.tween_callback($Sprite.queue_free) [/gdscript] @@ -27,7 +27,7 @@ [codeblocks] [gdscript] var tween = get_tree().create_tween() - tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE) + tween.tween_property($Sprite, "modulate", Color.RED, 1).set_trans(Tween.TRANS_SINE) tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE) tween.tween_callback($Sprite.queue_free) [/gdscript] @@ -42,7 +42,7 @@ [codeblocks] [gdscript] var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC) - tween.tween_property($Sprite, "modulate", Color.red, 1) + tween.tween_property($Sprite, "modulate", Color.RED, 1) tween.tween_property($Sprite, "scale", Vector2(), 1) tween.tween_callback($Sprite.queue_free) [/gdscript] @@ -288,8 +288,8 @@ [codeblocks] [gdscript] var tween = get_tree().create_tween() - tween.tween_callback($Sprite.set_modulate.bind(Color.red)).set_delay(2) - tween.tween_callback($Sprite.set_modulate.bind(Color.blue)).set_delay(2) + tween.tween_callback($Sprite.set_modulate.bind(Color.RED)).set_delay(2) + tween.tween_callback($Sprite.set_modulate.bind(Color.BLUE)).set_delay(2) [/gdscript] [csharp] Tween tween = GetTree().CreateTween(); diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index f9baf194b7..41a87ba886 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -9,8 +9,8 @@ <tutorials> </tutorials> <members> - <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" /> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" enum="Control.SizeFlags" default="0" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> </members> <theme_items> <theme_item name="decrement" data_type="icon" type="Texture2D"> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 4bc98dea6f..2a5b5c1e0a 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -10,8 +10,8 @@ <tutorials> </tutorials> <members> - <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" /> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" enum="Control.SizeFlags" default="0" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> </members> <theme_items> <theme_item name="grabber_offset" data_type="constant" type="int" default="0"> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index 6b384d6a77..0a34faecd0 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -70,6 +70,6 @@ Modifications to a container will modify all references to it. A [Mutex] should be created to lock it if multi-threaded access is desired. </description> <tutorials> - <link title="Variant class">$DOCS_URL/development/cpp/variant_class.html</link> + <link title="Variant class introduction">$DOCS_URL/contributing/development/core_and_modules/variant_class.html</link> </tutorials> </class> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 31811f817b..e069642e50 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -61,5 +61,12 @@ This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal. </member> + <member name="sorting_offset" type="float" setter="set_sorting_offset" getter="get_sorting_offset" default="0.0"> + The sorting offset used by this [VisualInstance3D]. Adjusting it to a higher value will make the [VisualInstance3D] reliably draw on top of other [VisualInstance3D]s that are otherwise positioned at the same spot. + </member> + <member name="sorting_use_aabb_center" type="bool" setter="set_sorting_use_aabb_center" getter="is_sorting_use_aabb_center" default="true"> + If [code]true[/code], the object is sorted based on the [AABB] center. The object will be sorted based on the global position otherwise. + The [AABB] center based sorting is generally more accurate for 3D models. The position based sorting instead allows to better control the drawing order when working with [GPUParticles3D] and [CPUParticles3D]. + </member> </members> </class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index a2089ae2b8..6bffcdef36 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -26,6 +26,7 @@ <param index="1" name="mode" type="int" enum="VisualShader.VaryingMode" /> <param index="2" name="type" type="int" enum="VisualShader.VaryingType" /> <description> + Adds a new varying value node to the shader. </description> </method> <method name="can_connect_nodes" qualifiers="const"> @@ -106,12 +107,14 @@ <return type="int" /> <param index="0" name="type" type="int" enum="VisualShader.Type" /> <description> + Returns next valid node ID that can be added to the shader graph. </description> </method> <method name="has_varying" qualifiers="const"> <return type="bool" /> <param index="0" name="name" type="String" /> <description> + Returns [code]true[/code] if the shader has a varying with the given [param name]. </description> </method> <method name="is_node_connection" qualifiers="const"> @@ -137,6 +140,7 @@ <return type="void" /> <param index="0" name="name" type="String" /> <description> + Removes a varying value node with the given [param name]. Prints an error if a node with this name is not found. </description> </method> <method name="replace_node"> @@ -181,16 +185,22 @@ A shader for light calculations. </constant> <constant name="TYPE_START" value="3" enum="Type"> + A function for the "start" stage of particle shader. </constant> <constant name="TYPE_PROCESS" value="4" enum="Type"> + A function for the "process" stage of particle shader. </constant> <constant name="TYPE_COLLIDE" value="5" enum="Type"> + A function for the "collide" stage (particle collision handler) of particle shader. </constant> <constant name="TYPE_START_CUSTOM" value="6" enum="Type"> + A function for the "start" stage of particle shader, with customized output. </constant> <constant name="TYPE_PROCESS_CUSTOM" value="7" enum="Type"> + A function for the "process" stage of particle shader, with customized output. </constant> <constant name="TYPE_SKY" value="8" enum="Type"> + A shader for 3D environment's sky. </constant> <constant name="TYPE_FOG" value="9" enum="Type"> A compute shader that runs for each froxel of the volumetric fog map. @@ -199,30 +209,46 @@ Represents the size of the [enum Type] enum. </constant> <constant name="VARYING_MODE_VERTEX_TO_FRAG_LIGHT" value="0" enum="VaryingMode"> + Varying is passed from [code]Vertex[/code] function to [code]Fragment[/code] and [code]Light[/code] functions. </constant> <constant name="VARYING_MODE_FRAG_TO_LIGHT" value="1" enum="VaryingMode"> + Varying is passed from [code]Fragment[/code] function to [code]Light[/code] function. </constant> <constant name="VARYING_MODE_MAX" value="2" enum="VaryingMode"> + Represents the size of the [enum VaryingMode] enum. </constant> <constant name="VARYING_TYPE_FLOAT" value="0" enum="VaryingType"> + Varying is of type [float]. </constant> <constant name="VARYING_TYPE_INT" value="1" enum="VaryingType"> + Varying is of type [int]. </constant> - <constant name="VARYING_TYPE_VECTOR_2D" value="2" enum="VaryingType"> + <constant name="VARYING_TYPE_UINT" value="2" enum="VaryingType"> + Varying is of type unsigned [int]. </constant> - <constant name="VARYING_TYPE_VECTOR_3D" value="3" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_2D" value="3" enum="VaryingType"> + Varying is of type [Vector2]. </constant> - <constant name="VARYING_TYPE_VECTOR_4D" value="4" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_3D" value="4" enum="VaryingType"> + Varying is of type [Vector3]. </constant> - <constant name="VARYING_TYPE_BOOLEAN" value="5" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_4D" value="5" enum="VaryingType"> + Varying is of type [Vector4]. </constant> - <constant name="VARYING_TYPE_TRANSFORM" value="6" enum="VaryingType"> + <constant name="VARYING_TYPE_BOOLEAN" value="6" enum="VaryingType"> + Varying is of type [bool]. </constant> - <constant name="VARYING_TYPE_MAX" value="7" enum="VaryingType"> + <constant name="VARYING_TYPE_TRANSFORM" value="7" enum="VaryingType"> + Varying is of type [Transform3D]. + </constant> + <constant name="VARYING_TYPE_MAX" value="8" enum="VaryingType"> + Represents the size of the [enum VaryingType] enum. </constant> <constant name="NODE_ID_INVALID" value="-1"> + Denotes invalid [VisualShader] node. </constant> <constant name="NODE_ID_OUTPUT" value="0"> + Denotes output node of [VisualShader]. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 1f3397f39c..f95f871e52 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -72,25 +72,28 @@ <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType"> Integer scalar. Translated to [code]int[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR_2D" value="2" enum="PortType"> + <constant name="PORT_TYPE_SCALAR_UINT" value="2" enum="PortType"> + Unsigned integer scalar. Translated to [code]uint[/code] type in shader code. + </constant> + <constant name="PORT_TYPE_VECTOR_2D" value="3" enum="PortType"> 2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR_3D" value="3" enum="PortType"> + <constant name="PORT_TYPE_VECTOR_3D" value="4" enum="PortType"> 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR_4D" value="4" enum="PortType"> + <constant name="PORT_TYPE_VECTOR_4D" value="5" enum="PortType"> 4D vector of floating-point values. Translated to [code]vec4[/code] type in shader code. </constant> - <constant name="PORT_TYPE_BOOLEAN" value="5" enum="PortType"> + <constant name="PORT_TYPE_BOOLEAN" value="6" enum="PortType"> Boolean type. Translated to [code]bool[/code] type in shader code. </constant> - <constant name="PORT_TYPE_TRANSFORM" value="6" enum="PortType"> + <constant name="PORT_TYPE_TRANSFORM" value="7" enum="PortType"> Transform type. Translated to [code]mat4[/code] type in shader code. </constant> - <constant name="PORT_TYPE_SAMPLER" value="7" enum="PortType"> + <constant name="PORT_TYPE_SAMPLER" value="8" enum="PortType"> Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. </constant> - <constant name="PORT_TYPE_MAX" value="8" enum="PortType"> + <constant name="PORT_TYPE_MAX" value="9" enum="PortType"> Represents the size of the [enum PortType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml index 35f50a37c3..642a98ec8c 100644 --- a/doc/classes/VisualShaderNodeClamp.xml +++ b/doc/classes/VisualShaderNodeClamp.xml @@ -20,16 +20,19 @@ <constant name="OP_TYPE_INT" value="1" enum="OpType"> An integer scalar. </constant> - <constant name="OP_TYPE_VECTOR_2D" value="2" enum="OpType"> + <constant name="OP_TYPE_UINT" value="2" enum="OpType"> + An unsigned integer scalar. + </constant> + <constant name="OP_TYPE_VECTOR_2D" value="3" enum="OpType"> A 2D vector type. </constant> - <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType"> + <constant name="OP_TYPE_VECTOR_3D" value="4" enum="OpType"> A 3D vector type. </constant> - <constant name="OP_TYPE_VECTOR_4D" value="4" enum="OpType"> + <constant name="OP_TYPE_VECTOR_4D" value="5" enum="OpType"> A 4D vector type. </constant> - <constant name="OP_TYPE_MAX" value="5" enum="OpType"> + <constant name="OP_TYPE_MAX" value="6" enum="OpType"> Represents the size of the [enum OpType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index 942ced2ebd..19ed42d1c7 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -26,22 +26,25 @@ <constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType"> An integer scalar. </constant> - <constant name="CTYPE_VECTOR_2D" value="2" enum="ComparisonType"> + <constant name="CTYPE_SCALAR_UINT" value="2" enum="ComparisonType"> + An unsigned integer scalar. + </constant> + <constant name="CTYPE_VECTOR_2D" value="3" enum="ComparisonType"> A 2D vector type. </constant> - <constant name="CTYPE_VECTOR_3D" value="3" enum="ComparisonType"> + <constant name="CTYPE_VECTOR_3D" value="4" enum="ComparisonType"> A 3D vector type. </constant> - <constant name="CTYPE_VECTOR_4D" value="4" enum="ComparisonType"> + <constant name="CTYPE_VECTOR_4D" value="5" enum="ComparisonType"> A 4D vector type. </constant> - <constant name="CTYPE_BOOLEAN" value="5" enum="ComparisonType"> + <constant name="CTYPE_BOOLEAN" value="6" enum="ComparisonType"> A boolean type. </constant> - <constant name="CTYPE_TRANSFORM" value="6" enum="ComparisonType"> + <constant name="CTYPE_TRANSFORM" value="7" enum="ComparisonType"> A transform ([code]mat4[/code]) type. </constant> - <constant name="CTYPE_MAX" value="7" enum="ComparisonType"> + <constant name="CTYPE_MAX" value="8" enum="ComparisonType"> Represents the size of the [enum ComparisonType] enum. </constant> <constant name="FUNC_EQUAL" value="0" enum="Function"> diff --git a/doc/classes/VisualShaderNodeConstant.xml b/doc/classes/VisualShaderNodeConstant.xml index 213ab664ad..23b97a78c7 100644 --- a/doc/classes/VisualShaderNodeConstant.xml +++ b/doc/classes/VisualShaderNodeConstant.xml @@ -4,6 +4,7 @@ A base type for the constants within the visual shader graph. </brief_description> <description> + This is an abstract class. See the derived types for descriptions of the possible values. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeDistanceFade.xml b/doc/classes/VisualShaderNodeDistanceFade.xml index 8ea0857776..c707035253 100644 --- a/doc/classes/VisualShaderNodeDistanceFade.xml +++ b/doc/classes/VisualShaderNodeDistanceFade.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeDistanceFade" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node representing distance fade effect. </brief_description> <description> + The distance fade effect fades out each pixel based on its distance to another object. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeIntParameter.xml b/doc/classes/VisualShaderNodeIntParameter.xml index 70335b0c77..1ee7e3f217 100644 --- a/doc/classes/VisualShaderNodeIntParameter.xml +++ b/doc/classes/VisualShaderNodeIntParameter.xml @@ -1,33 +1,45 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeIntParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node for shader parameter (uniform) of type [int]. </brief_description> <description> + A [VisualShaderNodeParameter] of type [int]. Offers additional customization for range of accepted values. </description> <tutorials> </tutorials> <members> <member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="0"> + Default value of this parameter, which will be used if not set externally. [member default_value_enabled] must be enabled; defaults to [code]0[/code] otherwise. </member> <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + If [code]true[/code], the node will have a custom default value. </member> <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntParameter.Hint" default="0"> + Range hint of this node. Use it to customize valid parameter range. </member> <member name="max" type="int" setter="set_max" getter="get_max" default="100"> + The maximum value this parameter can take. [member hint] must be either [constant HINT_RANGE] or [constant HINT_RANGE_STEP] for this to take effect. </member> <member name="min" type="int" setter="set_min" getter="get_min" default="0"> + The minimum value this parameter can take. [member hint] must be either [constant HINT_RANGE] or [constant HINT_RANGE_STEP] for this to take effect. </member> <member name="step" type="int" setter="set_step" getter="get_step" default="1"> + The step between parameter's values. Forces the parameter to be a multiple of the given value. [member hint] must be [constant HINT_RANGE_STEP] for this to take effect. </member> </members> <constants> <constant name="HINT_NONE" value="0" enum="Hint"> + The parameter will not constrain its value. </constant> <constant name="HINT_RANGE" value="1" enum="Hint"> + The parameter's value must be within the specified [member min]/[member max] range. </constant> <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> + The parameter's value must be within the specified range, with the given [member step] between values. </constant> <constant name="HINT_MAX" value="3" enum="Hint"> + Represents the size of the [enum Hint] enum. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeLinearSceneDepth.xml b/doc/classes/VisualShaderNodeLinearSceneDepth.xml index fa8c01ac0a..0dff2d780d 100644 --- a/doc/classes/VisualShaderNodeLinearSceneDepth.xml +++ b/doc/classes/VisualShaderNodeLinearSceneDepth.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeLinearSceneDepth" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that returns the depth value of the DEPTH_TEXTURE node in a linear space. </brief_description> <description> + This node can be used in fragment shaders. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeParameter.xml b/doc/classes/VisualShaderNodeParameter.xml index 55b10ac810..acc180a7ca 100644 --- a/doc/classes/VisualShaderNodeParameter.xml +++ b/doc/classes/VisualShaderNodeParameter.xml @@ -13,14 +13,18 @@ Name of the parameter, by which it can be accessed through the [ShaderMaterial] properties. </member> <member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeParameter.Qualifier" default="0"> + Defines the scope of the parameter. </member> </members> <constants> <constant name="QUAL_NONE" value="0" enum="Qualifier"> + The parameter will be tied to the [ShaderMaterial] using this shader. </constant> <constant name="QUAL_GLOBAL" value="1" enum="Qualifier"> + The parameter will use a global value, defined in Project Settings. </constant> <constant name="QUAL_INSTANCE" value="2" enum="Qualifier"> + The parameter will be tied to the node with attached [ShaderMaterial] using this shader. </constant> <constant name="QUAL_MAX" value="3" enum="Qualifier"> Represents the size of the [enum Qualifier] enum. diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml index f26362b336..7a197dd8cb 100644 --- a/doc/classes/VisualShaderNodeParticleAccelerator.xml +++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml @@ -1,21 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleAccelerator" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that accelerates particles. </brief_description> <description> + Particle accelerator can be used in "process" step of particle shader. It will accelerate the particles. Connect it to the Velocity output port. </description> <tutorials> </tutorials> <members> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="VisualShaderNodeParticleAccelerator.Mode" default="0"> + Defines in what manner the particles will be accelerated. </member> </members> <constants> <constant name="MODE_LINEAR" value="0" enum="Mode"> + The particles will be accelerated based on their velocity. </constant> <constant name="MODE_RADIAL" value="1" enum="Mode"> + The particles will be accelerated towards or away from the center. </constant> <constant name="MODE_TANGENTIAL" value="2" enum="Mode"> + The particles will be accelerated tangentially to the radius vector from center to their position. </constant> <constant name="MODE_MAX" value="3" enum="Mode"> Represents the size of the [enum Mode] enum. diff --git a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml index dbef4b806d..1bdb9d15bc 100644 --- a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleBoxEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that makes particles emitted in a box shape. </brief_description> <description> + [VisualShaderNodeParticleEmitter] that makes the particles emitted in box shape with the specified extents. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeParticleConeVelocity.xml b/doc/classes/VisualShaderNodeParticleConeVelocity.xml index c3b3621fbc..48da5b874b 100644 --- a/doc/classes/VisualShaderNodeParticleConeVelocity.xml +++ b/doc/classes/VisualShaderNodeParticleConeVelocity.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleConeVelocity" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that makes particles move in a cone shape. </brief_description> <description> + This node can be used in "start" step of particle shader. It defines the initial velocity of the particles, making them move in cone shape starting from the center, with a given spread. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeParticleEmit.xml b/doc/classes/VisualShaderNodeParticleEmit.xml index c5e9d25ca1..3e52a74aed 100644 --- a/doc/classes/VisualShaderNodeParticleEmit.xml +++ b/doc/classes/VisualShaderNodeParticleEmit.xml @@ -1,25 +1,33 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleEmit" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that forces to emit a particle from a sub-emitter. </brief_description> <description> + This node internally calls [code]emit_subparticle[/code] shader method. It will emit a particle from the configured sub-emitter and also allows to customize how its emitted. Requires a sub-emitter assigned to the particles node with this shader. </description> <tutorials> </tutorials> <members> <member name="flags" type="int" setter="set_flags" getter="get_flags" enum="VisualShaderNodeParticleEmit.EmitFlags" default="31"> + Flags used to override the properties defined in the sub-emitter's process material. </member> </members> <constants> <constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags"> + If enabled, the particle starts with the position defined by this node. </constant> <constant name="EMIT_FLAG_ROT_SCALE" value="2" enum="EmitFlags"> + If enabled, the particle starts with the rotation and scale defined by this node. </constant> <constant name="EMIT_FLAG_VELOCITY" value="4" enum="EmitFlags"> + If enabled,the particle starts with the velocity defined by this node. </constant> <constant name="EMIT_FLAG_COLOR" value="8" enum="EmitFlags"> + If enabled, the particle starts with the color defined by this node. </constant> <constant name="EMIT_FLAG_CUSTOM" value="16" enum="EmitFlags"> + If enabled, the particle starts with the [code]CUSTOM[/code] data defined by this node. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleEmitter.xml b/doc/classes/VisualShaderNodeParticleEmitter.xml index ddfd410708..abb5528d5f 100644 --- a/doc/classes/VisualShaderNodeParticleEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleEmitter.xml @@ -4,6 +4,7 @@ A base class for particle emitters. </brief_description> <description> + Particle emitter nodes can be used in "start" step of particle shaders and they define the starting position of the particles. Connect them to the Position output port. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeParticleMeshEmitter.xml b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml index 25dd925112..59dc74690e 100644 --- a/doc/classes/VisualShaderNodeParticleMeshEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml @@ -1,17 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleMeshEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that makes particles emitted in a shape defined by a [Mesh]. </brief_description> <description> + [VisualShaderNodeParticleEmitter] that makes the particles emitted in a shape of the assigned [member mesh]. It will emit from the mesh's surfaces, either all or only the specified one. </description> <tutorials> </tutorials> <members> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + The [Mesh] that defines emission shape. </member> <member name="surface_index" type="int" setter="set_surface_index" getter="get_surface_index" default="0"> + Index of the surface that emits particles. [member use_all_surfaces] must be [code]false[/code] for this to take effect. </member> <member name="use_all_surfaces" type="bool" setter="set_use_all_surfaces" getter="is_use_all_surfaces" default="true"> + If [code]true[/code], the particles will emit from all surfaces of the mesh. </member> </members> </class> diff --git a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml index a911dbf3b4..95d031807b 100644 --- a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml +++ b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml @@ -1,13 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleMultiplyByAxisAngle" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader helper node for multiplying position and rotation of particles. </brief_description> <description> + This node helps to multiply a position input vector by rotation using specific axis. Intended to work with emitters. </description> <tutorials> </tutorials> <members> <member name="degrees_mode" type="bool" setter="set_degrees_mode" getter="is_degrees_mode" default="true"> + If [code]true[/code], the angle will be interpreted in degrees instead of radians. </member> </members> </class> diff --git a/doc/classes/VisualShaderNodeParticleOutput.xml b/doc/classes/VisualShaderNodeParticleOutput.xml index 7542272e61..4a1e61b879 100644 --- a/doc/classes/VisualShaderNodeParticleOutput.xml +++ b/doc/classes/VisualShaderNodeParticleOutput.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleOutput" inherits="VisualShaderNodeOutput" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Visual shader node that defines output values for particle emitting. </brief_description> <description> + This node defines how particles are emitted. It allows to customize e.g. position and velocity. Available ports are different depending on which function this node is inside (start, process, collision) and whether custom data is enabled. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml index a1f9ce040a..233e072246 100644 --- a/doc/classes/VisualShaderNodeParticleRandomness.xml +++ b/doc/classes/VisualShaderNodeParticleRandomness.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleRandomness" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Visual shader node for randomizing particle values. </brief_description> <description> + Randomness node will output pseudo-random values of the given type based on the specified minimum and maximum values. </description> <tutorials> </tutorials> @@ -21,7 +23,10 @@ <constant name="OP_TYPE_VECTOR_3D" value="2" enum="OpType"> A 3D vector type. </constant> - <constant name="OP_TYPE_MAX" value="3" enum="OpType"> + <constant name="OP_TYPE_VECTOR_4D" value="3" enum="OpType"> + A 4D vector type. + </constant> + <constant name="OP_TYPE_MAX" value="4" enum="OpType"> Represents the size of the [enum OpType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeParticleRingEmitter.xml b/doc/classes/VisualShaderNodeParticleRingEmitter.xml index bebce51d6b..e2ff44ed55 100644 --- a/doc/classes/VisualShaderNodeParticleRingEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleRingEmitter.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleRingEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that makes particles emitted in a ring shape. </brief_description> <description> + [VisualShaderNodeParticleEmitter] that makes the particles emitted in ring shape with the specified inner and outer radii and height. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml index ffbd384f1e..3d1e332c97 100644 --- a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeParticleSphereEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that makes particles emitted in a sphere shape. </brief_description> <description> + [VisualShaderNodeParticleEmitter] that makes the particles emitted in sphere shape with the specified inner and outer radii. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeProximityFade.xml b/doc/classes/VisualShaderNodeProximityFade.xml index 25051eed71..8405fcef36 100644 --- a/doc/classes/VisualShaderNodeProximityFade.xml +++ b/doc/classes/VisualShaderNodeProximityFade.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeProximityFade" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node representing proximity fade effect. </brief_description> <description> + The proximity fade effect fades out each pixel based on its distance to another object. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeRandomRange.xml b/doc/classes/VisualShaderNodeRandomRange.xml index adc83d808c..e1a5e0b266 100644 --- a/doc/classes/VisualShaderNodeRandomRange.xml +++ b/doc/classes/VisualShaderNodeRandomRange.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeRandomRange" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that generates a pseudo-random scalar. </brief_description> <description> + Random range node will output a pseudo-random scalar value in the specified range, based on the seed. The value is always the same for the given seed and range, so you should provide a changing input, e.g. by using time. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeRemap.xml b/doc/classes/VisualShaderNodeRemap.xml index 5a73a76e7f..73512bcb99 100644 --- a/doc/classes/VisualShaderNodeRemap.xml +++ b/doc/classes/VisualShaderNodeRemap.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeRemap" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node for remap function. </brief_description> <description> + Remap will transform the input range into output range, e.g. you can change a [code]0..1[/code] value to [code]-2..2[/code] etc. See [method @GlobalScope.remap] for more details. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml index e74ff6e162..3fda4eb2b8 100644 --- a/doc/classes/VisualShaderNodeSwitch.xml +++ b/doc/classes/VisualShaderNodeSwitch.xml @@ -20,22 +20,25 @@ <constant name="OP_TYPE_INT" value="1" enum="OpType"> An integer scalar. </constant> - <constant name="OP_TYPE_VECTOR_2D" value="2" enum="OpType"> + <constant name="OP_TYPE_UINT" value="2" enum="OpType"> + An unsigned integer scalar. + </constant> + <constant name="OP_TYPE_VECTOR_2D" value="3" enum="OpType"> A 2D vector type. </constant> - <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType"> + <constant name="OP_TYPE_VECTOR_3D" value="4" enum="OpType"> A 3D vector type. </constant> - <constant name="OP_TYPE_VECTOR_4D" value="4" enum="OpType"> + <constant name="OP_TYPE_VECTOR_4D" value="5" enum="OpType"> A 4D vector type. </constant> - <constant name="OP_TYPE_BOOLEAN" value="5" enum="OpType"> + <constant name="OP_TYPE_BOOLEAN" value="6" enum="OpType"> A boolean type. </constant> - <constant name="OP_TYPE_TRANSFORM" value="6" enum="OpType"> + <constant name="OP_TYPE_TRANSFORM" value="7" enum="OpType"> A transform type. </constant> - <constant name="OP_TYPE_MAX" value="7" enum="OpType"> + <constant name="OP_TYPE_MAX" value="8" enum="OpType"> Represents the size of the [enum OpType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml b/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml index 2afaa8e219..885325bc6c 100644 --- a/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml +++ b/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTexture2DArrayParameter" inherits="VisualShaderNodeTextureParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node for shader parameter (uniform) of type [Texture2DArray]. </brief_description> <description> + This parameter allows to provide a collection of textures for the shader. You can use [VisualShaderNodeTexture2DArray] to extract the textures from array. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeTextureParameter.xml b/doc/classes/VisualShaderNodeTextureParameter.xml index ad21c4e990..333226dc58 100644 --- a/doc/classes/VisualShaderNodeTextureParameter.xml +++ b/doc/classes/VisualShaderNodeTextureParameter.xml @@ -51,27 +51,39 @@ Represents the size of the [enum ColorDefault] enum. </constant> <constant name="FILTER_DEFAULT" value="0" enum="TextureFilter"> + Sample the texture using the filter determined by the node this shader is attached to. </constant> <constant name="FILTER_NEAREST" value="1" enum="TextureFilter"> + The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. </constant> <constant name="FILTER_LINEAR" value="2" enum="TextureFilter"> + The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. </constant> <constant name="FILTER_NEAREST_MIPMAP" value="3" enum="TextureFilter"> + The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. </constant> <constant name="FILTER_LINEAR_MIPMAP" value="4" enum="TextureFilter"> + The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. </constant> <constant name="FILTER_NEAREST_MIPMAP_ANISOTROPIC" value="5" enum="TextureFilter"> + The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate. </constant> <constant name="FILTER_LINEAR_MIPMAP_ANISOTROPIC" value="6" enum="TextureFilter"> + The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate. </constant> <constant name="FILTER_MAX" value="7" enum="TextureFilter"> Represents the size of the [enum TextureFilter] enum. </constant> <constant name="REPEAT_DEFAULT" value="0" enum="TextureRepeat"> + Sample the texture using the repeat mode determined by the node this shader is attached to. </constant> <constant name="REPEAT_ENABLED" value="1" enum="TextureRepeat"> + Texture will repeat normally. </constant> <constant name="REPEAT_DISABLED" value="2" enum="TextureRepeat"> + Texture will not repeat. </constant> <constant name="REPEAT_MAX" value="3" enum="TextureRepeat"> Represents the size of the [enum TextureRepeat] enum. diff --git a/doc/classes/VisualShaderNodeUIntConstant.xml b/doc/classes/VisualShaderNodeUIntConstant.xml new file mode 100644 index 0000000000..926e4e11d2 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntConstant.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntConstant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + An unsigned scalar integer constant to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]uint[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <members> + <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0"> + An unsigned integer constant which represents a state of this node. + </member> + </members> +</class> diff --git a/doc/classes/VisualShaderNodeUIntFunc.xml b/doc/classes/VisualShaderNodeUIntFunc.xml new file mode 100644 index 0000000000..c0c591304a --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntFunc.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + An unsigned scalar integer function to be used within the visual shader graph. + </brief_description> + <description> + Accept an unsigned integer scalar ([code]x[/code]) to the input port and transform it according to [member function]. + </description> + <tutorials> + </tutorials> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeUIntFunc.Function" default="0"> + A function to be applied to the scalar. See [enum Function] for options. + </member> + </members> + <constants> + <constant name="FUNC_NEGATE" value="0" enum="Function"> + Negates the [code]x[/code] using [code]-(x)[/code]. + </constant> + <constant name="FUNC_BITWISE_NOT" value="1" enum="Function"> + Returns the result of bitwise [code]NOT[/code] operation on the integer. Translates to [code]~a[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeUIntOp.xml b/doc/classes/VisualShaderNodeUIntOp.xml new file mode 100644 index 0000000000..44f71286e3 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntOp.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntOp" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + An unsigned integer scalar operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two unsigned integer inputs: [code]a[/code] and [code]b[/code]. + </description> + <tutorials> + </tutorials> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeUIntOp.Operator" default="0"> + An operator to be applied to the inputs. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_ADD" value="0" enum="Operator"> + Sums two numbers using [code]a + b[/code]. + </constant> + <constant name="OP_SUB" value="1" enum="Operator"> + Subtracts two numbers using [code]a - b[/code]. + </constant> + <constant name="OP_MUL" value="2" enum="Operator"> + Multiplies two numbers using [code]a * b[/code]. + </constant> + <constant name="OP_DIV" value="3" enum="Operator"> + Divides two numbers using [code]a / b[/code]. + </constant> + <constant name="OP_MOD" value="4" enum="Operator"> + Calculates the remainder of two numbers using [code]a % b[/code]. + </constant> + <constant name="OP_MAX" value="5" enum="Operator"> + Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_MIN" value="6" enum="Operator"> + Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_AND" value="7" enum="Operator"> + Returns the result of bitwise [code]AND[/code] operation on the integer. Translates to [code]a & b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_OR" value="8" enum="Operator"> + Returns the result of bitwise [code]OR[/code] operation for two integers. Translates to [code]a | b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_XOR" value="9" enum="Operator"> + Returns the result of bitwise [code]XOR[/code] operation for two integers. Translates to [code]a ^ b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_LEFT_SHIFT" value="10" enum="Operator"> + Returns the result of bitwise left shift operation on the integer. Translates to [code]a << b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_RIGHT_SHIFT" value="11" enum="Operator"> + Returns the result of bitwise right shift operation on the integer. Translates to [code]a >> b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_ENUM_SIZE" value="12" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeUIntParameter.xml b/doc/classes/VisualShaderNodeUIntParameter.xml new file mode 100644 index 0000000000..4c95e58962 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntParameter.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A visual shader node for shader parameter (uniform) of type unsigned [int]. + </brief_description> + <description> + A [VisualShaderNodeParameter] of type unsigned [int]. Offers additional customization for range of accepted values. + </description> + <tutorials> + </tutorials> + <members> + <member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="0"> + Default value of this parameter, which will be used if not set externally. [member default_value_enabled] must be enabled; defaults to [code]0[/code] otherwise. + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + If [code]true[/code], the node will have a custom default value. + </member> + </members> +</class> diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml index 541991b790..b5143b647c 100644 --- a/doc/classes/VisualShaderNodeUVFunc.xml +++ b/doc/classes/VisualShaderNodeUVFunc.xml @@ -4,6 +4,7 @@ Contains functions to modify texture coordinates ([code]uv[/code]) to be used within the visual shader graph. </brief_description> <description> + UV functions are similar to [Vector2] functions, but the input port of this node uses the shader's UV value by default. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeUVPolarCoord.xml b/doc/classes/VisualShaderNodeUVPolarCoord.xml index 8582939db3..49f7f52bc1 100644 --- a/doc/classes/VisualShaderNodeUVPolarCoord.xml +++ b/doc/classes/VisualShaderNodeUVPolarCoord.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeUVPolarCoord" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that modifies the texture UV using polar coordinates. </brief_description> <description> + UV polar coord node will transform UV values into polar coordinates, with specified scale, zoom strength and repeat parameters. It can be used to create various swirl distortions. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeVarying.xml b/doc/classes/VisualShaderNodeVarying.xml index 0dbbd61f3a..0a5c5a70af 100644 --- a/doc/classes/VisualShaderNodeVarying.xml +++ b/doc/classes/VisualShaderNodeVarying.xml @@ -1,15 +1,19 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeVarying" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that represents a "varying" shader value. </brief_description> <description> + Varying values are shader variables that can be passed between shader functions, e.g. from Vertex shader to Fragment shader. </description> <tutorials> </tutorials> <members> <member name="varying_name" type="String" setter="set_varying_name" getter="get_varying_name" default=""[None]""> + Name of the variable. Must be unique. </member> <member name="varying_type" type="int" setter="set_varying_type" getter="get_varying_type" enum="VisualShader.VaryingType" default="0"> + Type of the variable. Determines where the variable can be accessed. </member> </members> </class> diff --git a/doc/classes/VisualShaderNodeVaryingGetter.xml b/doc/classes/VisualShaderNodeVaryingGetter.xml index de30b18d67..dea47ed3c1 100644 --- a/doc/classes/VisualShaderNodeVaryingGetter.xml +++ b/doc/classes/VisualShaderNodeVaryingGetter.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeVaryingGetter" inherits="VisualShaderNodeVarying" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that gets a value of a varying. </brief_description> <description> + Outputs a value of a varying defined in the shader. You need to first create a varying that can be used in the given function, e.g. varying getter in Fragment shader requires a varying with mode set to [constant VisualShader.VARYING_MODE_VERTEX_TO_FRAG_LIGHT]. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeVaryingSetter.xml b/doc/classes/VisualShaderNodeVaryingSetter.xml index 57ead3d82b..b305fdd3ef 100644 --- a/doc/classes/VisualShaderNodeVaryingSetter.xml +++ b/doc/classes/VisualShaderNodeVaryingSetter.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeVaryingSetter" inherits="VisualShaderNodeVarying" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A visual shader node that sets a value of a varying. </brief_description> <description> + Inputs a value to a varying defined in the shader. You need to first create a varying that can be used in the given function, e.g. varying setter in Fragment shader requires a varying with mode set to [constant VisualShader.VARYING_MODE_FRAG_TO_LIGHT]. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeVectorBase.xml b/doc/classes/VisualShaderNodeVectorBase.xml index d9c9f2d79c..68cf00e819 100644 --- a/doc/classes/VisualShaderNodeVectorBase.xml +++ b/doc/classes/VisualShaderNodeVectorBase.xml @@ -1,15 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeVectorBase" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - A base type for the nodes using different vector types within the visual shader graph. + A base type for the nodes that perform vector operations within the visual shader graph. </brief_description> <description> + This is an abstract class. See the derived types for descriptions of the possible operations. </description> <tutorials> </tutorials> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeVectorBase.OpType" default="1"> - A base type. + A vector type that this operation is performed on. </member> </members> <constants> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 16ca486e4a..4cd6cf41da 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -503,7 +503,7 @@ <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)"> Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, [Window]'s content will be scaled when the window is resized to a different size. </member> - <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0"> + <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen"> The screen the window is currently on. </member> <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false"> @@ -513,6 +513,8 @@ <member name="extend_to_title" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the [Window] contents is expanded to the full size of the window, window title bar is transparent. </member> + <member name="initial_position" type="int" setter="set_initial_position" getter="get_initial_position" enum="Window.WindowInitialPosition" default="0"> + </member> <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)"> If non-zero, the [Window] can't be resized to be bigger than this size. [b]Note:[/b] This property will be ignored if the value is lower than [member min_size]. @@ -732,6 +734,10 @@ <constant name="LAYOUT_DIRECTION_RTL" value="3" enum="LayoutDirection"> Right-to-left layout direction. </constant> + <constant name="WINDOW_INITIAL_POSITION_ABSOLUTE" value="0" enum="WindowInitialPosition"> + </constant> + <constant name="WINDOW_INITIAL_POSITION_CENTER_SCREEN" value="1" enum="WindowInitialPosition"> + </constant> </constants> <theme_items> <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)"> |