diff options
Diffstat (limited to 'doc/classes')
182 files changed, 1718 insertions, 1860 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 50c1ed847a..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> @@ -1479,6 +1479,9 @@ <constant name="INLINE_ALIGNMENT_CENTER_TO" value="1" enum="InlineAlignment"> Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant. </constant> + <constant name="INLINE_ALIGNMENT_BASELINE_TO" value="3" enum="InlineAlignment"> + Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant. + </constant> <constant name="INLINE_ALIGNMENT_BOTTOM_TO" value="2" enum="InlineAlignment"> Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant. </constant> @@ -2316,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"> @@ -2373,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"> @@ -2791,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> - <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="26" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="27" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="28" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="29" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="30" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="31" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="32" enum="PropertyHint"> + <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="25" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="33" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="26" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="34" enum="PropertyHint"> + <constant name="PROPERTY_HINT_SAVE_FILE" value="27" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_SAVE_FILE" value="35" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="28" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="36" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="29" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="37" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="30" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_INT_IS_POINTER" value="38" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ARRAY_TYPE" value="31" 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 8dde3748d7..32599d7f7d 100644 --- a/doc/classes/AStarGrid2D.xml +++ b/doc/classes/AStarGrid2D.xml @@ -69,6 +69,20 @@ [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message. </description> </method> + <method name="get_point_position" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="id" type="Vector2i" /> + <description> + Returns the position of the point associated with the given [param id]. + </description> + </method> + <method name="get_point_weight_scale" qualifiers="const"> + <return type="float" /> + <param index="0" name="id" type="Vector2i" /> + <description> + Returns the weight scale of the point associated with the given [param id]. + </description> + </method> <method name="is_dirty" qualifiers="const"> <return type="bool" /> <description> @@ -103,6 +117,16 @@ <param index="1" name="solid" type="bool" default="true" /> <description> Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. + [b]Note:[/b] Calling [method update] is not needed after the call of this function. + </description> + </method> + <method name="set_point_weight_scale"> + <return type="void" /> + <param index="0" name="id" type="Vector2i" /> + <param index="1" name="weight_scale" type="float" /> + <description> + Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. + [b]Note:[/b] Calling [method update] is not needed after the call of this function. </description> </method> <method name="update"> @@ -116,14 +140,18 @@ <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. </member> <member name="jumping_enabled" type="bool" setter="set_jumping_enabled" getter="is_jumping_enabled" default="false"> Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm. + [b]Note:[/b] Currently, toggling it on disables the consideration of weight scaling in pathfinding. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The offset of the grid 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. @@ -134,20 +162,22 @@ </members> <constants> <constant name="HEURISTIC_EUCLIDEAN" value="0" enum="Heuristic"> - The Euclidean heuristic to be used for the pathfinding using the following formula: + The [url=https://en.wikipedia.org/wiki/Euclidean_distance]Euclidean heuristic[/url] to be used for the pathfinding using the following formula: [codeblock] dx = abs(to_id.x - from_id.x) dy = abs(to_id.y - from_id.y) result = sqrt(dx * dx + dy * dy) [/codeblock] + [b]Note:[/b] This is also the internal heuristic used in [AStar3D] and [AStar2D] by default (with the inclusion of possible z-axis coordinate). </constant> <constant name="HEURISTIC_MANHATTAN" value="1" enum="Heuristic"> - The Manhattan heuristic to be used for the pathfinding using the following formula: + The [url=https://en.wikipedia.org/wiki/Taxicab_geometry]Manhattan heuristic[/url] to be used for the pathfinding using the following formula: [codeblock] dx = abs(to_id.x - from_id.x) dy = abs(to_id.y - from_id.y) result = dx + dy [/codeblock] + [b]Note:[/b] This heuristic is intended to be used with 4-side orthogonal movements, provided by setting the [member diagonal_mode] to [constant DIAGONAL_MODE_NEVER]. </constant> <constant name="HEURISTIC_OCTILE" value="2" enum="Heuristic"> The Octile heuristic to be used for the pathfinding using the following formula: @@ -159,7 +189,7 @@ [/codeblock] </constant> <constant name="HEURISTIC_CHEBYSHEV" value="3" enum="Heuristic"> - The Chebyshev heuristic to be used for the pathfinding using the following formula: + The [url=https://en.wikipedia.org/wiki/Chebyshev_distance]Chebyshev heuristic[/url] to be used for the pathfinding using the following formula: [codeblock] dx = abs(to_id.x - from_id.x) dy = abs(to_id.y - from_id.y) 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/Area2D.xml b/doc/classes/Area2D.xml index 29592f133d..3f76cc16ec 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -114,15 +114,13 @@ <signal name="area_entered"> <param index="0" name="area" type="Area2D" /> <description> - Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area2D. + Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_exited"> <param index="0" name="area" type="Area2D" /> <description> - Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area2D. + Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_shape_entered"> @@ -131,11 +129,18 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. - [param area] the other Area2D. - [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param area_shape_index] contain indices of the interacting shapes from this area and the other area, respectively. [param area_rid] contains the [RID] of the other area. These values can be used with the [PhysicsServer2D]. + [b]Example of getting the[/b] [CollisionShape2D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var other_shape_owner = area.shape_find_owner(area_shape_index) + var other_shape_node = area.shape_owner_get_owner(other_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="area_shape_exited"> @@ -144,25 +149,20 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. - [param area] the other Area2D. - [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal area_shape_entered]. </description> </signal> <signal name="body_entered"> <param index="0" name="body" type="Node2D" /> <description> - Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + Emitted when the received [param body] enters this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node2D" /> <description> - Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + Emitted when the received [param body] exits this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_shape_entered"> @@ -171,11 +171,18 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. - [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param body] enters a shape of this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param body_shape_index] contain indices of the interacting shapes from this area and the interacting body, respectively. [param body_rid] contains the [RID] of the body. These values can be used with the [PhysicsServer2D]. + [b]Example of getting the[/b] [CollisionShape2D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var body_shape_owner = body.shape_find_owner(body_shape_index) + var body_shape_node = body.shape_owner_get_owner(body_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="body_shape_exited"> @@ -184,11 +191,8 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. - [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param body] exits a shape of this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal body_shape_entered]. </description> </signal> </signals> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index ea8cab324d..8923ac8aae 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -133,15 +133,13 @@ <signal name="area_entered"> <param index="0" name="area" type="Area3D" /> <description> - Emitted when another Area3D enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area3D. + Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_exited"> <param index="0" name="area" type="Area3D" /> <description> - Emitted when another Area3D exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area3D. + Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_shape_entered"> @@ -150,11 +148,18 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. - [param area] the other Area3D. - [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param area_shape_index] contain indices of the interacting shapes from this area and the other area, respectively. [param area_rid] contains the [RID] of the other area. These values can be used with the [PhysicsServer3D]. + [b]Example of getting the[/b] [CollisionShape3D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var other_shape_owner = area.shape_find_owner(area_shape_index) + var other_shape_node = area.shape_owner_get_owner(other_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="area_shape_exited"> @@ -163,25 +168,20 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area3D's [Shape3D]s exits one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. - [param area] the other Area3D. - [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal area_shape_entered]. </description> </signal> <signal name="body_entered"> <param index="0" name="body" type="Node3D" /> <description> - Emitted when a [PhysicsBody3D] or [GridMap] enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + Emitted when the received [param body] enters this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node3D" /> <description> - Emitted when a [PhysicsBody3D] or [GridMap] exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + Emitted when the received [param body] exits this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_shape_entered"> @@ -190,11 +190,18 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. - [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param body] enters a shape of this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param body_shape_index] contain indices of the interacting shapes from this area and the interacting body, respectively. [param body_rid] contains the [RID] of the body. These values can be used with the [PhysicsServer3D]. + [b]Example of getting the[/b] [CollisionShape3D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var body_shape_owner = body.shape_find_owner(body_shape_index) + var body_shape_node = body.shape_owner_get_owner(body_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="body_shape_exited"> @@ -203,11 +210,8 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. - [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param body] exits a shape of this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal body_shape_entered]. </description> </signal> </signals> 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/AudioStreamRandomizer.xml b/doc/classes/AudioStreamRandomizer.xml index 9b58d78af5..d93f853c89 100644 --- a/doc/classes/AudioStreamRandomizer.xml +++ b/doc/classes/AudioStreamRandomizer.xml @@ -12,8 +12,10 @@ <method name="add_stream"> <return type="void" /> <param index="0" name="index" type="int" /> + <param index="1" name="stream" type="AudioStream" /> + <param index="2" name="weight" type="float" default="1.0" /> <description> - Insert a stream at the specified index. + Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool. </description> </method> <method name="get_stream" qualifiers="const"> 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/Button.xml b/doc/classes/Button.xml index d2c9a77486..961f3c495a 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -118,6 +118,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> [Font] of the [Button]'s text. 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..79e65f3472 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -14,7 +14,7 @@ func test(): var callable = Callable(self, "print_args") callable.call("hello", "world") # Prints "hello world ". - callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(Node.gd)::print_args". + callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(node.gd)::print_args". callable.call("invalid") # Invalid call, should have at least 2 arguments. [/gdscript] [csharp] @@ -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/CanvasGroup.xml b/doc/classes/CanvasGroup.xml index d2bcf3c7ac..37827defec 100644 --- a/doc/classes/CanvasGroup.xml +++ b/doc/classes/CanvasGroup.xml @@ -5,16 +5,33 @@ </brief_description> <description> Child [CanvasItem] nodes of a [CanvasGroup] are drawn as a single object. It allows to e.g. draw overlapping translucent 2D nodes without blending (set [member CanvasItem.self_modulate] property of [CanvasGroup] to achieve this effect). + [b]Note:[/b] The [CanvasGroup] uses a custom shader to read from the backbuffer to draw its children. Assigning a [Material] to the [CanvasGroup] overrides the builtin shader. To duplicate the behavior of the builtin shader in a custom [Shader] use the following: + [codeblock] + shader_type canvas_item; + + void fragment() { + vec4 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0); + + if (c.a > 0.0001) { + c.rgb /= c.a; + } + + COLOR *= c; + } + [/codeblock] [b]Note:[/b] Since [CanvasGroup] and [member CanvasItem.clip_children] both utilize the backbuffer, children of a [CanvasGroup] who have their [member CanvasItem.clip_children] set to anything other than [constant CanvasItem.CLIP_CHILDREN_DISABLED] will not function correctly. </description> <tutorials> </tutorials> <members> <member name="clear_margin" type="float" setter="set_clear_margin" getter="get_clear_margin" default="10.0"> + Sets the size of the margin used to expand the clearing rect of this [CanvasGroup]. This expands the area of the backbuffer that will be used by the [CanvasGroup]. A smaller margin will reduce the area of the backbuffer used which can increase performance, however if [member use_mipmaps] is enabled, a small margin may result in mipmap errors at the edge of the [CanvasGroup]. Accordingly, this should be left as small as possible, but should be increased if artifacts appear along the edges of the canvas group. </member> <member name="fit_margin" type="float" setter="set_fit_margin" getter="get_fit_margin" default="10.0"> + Sets the size of a margin used to expand the drawable rect of this [CanvasGroup]. The size of the [CanvasGroup] is determined by fitting a rect around its children then expanding that rect by [member fit_margin]. This increases both the backbuffer area used and the area covered by the [CanvasGroup] both of which can reduce performance. This should be kept as small as possible and should only be expanded when an increased size is needed (e.g. for custom shader effects). </member> <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="is_using_mipmaps" default="false"> + If [code]true[/code], calculates mipmaps for the backbuffer before drawing the [CanvasGroup] so that mipmaps can be used in a custom [ShaderMaterial] attached to the [CanvasGroup]. Generating mipmaps has a performance cost so this should not be enabled unless required. </member> </members> </class> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 499d53e63c..e79bb97a92 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -95,10 +95,12 @@ <param index="0" name="from" type="Vector2" /> <param index="1" name="to" type="Vector2" /> <param index="2" name="color" type="Color" /> - <param index="3" name="width" type="float" default="1.0" /> + <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]. + If [param width] is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. </description> </method> <method name="draw_end_animation"> @@ -129,10 +131,11 @@ <param index="0" name="from" type="Vector2" /> <param index="1" name="to" type="Vector2" /> <param index="2" name="color" type="Color" /> - <param index="3" name="width" type="float" default="1.0" /> + <param index="3" name="width" type="float" default="-1.0" /> <param index="4" name="antialiased" type="bool" default="false" /> <description> Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also [method draw_multiline] and [method draw_polyline]. + If [param width] is negative, then a two-point primitive will be drawn instead of a four-point one. This means that when the CanvasItem is scaled, the line will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. </description> </method> <method name="draw_mesh"> @@ -153,6 +156,7 @@ <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <param index="4" name="outline" type="float" default="0.0" /> <param index="5" name="pixel_range" type="float" default="4.0" /> + <param index="6" name="scale" type="float" default="1.0" /> <description> Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. If [param outline] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [param outline] radius. @@ -163,18 +167,20 @@ <return type="void" /> <param index="0" name="points" type="PackedVector2Array" /> <param index="1" name="color" type="Color" /> - <param index="2" name="width" type="float" default="1.0" /> + <param index="2" name="width" type="float" default="-1.0" /> <description> Draws multiple disconnected lines with a uniform [param color]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead. + If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. </description> </method> <method name="draw_multiline_colors"> <return type="void" /> <param index="0" name="points" type="PackedVector2Array" /> <param index="1" name="colors" type="PackedColorArray" /> - <param index="2" name="width" type="float" default="1.0" /> + <param index="2" name="width" type="float" default="-1.0" /> <description> Draws multiple disconnected lines with a uniform [param width] and segment-by-segment coloring. Colors assigned to line segments match by index between [param points] and [param colors]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead. + If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. </description> </method> <method name="draw_multiline_string" qualifiers="const"> @@ -258,7 +264,6 @@ <param index="1" name="colors" type="PackedColorArray" /> <param index="2" name="uvs" type="PackedVector2Array" /> <param index="3" name="texture" type="Texture2D" default="null" /> - <param index="4" name="width" type="float" default="1.0" /> <description> Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [method draw_line], [method draw_polyline], [method draw_polygon], and [method draw_rect]. </description> @@ -268,10 +273,12 @@ <param index="0" name="rect" type="Rect2" /> <param index="1" name="color" type="Color" /> <param index="2" name="filled" type="bool" default="true" /> - <param index="3" name="width" type="float" default="1.0" /> + <param index="3" name="width" type="float" default="-1.0" /> <description> Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. + If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. [b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code]. + [b]Note:[/b] Unfilled rectangles drawn with a negative [param width] may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent [param color]). </description> </method> <method name="draw_set_transform"> @@ -404,7 +411,7 @@ <method name="get_canvas_transform" qualifiers="const"> <return type="Transform2D" /> <description> - Returns the transform matrix of this item's canvas. + Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s coordinate system. </description> </method> <method name="get_global_mouse_position" qualifiers="const"> @@ -422,7 +429,7 @@ <method name="get_global_transform_with_canvas" qualifiers="const"> <return type="Transform2D" /> <description> - Returns the global transform matrix of this item in relation to the canvas. + Returns the transform from the local coordinate system of this [CanvasItem] to the [Viewport]s coordinate system. </description> </method> <method name="get_local_mouse_position" qualifiers="const"> @@ -453,7 +460,7 @@ <method name="get_viewport_transform" qualifiers="const"> <return type="Transform2D" /> <description> - Returns this item's transform in relation to the viewport. + Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s embedders coordinate system. </description> </method> <method name="get_visibility_layer_bit" qualifiers="const"> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 7c1b19b961..ce999c06d3 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -19,6 +19,12 @@ Returns the RID of the canvas used by this layer. </description> </method> + <method name="get_final_transform" qualifiers="const"> + <return type="Transform2D" /> + <description> + Returns the transform from the [CanvasLayer]s coordinate system to the [Viewport]s coordinate system. + </description> + </method> <method name="hide"> <return type="void" /> <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/CheckBox.xml b/doc/classes/CheckBox.xml index 699e872e99..3ee18cf351 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -43,6 +43,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> The [Font] to use for the [CheckBox] text. diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index dfbaa7cbee..03578cafd0 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -43,6 +43,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> The [Font] to use for the [CheckButton] text. diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index e7ef5fb289..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="[]"> @@ -651,6 +651,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> Sets the default [Font]. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 4d78433915..d1387d088d 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -205,11 +205,18 @@ <description> Returns the [Color] associated with the provided [param hex] integer in 32-bit ARGB format (8 bits per channel, alpha channel first). In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix). - [codeblock] + [codeblocks] + [gdscript] var red = Color.hex(0xffff0000) var dark_cyan = Color.hex(0xff008b8b) var my_color = Color.hex(0xa4bbefd2) - [/codeblock] + [/gdscript] + [csharp] + var red = new Color(0xffff0000); + var dark_cyan = new Color(0xff008b8b); + var my_color = new Color(0xa4bbefd2); + [/csharp] + [/codeblocks] </description> </method> <method name="hex64" qualifiers="static"> @@ -234,9 +241,9 @@ var col = Color.html("663399cc") # col is Color(0.4, 0.2, 0.6, 0.8) [/gdscript] [csharp] - var blue = new Color("#0000ff"); // blue is Color(0.0, 0.0, 1.0, 1.0) - var green = new Color("#0F0"); // green is Color(0.0, 1.0, 0.0, 1.0) - var col = new Color("663399cc"); // col is Color(0.4, 0.2, 0.6, 0.8) + var blue = Color.FromHtml("#0000ff"); // blue is Color(0.0, 0.0, 1.0, 1.0) + var green = Color.FromHtml("#0F0"); // green is Color(0.0, 1.0, 0.0, 1.0) + var col = Color.FromHtml("663399cc"); // col is Color(0.4, 0.2, 0.6, 0.8) [/csharp] [/codeblocks] </description> @@ -257,14 +264,13 @@ Color.html_is_valid("#55aaFF5") # Returns false [/gdscript] [csharp] - // This method is not available in C#. Use `StringExtensions.IsValidHtmlColor()`, instead. - "#55AAFF".IsValidHtmlColor(); // Returns true - "#55AAFF20".IsValidHtmlColor(); // Returns true - "55AAFF".IsValidHtmlColor(); // Returns true - "#F2C".IsValidHtmlColor(); // Returns true + Color.IsHtmlValid("#55AAFF"); // Returns true + Color.IsHtmlValid("#55AAFF20"); // Returns true + Color.IsHtmlValid("55AAFF"); // Returns true + Color.IsHtmlValid("#F2C"); // Returns true - "#AABBC".IsValidHtmlColor(); // Returns false - "#55aaFF5".IsValidHtmlColor(); // Returns false + Color.IsHtmlValid("#AABBC"); // Returns false + Color.IsHtmlValid("#55aaFF5"); // Returns false [/csharp] [/codeblocks] </description> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 2b287d7546..823433c2df 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ColorPicker" inherits="BoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="ColorPicker" inherits="VBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Color picker control. </brief_description> @@ -88,7 +88,6 @@ <member name="sliders_visible" type="bool" setter="set_sliders_visible" getter="are_sliders_visible" default="true"> If [code]true[/code], the color sliders are visible. </member> - <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" overrides="BoxContainer" default="true" /> </members> <signals> <signal name="color_changed"> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index b7a0bdfb0c..2a37cc162a 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -79,6 +79,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> [Font] of the [ColorPickerButton]'s text. diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index fd6aab6a49..75afb0cdbf 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -180,14 +180,14 @@ [codeblocks] [gdscript] func _make_custom_tooltip(for_text): - var tooltip = preload("res://SomeTooltipScene.tscn").instantiate() + var tooltip = preload("res://some_tooltip_scene.tscn").instantiate() tooltip.get_node("Label").text = for_text return tooltip [/gdscript] [csharp] public override Godot.Control _MakeCustomTooltip(String forText) { - Node tooltip = ResourceLoader.Load<PackedScene>("res://SomeTooltipScene.tscn").Instantiate(); + Node tooltip = ResourceLoader.Load<PackedScene>("res://some_tooltip_scene.tscn").Instantiate(); tooltip.GetNode<Label>("Label").Text = forText; return tooltip; } @@ -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"> @@ -1050,6 +996,9 @@ <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> The node's rotation around its pivot, in radians. See [member pivot_offset] to change the pivot's position. </member> + <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> + Helper property to access [member rotation] in degrees instead of radians. + </member> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale, relative to its [member size]. Change this property to scale the node around its [member pivot_offset]. The Control's [member tooltip_text] will also scale according to this value. [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. @@ -1061,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"> @@ -1312,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/Curve3D.xml b/doc/classes/Curve3D.xml index cfe2036499..362d792b39 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -138,7 +138,7 @@ <param index="1" name="cubic" type="bool" default="false" /> <param index="2" name="apply_tilt" type="bool" default="false" /> <description> - Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to caculate the rotation, all vectors aligned with global space axes. + Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. </description> </method> <method name="samplef" qualifiers="const"> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 9af8be99ef..457513b8aa 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -8,7 +8,7 @@ Below a small example of how to use it: [codeblocks] [gdscript] - # ServerNode.gd + # server_node.gd extends Node var dtls := DTLSServer.new() @@ -86,7 +86,7 @@ [/codeblocks] [codeblocks] [gdscript] - # ClientNode.gd + # client_node.gd extends Node var dtls := PacketPeerDTLS.new() diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 92225b816f..5f99ba82b8 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -135,7 +135,7 @@ [/csharp] [/codeblocks] [b]Note:[/b] Erasing elements while iterating over dictionaries is [b]not[/b] supported and will result in unpredictable behavior. - [b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary becomes read-only. A read-only Dictionary's entries cannot be overriden at run-time. This does [i]not[/i] affect nested [Array] and [Dictionary] values. + [b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary becomes read-only. A read-only Dictionary's entries cannot be overridden at run-time. This does [i]not[/i] affect nested [Array] and [Dictionary] values. </description> <tutorials> <link title="GDScript basics: Dictionary">$DOCS_URL/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 29135376c5..1dc4dd3ff0 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> @@ -1678,7 +1694,10 @@ Use [method window_get_safe_title_margins] to determine area under the title bar that is not covered by decorations. [b]Note:[/b] This flag is implemented on macOS. </constant> - <constant name="WINDOW_FLAG_MAX" value="7" enum="WindowFlags"> + <constant name="WINDOW_FLAG_MOUSE_PASSTHROUGH" value="7" enum="WindowFlags"> + All mouse event as passed to the underlying window of the same application. + </constant> + <constant name="WINDOW_FLAG_MAX" value="8" enum="WindowFlags"> Max value of the [enum WindowFlags]. </constant> <constant name="WINDOW_EVENT_MOUSE_ENTER" value="0" enum="WindowEvent"> 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/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index e8df6ae7fe..cddf3662aa 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -96,6 +96,11 @@ Emitted if at least one resource is reloaded when the filesystem is scanned. </description> </signal> + <signal name="script_classes_updated"> + <description> + Emitted when the list of global script classes gets updated. + </description> + </signal> <signal name="sources_changed"> <param index="0" name="exist" type="bool" /> <description> 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 865faa13ae..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]. @@ -628,6 +628,9 @@ <member name="network/tls/editor_tls_certificates" type="String" setter="" getter=""> The TLS certificate bundle to use for HTTP requests made within the editor (e.g. from the AssetLib tab). If left empty, the [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]included Mozilla certificate bundle[/url] will be used. </member> + <member name="project_manager/default_renderer" type="String" setter="" getter=""> + The renderer type that will be checked off by default when creating a new project. Accepted strings are "forward_plus", "mobile" or "gl_compatibility". + </member> <member name="project_manager/sorting_order" type="int" setter="" getter=""> The sorting order to use in the project manager. When changing the sorting order in the project manager, this setting is set permanently in the editor settings. </member> @@ -738,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. @@ -779,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/EditorUndoRedoManager.xml b/doc/classes/EditorUndoRedoManager.xml index 133ee9db0d..4d6938e6aa 100644 --- a/doc/classes/EditorUndoRedoManager.xml +++ b/doc/classes/EditorUndoRedoManager.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorUndoRedoManager" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="EditorUndoRedoManager" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Manages undo history of scenes opened in the editor. </brief_description> @@ -123,6 +123,9 @@ <constant name="GLOBAL_HISTORY" value="0" enum="SpecialHistory"> Global history not associated with any scene, but with external resources etc. </constant> + <constant name="REMOTE_HISTORY" value="-9" enum="SpecialHistory"> + History associated with remote inspector. Used when live editing a running project. + </constant> <constant name="INVALID_HISTORY" value="-99" enum="SpecialHistory"> Invalid "null" history. It's a special value, not associated with any object. </constant> diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml index b766978c04..85c10fefd9 100644 --- a/doc/classes/EditorVCSInterface.xml +++ b/doc/classes/EditorVCSInterface.xml @@ -53,7 +53,7 @@ </description> </method> <method name="_get_branch_list" qualifiers="virtual"> - <return type="Dictionary[]" /> + <return type="String[]" /> <description> Gets an instance of an [Array] of [String]s containing available branch names in the VCS. </description> @@ -94,7 +94,7 @@ </description> </method> <method name="_get_remotes" qualifiers="virtual"> - <return type="Dictionary[]" /> + <return type="String[]" /> <description> Returns an [Array] of [String]s, each containing the name of a remote configured in the VCS. </description> diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml index 1019c271dc..69a7627774 100644 --- a/doc/classes/FontFile.xml +++ b/doc/classes/FontFile.xml @@ -570,7 +570,7 @@ Weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code]. </member> <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false"> - If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. + If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only (MSDF fonts don't support hinting). </member> <member name="generate_mipmaps" type="bool" setter="set_generate_mipmaps" getter="get_generate_mipmaps" default="false"> If set to [code]true[/code], generate mipmaps for the font textures. @@ -579,25 +579,27 @@ Font hinting mode. Used by dynamic fonts only. </member> <member name="msdf_pixel_range" type="int" setter="set_msdf_pixel_range" getter="get_msdf_pixel_range" default="16"> - The width of the range around the shape between the minimum and maximum representable signed distance. + The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, [member msdf_pixel_range] must be set to at least [i]twice[/i] the size of the largest font outline. The default [member msdf_pixel_range] value of [code]16[/code] allows outline sizes up to [code]8[/code] to look correct. </member> <member name="msdf_size" type="int" setter="set_msdf_size" getter="get_msdf_size" default="48"> - Source font size used to generate MSDF textures. + Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. </member> <member name="multichannel_signed_distance_field" type="bool" setter="set_multichannel_signed_distance_field" getter="is_multichannel_signed_distance_field" default="false"> - If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for [Control]s that are scaled down (or for [Label3D]s viewed from a long distance). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. + [b]Note:[/b] If using font outlines, [member msdf_pixel_range] must be set to at least [i]twice[/i] the size of the largest font outline. + [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts. </member> <member name="opentype_feature_overrides" type="Dictionary" setter="set_opentype_feature_overrides" getter="get_opentype_feature_overrides" default="{}"> Font OpenType feature set override. </member> <member name="oversampling" type="float" setter="set_oversampling" getter="get_oversampling" default="0.0"> - Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + Font oversampling factor. If set to [code]0.0[/code], the global oversampling factor is used instead. Used by dynamic fonts only (MSDF fonts ignore oversampling). </member> <member name="style_name" type="String" setter="set_font_style_name" getter="get_font_style_name" default=""""> Font style name. </member> <member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1"> - Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. + Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of higher memory usage and lower font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. </member> </members> </class> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 90a983d28b..127c5daf95 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -16,19 +16,15 @@ Get the value of a shader parameter as set on this instance. </description> </method> - <method name="set_custom_aabb"> - <return type="void" /> - <param index="0" name="aabb" type="AABB" /> - <description> - Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero. - </description> - </method> <method name="set_instance_shader_parameter"> <return type="void" /> <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> @@ -36,6 +32,9 @@ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting" default="1"> The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values. </member> + <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB(0, 0, 0, 0, 0, 0)"> + Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive [AABB] recalculation that happens when a skeleton is used with a [MeshInstance3D] or to have fine control over the [MeshInstance3D]'s bounding box. To remove this, set value to an [AABB] with all fields set to zero. + </member> <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0"> The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box. </member> 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 be66b8a7b9..051e087611 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -76,8 +76,12 @@ <param index="0" name="mode" type="int" enum="Image.CompressMode" /> <param index="1" name="source" type="int" enum="Image.CompressSource" default="0" /> <param index="2" name="lossy_quality" type="float" default="0.7" /> + <param index="3" name="astc_format" type="int" enum="Image.ASTCFormat" default="0" /> <description> - Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants. + Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. + The [param mode] parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. + The [param lossy_quality] parameter is optional for compressors that support it. + For ASTC compression, the [param astc_format] parameter must be supplied. </description> </method> <method name="compress_from_channels"> @@ -85,7 +89,12 @@ <param index="0" name="mode" type="int" enum="Image.CompressMode" /> <param index="1" name="channels" type="int" enum="Image.UsedChannels" /> <param index="2" name="lossy_quality" type="float" default="0.7" /> + <param index="3" name="astc_format" type="int" enum="Image.ASTCFormat" default="0" /> <description> + Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. + This is an alternative to [method compress] that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored. + The [param lossy_quality] parameter is optional for compressors that support it. + For ASTC compression, the [param astc_format] parameter must be supplied. </description> </method> <method name="compute_image_metrics"> @@ -480,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; @@ -508,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; @@ -658,7 +667,19 @@ </constant> <constant name="FORMAT_DXT5_RA_AS_RG" value="34" enum="Format"> </constant> - <constant name="FORMAT_MAX" value="35" enum="Format"> + <constant name="FORMAT_ASTC_4x4" value="35" enum="Format"> + [url=https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression]Adaptive Scalable Texutre Compression[/url]. This implements the 4x4 (high quality) mode. + </constant> + <constant name="FORMAT_ASTC_4x4_HDR" value="36" enum="Format"> + Same format as [constant FORMAT_ASTC_4x4], but with the hint to let the GPU know it is used for HDR. + </constant> + <constant name="FORMAT_ASTC_8x8" value="37" enum="Format"> + [url=https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression]Adaptive Scalable Texutre Compression[/url]. This implements the 8x8 (low quality) mode. + </constant> + <constant name="FORMAT_ASTC_8x8_HDR" value="38" enum="Format"> + Same format as [constant FORMAT_ASTC_8x8], but with the hint to let the GPU know it is used for HDR. + </constant> + <constant name="FORMAT_MAX" value="39" enum="Format"> Represents the size of the [enum Format] enum. </constant> <constant name="INTERPOLATE_NEAREST" value="0" enum="Interpolation"> @@ -722,5 +743,11 @@ <constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource"> Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). </constant> + <constant name="ASTC_FORMAT_4x4" value="0" enum="ASTCFormat"> + Hint to indicate that the high quality 4x4 ASTC compression format should be used. + </constant> + <constant name="ASTC_FORMAT_8x8" value="1" enum="ASTCFormat"> + Hint to indicate that the low quality 8x8 ASTC compression format should be used. + </constant> </constants> </class> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index d246e64251..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> @@ -339,7 +339,7 @@ <param index="2" name="strong_magnitude" type="float" /> <param index="3" name="duration" type="float" default="0" /> <description> - Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). + Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling [method stop_joy_vibration]. [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. </description> </method> @@ -347,18 +347,18 @@ <return type="void" /> <param index="0" name="device" type="int" /> <description> - Stops the vibration of the joypad. + Stops the vibration of the joypad started with [method start_joy_vibration]. </description> </method> <method name="vibrate_handheld"> <return type="void" /> <param index="0" name="duration_ms" type="int" default="500" /> <description> - Vibrate handheld devices. - [b]Note:[/b] This method is implemented on Android, iOS, and Web. - [b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] permission in the export preset. - [b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and later. - [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support this method. + Vibrate the handheld device for the specified duration in milliseconds. + [b]Note:[/b] This method is implemented on Android, iOS, and Web. It has no effect on other platforms. + [b]Note:[/b] For Android, [method vibrate_handheld] requires enabling the [code]VIBRATE[/code] permission in the export preset. Otherwise, [method vibrate_handheld] will have no effect. + [b]Note:[/b] For iOS, specifying the duration is only supported in iOS 13 and later. + [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support [method vibrate_handheld]. </description> </method> <method name="warp_mouse"> @@ -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/ItemList.xml b/doc/classes/ItemList.xml index 844f260971..c485d26e0c 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -459,6 +459,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the item text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="v_separation" data_type="constant" type="int" default="2"> The vertical spacing between items. 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 cd87b4558f..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> @@ -111,6 +111,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> Text outline size. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1"> The horizontal offset of the text's shadow. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index e57cc68b36..b8383aaed9 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -424,6 +424,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> Font used for the text. diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index d7701ea184..b3938999f3 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -28,7 +28,23 @@ Base text writing direction. </member> <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode" default="0"> - Determines when to show the underline. See [enum UnderlineMode] for options. + The underline mode to use for the text. See [enum LinkButton.UnderlineMode] for the available modes. + </member> + <member name="uri" type="String" setter="set_uri" getter="get_uri" default=""""> + The [url=https://en.wikipedia.org/wiki/Uniform_Resource_Identifier]URI[/url] for this [LinkButton]. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via [method OS.shell_open]). HTTP and HTTPS URLs open the default web browser. + [b]Examples:[/b] + [codeblocks] + [gdscript] + uri = "https://godotengine.org" # Opens the URL in the default web browser. + uri = "C:\SomeFolder" # Opens the file explorer at the given path. + uri = "C:\SomeImage.png" # Opens the given image in the default viewing app. + [/gdscript] + [csharp] + Uri = "https://godotengine.org"; // Opens the URL in the default web browser. + Uri = "C:\SomeFolder"; // Opens the file explorer at the given path. + Uri = "C:\SomeImage.png"; // Opens the given image in the default viewing app. + [/csharp] + [/codeblocks] </member> </members> <constants> @@ -60,6 +76,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="underline_spacing" data_type="constant" type="int" default="2"> The vertical space between the baseline of text and the underline. diff --git a/doc/classes/MenuBar.xml b/doc/classes/MenuBar.xml index e8505937ff..79876e56a3 100644 --- a/doc/classes/MenuBar.xml +++ b/doc/classes/MenuBar.xml @@ -143,6 +143,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> [Font] of the menu item's text. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 4d5d5a011b..3061149570 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -75,6 +75,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> [Font] of the [MenuButton]'s text. 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/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index 85e57dd0f3..7c93ba5dce 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -59,14 +59,21 @@ Returns the item's name. </description> </method> - <method name="get_item_navmesh" qualifiers="const"> + <method name="get_item_navigation_layers" qualifiers="const"> + <return type="int" /> + <param index="0" name="id" type="int" /> + <description> + Returns the item's navigation layers bitmask. + </description> + </method> + <method name="get_item_navigation_mesh" qualifiers="const"> <return type="NavigationMesh" /> <param index="0" name="id" type="int" /> <description> Returns the item's navigation mesh. </description> </method> - <method name="get_item_navmesh_transform" qualifiers="const"> + <method name="get_item_navigation_mesh_transform" qualifiers="const"> <return type="Transform3D" /> <param index="0" name="id" type="int" /> <description> @@ -126,18 +133,26 @@ This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name]. </description> </method> - <method name="set_item_navmesh"> + <method name="set_item_navigation_layers"> + <return type="void" /> + <param index="0" name="id" type="int" /> + <param index="1" name="navigation_layers" type="int" /> + <description> + Sets the item's navigation layers bitmask. + </description> + </method> + <method name="set_item_navigation_mesh"> <return type="void" /> <param index="0" name="id" type="int" /> - <param index="1" name="navmesh" type="NavigationMesh" /> + <param index="1" name="navigation_mesh" type="NavigationMesh" /> <description> Sets the item's navigation mesh. </description> </method> - <method name="set_item_navmesh_transform"> + <method name="set_item_navigation_mesh_transform"> <return type="void" /> <param index="0" name="id" type="int" /> - <param index="1" name="navmesh" type="Transform3D" /> + <param index="1" name="navigation_mesh" type="Transform3D" /> <description> Sets the transform to apply to the item's navigation mesh. </description> 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 8cf7824ff7..b561748b30 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationAgent2D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationAgent2D" inherits="Node" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> 2D Agent used in navigation for collision avoidance. </brief_description> @@ -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"> @@ -16,24 +17,30 @@ Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate. </description> </method> - <method name="get_final_location"> - <return type="Vector2" /> - <description> - Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. - </description> - </method> - <method name="get_nav_path" qualifiers="const"> + <method name="get_current_navigation_path" qualifiers="const"> <return type="PackedVector2Array" /> <description> Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. </description> </method> - <method name="get_nav_path_index" qualifiers="const"> + <method name="get_current_navigation_path_index" qualifiers="const"> <return type="int" /> <description> Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. </description> </method> + <method name="get_current_navigation_result" qualifiers="const"> + <return type="NavigationPathQueryResult2D" /> + <description> + Returns the path query result for the path the agent is currently following. + </description> + </method> + <method name="get_final_location"> + <return type="Vector2" /> + <description> + Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. + </description> + </method> <method name="get_navigation_layer_value" qualifiers="const"> <return type="bool" /> <param index="0" name="layer_number" type="int" /> @@ -107,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"> @@ -116,27 +123,41 @@ <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"> + Additional information to return with the navigation path. + </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> 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> <signals> + <signal name="link_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a navigation link has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The start location of the link that was reached. + - [code]type[/code]: Always [constant NavigationPathQueryResult2D.PATH_SEGMENT_TYPE_LINK]. + - [code]rid[/code]: The [RID] of the link. + - [code]owner[/code]: The object which manages the link (usually [NavigationLink2D]). + </description> + </signal> <signal name="navigation_finished"> <description> Notifies when the final location is reached. @@ -158,5 +179,16 @@ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true. </description> </signal> + <signal name="waypoint_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a waypoint along the path has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The location of the waypoint that was reached. + - [code]type[/code]: The type of navigation primitive (region or link) that contains this waypoint. + - [code]rid[/code]: The [RID] of the containing navigation primitive (region or link). + - [code]owner[/code]: The object which manages the containing navigation primitive (region or link). + </description> + </signal> </signals> </class> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index 44c17647f7..a1b007ee56 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationAgent3D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationAgent3D" inherits="Node" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> 3D Agent used in navigation for collision avoidance. </brief_description> @@ -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"> @@ -16,24 +17,30 @@ Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate. </description> </method> - <method name="get_final_location"> - <return type="Vector3" /> - <description> - Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. - </description> - </method> - <method name="get_nav_path" qualifiers="const"> + <method name="get_current_navigation_path" qualifiers="const"> <return type="PackedVector3Array" /> <description> Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. </description> </method> - <method name="get_nav_path_index" qualifiers="const"> + <method name="get_current_navigation_path_index" qualifiers="const"> <return type="int" /> <description> Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. </description> </method> + <method name="get_current_navigation_result" qualifiers="const"> + <return type="NavigationPathQueryResult3D" /> + <description> + Returns the path query result for the path the agent is currently following. + </description> + </method> + <method name="get_final_location"> + <return type="Vector3" /> + <description> + Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. + </description> + </method> <method name="get_navigation_layer_value" qualifiers="const"> <return type="bool" /> <param index="0" name="layer_number" type="int" /> @@ -128,6 +135,9 @@ <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. </member> + <member name="path_metadata_flags" type="int" setter="set_path_metadata_flags" getter="get_path_metadata_flags" enum="NavigationPathQueryParameters3D.PathMetadataFlags" default="7"> + Additional information to return with the navigation path. + </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> 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. @@ -143,6 +153,17 @@ </member> </members> <signals> + <signal name="link_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a navigation link has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The start location of the link that was reached. + - [code]type[/code]: Always [constant NavigationPathQueryResult3D.PATH_SEGMENT_TYPE_LINK]. + - [code]rid[/code]: The [RID] of the link. + - [code]owner[/code]: The object which manages the link (usually [NavigationLink3D]). + </description> + </signal> <signal name="navigation_finished"> <description> Notifies when the final location is reached. @@ -164,5 +185,16 @@ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true. </description> </signal> + <signal name="waypoint_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a waypoint along the path has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The location of the waypoint that was reached. + - [code]type[/code]: The type of navigation primitive (region or link) that contains this waypoint. + - [code]rid[/code]: The [RID] of the containing navigation primitive (region or link). + - [code]owner[/code]: The object which manages the containing navigation primitive (region or link). + </description> + </signal> </signals> </class> diff --git a/doc/classes/NavigationLink2D.xml b/doc/classes/NavigationLink2D.xml index 1e086fb730..44d2110a7c 100644 --- a/doc/classes/NavigationLink2D.xml +++ b/doc/classes/NavigationLink2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationLink2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationLink2D" inherits="Node2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Creates a link between two locations that [NavigationServer2D] can route agents through. </brief_description> @@ -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"> @@ -38,7 +39,7 @@ The distance the link will search is controlled by [method NavigationServer2D.map_set_link_connection_radius]. </member> <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> - When pathfinding enters this link from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + When pathfinding enters this link from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer2D.map_get_path]. diff --git a/doc/classes/NavigationLink3D.xml b/doc/classes/NavigationLink3D.xml index 4d5d81bec5..4aa5801afb 100644 --- a/doc/classes/NavigationLink3D.xml +++ b/doc/classes/NavigationLink3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationLink3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationLink3D" inherits="Node3D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Creates a link between two locations that [NavigationServer3D] can route agents through. </brief_description> @@ -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"> @@ -38,7 +39,7 @@ The distance the link will search is controlled by [method NavigationServer3D.map_set_link_connection_radius]. </member> <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> - When pathfinding enters this link from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + When pathfinding enters this link from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer3D.map_get_path]. diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index c86bc47e04..85af44a13e 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationMesh" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationMesh" inherits="Resource" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> A mesh to approximate the walkable areas and obstacles. </brief_description> @@ -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"> @@ -133,13 +134,10 @@ <member name="geometry_source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0"> The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values. </member> - <member name="geometry_source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name" default="&"navmesh""> + <member name="geometry_source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name" default="&"navigation_mesh_source_group""> The name of the group to scan for geometry. Only used when [member geometry_source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT]. </member> - <member name="polygon_verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> - The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. - </member> <member name="region_merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> Any regions with a size smaller than this will be merged with larger regions if possible. [b]Note:[/b] This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400. @@ -151,6 +149,9 @@ <member name="sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0"> Partitioning algorithm for creating the navigation mesh polys. See [enum SamplePartitionType] for possible values. </member> + <member name="vertices_per_polygon" type="float" setter="set_vertices_per_polygon" getter="get_vertices_per_polygon" default="6.0"> + The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. + </member> </members> <constants> <constant name="SAMPLE_PARTITION_WATERSHED" value="0" enum="SamplePartitionType"> @@ -177,8 +178,8 @@ <constant name="PARSED_GEOMETRY_MAX" value="3" enum="ParsedGeometryType"> Represents the size of the [enum ParsedGeometryType] enum. </constant> - <constant name="SOURCE_GEOMETRY_NAVMESH_CHILDREN" value="0" enum="SourceGeometryMode"> - Scans the child nodes of [NavigationRegion3D] recursively for geometry. + <constant name="SOURCE_GEOMETRY_ROOT_NODE_CHILDREN" value="0" enum="SourceGeometryMode"> + Scans the child nodes of the root node recursively for geometry. </constant> <constant name="SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN" value="1" enum="SourceGeometryMode"> Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name]. diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 4c337db90f..0d4c083eb0 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationMeshGenerator" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationMeshGenerator" inherits="Object" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Helper class for creating and clearing navigation meshes. </brief_description> @@ -11,21 +11,22 @@ [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"> <return type="void" /> - <param index="0" name="nav_mesh" type="NavigationMesh" /> + <param index="0" name="navigation_mesh" type="NavigationMesh" /> <param index="1" name="root_node" type="Node" /> <description> - Bakes navigation data to the provided [param nav_mesh] by parsing child nodes under the provided [param root_node] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry_parsed_geometry_type] and [member NavigationMesh.geometry_source_geometry_mode] properties on the [NavigationMesh] resource. + Bakes navigation data to the provided [param navigation_mesh] by parsing child nodes under the provided [param root_node] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry_parsed_geometry_type] and [member NavigationMesh.geometry_source_geometry_mode] properties on the [NavigationMesh] resource. </description> </method> <method name="clear"> <return type="void" /> - <param index="0" name="nav_mesh" type="NavigationMesh" /> + <param index="0" name="navigation_mesh" type="NavigationMesh" /> <description> - Removes all polygons and vertices from the provided [param nav_mesh] resource. + Removes all polygons and vertices from the provided [param navigation_mesh] resource. </description> </method> </methods> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index 68d9691ccf..7d391bfa99 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationObstacle2D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationObstacle2D" inherits="Node" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> 2D Obstacle used in navigation for collision avoidance. </brief_description> @@ -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 90eb55887f..ce24d2bb0e 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationObstacle3D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationObstacle3D" inherits="Node" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> 3D Obstacle used in navigation for collision avoidance. </brief_description> @@ -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 397ca8b713..05d7e9f918 100644 --- a/doc/classes/NavigationPathQueryParameters2D.xml +++ b/doc/classes/NavigationPathQueryParameters2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPathQueryParameters2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationPathQueryParameters2D" inherits="RefCounted" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Parameters to be sent to a 2D navigation path query. </brief_description> @@ -7,11 +7,15 @@ 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"> The navigation [code]map[/code] [RID] used in the path query. </member> + <member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" enum="NavigationPathQueryParameters2D.PathMetadataFlags" default="7"> + Additional information to include with the navigation path. + </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> The navigation layers the query will use (as a bitmask). </member> @@ -33,10 +37,25 @@ The path query uses the default A* pathfinding algorithm. </constant> <constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing"> - Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. </constant> <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing"> - Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + </constant> + <constant name="PATH_METADATA_INCLUDE_NONE" value="0" enum="PathMetadataFlags" is_bitfield="true"> + Don't include any additional metadata about the returned path. + </constant> + <constant name="PATH_METADATA_INCLUDE_TYPES" value="1" enum="PathMetadataFlags" is_bitfield="true"> + Include the type of navigation primitive (region or link) that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_RIDS" value="2" enum="PathMetadataFlags" is_bitfield="true"> + Include the [RID]s of the regions and links that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_OWNERS" value="4" enum="PathMetadataFlags" is_bitfield="true"> + Include the [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_ALL" value="7" enum="PathMetadataFlags" is_bitfield="true"> + Include all available metadata about the returned path. </constant> </constants> </class> diff --git a/doc/classes/NavigationPathQueryParameters3D.xml b/doc/classes/NavigationPathQueryParameters3D.xml index 29faa5561b..690d74ab70 100644 --- a/doc/classes/NavigationPathQueryParameters3D.xml +++ b/doc/classes/NavigationPathQueryParameters3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPathQueryParameters3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationPathQueryParameters3D" inherits="RefCounted" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Parameters to be sent to a 3D navigation path query. </brief_description> @@ -7,11 +7,15 @@ 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"> The navigation [code]map[/code] [RID] used in the path query. </member> + <member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" enum="NavigationPathQueryParameters3D.PathMetadataFlags" default="7"> + Additional information to include with the navigation path. + </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> The navigation layers the query will use (as a bitmask). </member> @@ -33,10 +37,25 @@ The path query uses the default A* pathfinding algorithm. </constant> <constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing"> - Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. </constant> <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing"> - Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + </constant> + <constant name="PATH_METADATA_INCLUDE_NONE" value="0" enum="PathMetadataFlags" is_bitfield="true"> + Don't include any additional metadata about the returned path. + </constant> + <constant name="PATH_METADATA_INCLUDE_TYPES" value="1" enum="PathMetadataFlags" is_bitfield="true"> + Include the type of navigation primitive (region or link) that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_RIDS" value="2" enum="PathMetadataFlags" is_bitfield="true"> + Include the [RID]s of the regions and links that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_OWNERS" value="4" enum="PathMetadataFlags" is_bitfield="true"> + Include the [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_ALL" value="7" enum="PathMetadataFlags" is_bitfield="true"> + Include all available metadata about the returned path. </constant> </constants> </class> diff --git a/doc/classes/NavigationPathQueryResult2D.xml b/doc/classes/NavigationPathQueryResult2D.xml index 95b90e9383..7bc588619d 100644 --- a/doc/classes/NavigationPathQueryResult2D.xml +++ b/doc/classes/NavigationPathQueryResult2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPathQueryResult2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationPathQueryResult2D" inherits="RefCounted" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Result from a [NavigationPathQueryParameters2D] navigation path query. </brief_description> @@ -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"> @@ -20,5 +21,22 @@ <member name="path" type="PackedVector2Array" setter="set_path" getter="get_path" default="PackedVector2Array()"> The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer2D.map_get_path]. </member> + <member name="path_owner_ids" type="PackedInt64Array" setter="set_path_owner_ids" getter="get_path_owner_ids" default="PackedInt64Array()"> + The [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </member> + <member name="path_rids" type="RID[]" setter="set_path_rids" getter="get_path_rids" default="[]"> + The [RID]s of the regions and links that each point of the path goes through. + </member> + <member name="path_types" type="PackedInt32Array" setter="set_path_types" getter="get_path_types" default="PackedInt32Array()"> + The type of navigation primitive (region or link) that each point of the path goes through. + </member> </members> + <constants> + <constant name="PATH_SEGMENT_TYPE_REGION" value="0" enum="PathSegmentType"> + This segment of the path goes through a region. + </constant> + <constant name="PATH_SEGMENT_TYPE_LINK" value="1" enum="PathSegmentType"> + This segment of the path goes through a link. + </constant> + </constants> </class> diff --git a/doc/classes/NavigationPathQueryResult3D.xml b/doc/classes/NavigationPathQueryResult3D.xml index b4ca8288db..118a597b6c 100644 --- a/doc/classes/NavigationPathQueryResult3D.xml +++ b/doc/classes/NavigationPathQueryResult3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPathQueryResult3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationPathQueryResult3D" inherits="RefCounted" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Result from a [NavigationPathQueryParameters3D] navigation path query. </brief_description> @@ -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"> @@ -20,5 +21,22 @@ <member name="path" type="PackedVector3Array" setter="set_path" getter="get_path" default="PackedVector3Array()"> The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer3D.map_get_path]. </member> + <member name="path_owner_ids" type="PackedInt64Array" setter="set_path_owner_ids" getter="get_path_owner_ids" default="PackedInt64Array()"> + The [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </member> + <member name="path_rids" type="RID[]" setter="set_path_rids" getter="get_path_rids" default="[]"> + The [RID]s of the regions and links that each point of the path goes through. + </member> + <member name="path_types" type="PackedInt32Array" setter="set_path_types" getter="get_path_types" default="PackedInt32Array()"> + The type of navigation primitive (region or link) that each point of the path goes through. + </member> </members> + <constants> + <constant name="PATH_SEGMENT_TYPE_REGION" value="0" enum="PathSegmentType"> + This segment of the path goes through a region. + </constant> + <constant name="PATH_SEGMENT_TYPE_LINK" value="1" enum="PathSegmentType"> + This segment of the path goes through a link. + </constant> + </constants> </class> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index 19466c171f..c223f88d6d 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPolygon" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationPolygon" inherits="Resource" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> A node that has methods to draw outlines or use indices of vertices to create navigation polygons. </brief_description> @@ -12,14 +12,14 @@ var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.add_outline(outline) polygon.make_polygons_from_outlines() - $NavigationRegion2D.navpoly = polygon + $NavigationRegion2D.navigation_polygon = polygon [/gdscript] [csharp] var polygon = new NavigationPolygon(); var outline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; polygon.AddOutline(outline); polygon.MakePolygonsFromOutlines(); - GetNode<NavigationRegion2D>("NavigationRegion2D").Navpoly = polygon; + GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = polygon; [/csharp] [/codeblocks] Using [method add_polygon] and indices of the vertices array. @@ -30,7 +30,7 @@ polygon.vertices = vertices var indices = PackedInt32Array([0, 1, 2, 3]) polygon.add_polygon(indices) - $NavigationRegion2D.navpoly = polygon + $NavigationRegion2D.navigation_polygon = polygon [/gdscript] [csharp] var polygon = new NavigationPolygon(); @@ -38,12 +38,13 @@ polygon.Vertices = vertices; var indices = new int[] { 0, 1, 2, 3 }; polygon.AddPolygon(indices); - GetNode<NavigationRegion2D>("NavigationRegion2D").Navpoly = polygon; + GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = polygon; [/csharp] [/codeblocks] </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"> @@ -80,10 +81,10 @@ Clears the array of polygons, but it doesn't clear the array of outlines and vertices. </description> </method> - <method name="get_mesh"> + <method name="get_navigation_mesh"> <return type="NavigationMesh" /> <description> - Returns the [NavigationMesh] resulting from this navigation polygon. This navmesh can be used to update the navmesh of a region with the [method NavigationServer3D.region_set_navmesh] API directly (as 2D uses the 3D server behind the scene). + Returns the [NavigationMesh] resulting from this navigation polygon. This navigation mesh can be used to update the navigation mesh of a region with the [method NavigationServer3D.region_set_navigation_mesh] API directly (as 2D uses the 3D server behind the scene). </description> </method> <method name="get_outline" qualifiers="const"> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index 0f28081201..5d0fe9dae4 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -1,18 +1,19 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationRegion2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationRegion2D" inherits="Node2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> A region of the 2D navigation map. </brief_description> <description> A region of the navigation map. It tells the [NavigationServer2D] what can be navigated and what cannot, based on its [NavigationPolygon] resource. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin]. - [b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge. + [b]Note:[/b] Overlapping two regions' navigation polygons is not enough for connecting two regions. They must share a similar edge. The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value. [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region. The pathfinding cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier. [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"> @@ -42,16 +43,16 @@ Determines if the [NavigationRegion2D] is enabled or disabled. </member> <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> - When pathfinding enters this region's navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + When pathfinding enters this region's navigation mesh from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. </member> - <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon"> + <member name="navigation_polygon" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon"> The [NavigationPolygon] resource to use. </member> <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0"> - When pathfinding moves inside this region's navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. + When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. </member> </members> </class> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 85f163b3c2..c3e554e7d6 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -1,18 +1,19 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationRegion3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationRegion3D" inherits="Node3D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> A region of the navigation map. </brief_description> <description> A region of the navigation map. It tells the [NavigationServer3D] what can be navigated and what cannot, based on its [NavigationMesh] resource. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin]. - [b]Note:[/b] Overlapping two regions' navmeshes is not enough for connecting two regions. They must share a similar edge. + [b]Note:[/b] Overlapping two regions' navigation meshes is not enough for connecting two regions. They must share a similar edge. The cost of entering this region from another region can be controlled with the [member enter_cost] value. [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region. The cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier. [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"> @@ -49,16 +50,16 @@ Determines if the [NavigationRegion3D] is enabled or disabled. </member> <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> - When pathfinding enters this region's navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + When pathfinding enters this region's navigation mesh from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. </member> - <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> + <member name="navigation_mesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> The [NavigationMesh] resource to use. </member> <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0"> - When pathfinding moves inside this region's navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. + When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. </member> </members> <signals> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 230e58a12a..1ba949b294 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationServer2D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationServer2D" inherits="Object" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Server interface for low-level 2D navigation access </brief_description> @@ -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,15 +490,15 @@ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]). </description> </method> - <method name="region_set_navpoly" qualifiers="const"> + <method name="region_set_navigation_polygon"> <return type="void" /> <param index="0" name="region" type="RID" /> - <param index="1" name="nav_poly" type="NavigationPolygon" /> + <param index="1" name="navigation_polygon" type="NavigationPolygon" /> <description> - Sets the navigation mesh for the region. + 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 c7da3b7b5b..e007c71342 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationServer3D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="NavigationServer3D" inherits="Object" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Server interface for low-level 3D navigation access </brief_description> @@ -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,15 +441,15 @@ 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_navmesh" qualifiers="const"> + <method name="region_bake_navigation_mesh"> <return type="void" /> - <param index="0" name="mesh" type="NavigationMesh" /> - <param index="1" name="node" type="Node" /> + <param index="0" name="navigation_mesh" type="NavigationMesh" /> + <param index="1" name="root_node" type="Node" /> <description> - Bakes the navigation mesh. + 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,15 +547,15 @@ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]). </description> </method> - <method name="region_set_navmesh" qualifiers="const"> + <method name="region_set_navigation_mesh"> <return type="void" /> <param index="0" name="region" type="RID" /> - <param index="1" name="nav_mesh" type="NavigationMesh" /> + <param index="1" name="navigation_mesh" type="NavigationMesh" /> <description> 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/Node2D.xml b/doc/classes/Node2D.xml index 26efe37dce..9d224f09b1 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -99,6 +99,9 @@ <member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation"> Global rotation in radians. </member> + <member name="global_rotation_degrees" type="float" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees"> + Helper property to access [member global_rotation] in degrees instead of radians. + </member> <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale"> Global scale. </member> @@ -114,6 +117,9 @@ <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> Rotation in radians, relative to the node's parent. </member> + <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> + Helper property to access [member rotation] in degrees instead of radians. + </member> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale. Unscaled value: [code](1, 1)[/code]. [b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index b6024b1887..1aa71113e9 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -274,6 +274,9 @@ Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. </member> + <member name="global_rotation_degrees" type="Vector3" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees"> + Helper property to access [member global_rotation] in degrees instead of radians. + </member> <member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform"> World3D space (global) [Transform3D] of this node. </member> @@ -287,6 +290,9 @@ Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the [member rotation_order] property. [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. </member> + <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees"> + Helper property to access [member rotation] in degrees instead of radians. + </member> <member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0"> Specify how rotation (and scale) will be presented in the editor. </member> 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 5e834b3d91..a9e17f4666 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -8,7 +8,7 @@ You can create new instances, using [code]Object.new()[/code] in GDScript, or [code]new Object[/code] in C#. To delete an Object instance, call [method free]. This is necessary for most classes inheriting Object, because they do not manage memory on their own, and will otherwise cause memory leaks when no longer in use. There are a few classes that perform memory management. For example, [RefCounted] (and by extension [Resource]) deletes itself when no longer referenced, and [Node] deletes its children when freed. Objects can have a [Script] attached to them. Once the [Script] is instantiated, it effectively acts as an extension to the base class, allowing it to define and inherit new properties, methods and signals. - Inside a [Script], [method _get_property_list] may be overriden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the [annotation @GDScript.@export] annotation. + Inside a [Script], [method _get_property_list] may be overridden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the [annotation @GDScript.@export] annotation. Godot is very dynamic. An object's script, and therefore its properties, methods and signals, can be changed at run-time. Because of this, there can be occasions where, for example, a property required by a method may not exist. To prevent run-time errors, see methods such as [method set], [method get], [method call], [method has_method], [method has_signal], etc. Note that these methods are [b]much[/b] slower than direct references. In GDScript, you can also check if a given property, method, or signal name exists in an object with the [code]in[/code] operator: [codeblock] @@ -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 e63e822648..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"> @@ -259,6 +263,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> [Font] of the [OptionButton]'s text. diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml index fa7580b7b6..01275471d0 100644 --- a/doc/classes/PathFollow3D.xml +++ b/doc/classes/PathFollow3D.xml @@ -15,7 +15,7 @@ <param index="0" name="transform" type="Transform3D" /> <param index="1" name="rotation_mode" type="int" enum="PathFollow3D.RotationMode" /> <description> - Correct the [code]transform[/code]. [code]rotation_mode[/code] implicitly specifies how posture (forward, up and sideway direction) is caculated. + Correct the [code]transform[/code]. [code]rotation_mode[/code] implicitly specifies how posture (forward, up and sideway direction) is calculated. </description> </method> </methods> 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/Plane.xml b/doc/classes/Plane.xml index fbe8afa8d1..aa09081e3e 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -38,6 +38,7 @@ <param index="0" name="normal" type="Vector3" /> <description> Creates a plane from the normal vector. The plane will intersect the origin. + The [param normal] of the plane must be a unit vector. </description> </constructor> <constructor name="Plane"> @@ -46,6 +47,7 @@ <param index="1" name="d" type="float" /> <description> Creates a plane from the normal vector and the plane's distance from the origin. + The [param normal] of the plane must be a unit vector. </description> </constructor> <constructor name="Plane"> @@ -54,6 +56,7 @@ <param index="1" name="point" type="Vector3" /> <description> Creates a plane from the normal vector and a point on the plane. + The [param normal] of the plane must be a unit vector. </description> </constructor> <constructor name="Plane"> @@ -67,12 +70,6 @@ </constructor> </constructors> <methods> - <method name="center" qualifiers="const"> - <return type="Vector3" /> - <description> - Returns the center of the plane. - </description> - </method> <method name="distance_to" qualifiers="const"> <return type="float" /> <param index="0" name="point" type="Vector3" /> @@ -80,6 +77,12 @@ Returns the shortest distance from the plane to the position [param point]. If the point is above the plane, the distance will be positive. If below, the distance will be negative. </description> </method> + <method name="get_center" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the center of the plane. + </description> + </method> <method name="has_point" qualifiers="const"> <return type="bool" /> <param index="0" name="point" type="Vector3" /> @@ -152,7 +155,7 @@ In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property. </member> <member name="normal" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> - The normal of the plane, which must be normalized. + The normal of the plane, which must be a unit vector. In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property. </member> <member name="x" type="float" setter="" getter="" default="0.0"> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 6810b0e8e4..8dec4eaf86 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -584,6 +584,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the item text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="separator_outline_size" data_type="constant" type="int" default="0"> The size of the labeled separator text outline. diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 510b8d5bd1..9f89a4e4c3 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -42,6 +42,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> Font used to draw the fill percentage if [member show_percentage] is [code]true[/code]. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index dce9d5a55c..9e1c751662 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -70,17 +70,39 @@ <method name="get_setting" qualifiers="const"> <return type="Variant" /> <param index="0" name="name" type="String" /> + <param index="1" name="default_value" type="Variant" default="null" /> <description> - Returns the value of a setting. + Returns the value of the setting identified by [param name]. If the setting doesn't exist and [param default_value] is specified, the value of [param default_value] is returned. Otherwise, [code]null[/code] is returned. [b]Example:[/b] [codeblocks] [gdscript] print(ProjectSettings.get_setting("application/config/name")) + print(ProjectSettings.get_setting("application/config/custom_description", "No description specified.")) [/gdscript] [csharp] GD.Print(ProjectSettings.GetSetting("application/config/name")); + 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"> @@ -344,9 +366,6 @@ <member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27"> Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing. </member> - <member name="debug/disable_touch" type="bool" setter="" getter="" default="false"> - Disable touch input. Only has effect on iOS. - </member> <member name="debug/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false"> If [code]true[/code], logs all output to files. </member> @@ -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> @@ -585,7 +601,7 @@ [b]Note:[/b] This setting has no effect on the home indicator if [code]hide_home_indicator[/code] is [code]true[/code]. </member> <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false"> - If [code]true[/code], allows per-pixel transparency for the window background. This affects performance, so leave it on [code]false[/code] unless you need it. See also [member display/window/size/transparent] and [member rendering/transparent_background]. + If [code]true[/code], allows per-pixel transparency for the window background. This affects performance, so leave it on [code]false[/code] unless you need it. See also [member display/window/size/transparent] and [member rendering/viewport/transparent_background]. </member> <member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false"> Forces the main window to be always on top. @@ -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> @@ -610,7 +629,7 @@ [b]Note:[/b] This setting is ignored on iOS. </member> <member name="display/window/size/transparent" type="bool" setter="" getter="" default="false"> - If [code]true[/code], enables a window manager hint that the main window background [i]can[/i] be transparent. This does not make the background actually transparent. For the background to be transparent, the root viewport must also be made transparent by enabling [member rendering/transparent_background]. + If [code]true[/code], enables a window manager hint that the main window background [i]can[/i] be transparent. This does not make the background actually transparent. For the background to be transparent, the root viewport must also be made transparent by enabling [member rendering/viewport/transparent_background]. [b]Note:[/b] To use a transparent splash screen, set [member application/boot_splash/bg_color] to [code]Color(0, 0, 0, 0)[/code]. [b]Note:[/b] This setting has no effect if [member display/window/per_pixel_transparency/allowed] is set to [code]false[/code]. </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> @@ -1895,9 +1917,6 @@ <member name="rendering/environment/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0"> Lower-end override for [member rendering/environment/glow/upscale_mode] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/environment/glow/use_high_quality" type="bool" setter="" getter="" default="false"> - Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long. - </member> <member name="rendering/environment/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1"> Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. </member> @@ -2259,7 +2278,7 @@ <member name="rendering/textures/webp_compression/lossless_compression_factor" type="float" setter="" getter="" default="25"> The default compression factor for lossless WebP. Decompression speed is mostly unaffected by the compression factor. Supported values are 0 to 100. </member> - <member name="rendering/transparent_background" type="bool" setter="" getter="" default="false"> + <member name="rendering/viewport/transparent_background" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables [member Viewport.transparent_bg] on the root viewport. This allows per-pixel transparency to be effective after also enabling [member display/window/size/transparent] and [member display/window/per_pixel_transparency/allowed]. </member> <member name="rendering/vrs/mode" type="int" setter="" getter="" default="0"> 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/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 797231ac5e..f318430611 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -504,7 +504,7 @@ <return type="RID" /> <param index="0" name="size_bytes" type="int" /> <param index="1" name="data" type="PackedByteArray" default="PackedByteArray()" /> - <param index="2" name="usage" type="int" default="0" /> + <param index="2" name="usage" type="int" enum="RenderingDevice.StorageBufferUsage" default="0" /> <description> </description> </method> @@ -1273,7 +1273,7 @@ </constant> <constant name="INDEX_BUFFER_FORMAT_UINT32" value="1" enum="IndexBufferFormat"> </constant> - <constant name="STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT" value="1" enum="StorageBufferUsage"> + <constant name="STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT" value="1" enum="StorageBufferUsage" is_bitfield="true"> </constant> <constant name="UNIFORM_TYPE_SAMPLER" value="0" enum="UniformType"> </constant> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index fc05f67416..32281953b2 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -217,7 +217,7 @@ <param index="1" name="from" type="Vector2" /> <param index="2" name="to" type="Vector2" /> <param index="3" name="color" type="Color" /> - <param index="4" name="width" type="float" default="1.0" /> + <param index="4" name="width" type="float" default="-1.0" /> <param index="5" name="antialiased" type="bool" default="false" /> <description> </description> @@ -241,6 +241,7 @@ <param index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <param index="5" name="outline_size" type="int" default="0" /> <param index="6" name="px_range" type="float" default="1.0" /> + <param index="7" name="scale" type="float" default="1.0" /> <description> </description> </method> @@ -302,7 +303,6 @@ <param index="2" name="colors" type="PackedColorArray" /> <param index="3" name="uvs" type="PackedVector2Array" /> <param index="4" name="texture" type="RID" /> - <param index="5" name="width" type="float" default="1.0" /> <description> </description> </method> @@ -962,12 +962,6 @@ <description> </description> </method> - <method name="environment_glow_set_use_high_quality"> - <return type="void" /> - <param index="0" name="enable" type="bool" /> - <description> - </description> - </method> <method name="environment_set_adjustment"> <return type="void" /> <param index="0" name="env" type="RID" /> @@ -1267,6 +1261,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> @@ -1565,7 +1565,7 @@ <param index="0" name="instance" type="RID" /> <param index="1" name="aabb" type="AABB" /> <description> - Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance3D.set_custom_aabb]. + Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting [member GeometryInstance3D.custom_aabb]. </description> </method> <method name="instance_set_extra_visibility_margin"> @@ -1591,6 +1591,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" /> @@ -1926,7 +1935,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> @@ -2028,14 +2037,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> @@ -2043,14 +2052,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> @@ -3741,65 +3750,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/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 17904697e6..5c0079f408 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ResourcePreloader" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Resource Preloader Node. + Preloads a list of resources inside a scene. </brief_description> <description> - This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. + This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. You can add the resources using the ResourcePreloader tab when the node is selected. GDScript has a simplified [method @GDScript.preload] built-in method which can be used in most situations, leaving the use of [ResourcePreloader] for more advanced scenarios. </description> <tutorials> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index e222894647..dd291a425d 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -367,6 +367,7 @@ <return type="void" /> <param index="0" name="columns" type="int" /> <param index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" /> + <param index="2" name="align_to_row" type="int" default="-1" /> <description> Adds a [code][table=columns,inline_align][/code] tag to the tag stack. </description> @@ -377,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"> @@ -655,6 +656,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1"> The horizontal offset of the font's shadow. 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/SkeletonProfileHumanoid.xml b/doc/classes/SkeletonProfileHumanoid.xml index 0dbd66d8d6..7445272ccc 100644 --- a/doc/classes/SkeletonProfileHumanoid.xml +++ b/doc/classes/SkeletonProfileHumanoid.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SkeletonProfileHumanoid" inherits="SkeletonProfile" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + A humanoid [SkeletonProfile] preset. </brief_description> <description> A [SkeletonProfile] as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only. 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/String.xml b/doc/classes/String.xml index d5624aeaa2..97466e7860 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -237,7 +237,7 @@ <description> If the string is a valid file path, returns the base directory name. [codeblock] - var dir_path = "/path/to/file.txt".get_basename() # dir_path is "/path/to" + var dir_path = "/path/to/file.txt".get_base_dir() # dir_path is "/path/to" [/codeblock] </description> </method> @@ -973,11 +973,11 @@ [codeblocks] [gdscript] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - print(url.uri_decode()) # Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + print(url.uri_decode()) # Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/gdscript] [csharp] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/csharp] [/codeblocks] </description> @@ -988,13 +988,13 @@ Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. [codeblocks] [gdscript] - var prefix = "$DOCS_URL/?hightlight=" + var prefix = "$DOCS_URL/?highlight=" var url = prefix + "Godot Engine:docs".uri_encode() print(url) # Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/gdscript] [csharp] - var prefix = "$DOCS_URL/?hightlight="; + var prefix = "$DOCS_URL/?highlight="; var url = prefix + "Godot Engine:docs".URIEncode(); GD.Print(url); // Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index e3cb6517f3..b46e39b8d7 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -220,7 +220,7 @@ <description> If the string is a valid file path, returns the base directory name. [codeblock] - var dir_path = "/path/to/file.txt".get_basename() # dir_path is "/path/to" + var dir_path = "/path/to/file.txt".get_base_dir() # dir_path is "/path/to" [/codeblock] </description> </method> @@ -880,11 +880,11 @@ [codeblocks] [gdscript] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - print(url.uri_decode()) # Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + print(url.uri_decode()) # Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/gdscript] [csharp] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/csharp] [/codeblocks] </description> @@ -895,13 +895,13 @@ Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. [codeblocks] [gdscript] - var prefix = "$DOCS_URL/?hightlight=" + var prefix = "$DOCS_URL/?highlight=" var url = prefix + "Godot Engine:docs".uri_encode() print(url) # Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/gdscript] [csharp] - var prefix = "$DOCS_URL/?hightlight="; + var prefix = "$DOCS_URL/?highlight="; var url = prefix + "Godot Engine:docs".URIEncode(); GD.Print(url); // Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index 713c016651..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" /> @@ -319,6 +325,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the tab text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> The font used to draw tab names. diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index e2e7a0c37e..c744c9b439 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -214,6 +214,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the tab text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="side_margin" data_type="constant" type="int" default="8"> The space at the left or right edges of the tab bar, accordingly with the current [member tab_alignment]. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index d4f5233438..1efd0f9326 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1396,6 +1396,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="font" data_type="font" type="Font"> Sets the default [Font]. diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index d1dfdecbd2..1ebae9889d 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -15,6 +15,7 @@ <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> <param index="3" name="length" type="int" default="1" /> + <param index="4" name="baseline" type="float" default="0.0" /> <description> Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. </description> @@ -122,6 +123,7 @@ <param index="0" name="key" type="Variant" /> <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> + <param index="3" name="baseline" type="float" default="0.0" /> <description> Sets new size and alignment of embedded object. </description> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index e0729ba844..38afd9b5f8 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -15,6 +15,7 @@ <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> <param index="3" name="length" type="int" default="1" /> + <param index="4" name="baseline" type="float" default="0.0" /> <description> Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. </description> @@ -228,6 +229,7 @@ <param index="0" name="key" type="Variant" /> <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> + <param index="3" name="baseline" type="float" default="0.0" /> <description> Sets new size and alignment of embedded object. </description> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 4fc6ee3312..d2c6dee373 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -930,6 +930,7 @@ <param index="1" name="language" type="String" default="""" /> <description> Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language]. + If [param language] is omitted, the active locale will be used. </description> </method> <method name="free_rid"> @@ -1097,6 +1098,7 @@ <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" /> <param index="4" name="length" type="int" default="1" /> + <param index="5" name="baseline" type="float" default="0.0" /> <description> Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. </description> @@ -1438,6 +1440,7 @@ <param index="1" name="key" type="Variant" /> <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" /> + <param index="4" name="baseline" type="float" default="0.0" /> <description> Sets new size and alignment of embedded object. </description> @@ -1546,8 +1549,15 @@ <return type="PackedInt32Array" /> <param index="0" name="string" type="String" /> <param index="1" name="language" type="String" default="""" /> - <description> - Returns array of the word break character offsets. + <param index="2" name="chars_per_line" type="int" default="0" /> + <description> + Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even. + When [param chars_per_line] is greater than zero, line break boundaries are returned instead. + [codeblock] + var ts = TextServerManager.get_primary_interface() + print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12] + print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12] + [/codeblock] </description> </method> <method name="string_to_lower" qualifiers="const"> diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index 4c9817fcd4..e144b09eb6 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -945,6 +945,7 @@ <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" /> <param index="4" name="length" type="int" /> + <param index="5" name="baseline" type="float" /> <description> </description> </method> @@ -1242,6 +1243,7 @@ <param index="1" name="key" type="Variant" /> <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" /> + <param index="4" name="baseline" type="float" /> <description> </description> </method> @@ -1344,6 +1346,7 @@ <return type="PackedInt32Array" /> <param index="0" name="string" type="String" /> <param index="1" name="language" type="String" /> + <param index="2" name="chars_per_line" type="int" /> <description> </description> </method> 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 e9e2a738d3..8176901ff7 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -257,8 +257,9 @@ <description> Sets the tile indentifiers for the cell on layer [param layer] at coordinates [param coords]. Each tile of the [TileSet] is identified using three parts: - The source identifier [param source_id] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id], - - The atlas coordinates identifier [param atlas_coords] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0), + - The atlas coordinates identifier [param atlas_coords] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should always be [code]Vector2i(0, 0)[/code]), - The alternative tile identifier [param alternative_tile] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource]. + If [param source_id] is set to [code]-1[/code], [param atlas_coords] to [code]Vector2i(-1, -1)[/code] or [param alternative_tile] to [code]-1[/code], the cell will be erased. An erased cell gets [b]all[/b] its identifiers automatically set to their respective invalid values, namely [code]-1[/code], [code]Vector2i(-1, -1)[/code] and [code]-1[/code]. </description> </method> <method name="set_cells_terrain_connect"> @@ -320,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/Transform3D.xml b/doc/classes/Transform3D.xml index b3145ea022..90c10e3664 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -41,6 +41,7 @@ <return type="Transform3D" /> <param index="0" name="from" type="Projection" /> <description> + Constructs a Transform3D from a [Projection] by trimming the last row of the projection matrix ([code]from.x.w[/code], [code]from.y.w[/code], [code]from.z.w[/code], and [code]from.w.w[/code] are not copied over). </description> </constructor> <constructor name="Transform3D"> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 629c271417..ff5a665bfd 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -45,11 +45,17 @@ <method name="create_item"> <return type="TreeItem" /> <param index="0" name="parent" type="TreeItem" default="null" /> - <param index="1" name="idx" type="int" default="-1" /> + <param index="1" name="index" type="int" default="-1" /> <description> Creates an item in the tree and adds it as a child of [param parent], which can be either a valid [TreeItem] or [code]null[/code]. If [param parent] is [code]null[/code], the root item will be the parent, or the new item will be the root itself if the tree is empty. - The new item will be the [param idx]th child of parent, or it will be the last child if there are not enough siblings. + 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"> @@ -522,6 +528,7 @@ </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. + [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. </theme_item> <theme_item name="parent_hl_line_margin" data_type="constant" type="int" default="0"> The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected. diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index ec6b166e57..91248092d9 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -18,7 +18,7 @@ <param index="3" name="disabled" type="bool" default="false" /> <param index="4" name="tooltip_text" type="String" default="""" /> <description> - Adds a button with [Texture2D] [param button] at column [param column]. The [param id] is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [param disabled] and have a [param tooltip_text]. + Adds a button with [Texture2D] [param button] at column [param column]. The [param id] is used to identify the button in the according [signal Tree.button_clicked] signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [param disabled] and have a [param tooltip_text]. </description> </method> <method name="call_recursive" qualifiers="vararg"> @@ -44,10 +44,10 @@ </method> <method name="create_child"> <return type="TreeItem" /> - <param index="0" name="idx" type="int" default="-1" /> + <param index="0" name="index" type="int" default="-1" /> <description> Creates an item and adds it as a child. - The new item will be inserted as position [param idx] (the default value [code]-1[/code] means the last position), or it will be the last child if [param idx] is higher than the child count. + The new item will be inserted as position [param index] (the default value [code]-1[/code] means the last position), or it will be the last child if [param index] is higher than the child count. </description> </method> <method name="deselect"> @@ -60,17 +60,17 @@ <method name="erase_button"> <return type="void" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <description> - Removes the button at index [param button_idx] in column [param column]. + Removes the button at index [param button_index] in column [param column]. </description> </method> <method name="get_button" qualifiers="const"> <return type="Texture2D" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <description> - Returns the [Texture2D] of the button at index [param button_idx] in column [param column]. + Returns the [Texture2D] of the button at index [param button_index] in column [param column]. </description> </method> <method name="get_button_by_id" qualifiers="const"> @@ -91,17 +91,17 @@ <method name="get_button_id" qualifiers="const"> <return type="int" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <description> - Returns the ID for the button at index [param button_idx] in column [param column]. + Returns the ID for the button at index [param button_index] in column [param column]. </description> </method> <method name="get_button_tooltip_text" qualifiers="const"> <return type="String" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <description> - Returns the tooltip text for the button at index [param button_idx] in column [param column]. + Returns the tooltip text for the button at index [param button_index] in column [param column]. </description> </method> <method name="get_cell_mode" qualifiers="const"> @@ -113,9 +113,9 @@ </method> <method name="get_child"> <return type="TreeItem" /> - <param index="0" name="idx" type="int" /> + <param index="0" name="index" type="int" /> <description> - Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item. + Returns a child item by its [param index] (see [method get_child_count]). This method is often used for iterating all children of an item. Negative indices access the children from the last one. </description> </method> @@ -332,9 +332,9 @@ <method name="is_button_disabled" qualifiers="const"> <return type="bool" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <description> - Returns [code]true[/code] if the button at index [param button_idx] for the given [param column] is disabled. + Returns [code]true[/code] if the button at index [param button_index] for the given [param column] is disabled. </description> </method> <method name="is_checked" qualifiers="const"> @@ -419,28 +419,28 @@ <method name="set_button"> <return type="void" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <param index="2" name="button" type="Texture2D" /> <description> - Sets the given column's button [Texture2D] at index [param button_idx] to [param button]. + Sets the given column's button [Texture2D] at index [param button_index] to [param button]. </description> </method> <method name="set_button_color"> <return type="void" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <param index="2" name="color" type="Color" /> <description> - Sets the given column's button color at index [param button_idx] to [param color]. + Sets the given column's button color at index [param button_index] to [param color]. </description> </method> <method name="set_button_disabled"> <return type="void" /> <param index="0" name="column" type="int" /> - <param index="1" name="button_idx" type="int" /> + <param index="1" name="button_index" type="int" /> <param index="2" name="disabled" type="bool" /> <description> - If [code]true[/code], disables the button at index [param button_idx] in the given [param column]. + If [code]true[/code], disables the button at index [param button_index] in the given [param column]. </description> </method> <method name="set_cell_mode"> diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml index ddc544dc97..7457aa4050 100644 --- a/doc/classes/TubeTrailMesh.xml +++ b/doc/classes/TubeTrailMesh.xml @@ -7,6 +7,12 @@ <tutorials> </tutorials> <members> + <member name="cap_bottom" type="bool" setter="set_cap_bottom" getter="is_cap_bottom" default="true"> + If [code]true[/code], generates a cap at the bottom of the tube. This can be set to [code]false[/code] to speed up generation and rendering when the cap is never seen by the camera. + </member> + <member name="cap_top" type="bool" setter="set_cap_top" getter="is_cap_top" default="true"> + If [code]true[/code], generates a cap at the top of the tube. This can be set to [code]false[/code] to speed up generation and rendering when the cap is never seen by the camera. + </member> <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> </member> <member name="radial_steps" type="int" setter="set_radial_steps" getter="get_radial_steps" default="8"> 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/UndoRedo.xml b/doc/classes/UndoRedo.xml index 7258efbdda..42baf7728d 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -17,7 +17,7 @@ func undo_something(): pass # Put here the code that reverts what's done by "do_something()". - func _on_MyButton_pressed(): + func _on_my_button_pressed(): var node = get_node("MyNode2D") undo_redo.create_action("Move the node") undo_redo.add_do_method(self, "do_something") 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..5416468ab6 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -38,7 +38,7 @@ # To get the name of the underlying Object type, you need the `get_class()` method. print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string. # Note also that there is not yet any way to get a script's `class_name` string easily. - # To fetch that value, you need to dig deeply into a hidden ProjectSettings setting: an Array of Dictionaries called "_global_script_classes". + # To fetch that value, you can parse the [code]res://.godot/global_script_class_cache.cfg[/code] file with the [ConfigFile] API. # Open your project.godot file to see it up close. [/gdscript] [csharp] @@ -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..dd145c016c 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]. @@ -525,6 +527,39 @@ Set's the window's current mode. [b]Note:[/b] Fullscreen mode is not exclusive full screen on Windows and Linux. </member> + <member name="mouse_passthrough" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], all mouse event as passed to the underlying window of the same application. See also [member mouse_passthrough_polygon]. + [b]Note:[/b] This property is implemented on Linux (X11), macOS and Windows. + </member> + <member name="mouse_passthrough_polygon" type="PackedVector2Array" setter="set_mouse_passthrough_polygon" getter="get_mouse_passthrough_polygon" default="PackedVector2Array()"> + Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. + Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior). + [codeblocks] + [gdscript] + # Set region, using Path2D node. + $Window.mouse_passthrough_polygon = $Path2D.curve.get_baked_points() + + # Set region, using Polygon2D node. + $Window.mouse_passthrough_polygon = $Polygon2D.polygon + + # Reset region to default. + $Window.mouse_passthrough_polygon = [] + [/gdscript] + [csharp] + // Set region, using Path2D node. + GetNode<Window>("Window").MousePassthrough = GetNode<Path2D>("Path2D").Curve.GetBakedPoints(); + + // Set region, using Polygon2D node. + GetNode<Window>("Window").MousePassthrough = GetNode<Polygon2D>("Polygon2D").Polygon; + + // Reset region to default. + GetNode<Window>("Window").MousePassthrough = new Vector2[] {}; + [/csharp] + [/codeblocks] + [b]Note:[/b] This property is ignored if [member mouse_passthrough] is set to [code]true[/code]. + [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. + [b]Note:[/b] This property is implemented on Linux (X11), macOS and Windows. + </member> <member name="popup_window" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled). </member> @@ -693,7 +728,9 @@ Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with [member extend_to_title]. [b]Note:[/b] This flag is implemented on macOS. </constant> - <constant name="FLAG_MAX" value="7" enum="Flags"> + <constant name="FLAG_MOUSE_PASSTHROUGH" value="7" enum="Flags"> + </constant> + <constant name="FLAG_MAX" value="8" enum="Flags"> Max value of the [enum Flags]. </constant> <constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode"> @@ -732,6 +769,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)"> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index d0ef664281..e1a98f0ea4 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -60,7 +60,7 @@ _can_shoot = false _cool_down.start() - func _on_CoolDownTimer_timeout(): + func _on_cool_down_timer_timeout(): _can_shoot = true [/gdscript] [csharp] |