diff options
Diffstat (limited to 'doc/classes')
623 files changed, 4022 insertions, 3009 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index d4680d1836..0334bab32a 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -99,14 +99,6 @@ [b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). </description> </method> - <method name="cartesian2polar"> - <return type="Vector2" /> - <argument index="0" name="x" type="float" /> - <argument index="1" name="y" type="float" /> - <description> - Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle). - </description> - </method> <method name="ceil"> <return type="float" /> <argument index="0" name="x" type="float" /> @@ -521,14 +513,6 @@ [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2). </description> </method> - <method name="polar2cartesian"> - <return type="Vector2" /> - <argument index="0" name="r" type="float" /> - <argument index="1" name="th" type="float" /> - <description> - Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis). - </description> - </method> <method name="posmod"> <return type="int" /> <argument index="0" name="x" type="int" /> @@ -572,6 +556,11 @@ [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. </description> </method> + <method name="print_verbose" qualifiers="vararg"> + <description> + If verbose mode is enabled ([method OS.is_stdout_verbose] returning [code]true[/code]), converts one or more arguments of any type to string in the best way possible and prints them to the console. + </description> + </method> <method name="printerr" qualifiers="vararg"> <description> Prints one or more arguments to strings in the best way possible to standard error line. @@ -711,6 +700,19 @@ <description> </description> </method> + <method name="rid_allocate_id"> + <return type="int" /> + <description> + Allocate a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers. + </description> + </method> + <method name="rid_from_int64"> + <return type="RID" /> + <argument index="0" name="base" type="int" /> + <description> + Create a RID from an int64. This is used mainly from native extensions to build servers. + </description> + </method> <method name="round"> <return type="float" /> <argument index="0" name="x" type="float" /> @@ -1072,8 +1074,8 @@ <member name="TranslationServer" type="TranslationServer" setter="" getter=""> The [TranslationServer] singleton. </member> - <member name="VisualScriptEditor" type="VisualScriptEditor" setter="" getter=""> - The [VisualScriptEditor] singleton. + <member name="VisualScriptCustomNodes" type="VisualScriptCustomNodes" setter="" getter=""> + The [VisualScriptCustomNodes] singleton. </member> <member name="XRServer" type="XRServer" setter="" getter=""> The [XRServer] singleton. @@ -2351,9 +2353,11 @@ </constant> <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="38" enum="PropertyHint"> </constant> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint"> + </constant> <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_MAX" value="40" enum="PropertyHint"> + <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint"> </constant> <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> </constant> @@ -2426,6 +2430,8 @@ </constant> <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="268435456" enum="PropertyUsageFlags"> </constant> + <constant name="PROPERTY_USAGE_ARRAY" value="1073741824" enum="PropertyUsageFlags"> + </constant> <constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags"> Default usage (storage, editor and network). </constant> @@ -2458,9 +2464,30 @@ </constant> <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags"> </constant> + <constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags"> + Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API. + </constant> <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags"> Default method flags. </constant> + <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode"> + Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods. + </constant> + <constant name="RPC_MODE_ANY" value="1" enum="RPCMode"> + Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. + </constant> + <constant name="RPC_MODE_AUTH" value="2" enum="RPCMode"> + Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(auth)[/code] annotation. See [method Node.set_multiplayer_authority]. + </constant> + <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> + Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_ORDERED]. Use for non-critical data, and always consider whether the order matters. + </constant> + <constant name="TRANSFER_MODE_ORDERED" value="1" enum="TransferMode"> + Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. + </constant> + <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode"> + Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. + </constant> <constant name="TYPE_NIL" value="0" enum="Variant.Type"> Variable is [code]null[/code]. </constant> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 4bc11e7166..5d18f69409 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -61,6 +61,12 @@ Returns the volume of the [AABB]. </description> </method> + <method name="get_center" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the center of the [AABB], which is equal to [member position] + ([member size] / 2). + </description> + </method> <method name="get_endpoint" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="idx" type="int" /> @@ -189,6 +195,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="AABB" /> <description> </description> @@ -201,6 +212,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="AABB" /> <description> </description> @@ -218,6 +234,4 @@ If the size is negative, you can use [method abs] to fix it. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 63dd250dbc..11c0fc33b8 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -38,7 +38,7 @@ <tutorials> </tutorials> <methods> - <method name="_compute_cost" qualifiers="virtual"> + <method name="_compute_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> @@ -47,7 +47,7 @@ Note that this function is hidden in the default [code]AStar[/code] class. </description> </method> - <method name="_estimate_cost" qualifiers="virtual"> + <method name="_estimate_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> @@ -326,6 +326,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 31d695b051..43e7d59665 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -9,7 +9,7 @@ <tutorials> </tutorials> <methods> - <method name="_compute_cost" qualifiers="virtual"> + <method name="_compute_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> @@ -18,7 +18,7 @@ Note that this function is hidden in the default [code]AStar2D[/code] class. </description> </method> - <method name="_estimate_cost" qualifiers="virtual"> + <method name="_estimate_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> @@ -297,6 +297,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 077c062d6b..c753b341d2 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -90,8 +90,6 @@ </description> </signal> </signals> - <constants> - </constants> <theme_items> <theme_item name="panel" data_type="style" type="StyleBox"> Panel that fills up the background of the window. diff --git a/doc/classes/AnimatableBody2D.xml b/doc/classes/AnimatableBody2D.xml new file mode 100644 index 0000000000..e58f4bd692 --- /dev/null +++ b/doc/classes/AnimatableBody2D.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0"> + <brief_description> + Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors. + </brief_description> + <description> + Animatable body for 2D physics. + An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors. + When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + </description> + <tutorials> + </tutorials> + <members> + <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide]. + </member> + </members> +</class> diff --git a/doc/classes/AnimatableBody3D.xml b/doc/classes/AnimatableBody3D.xml new file mode 100644 index 0000000000..71a48a5aa6 --- /dev/null +++ b/doc/classes/AnimatableBody3D.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0"> + <brief_description> + Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors. + </brief_description> + <description> + Animatable body for 3D physics. + An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors. + When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + </description> + <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> + </tutorials> + <members> + <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide]. + </member> + </members> +</class> diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index 14e19b4c9a..b468e1d109 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -74,6 +74,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 6b3d426cef..59d7553ef4 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -56,6 +56,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index a9a08efcf1..173ff43d2a 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -11,46 +11,46 @@ <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> - <method name="_get_caption" qualifiers="virtual"> + <method name="_get_caption" qualifiers="virtual const"> <return type="String" /> <description> Gets the text caption for this node (used by some editors). </description> </method> - <method name="_get_child_by_name" qualifiers="virtual"> - <return type="Object" /> - <argument index="0" name="name" type="String" /> + <method name="_get_child_by_name" qualifiers="virtual const"> + <return type="AnimationNode" /> + <argument index="0" name="name" type="StringName" /> <description> Gets a child node by index (used by editors inheriting from [AnimationRootNode]). </description> </method> - <method name="_get_child_nodes" qualifiers="virtual"> + <method name="_get_child_nodes" qualifiers="virtual const"> <return type="Dictionary" /> <description> Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode]. </description> </method> - <method name="_get_parameter_default_value" qualifiers="virtual"> + <method name="_get_parameter_default_value" qualifiers="virtual const"> <return type="Variant" /> - <argument index="0" name="name" type="StringName" /> + <argument index="0" name="parameter" type="StringName" /> <description> Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. </description> </method> - <method name="_get_parameter_list" qualifiers="virtual"> + <method name="_get_parameter_list" qualifiers="virtual const"> <return type="Array" /> <description> Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. </description> </method> - <method name="_has_filter" qualifiers="virtual"> + <method name="_has_filter" qualifiers="virtual const"> <return type="bool" /> <description> Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node. </description> </method> - <method name="_process" qualifiers="virtual"> - <return type="void" /> + <method name="_process" qualifiers="virtual const"> + <return type="float" /> <argument index="0" name="time" type="float" /> <argument index="1" name="seek" type="bool" /> <description> diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index 63127ade9a..20ee33209b 100644 --- a/doc/classes/AnimationNodeAdd2.xml +++ b/doc/classes/AnimationNodeAdd2.xml @@ -9,13 +9,9 @@ <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> - <methods> - </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 0e49ac7bbf..26738499bb 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -14,13 +14,9 @@ <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <methods> - </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index 75dae6a48e..668a35226f 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -11,13 +11,9 @@ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <methods> - </methods> <members> <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&"""> Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index e509a2df6c..1f7a4c91c8 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -11,13 +11,9 @@ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <methods> - </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index 7c81b37663..ed827e2535 100644 --- a/doc/classes/AnimationNodeBlend3.xml +++ b/doc/classes/AnimationNodeBlend3.xml @@ -13,13 +13,9 @@ <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> - <methods> - </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index c47d84fe37..6e55a79fd2 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -80,6 +80,4 @@ Label of the virtual axis of the blend space. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml index c4150d7e82..34c96d13ea 100644 --- a/doc/classes/AnimationNodeOutput.xml +++ b/doc/classes/AnimationNodeOutput.xml @@ -10,8 +10,4 @@ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 9921e157f2..17ef565b3a 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -187,6 +187,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 5c11adfaf0..15c6c96302 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -74,6 +74,4 @@ <members> <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" /> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 7f07afecee..763bba6e93 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -7,8 +7,6 @@ <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> - <methods> - </methods> <members> <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&"""> Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml index 2ce8309418..5b40b39bca 100644 --- a/doc/classes/AnimationNodeTimeScale.xml +++ b/doc/classes/AnimationNodeTimeScale.xml @@ -10,8 +10,4 @@ <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml index 171d65fbe0..d927c663c8 100644 --- a/doc/classes/AnimationNodeTimeSeek.xml +++ b/doc/classes/AnimationNodeTimeSeek.xml @@ -29,8 +29,4 @@ <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index 8c859e43be..b297832ac0 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -47,6 +47,4 @@ Cross-fading time (in seconds) between each animation connected to the inputs. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationRootNode.xml b/doc/classes/AnimationRootNode.xml index 46759b7f4d..056edbd230 100644 --- a/doc/classes/AnimationRootNode.xml +++ b/doc/classes/AnimationRootNode.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AnimationTrackEditPlugin.xml b/doc/classes/AnimationTrackEditPlugin.xml index 7b96808581..4a4c7157d2 100644 --- a/doc/classes/AnimationTrackEditPlugin.xml +++ b/doc/classes/AnimationTrackEditPlugin.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index 2180196bb5..e91cfd79a1 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -92,6 +92,15 @@ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area3D.SpaceOverride" default="0"> Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values. </member> + <member name="wind_attenuation_factor" type="float" setter="set_wind_attenuation_factor" getter="get_wind_attenuation_factor" default="0.0"> + The exponential rate at which wind force decreases with distance from its origin. + </member> + <member name="wind_force_magnitude" type="float" setter="set_wind_force_magnitude" getter="get_wind_force_magnitude" default="0.0"> + The magnitude of area-specific wind force. + </member> + <member name="wind_source_path" type="NodePath" setter="set_wind_source_path" getter="get_wind_source_path" default="NodePath("")"> + The [Node3D] which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform. + </member> </members> <signals> <signal name="area_entered"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 7767a1028d..44e27643bb 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -302,7 +302,7 @@ </description> </method> <method name="insert"> - <return type="void" /> + <return type="int" /> <argument index="0" name="position" type="int" /> <argument index="1" name="value" type="Variant" /> <description> @@ -347,6 +347,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Array" /> <description> </description> @@ -371,6 +376,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Array" /> <description> </description> @@ -393,6 +403,14 @@ <description> </description> </method> + <method name="pop_at"> + <return type="Variant" /> + <argument index="0" name="position" type="int" /> + <description> + Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty. + [b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be. + </description> + </method> <method name="pop_back"> <return type="Variant" /> <description> @@ -487,7 +505,7 @@ <argument index="2" name="step" type="int" default="1" /> <argument index="3" name="deep" type="bool" default="false" /> <description> - Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. + Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. Wraps around if [code]begin[/code] or [code]end[/code] are out of bounds or negative. Returns an empty array for invalid parameters. </description> </method> <method name="sort"> @@ -532,6 +550,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 637b9a9f16..49ce2588c5 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -115,6 +115,7 @@ <argument index="0" name="index" type="int" /> <argument index="1" name="name" type="StringName" /> <description> + Sets the name of the blend shape at this index. </description> </method> <method name="surface_find_by_name" qualifiers="const"> @@ -202,6 +203,4 @@ <member name="shadow_mesh" type="ArrayMesh" setter="set_shadow_mesh" getter="get_shadow_mesh"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AspectRatioContainer.xml b/doc/classes/AspectRatioContainer.xml index 7b41133139..4c0af0b997 100644 --- a/doc/classes/AspectRatioContainer.xml +++ b/doc/classes/AspectRatioContainer.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignMode" default="1"> Specifies the horizontal relative position of child controls. diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index b49c0e4278..3435bbec59 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="atlas" type="Texture2D" setter="set_atlas" getter="get_atlas"> The texture that contains the atlas. Can be any [Texture2D] subtype. @@ -25,6 +23,4 @@ The AtlasTexture's used region. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml index 09746913bd..b7e8d8932c 100644 --- a/doc/classes/AudioBusLayout.xml +++ b/doc/classes/AudioBusLayout.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml index 955285bd2e..fd2bab073f 100644 --- a/doc/classes/AudioEffect.xml +++ b/doc/classes/AudioEffect.xml @@ -9,8 +9,4 @@ <tutorials> <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml index 1334a81661..7fcfe24d97 100644 --- a/doc/classes/AudioEffectAmplify.xml +++ b/doc/classes/AudioEffectAmplify.xml @@ -9,13 +9,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml index e8b398c8f4..ed0a33deb1 100644 --- a/doc/classes/AudioEffectBandLimitFilter.xml +++ b/doc/classes/AudioEffectBandLimitFilter.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml index ad3dbc5256..642b70428e 100644 --- a/doc/classes/AudioEffectBandPassFilter.xml +++ b/doc/classes/AudioEffectBandPassFilter.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml index 8e46acbd07..6aecaa170a 100644 --- a/doc/classes/AudioEffectCapture.xml +++ b/doc/classes/AudioEffectCapture.xml @@ -61,6 +61,4 @@ Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml index cc93a8fc03..e3ab141e3d 100644 --- a/doc/classes/AudioEffectChorus.xml +++ b/doc/classes/AudioEffectChorus.xml @@ -171,6 +171,4 @@ The effect's processed signal. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index 4e924bcb65..28a5587377 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -14,8 +14,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" default="20.0"> Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000. @@ -39,6 +37,4 @@ The level above which compression is applied to the audio. Value can range from -60 to 0. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index e55e0cb2ad..96bd43bc3b 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0"> Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. @@ -52,6 +50,4 @@ Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right). </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml index 24a145b0f3..600ca93028 100644 --- a/doc/classes/AudioEffectDistortion.xml +++ b/doc/classes/AudioEffectDistortion.xml @@ -11,8 +11,6 @@ <tutorials> <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> - <methods> - </methods> <members> <member name="drive" type="float" setter="set_drive" getter="get_drive" default="0.0"> Distortion power. Value can range from 0 to 1. diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml index ddc1af0618..9d84f87cbe 100644 --- a/doc/classes/AudioEffectEQ.xml +++ b/doc/classes/AudioEffectEQ.xml @@ -32,6 +32,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml index c9fb03e23c..be89a0c4d6 100644 --- a/doc/classes/AudioEffectEQ10.xml +++ b/doc/classes/AudioEffectEQ10.xml @@ -20,8 +20,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml index 7ff8a1756e..0b1a8b2a1d 100644 --- a/doc/classes/AudioEffectEQ21.xml +++ b/doc/classes/AudioEffectEQ21.xml @@ -31,8 +31,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml index b47da5ed2a..9f7efad375 100644 --- a/doc/classes/AudioEffectEQ6.xml +++ b/doc/classes/AudioEffectEQ6.xml @@ -16,8 +16,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml index 293848d204..5b43646077 100644 --- a/doc/classes/AudioEffectFilter.xml +++ b/doc/classes/AudioEffectFilter.xml @@ -9,8 +9,6 @@ <tutorials> <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> - <methods> - </methods> <members> <member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" default="2000.0"> Threshold frequency for the filter, in Hz. diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml index 82a3c74941..e1bd7a3ff5 100644 --- a/doc/classes/AudioEffectHighPassFilter.xml +++ b/doc/classes/AudioEffectHighPassFilter.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml index 4ba31f9fc8..c572824448 100644 --- a/doc/classes/AudioEffectHighShelfFilter.xml +++ b/doc/classes/AudioEffectHighShelfFilter.xml @@ -8,8 +8,4 @@ <tutorials> <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml index 9ab6028901..f9836226fc 100644 --- a/doc/classes/AudioEffectInstance.xml +++ b/doc/classes/AudioEffectInstance.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml index 2fbea06aed..813429e42f 100644 --- a/doc/classes/AudioEffectLimiter.xml +++ b/doc/classes/AudioEffectLimiter.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" default="-0.1"> The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1. @@ -24,6 +22,4 @@ Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml index e7a66d03bd..ece2e57c96 100644 --- a/doc/classes/AudioEffectLowPassFilter.xml +++ b/doc/classes/AudioEffectLowPassFilter.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml index 078e7bf1a1..e78dbf9732 100644 --- a/doc/classes/AudioEffectLowShelfFilter.xml +++ b/doc/classes/AudioEffectLowShelfFilter.xml @@ -8,8 +8,4 @@ <tutorials> <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml index 2393674a2e..f5e4abae96 100644 --- a/doc/classes/AudioEffectNotchFilter.xml +++ b/doc/classes/AudioEffectNotchFilter.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml index 19c4cd1457..858c48c3b6 100644 --- a/doc/classes/AudioEffectPanner.xml +++ b/doc/classes/AudioEffectPanner.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="pan" type="float" setter="set_pan" getter="get_pan" default="0.0"> Pan position. Value can range from -1 (fully left) to 1 (fully right). </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml index b1d229e150..2855d12d51 100644 --- a/doc/classes/AudioEffectPhaser.xml +++ b/doc/classes/AudioEffectPhaser.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0"> Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. @@ -28,6 +26,4 @@ Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index 9c28a01650..0c323fd85c 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3"> The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes. diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index 9656718ee8..b32206726d 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -36,6 +36,4 @@ Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index fbe68cde0e..d931720e88 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -10,8 +10,6 @@ <tutorials> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <methods> - </methods> <members> <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.5"> Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. @@ -38,6 +36,4 @@ Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml index 10d29ff8ab..b2f2c55aa2 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzer.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml @@ -11,8 +11,6 @@ <link title="https://godotengine.org/asset-library/asset/528">Audio Spectrum Demo</link> <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link> </tutorials> - <methods> - </methods> <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0"> The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory. diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml index 663e3e982c..e82892f355 100644 --- a/doc/classes/AudioEffectStereoEnhance.xml +++ b/doc/classes/AudioEffectStereoEnhance.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0"> </member> @@ -16,6 +14,4 @@ <member name="time_pullout_ms" type="float" setter="set_time_pullout" getter="get_time_pullout" default="0.0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioListener2D.xml b/doc/classes/AudioListener2D.xml new file mode 100644 index 0000000000..a7cdd0348c --- /dev/null +++ b/doc/classes/AudioListener2D.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AudioListener2D" inherits="Node2D" version="4.0"> + <brief_description> + Overrides the location sounds are heard from. + </brief_description> + <description> + Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. Only one [AudioListener2D] can be current. Using [method make_current] will disable the previous [AudioListener2D]. + If there is no active [AudioListener2D] in the current [Viewport], center of the screen will be used as a hearing point for the audio. [AudioListener2D] needs to be inside [SceneTree] to function. + </description> + <tutorials> + </tutorials> + <methods> + <method name="clear_current"> + <return type="void" /> + <description> + Disables the [AudioListener2D]. If it's not set as current, this method will have no effect. + </description> + </method> + <method name="is_current" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if this [AudioListener2D] is currently active. + </description> + </method> + <method name="make_current"> + <return type="void" /> + <description> + Makes the [AudioListener2D] active, setting it as the hearing point for the sounds. If there is already another active [AudioListener2D], it will be disabled. + This method will have no effect if the [AudioListener2D] is not added to [SceneTree]. + </description> + </method> + </methods> +</class> diff --git a/doc/classes/Listener3D.xml b/doc/classes/AudioListener3D.xml index 9cc803f241..4a56071b57 100644 --- a/doc/classes/Listener3D.xml +++ b/doc/classes/AudioListener3D.xml @@ -1,11 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Listener3D" inherits="Node3D" version="4.0"> +<class name="AudioListener3D" inherits="Node3D" version="4.0"> <brief_description> Overrides the location sounds are heard from. </brief_description> <description> Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera3D]. - [b]Note:[/b] There is no 2D equivalent for this node yet. </description> <tutorials> </tutorials> @@ -26,7 +25,7 @@ <return type="bool" /> <description> Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise. - [b]Note:[/b] There may be more than one Listener3D marked as "current" in the scene tree, but only the one that was made current last will be used. + [b]Note:[/b] There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used. </description> </method> <method name="make_current"> @@ -36,6 +35,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 8a58b178d8..cff7199c4a 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -13,13 +13,37 @@ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link> </tutorials> <methods> + <method name="_get_length" qualifiers="virtual const"> + <return type="float" /> + <description> + </description> + </method> + <method name="_get_stream_name" qualifiers="virtual const"> + <return type="String" /> + <description> + </description> + </method> + <method name="_instance_playback" qualifiers="virtual const"> + <return type="AudioStreamPlayback" /> + <description> + </description> + </method> + <method name="_is_monophonic" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> <method name="get_length" qualifiers="const"> <return type="float" /> <description> Returns the length of the audio stream in seconds. </description> </method> + <method name="is_monophonic" qualifiers="const"> + <return type="bool" /> + <description> + Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony. + </description> + </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml index 8464bc8a85..05406846ce 100644 --- a/doc/classes/AudioStreamGenerator.xml +++ b/doc/classes/AudioStreamGenerator.xml @@ -12,8 +12,6 @@ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link> </tutorials> - <methods> - </methods> <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5"> The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up. @@ -24,6 +22,4 @@ According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index d99d041053..7520d5d97a 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -50,6 +50,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStreamMicrophone.xml b/doc/classes/AudioStreamMicrophone.xml index e73e50e3a9..13b0c2cd67 100644 --- a/doc/classes/AudioStreamMicrophone.xml +++ b/doc/classes/AudioStreamMicrophone.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml index cb01aa75e8..bcf0b55b31 100644 --- a/doc/classes/AudioStreamPlayback.xml +++ b/doc/classes/AudioStreamPlayback.xml @@ -10,7 +10,45 @@ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> </tutorials> <methods> + <method name="_get_loop_count" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_playback_position" qualifiers="virtual const"> + <return type="float" /> + <description> + </description> + </method> + <method name="_is_playing" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_mix" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="buffer" type="AudioFrame*" /> + <argument index="1" name="rate_scale" type="float" /> + <argument index="2" name="frames" type="int" /> + <description> + </description> + </method> + <method name="_seek" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="position" type="float" /> + <description> + </description> + </method> + <method name="_start" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="from_pos" type="float" /> + <description> + </description> + </method> + <method name="_stop" qualifiers="virtual"> + <return type="void" /> + <description> + </description> + </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStreamPlaybackResampled.xml b/doc/classes/AudioStreamPlaybackResampled.xml index faa563fdd8..d60d1acb7a 100644 --- a/doc/classes/AudioStreamPlaybackResampled.xml +++ b/doc/classes/AudioStreamPlaybackResampled.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index a6c437f875..b692ae858e 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -56,6 +56,9 @@ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&"Master""> Bus on which this audio is playing. </member> + <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1"> + The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. + </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants. </member> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index c40c223091..9c76eefbf9 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -61,6 +61,9 @@ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0"> Maximum distance from which audio is still hearable. </member> + <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1"> + The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. + </member> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. </member> @@ -84,6 +87,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 584f03399c..bd344fad29 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code]. - By default, audio is heard from the camera position. This can be changed by adding a [Listener3D] node to the scene and enabling it by calling [method Listener3D.make_current] on it. + By default, audio is heard from the camera position. This can be changed by adding a [AudioListener3D] node to the scene and enabling it by calling [method AudioListener3D.make_current] on it. See also [AudioStreamPlayer] to play a sound non-positionally. [b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing). </description> @@ -81,10 +81,10 @@ Sets the absolute maximum of the soundlevel, in decibels. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0"> - Sets the distance from which the [member out_of_range_mode] takes effect. Has no effect if set to 0. + The distance past which the sound can no longer be heard at all. Only has an effect if set to a value greater than [code]0.0[/code]. [member max_distance] works in tandem with [member unit_size]. However, unlike [member unit_size] whose behavior depends on the [member attenuation_model], [member max_distance] always works in a linear fashion. This can be used to prevent the [AudioStreamPlayer3D] from requiring audio mixing when the listener is far away, which saves CPU resources. </member> - <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode" default="0"> - Decides if audio should pause when source is outside of [member max_distance] range. + <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1"> + The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. </member> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. @@ -125,12 +125,6 @@ <constant name="ATTENUATION_DISABLED" value="3" enum="AttenuationModel"> No dampening of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer]. </constant> - <constant name="OUT_OF_RANGE_MIX" value="0" enum="OutOfRangeMode"> - Mix this audio in, even when it's out of range. This increases CPU usage, but keeps the sound playing at the correct position if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius. - </constant> - <constant name="OUT_OF_RANGE_PAUSE" value="1" enum="OutOfRangeMode"> - Pause this audio when it gets out of range. This decreases CPU usage, but will cause the sound to restart if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius. - </constant> <constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking"> Disables doppler tracking. </constant> diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml index 7e93b3267c..0f580699e9 100644 --- a/doc/classes/AudioStreamRandomPitch.xml +++ b/doc/classes/AudioStreamRandomPitch.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream"> The current [AudioStream]. @@ -18,6 +16,4 @@ The intensity of random pitch variation. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml index 55ee573811..6f1dd9fc76 100644 --- a/doc/classes/BackBufferCopy.xml +++ b/doc/classes/BackBufferCopy.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode" default="1"> Buffer mode. See [enum CopyMode] constants. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index bbf7c5eb6d..a5516636aa 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -683,7 +683,7 @@ </constant> <constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode"> Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties. - The [member ParticlesMaterial.anim_speed] or [member CPUParticles3D.anim_speed] should also be set to a positive value for the animation to play. + The [member ParticlesMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play. </constant> <constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel"> Used to read from the red channel of a texture. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 8fab84d885..63df5c40b2 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -71,6 +71,13 @@ A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid. </description> </method> + <method name="from_scale" qualifiers="static"> + <return type="Basis" /> + <argument index="0" name="scale" type="Vector3" /> + <description> + Constructs a pure scale basis matrix with no rotation or shearing. The scale values are set as the diagonal of the matrix, and the other parts of the matrix are zero. + </description> + </method> <method name="get_euler" qualifiers="const"> <return type="Vector3" /> <description> @@ -120,6 +127,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Basis" /> <description> </description> @@ -152,6 +164,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Basis" /> <description> </description> diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index 9a349c957f..0997896260 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -81,6 +81,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml index f9f3ea21f1..ef0778682f 100644 --- a/doc/classes/Bone2D.xml +++ b/doc/classes/Bone2D.xml @@ -90,6 +90,4 @@ Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml index b493002c70..a1670430e6 100644 --- a/doc/classes/BoneAttachment3D.xml +++ b/doc/classes/BoneAttachment3D.xml @@ -78,6 +78,4 @@ The name of the attached bone. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/BoxMesh.xml b/doc/classes/BoxMesh.xml index dda5e2f1e5..af3365b6ea 100644 --- a/doc/classes/BoxMesh.xml +++ b/doc/classes/BoxMesh.xml @@ -10,8 +10,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)"> The box's width, height and depth. @@ -26,6 +24,4 @@ Number of extra edge loops inserted along the X axis. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml index 5704de905b..3bfded6512 100644 --- a/doc/classes/BoxShape3D.xml +++ b/doc/classes/BoxShape3D.xml @@ -11,13 +11,9 @@ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> </tutorials> - <methods> - </methods> <members> <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)"> The box's width, height and depth. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 302a213836..9229e69fa7 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -34,6 +34,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index ab6897ca1d..9226140c1a 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -18,25 +18,23 @@ Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial]. </description> </method> - <method name="get_param" qualifiers="const"> - <return type="float" /> + <method name="get_param_curve" qualifiers="const"> + <return type="Curve" /> <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> <description> - Returns the base value of the parameter specified by [enum Parameter]. + Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_curve" qualifiers="const"> - <return type="Curve" /> + <method name="get_param_max" qualifiers="const"> + <return type="float" /> <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> <description> - Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_randomness" qualifiers="const"> + <method name="get_param_min" qualifiers="const"> <return type="float" /> <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> <description> - Returns the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="get_particle_flag" qualifiers="const"> @@ -52,28 +50,26 @@ Restarts the particle emitter. </description> </method> - <method name="set_param"> + <method name="set_param_curve"> <return type="void" /> <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> - <argument index="1" name="value" type="float" /> + <argument index="1" name="curve" type="Curve" /> <description> - Sets the base value of the parameter specified by [enum Parameter]. + Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="set_param_curve"> + <method name="set_param_max"> <return type="void" /> <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> - <argument index="1" name="curve" type="Curve" /> + <argument index="1" name="value" type="float" /> <description> - Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="set_param_randomness"> + <method name="set_param_min"> <return type="void" /> <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> - <argument index="1" name="randomness" type="float" /> + <argument index="1" name="value" type="float" /> <description> - Sets the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="set_particle_flag"> @@ -89,41 +85,33 @@ <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial rotation applied to each particle, in degrees. - </member> <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's rotation will be animated along this [Curve]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Rotation randomness ratio. + <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's angular velocity will vary along this [Curve]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Angular velocity randomness ratio. + <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation offset. + <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation offset will vary along this [Curve]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation offset randomness ratio. + <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation speed. + <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation speed will vary along this [Curve]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation speed randomness ratio. + <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. @@ -131,14 +119,12 @@ <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> Each particle's color will vary along this [Gradient] (multiplied with [member color]). </member> - <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> - The rate at which particles lose velocity. - </member> <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Damping will vary along this [Curve]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Damping randomness ratio. + <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2(1, 0)"> Unit vector specifying the particles' emission direction. @@ -179,20 +165,16 @@ <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 980)"> Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial hue variation applied to each particle. - </member> <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's hue will vary along this [Curve]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Hue variation randomness ratio. + <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Initial velocity randomness ratio. + <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> Amount of time each particle will exist. @@ -200,14 +182,12 @@ <member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0"> Particle lifetime randomness ratio. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Linear acceleration applied to each particle in the direction of motion. - </member> <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's linear acceleration will vary along this [Curve]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Linear acceleration randomness ratio. + <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. @@ -215,14 +195,12 @@ <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. </member> - <member name="orbit_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. - </member> <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's orbital velocity will vary along this [Curve]. </member> - <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Orbital velocity randomness ratio. + <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> Align Y axis of particle with the direction of its velocity. @@ -230,41 +208,41 @@ <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Radial acceleration applied to each particle. Makes particle accelerate away from origin. - </member> <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's radial acceleration will vary along this [Curve]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Radial acceleration randomness ratio. + <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> Emission lifetime randomness ratio. </member> - <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0"> - Initial scale applied to each particle. - </member> <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's scale will vary along this [Curve]. </member> - <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Scale randomness ratio. + <member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0"> + </member> + <member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0"> + </member> + <member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x"> + </member> + <member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y"> </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> + <member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false"> + </member> <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - </member> <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's tangential acceleration will vary along this [Curve]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Tangential acceleration randomness ratio. + <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> Particle texture. If [code]null[/code], particles will be squares. @@ -278,40 +256,40 @@ Particles are drawn in order of remaining lifetime. </constant> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index 8aa3573996..fe8c354427 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -17,25 +17,23 @@ Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial]. </description> </method> - <method name="get_param" qualifiers="const"> - <return type="float" /> + <method name="get_param_curve" qualifiers="const"> + <return type="Curve" /> <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> <description> - Returns the base value of the parameter specified by [enum Parameter]. + Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_curve" qualifiers="const"> - <return type="Curve" /> + <method name="get_param_max" qualifiers="const"> + <return type="float" /> <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> <description> - Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_randomness" qualifiers="const"> + <method name="get_param_min" qualifiers="const"> <return type="float" /> <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> <description> - Returns the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="get_particle_flag" qualifiers="const"> @@ -51,28 +49,28 @@ Restarts the particle emitter. </description> </method> - <method name="set_param"> + <method name="set_param_curve"> <return type="void" /> <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> - <argument index="1" name="value" type="float" /> + <argument index="1" name="curve" type="Curve" /> <description> - Sets the base value of the parameter specified by [enum Parameter]. + Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="set_param_curve"> + <method name="set_param_max"> <return type="void" /> <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> - <argument index="1" name="curve" type="Curve" /> + <argument index="1" name="value" type="float" /> <description> - Sets the [Curve] of the parameter specified by [enum Parameter]. + Sets the maximum value for the given parameter </description> </method> - <method name="set_param_randomness"> + <method name="set_param_min"> <return type="void" /> <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> - <argument index="1" name="randomness" type="float" /> + <argument index="1" name="value" type="float" /> <description> - Sets the randomness factor of the parameter specified by [enum Parameter]. + Sets the minimum value for the given parameter </description> </method> <method name="set_particle_flag"> @@ -88,41 +86,41 @@ <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial rotation applied to each particle, in degrees. - </member> <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's rotation will be animated along this [Curve]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Rotation randomness ratio. + <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angle. </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angle. </member> <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's angular velocity will vary along this [Curve]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Angular velocity randomness ratio. + <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angular velocity. </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation offset. + <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angular velocity. </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation offset will vary along this [Curve]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation offset randomness ratio. + <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum animation offset. </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation speed. + <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum animation offset. </member> <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation speed will vary along this [Curve]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation speed randomness ratio. + <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum particle animation speed. + </member> + <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum particle animation speed. </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. @@ -130,14 +128,14 @@ <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). </member> - <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> - The rate at which particles lose velocity. - </member> <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Damping will vary along this [Curve]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Damping randomness ratio. + <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum damping. + </member> + <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum damping </member> <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)"> Unit vector specifying the particles' emission direction. @@ -193,20 +191,20 @@ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)"> Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial hue variation applied to each particle. - </member> <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's hue will vary along this [Curve]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Hue variation randomness ratio. + <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum hue variation. </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum hue variation. </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Initial velocity randomness ratio. + <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum value of the initial velocity. + </member> + <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum value of the initial velocity. </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> Amount of time each particle will exist. @@ -214,14 +212,14 @@ <member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0"> Particle lifetime randomness ratio. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Linear acceleration applied to each particle in the direction of motion. - </member> <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's linear acceleration will vary along this [Curve]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Linear acceleration randomness ratio. + <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum linear acceleration. + </member> + <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum linear acceleration. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. @@ -232,15 +230,14 @@ <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. </member> - <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> - Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. - This property is only available when [member particle_flag_disable_z] is [code]true[/code]. - </member> <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's orbital velocity will vary along this [Curve]. </member> - <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Orbital velocity randomness ratio. + <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max"> + Maximum orbit velocity. + </member> + <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min"> + Minimum orbit velocity. </member> <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> Align Y axis of particle with the direction of its velocity. @@ -249,46 +246,58 @@ If [code]true[/code], particles will not move on the Z axis. </member> <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - If [code]true[/code], particles rotate around Y axis by [member angle]. + If [code]true[/code], particles rotate around Y axis by [member angle_min]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Radial acceleration applied to each particle. Makes particle accelerate away from origin. - </member> <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's radial acceleration will vary along this [Curve]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Radial acceleration randomness ratio. + <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum radial acceleration. + </member> + <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum radial acceleration. </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> Emission lifetime randomness ratio. </member> - <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0"> - Initial scale applied to each particle. - </member> <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's scale will vary along this [Curve]. </member> - <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Scale randomness ratio. + <member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0"> + Maximum scale. + </member> + <member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0"> + Minimum scale. + </member> + <member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x"> + Curve for the scale over life, along the x axis. + </member> + <member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y"> + Curve for the scale over life, along the y axis. + </member> + <member name="scale_curve_z" type="Curve" setter="set_scale_curve_z" getter="get_scale_curve_z"> + Curve for the scale over life, along the z axis. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> + <member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false"> + If set to true, three different scale curves can be specified, one per scale axis. + </member> <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - </member> <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's tangential acceleration will vary along this [Curve]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Tangential acceleration randomness ratio. + <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum tangent acceleration. + </member> + <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum tangent acceleration. </member> </members> <constants> @@ -302,40 +311,40 @@ Particles are drawn in order of depth. </constant> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 5228df706b..0a95836e96 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -125,6 +125,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Callable" /> <description> Returns [code]true[/code] if both [Callable]s invoke different targets. @@ -132,6 +137,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Callable" /> <description> Returns [code]true[/code] if both [Callable]s invoke the same custom target. @@ -158,6 +168,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml index fab5f06ba8..70709d269c 100644 --- a/doc/classes/CallbackTweener.xml +++ b/doc/classes/CallbackTweener.xml @@ -22,6 +22,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index d0ff66ae06..a3a891cdcb 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -5,6 +5,7 @@ </brief_description> <description> Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes. + Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]). Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position. </description> @@ -81,7 +82,7 @@ The Camera2D's anchor point. See [enum AnchorMode] constants. </member> <member name="current" type="bool" setter="set_current" getter="is_current" default="false"> - If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. + If [code]true[/code], the camera acts as the active camera for its [Viewport] ancestor. Only one camera can be current in a given viewport, so setting a different camera in the same viewport [code]current[/code] will disable whatever camera was already active in that viewport. </member> <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] or not a [Viewport], uses the default viewport instead. diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 8a91a91b22..cd17a31e23 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -26,7 +26,7 @@ <method name="get_camera_transform" qualifiers="const"> <return type="Transform3D" /> <description> - Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform. + Returns the transform of the camera plus the vertical ([member v_offset]) and horizontal ([member h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [ClippedCamera3D] and [XRCamera3D]. </description> </method> <method name="get_cull_mask_value" qualifiers="const"> diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml index 7a874d31db..5cbd489143 100644 --- a/doc/classes/CameraEffects.xml +++ b/doc/classes/CameraEffects.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1"> The amount of blur for both near and far depth-of-field effects. The amount of blur increases the radius of the blur effect, making the affected area blurrier. However, If the amount is too high, you might start to see lines appearing, especially when using a low quality blur. @@ -40,6 +38,4 @@ If [code]true[/code], overrides the manual or automatic exposure defined in the [Environment] with the value in [member override_exposure]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml index c0730129a9..2030d3bb45 100644 --- a/doc/classes/CameraTexture.xml +++ b/doc/classes/CameraTexture.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="0"> The ID of the [CameraFeed] for which we want to display the image. @@ -22,6 +20,4 @@ Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CanvasGroup.xml b/doc/classes/CanvasGroup.xml index ceeda6c3f5..e9b2c9a915 100644 --- a/doc/classes/CanvasGroup.xml +++ b/doc/classes/CanvasGroup.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="clear_margin" type="float" setter="set_clear_margin" getter="get_clear_margin" default="10.0"> </member> @@ -16,6 +14,4 @@ <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="is_using_mipmaps" default="false"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 2c92ce0185..501f89fa0d 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -106,6 +106,20 @@ Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation. </description> </method> + <method name="draw_msdf_texture_rect_region"> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="src_rect" type="Rect2" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="outline" type="float" default="0.0" /> + <argument index="5" name="pixel_range" type="float" default="4.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 [method FontData.set_multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. + If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius. + Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation. + </description> + </method> <method name="draw_multiline"> <return type="void" /> <argument index="0" name="points" type="PackedVector2Array" /> diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index c2d44c1d17..3f9dd02e4c 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode" default="0"> The manner in which a material's rendering is applied to underlying textures. @@ -30,7 +28,7 @@ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false"> - If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play. + If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed_max] or [member CPUParticles2D.anim_speed_max] should also be set to a positive value for the animation to play. This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes. </member> </members> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 616fb24a6f..2f99f94893 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -45,6 +45,4 @@ The layer's transform. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml index 3540fa423f..d5f85132a5 100644 --- a/doc/classes/CanvasModulate.xml +++ b/doc/classes/CanvasModulate.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> The tint color to apply. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml index f7147d9f0b..28a62ae1e1 100644 --- a/doc/classes/CanvasTexture.xml +++ b/doc/classes/CanvasTexture.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="diffuse_texture" type="Texture2D" setter="set_diffuse_texture" getter="get_diffuse_texture"> </member> @@ -24,6 +22,4 @@ <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml index b8605ccaec..3b4e60ce93 100644 --- a/doc/classes/CapsuleMesh.xml +++ b/doc/classes/CapsuleMesh.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" default="3.0"> Total height of the capsule mesh (including the hemispherical ends). @@ -24,6 +22,4 @@ Number of rings along the height of the capsule. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml index 8ed7d56557..74db0da033 100644 --- a/doc/classes/CapsuleShape2D.xml +++ b/doc/classes/CapsuleShape2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" default="30.0"> The capsule's height. @@ -18,6 +16,4 @@ The capsule's radius. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml index c2b13224cf..8856ec3779 100644 --- a/doc/classes/CapsuleShape3D.xml +++ b/doc/classes/CapsuleShape3D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> - <methods> - </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" default="3.0"> The capsule's height. @@ -19,6 +17,4 @@ The capsule's radius. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml index 435f4eb06b..8f8a978f9e 100644 --- a/doc/classes/CenterContainer.xml +++ b/doc/classes/CenterContainer.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left" default="false"> If [code]true[/code], centers children relative to the [CenterContainer]'s top left corner. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index 1f63b530b1..b00031edf6 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -10,8 +10,6 @@ <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> <link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> - <methods> - </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)"> The color the character will be drawn with. @@ -30,6 +28,12 @@ <member name="font" type="RID" setter="set_font" getter="get_font"> Font resource used to render glyph. </member> + <member name="glyph_count" type="int" setter="set_glyph_count" getter="get_glyph_count" default="0"> + Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing. + </member> + <member name="glyph_flags" type="int" setter="set_glyph_flags" getter="get_glyph_flags" default="0"> + Glyph flags. See [enum TextServer.GraphemeFlag] for more info. Setting this property won't affect drawing. + </member> <member name="glyph_index" type="int" setter="set_glyph_index" getter="get_glyph_index" default="0"> Font specific glyph index. </member> @@ -46,6 +50,4 @@ If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index e23ceedc28..882aa8bd71 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> - Character body 2D node. + Specialized 2D physics body node for characters moved by script. </brief_description> <description> - Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses: - [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. - [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path. + Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody2D]. However, they have two main uses: + [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody2D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. + [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody2D]), which allows them to be moved by code and push other bodies on their path. </description> <tutorials> <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> @@ -107,10 +107,11 @@ <method name="move_and_slide"> <return type="bool" /> <description> - Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidDynamicBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. Modifies [member linear_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision]. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. + The general behaviour and available properties change according to the [member motion_mode]. Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code]. </description> </method> @@ -139,14 +140,23 @@ <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="false"> If [code]true[/code], the body will not slide on floor's slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. </member> + <member name="free_mode_min_slide_angle" type="float" setter="set_free_mode_min_slide_angle" getter="get_free_mode_min_slide_angle" default="0.261799"> + Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. + </member> <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)"> Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. </member> <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. </member> - <member name="moving_platform_ignore_layers" type="int" setter="set_moving_platform_ignore_layers" getter="get_moving_platform_ignore_layers" default="0"> - Collision layers that will be excluded for detecting bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all touching bodies are detected and propagate their velocity. You can add excluded layers to ignore bodies that are contained in these layers. + <member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0"> + Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes. + </member> + <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295"> + Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity. + </member> + <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0"> + Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored. </member> <member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true"> If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically. @@ -156,5 +166,11 @@ </member> </members> <constants> + <constant name="MOTION_MODE_GROUNDED" value="0" enum="MotionMode"> + Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers. + </constant> + <constant name="MOTION_MODE_FREE" value="1" enum="MotionMode"> + Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games. + </constant> </constants> </class> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 85135d5509..f13796bfe7 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0"> <brief_description> - Character body 3D node. + Specialized 3D physics body node for characters moved by script. </brief_description> <description> - Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses: + Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody3D]. However, they have two main uses: [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. - [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path. + [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody3D]), which allows them to be moved by code and push other bodies on their path. </description> <tutorials> <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> @@ -29,6 +29,12 @@ Returns the surface normal 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]. </description> </method> + <method name="get_last_motion" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the last motion applied to the [CharacterBody3D] during the last call to [method move_and_slide]. The movement can be split if needed into multiple motion, this method return the last one, it's useful to retrieve the current direction of the movement. + </description> + </method> <method name="get_last_slide_collision"> <return type="KinematicCollision3D" /> <description> @@ -41,6 +47,18 @@ 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]. </description> </method> + <method name="get_position_delta" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the travel (position delta) that occurred during the last call to [method move_and_slide]. + </description> + </method> + <method name="get_real_velocity" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member linear_velocity] which returns the requested velocity. + </description> + </method> <method name="get_slide_collision"> <return type="KinematicCollision3D" /> <argument index="0" name="slide_idx" type="int" /> @@ -54,6 +72,12 @@ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. </description> </method> + <method name="get_wall_normal" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the surface normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code]. + </description> + </method> <method name="is_on_ceiling" qualifiers="const"> <return type="bool" /> <description> @@ -93,7 +117,7 @@ <method name="move_and_slide"> <return type="bool" /> <description> - Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidDynamicBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. Modifies [member linear_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision]. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. @@ -108,26 +132,66 @@ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. </member> + <member name="floor_block_on_wall" type="bool" setter="set_floor_block_on_wall_enabled" getter="is_floor_block_on_wall_enabled" default="true"> + If [code]true[/code], the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. + </member> + <member name="floor_constant_speed" type="bool" setter="set_floor_constant_speed_enabled" getter="is_floor_constant_speed_enabled" default="false"> + If [code]false[/code] (by default), the body will move faster on downward slopes and slower on upward slopes. + If [code]true[/code], the body will always move at the same speed on the ground no matter the slope. Note that you need to use [member floor_snap_length] to stick along a downward slope at constant speed. + </member> <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. </member> + <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.1"> + Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. + As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. + </member> <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="false"> If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. </member> <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)"> Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]. </member> - <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> + <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="6"> Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. </member> - <member name="snap" type="Vector3" setter="set_snap" getter="get_snap" default="Vector3(0, 0, 0)"> - When set to a value different from [code]Vector3(0, 0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector3(0, 0, 0)[/code]. + <member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody3D.MotionMode" default="0"> + Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes. + </member> + <member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody3D.MovingPlatformApplyVelocityOnLeave" default="0"> + Sets the behaviour to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behaviour. + </member> + <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295"> + Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity. + </member> + <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0"> + Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored. + </member> + <member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true"> + If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically. </member> <member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3(0, 1, 0)"> Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. </member> + <member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.261799"> + Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. In [code]MOTION_MODE_GROUNDED[/code], it works only when [member floor_block_on_wall] is [code]true[/code]. + </member> </members> <constants> + <constant name="MOTION_MODE_GROUNDED" value="0" enum="MotionMode"> + Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers. + </constant> + <constant name="MOTION_MODE_FREE" value="1" enum="MotionMode"> + Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games. + </constant> + <constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave"> + Add the last platform velocity to the [member linear_velocity] when you leave a moving platform. + </constant> + <constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave"> + Add the last platform velocity to the [member linear_velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. + </constant> + <constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave"> + Do nothing when leaving a platform. + </constant> </constants> </class> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index f13a6ea34a..a674fa8339 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -9,14 +9,10 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" /> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" /> </members> - <constants> - </constants> <theme_items> <theme_item name="check_vadjust" data_type="constant" type="int" default="0"> The vertical offset used when rendering the check icons (in pixels). diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index a0a05bcb79..12bd493ae1 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -9,14 +9,10 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" /> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" /> </members> - <constants> - </constants> <theme_items> <theme_item name="check_vadjust" data_type="constant" type="int" default="0"> The vertical offset used when rendering the toggle icons (in pixels). diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml index db889b0f1b..3969734d3f 100644 --- a/doc/classes/CircleShape2D.xml +++ b/doc/classes/CircleShape2D.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> The circle's radius. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 063233fe50..5f39fc48e0 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -30,6 +30,23 @@ Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required. </description> </method> + <method name="class_get_enum_constants" qualifiers="const"> + <return type="PackedStringArray" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="enum" type="StringName" /> + <argument index="2" name="no_inheritance" type="bool" default="false" /> + <description> + Returns an array with all the keys in [code]enum[/code] of [code]class[/code] or its ancestry. + </description> + </method> + <method name="class_get_enum_list" qualifiers="const"> + <return type="PackedStringArray" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="no_inheritance" type="bool" default="false" /> + <description> + Returns an array with all the enums of [code]class[/code] or its ancestry. + </description> + </method> <method name="class_get_integer_constant" qualifiers="const"> <return type="int" /> <argument index="0" name="class" type="StringName" /> @@ -38,6 +55,15 @@ Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found. </description> </method> + <method name="class_get_integer_constant_enum" qualifiers="const"> + <return type="StringName" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="no_inheritance" type="bool" default="false" /> + <description> + Returns which enum the integer constant [code]name[/code] of [code]class[/code] or its ancestry belongs to. + </description> + </method> <method name="class_get_integer_constant_list" qualifiers="const"> <return type="PackedStringArray" /> <argument index="0" name="class" type="StringName" /> @@ -87,6 +113,15 @@ Returns an array with all the signals of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal]. </description> </method> + <method name="class_has_enum" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="no_inheritance" type="bool" default="false" /> + <description> + Returns whether [code]class[/code] or its ancestry has an enum called [code]name[/code] or not. + </description> + </method> <method name="class_has_integer_constant" qualifiers="const"> <return type="bool" /> <argument index="0" name="class" type="StringName" /> @@ -164,6 +199,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 47078330f3..d856990ff8 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -17,9 +17,9 @@ Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced. </description> </method> - <method name="_filter_code_completion_candidates" qualifiers="virtual"> + <method name="_filter_code_completion_candidates" qualifiers="virtual const"> <return type="Array" /> - <argument index="0" name="candidates" type="Array" /> + <argument index="0" name="candidates" type="Dictionary[]" /> <description> Override this method to define what items in [code]candidates[/code] should be displayed. Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. @@ -671,6 +671,12 @@ <theme_item name="read_only" data_type="style" type="StyleBox"> Sets the [StyleBox] when [member TextEdit.editable] is disabled. </theme_item> + <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)"> + [Color] of the border around text that matches the search query. + </theme_item> + <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)"> + [Color] behind the text that matches the search query. + </theme_item> <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Sets the highlight [Color] of text selections. </theme_item> diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml index 2b93188d10..064be0c29d 100644 --- a/doc/classes/CodeHighlighter.xml +++ b/doc/classes/CodeHighlighter.xml @@ -138,6 +138,4 @@ Sets the color for symbols. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 7129c72e7c..ba1ee3909d 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -11,7 +11,7 @@ <methods> <method name="_input_event" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="viewport" type="Object" /> + <argument index="0" name="viewport" type="Viewport" /> <argument index="1" name="event" type="InputEvent" /> <argument index="2" name="shape_idx" type="int" /> <description> diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index f9151a2c2f..19bcdcbb27 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -11,7 +11,7 @@ <methods> <method name="_input_event" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="camera" type="Object" /> + <argument index="0" name="camera" type="Camera3D" /> <argument index="1" name="event" type="InputEvent" /> <argument index="2" name="position" type="Vector3" /> <argument index="3" name="normal" type="Vector3" /> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index 4607ab3fbd..cdaa0638ba 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0"> Collision build mode. Use one of the [enum BuildMode] constants. diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml index cf0e55e712..b70f517da1 100644 --- a/doc/classes/CollisionPolygon3D.xml +++ b/doc/classes/CollisionPolygon3D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0"> Length that the resulting collision extends in either direction perpendicular to its polygon. @@ -25,6 +23,4 @@ [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index c03eba82ff..5159b2b15b 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -12,8 +12,6 @@ <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link> <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> - <methods> - </methods> <members> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred]. @@ -28,6 +26,4 @@ The actual shape owned by this collision shape. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml index 9184b672ff..84e362c38b 100644 --- a/doc/classes/CollisionShape3D.xml +++ b/doc/classes/CollisionShape3D.xml @@ -35,6 +35,4 @@ The actual shape owned by this collision shape. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index f00a20e95e..c85bc775c7 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -261,6 +261,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Color" /> <description> </description> @@ -315,6 +320,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Color" /> <description> </description> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 99e121de75..571ffd592a 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -116,7 +116,7 @@ </theme_item> <theme_item name="picker_cursor" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="preset_bg" data_type="icon" type="Texture2D"> + <theme_item name="sample_bg" data_type="icon" type="Texture2D"> </theme_item> <theme_item name="screen_picker" data_type="icon" type="Texture2D"> The icon for the screen color picker button. diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 6b5a9f2503..dcef1c55f7 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -52,8 +52,6 @@ </description> </signal> </signals> - <constants> - </constants> <theme_items> <theme_item name="bg" data_type="icon" type="Texture2D"> The background of the color preview rect on the button. diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml index 84955fed8a..db0dfc705e 100644 --- a/doc/classes/ColorRect.xml +++ b/doc/classes/ColorRect.xml @@ -9,8 +9,6 @@ <tutorials> <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> - <methods> - </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> The fill color. @@ -24,6 +22,4 @@ [/codeblocks] </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml index e6b2e1845d..2ace8c72d7 100644 --- a/doc/classes/ConcavePolygonShape2D.xml +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -4,18 +4,14 @@ Concave polygon 2D shape resource for physics. </brief_description> <description> - Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. + Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidDynamicBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array()"> The array of points that make up the [ConcavePolygonShape2D]'s line segments. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml index 34fb06a476..ac569a8992 100644 --- a/doc/classes/ConcavePolygonShape3D.xml +++ b/doc/classes/ConcavePolygonShape3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles. - Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] with a mode other than Static. + Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidDynamicBody3D] with a mode other than Static. </description> <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> @@ -30,6 +30,4 @@ If set to [code]true[/code], collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index f970be23a6..4f6f099ebd 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -84,8 +84,10 @@ } [/csharp] [/codeblocks] + Any operation that mutates the ConfigFile such as [method set_value], [method clear], or [method erase_section], only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with [method save], [method save_encrypted], or [method save_encrypted_pass]. Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. ConfigFiles can also contain manually written comment lines starting with a semicolon ([code];[/code]). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action. + [b]Note:[/b] The file extension given to a ConfigFile does not have any impact on its formatting or behavior. By convention, the [code].cfg[/code] extension is used here, but any other extension such as [code].ini[/code] is also valid. Since neither [code].cfg[/code] nor [code].ini[/code] are standardized, Godot's ConfigFile formatting may differ from files written by other programs. </description> <tutorials> </tutorials> @@ -93,6 +95,7 @@ <method name="clear"> <return type="void" /> <description> + Removes the entire contents of the config. </description> </method> <method name="erase_section"> @@ -149,6 +152,8 @@ </method> <method name="load"> <return type="int" enum="Error" /> + <returns_error number="0"/> + <returns_error number="12"/> <argument index="0" name="path" type="String" /> <description> Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. @@ -217,6 +222,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 871082696c..352631da1d 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -30,6 +30,4 @@ <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i(200, 100)" /> <member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Please Confirm..."" /> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 0834521c91..c9a2de66a8 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -22,9 +22,9 @@ <link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link> </tutorials> <methods> - <method name="_can_drop_data" qualifiers="virtual"> + <method name="_can_drop_data" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="position" type="Vector2" /> + <argument index="0" name="at_position" type="Vector2" /> <argument index="1" name="data" type="Variant" /> <description> Godot calls this method to test if [code]data[/code] from a control's [method _get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control. @@ -49,7 +49,7 @@ </method> <method name="_drop_data" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="position" type="Vector2" /> + <argument index="0" name="at_position" type="Vector2" /> <argument index="1" name="data" type="Variant" /> <description> Godot calls this method to pass you the [code]data[/code] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control. @@ -73,9 +73,9 @@ [/codeblocks] </description> </method> - <method name="_get_drag_data" qualifiers="virtual"> + <method name="_get_drag_data" qualifiers="virtual const"> <return type="Variant" /> - <argument index="0" name="position" type="Vector2" /> + <argument index="0" name="at_position" type="Vector2" /> <description> Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag]. A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. @@ -97,7 +97,7 @@ [/codeblocks] </description> </method> - <method name="_get_minimum_size" qualifiers="virtual"> + <method name="_get_minimum_size" qualifiers="virtual const"> <return type="Vector2" /> <description> Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member rect_min_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). @@ -137,19 +137,20 @@ * control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE]; * control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event; * it happens outside the parent's rectangle and the parent has either [member rect_clip_content] enabled. + [b]Note:[/b] Event position is relative to the control origin. </description> </method> <method name="_has_point" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="" type="Vector2" /> + <argument index="0" name="position" type="Vector2" /> <description> Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control. If not overridden, default behavior is checking if the point is within control's Rect. [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. </description> </method> - <method name="_make_custom_tooltip" qualifiers="virtual"> - <return type="Control" /> + <method name="_make_custom_tooltip" qualifiers="virtual const"> + <return type="Object" /> <argument index="0" name="for_text" type="String" /> <description> Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property. @@ -193,8 +194,8 @@ [/codeblocks] </description> </method> - <method name="_structured_text_parser" qualifiers="virtual"> - <return type="void" /> + <method name="_structured_text_parser" qualifiers="virtual const"> + <return type="Array" /> <argument index="0" name="args" type="Array" /> <argument index="1" name="text" type="String" /> <description> @@ -921,7 +922,8 @@ Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. </member> <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true"> - Toggles if any text should automatically change to its translated version depending on the current locale. + Toggles if any text should automatically change to its translated version depending on the current locale. Note that this will not affect any internal nodes (e.g. the popup of a [MenuButton]). + Also decides if the node's strings should be parsed for POT generation. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0"> The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals. diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index 243605e2b7..ec7583e68b 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -23,6 +23,4 @@ The polygon's list of vertices. Can be in either clockwise or counterclockwise order. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml index a5c86526b0..832e073665 100644 --- a/doc/classes/ConvexPolygonShape3D.xml +++ b/doc/classes/ConvexPolygonShape3D.xml @@ -9,13 +9,9 @@ <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> - <methods> - </methods> <members> <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array()"> The list of 3D points forming the convex polygon shape. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index 3d7ca956da..a87c8bfab2 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -171,6 +171,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index afe2c6b301..5665c629a8 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -51,6 +51,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml index 61cb1d43f0..886dc36bdf 100644 --- a/doc/classes/Cubemap.xml +++ b/doc/classes/Cubemap.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Cubemap" inherits="ImageTextureLayered" version="4.0"> <brief_description> + 6-sided texture typically used in 3D rendering. </brief_description> <description> + A cubemap is a 6-sided texture typically used for faking reflections in 3D rendering. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. + This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of Cubemap resources. + [b]Note:[/b] Godot doesn't support using cubemaps as a [PanoramaSkyMaterial]. You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map. </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml index 627baf79e0..9f2231886d 100644 --- a/doc/classes/CubemapArray.xml +++ b/doc/classes/CubemapArray.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index c02b0f7ead..8c5b39a895 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -156,6 +156,4 @@ The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 5839ccba02..30e9e2ac68 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -198,6 +198,4 @@ If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow3D.rotation_mode] is set to [constant PathFollow3D.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml index 54065fe0f9..fe75f029f0 100644 --- a/doc/classes/CurveTexture.xml +++ b/doc/classes/CurveTexture.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> The [code]curve[/code] rendered onto the texture. diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml index 9afeb58060..815653e987 100644 --- a/doc/classes/CurveXYZTexture.xml +++ b/doc/classes/CurveXYZTexture.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="curve_x" type="Curve" setter="set_curve_x" getter="get_curve_x"> </member> @@ -18,6 +16,4 @@ <member name="width" type="int" setter="set_width" getter="get_width" default="2048"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml index 827fb5c10c..077435990b 100644 --- a/doc/classes/CylinderMesh.xml +++ b/doc/classes/CylinderMesh.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="1.0"> Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape. @@ -27,6 +25,4 @@ Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml index 99334ceae6..d40b96710b 100644 --- a/doc/classes/CylinderShape3D.xml +++ b/doc/classes/CylinderShape3D.xml @@ -11,8 +11,6 @@ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> - <methods> - </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> The cylinder's height. @@ -21,6 +19,4 @@ The cylinder's radius. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 627a7a65a5..16e65eaadf 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -164,6 +164,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml index e1b6bb6866..76e38d5271 100644 --- a/doc/classes/DampedSpringJoint2D.xml +++ b/doc/classes/DampedSpringJoint2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="damping" type="float" setter="set_damping" getter="get_damping" default="1.0"> The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [code]damping[/code] value forces the attached bodies to align faster. @@ -24,6 +22,4 @@ The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 59088f33fd..0575ea3eef 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -290,12 +290,22 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Dictionary" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Dictionary" /> <description> </description> @@ -319,6 +329,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/DirectionalLight2D.xml b/doc/classes/DirectionalLight2D.xml index a6eb780159..317cf6e66c 100644 --- a/doc/classes/DirectionalLight2D.xml +++ b/doc/classes/DirectionalLight2D.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" default="0.0"> The height of the light. Used with 2D normal mapping. @@ -15,6 +13,4 @@ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="10000.0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index e3badea0f4..7c006ad3a6 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="Lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> - <methods> - </methods> <members> <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false"> If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index e8e5a286b4..c8fda27989 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -192,6 +192,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index abb715b34e..4f495eaec9 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -649,6 +649,8 @@ <argument index="0" name="min_size" type="Vector2i" /> <argument index="1" name="window_id" type="int" default="0" /> <description> + Sets the minimum size for the given window to [code]min_size[/code] (in pixels). + [b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size. </description> </method> <method name="window_set_mode"> diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml index 743c59eec2..01b8593f89 100644 --- a/doc/classes/EditorCommandPalette.xml +++ b/doc/classes/EditorCommandPalette.xml @@ -1,8 +1,26 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorCommandPalette" inherits="ConfirmationDialog" version="4.0"> <brief_description> + Godot editor's command palette. </brief_description> <description> + Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through [b]Editor > Command Palette[/b] menu. + Command key names use slash delimiters to distinguish sections Example: [code]"example/command1"[/code] then [code]example[/code] will be the section name. + [codeblocks] + [gdscript] + var command_palette = get_editor_interface().get_command_palette() + # external_command is a function that will be called with the command is executed. + var command_callable = Callable(self, "external_command").bind(arguments) + command_palette.add_command("command", "test/command",command_callable) + [/gdscript] + [csharp] + EditorCommandPalette commandPalette = GetEditorInterface().GetCommandPalette(); + // ExternalCommand is a function that will be called with the command is executed. + Callable commandCallable = new Callable(this, nameof(ExternalCommand)); + commandPalette.AddCommand("command", "test/command", commandCallable) + [/csharp] + [/codeblocks] + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_command_palette]. </description> <tutorials> </tutorials> @@ -14,18 +32,23 @@ <argument index="2" name="binded_callable" type="Callable" /> <argument index="3" name="shortcut_text" type="String" default=""None"" /> <description> + Adds a custom command to EditorCommandPalette. + - [code]command_name[/code]: [String] (Name of the [b]Command[/b]. This is displayed to the user.) + - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b]. This is used to uniquely identify the [b]Command[/b].) + - [code]binded_callable[/code]: [Callable] (Callable of the [b]Command[/b]. This will be executed when the [b]Command[/b] is selected.) + - [code]shortcut_text[/code]: [String] (Shortcut text of the [b]Command[/b] if available.) </description> </method> <method name="remove_command"> <return type="void" /> <argument index="0" name="key_name" type="String" /> <description> + Removes the custom command from EditorCommandPalette. + - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b].) </description> </method> </methods> <members> <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" /> </members> - <constants> - </constants> </class> diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml index d67df8dfee..0773e176b3 100644 --- a/doc/classes/EditorDebuggerPlugin.xml +++ b/doc/classes/EditorDebuggerPlugin.xml @@ -84,6 +84,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 16c50b4d3e..fca7bb350d 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -110,6 +110,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 6befe32e7a..859480078b 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -93,6 +93,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index a8f94101a7..6a0a94a4c4 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -103,6 +103,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index b379ccc8c6..f20f4adcdf 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -113,28 +113,28 @@ <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link> </tutorials> <methods> - <method name="_get_import_options" qualifiers="virtual"> + <method name="_get_import_options" qualifiers="virtual const"> <return type="Array" /> - <argument index="0" name="preset" type="int" /> + <argument index="0" name="preset_index" type="int" /> <description> Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional). </description> </method> - <method name="_get_import_order" qualifiers="virtual"> + <method name="_get_import_order" qualifiers="virtual const"> <return type="int" /> <description> Gets the order of this importer to be run when importing resources. Importers with [i]lower[/i] import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is [code]0[/code] unless overridden by a specific importer. See [enum ResourceImporter.ImportOrder] for some predefined values. </description> </method> - <method name="_get_importer_name" qualifiers="virtual"> + <method name="_get_importer_name" qualifiers="virtual const"> <return type="String" /> <description> Gets the unique name of the importer. </description> </method> - <method name="_get_option_visibility" qualifiers="virtual"> + <method name="_get_option_visibility" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="option" type="String" /> + <argument index="0" name="option_name" type="StringName" /> <argument index="1" name="options" type="Dictionary" /> <description> This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example: @@ -163,50 +163,50 @@ Return [code]true[/code] to make all options always visible. </description> </method> - <method name="_get_preset_count" qualifiers="virtual"> + <method name="_get_preset_count" qualifiers="virtual const"> <return type="int" /> <description> Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset. </description> </method> - <method name="_get_preset_name" qualifiers="virtual"> + <method name="_get_preset_name" qualifiers="virtual const"> <return type="String" /> - <argument index="0" name="preset" type="int" /> + <argument index="0" name="preset_index" type="int" /> <description> Gets the name of the options preset at this index. </description> </method> - <method name="_get_priority" qualifiers="virtual"> + <method name="_get_priority" qualifiers="virtual const"> <return type="float" /> <description> Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is [code]1.0[/code]. </description> </method> - <method name="_get_recognized_extensions" qualifiers="virtual"> - <return type="Array" /> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> Gets the list of file extensions to associate with this loader (case-insensitive). e.g. [code]["obj"][/code]. </description> </method> - <method name="_get_resource_type" qualifiers="virtual"> + <method name="_get_resource_type" qualifiers="virtual const"> <return type="String" /> <description> Gets the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code]. </description> </method> - <method name="_get_save_extension" qualifiers="virtual"> + <method name="_get_save_extension" qualifiers="virtual const"> <return type="String" /> <description> Gets the extension used to save this resource in the [code].godot/imported[/code] directory. </description> </method> - <method name="_get_visible_name" qualifiers="virtual"> + <method name="_get_visible_name" qualifiers="virtual const"> <return type="String" /> <description> Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh". </description> </method> - <method name="_import" qualifiers="virtual"> + <method name="_import" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="source_file" type="String" /> <argument index="1" name="save_path" type="String" /> @@ -219,6 +219,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 515c4b4d32..0c47298180 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" /> </members> @@ -66,6 +64,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index 62fd7a1d6e..17397b80bf 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -16,9 +16,9 @@ <link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link> </tutorials> <methods> - <method name="_can_handle" qualifiers="virtual"> + <method name="_can_handle" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="object" type="Object" /> + <argument index="0" name="object" type="Variant" /> <description> Returns [code]true[/code] if this object can be handled by this plugin. </description> @@ -31,9 +31,9 @@ </method> <method name="_parse_category" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="category" type="String" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="category" type="String" /> <description> - Called to allow adding controls at the beginning of the category. </description> </method> <method name="_parse_end" qualifiers="virtual"> @@ -44,11 +44,13 @@ </method> <method name="_parse_property" qualifiers="virtual"> <return type="bool" /> - <argument index="0" name="type" type="int" /> - <argument index="1" name="path" type="String" /> - <argument index="2" name="hint" type="int" /> - <argument index="3" name="hint_text" type="String" /> - <argument index="4" name="usage" type="int" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="type" type="int" /> + <argument index="2" name="name" type="String" /> + <argument index="3" name="hint_type" type="int" /> + <argument index="4" name="hint_string" type="String" /> + <argument index="5" name="usage_flags" type="int" /> + <argument index="6" name="wide" type="bool" /> <description> Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. </description> @@ -78,6 +80,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 91e1dfbf57..ad878aad80 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -33,6 +33,7 @@ <method name="get_command_palette" qualifiers="const"> <return type="EditorCommandPalette" /> <description> + Returns the editor's [EditorCommandPalette] instance. </description> </method> <method name="get_current_path" qualifiers="const"> @@ -237,6 +238,4 @@ If [code]true[/code], enables distraction-free mode which hides side docks to increase the space available for the main view. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index 39f6805254..a2eac01ae8 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -13,7 +13,7 @@ <return type="void" /> <argument index="0" name="id" type="int" /> <argument index="1" name="restore" type="Variant" /> - <argument index="2" name="cancel" type="bool" default="false" /> + <argument index="2" name="cancel" type="bool" /> <description> Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. @@ -22,14 +22,14 @@ <method name="_commit_subgizmos" qualifiers="virtual"> <return type="void" /> <argument index="0" name="ids" type="PackedInt32Array" /> - <argument index="1" name="restore" type="Array" /> - <argument index="2" name="cancel" type="bool" default="false" /> + <argument index="1" name="restores" type="Transform3D[]" /> + <argument index="2" name="cancel" type="bool" /> <description> Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. </description> </method> - <method name="_get_handle_name" qualifiers="virtual"> + <method name="_get_handle_name" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="id" type="int" /> <description> @@ -37,21 +37,21 @@ Handles can be named for reference to the user when editing. </description> </method> - <method name="_get_handle_value" qualifiers="virtual"> + <method name="_get_handle_value" qualifiers="virtual const"> <return type="Variant" /> <argument index="0" name="id" type="int" /> <description> Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. </description> </method> - <method name="_get_subgizmo_transform" qualifiers="virtual"> + <method name="_get_subgizmo_transform" qualifiers="virtual const"> <return type="Transform3D" /> <argument index="0" name="id" type="int" /> <description> Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_subgizmos]. </description> </method> - <method name="_is_handle_highlighted" qualifiers="virtual"> + <method name="_is_handle_highlighted" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="id" type="int" /> <description> @@ -81,15 +81,15 @@ Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. </description> </method> - <method name="_subgizmos_intersect_frustum" qualifiers="virtual"> + <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> <return type="PackedInt32Array" /> <argument index="0" name="camera" type="Camera3D" /> - <argument index="1" name="frustum" type="Array" /> + <argument index="1" name="frustum" type="Plane[]" /> <description> Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. </description> </method> - <method name="_subgizmos_intersect_ray" qualifiers="virtual"> + <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="camera" type="Camera3D" /> <argument index="1" name="point" type="Vector2" /> @@ -198,6 +198,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index fb72427a7a..424d5dd310 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -10,7 +10,7 @@ <link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> </tutorials> <methods> - <method name="_can_be_hidden" qualifiers="virtual"> + <method name="_can_be_hidden" qualifiers="virtual const"> <return type="bool" /> <description> Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns [code]true[/code] if not overridden. @@ -19,9 +19,9 @@ <method name="_commit_handle" qualifiers="virtual"> <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <argument index="2" name="restore" type="Variant" /> - <argument index="3" name="cancel" type="bool" default="false" /> + <argument index="3" name="cancel" type="bool" /> <description> Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. Called for this plugin's active gizmos. @@ -31,73 +31,73 @@ <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> <argument index="1" name="ids" type="PackedInt32Array" /> - <argument index="2" name="restore" type="Array" /> - <argument index="3" name="cancel" type="bool" default="false" /> + <argument index="2" name="restores" type="Transform3D[]" /> + <argument index="3" name="cancel" type="bool" /> <description> Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. </description> </method> - <method name="_create_gizmo" qualifiers="virtual"> + <method name="_create_gizmo" qualifiers="virtual const"> <return type="EditorNode3DGizmo" /> - <argument index="0" name="spatial" type="Node3D" /> + <argument index="0" name="for_node_3d" type="Node3D" /> <description> Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method _has_gizmo]. </description> </method> - <method name="_get_gizmo_name" qualifiers="virtual"> + <method name="_get_gizmo_name" qualifiers="virtual const"> <return type="String" /> <description> Override this method to provide the name that will appear in the gizmo visibility menu. </description> </method> - <method name="_get_handle_name" qualifiers="virtual"> + <method name="_get_handle_name" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <description> Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. </description> </method> - <method name="_get_handle_value" qualifiers="virtual"> + <method name="_get_handle_value" qualifiers="virtual const"> <return type="Variant" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <description> Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. Called for this plugin's active gizmos. </description> </method> - <method name="_get_priority" qualifiers="virtual"> + <method name="_get_priority" qualifiers="virtual const"> <return type="int" /> <description> Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically get higher priority than built-in gizmos. </description> </method> - <method name="_get_subgizmo_transform" qualifiers="virtual"> + <method name="_get_subgizmo_transform" qualifiers="virtual const"> <return type="Transform3D" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="subgizmo_id" type="int" /> <description> Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the [code]restore[/code] argument in [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> - <method name="_has_gizmo" qualifiers="virtual"> + <method name="_has_gizmo" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="spatial" type="Node3D" /> + <argument index="0" name="for_node_3d" type="Node3D" /> <description> Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos. </description> </method> - <method name="_is_handle_highlighted" qualifiers="virtual"> + <method name="_is_handle_highlighted" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <description> Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. Called for this plugin's active gizmos. </description> </method> - <method name="_is_selectable_when_hidden" qualifiers="virtual"> + <method name="_is_selectable_when_hidden" qualifiers="virtual const"> <return type="bool" /> <description> Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. @@ -113,9 +113,9 @@ <method name="_set_handle" qualifiers="virtual"> <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <argument index="2" name="camera" type="Camera3D" /> - <argument index="3" name="point" type="Vector2" /> + <argument index="3" name="screen_pos" type="Vector2" /> <description> Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. Called for this plugin's active gizmos. </description> @@ -123,26 +123,26 @@ <method name="_set_subgizmo_transform" qualifiers="virtual"> <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="subgizmo_id" type="int" /> <argument index="2" name="transform" type="Transform3D" /> <description> Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. </description> </method> - <method name="_subgizmos_intersect_frustum" qualifiers="virtual"> + <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> <return type="PackedInt32Array" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> <argument index="1" name="camera" type="Camera3D" /> - <argument index="2" name="frustum" type="Array" /> + <argument index="2" name="frustum_planes" type="Plane[]" /> <description> Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> - <method name="_subgizmos_intersect_ray" qualifiers="virtual"> + <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> <argument index="1" name="camera" type="Camera3D" /> - <argument index="2" name="point" type="Vector2" /> + <argument index="2" name="screen_pos" type="Vector2" /> <description> Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> @@ -195,6 +195,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml index 28a8314857..92a2cff27f 100644 --- a/doc/classes/EditorPaths.xml +++ b/doc/classes/EditorPaths.xml @@ -33,6 +33,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 37efca7f48..b8436be76a 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -38,7 +38,7 @@ </method> <method name="_edit" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="object" type="Object" /> + <argument index="0" name="object" type="Variant" /> <description> This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. </description> @@ -49,18 +49,18 @@ Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window. </description> </method> - <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual"> + <method name="_forward_3d_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. [codeblocks] [gdscript] - func _forward_canvas_draw_over_viewport(overlay): + func _forward_3d_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) - func _forward_canvas_gui_input(event): + func _forward_3d_gui_input(camera, event): if event is InputEventMouseMotion: # Redraw viewport when cursor is moved. update_overlays() @@ -68,13 +68,13 @@ return false [/gdscript] [csharp] - public override void ForwardCanvasDrawOverViewport(Godot.Control overlay) + public override void _Forward3dDrawOverViewport(Godot.Control overlay) { // Draw a circle at cursor position. overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); } - public override bool ForwardCanvasGuiInput(InputEvent @event) + public override bool _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event) { if (@event is InputEventMouseMotion) { @@ -87,28 +87,29 @@ [/codeblocks] </description> </method> - <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual"> + <method name="_forward_3d_force_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + This method is the same as [method _forward_3d_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. </description> </method> - <method name="_forward_canvas_gui_input" qualifiers="virtual"> + <method name="_forward_3d_gui_input" qualifiers="virtual"> <return type="bool" /> - <argument index="0" name="event" type="InputEvent" /> + <argument index="0" name="viewport_camera" type="Camera3D" /> + <argument index="1" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: [codeblocks] [gdscript] - # Prevents the InputEvent to reach other Editor classes - func _forward_canvas_gui_input(event): + # Prevents the InputEvent to reach other Editor classes. + func _forward_3d_gui_input(camera, event): return true [/gdscript] [csharp] - // Prevents the InputEvent to reach other Editor classes - public override bool ForwardCanvasGuiInput(InputEvent @event) + // Prevents the InputEvent to reach other Editor classes. + public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event) { return true; } @@ -118,12 +119,12 @@ [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. - func _forward_canvas_gui_input(event): + func _forward_3d_gui_input(camera, event): return event is InputEventMouseMotion [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. - public override bool ForwardCanvasGuiInput(InputEvent @event) + public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event) { return @event is InputEventMouseMotion; } @@ -131,18 +132,18 @@ [/codeblocks] </description> </method> - <method name="_forward_spatial_draw_over_viewport" qualifiers="virtual"> + <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. [codeblocks] [gdscript] - func _forward_spatial_draw_over_viewport(overlay): + func _forward_canvas_draw_over_viewport(overlay): # Draw a circle at cursor position. - overlay.draw_circle(overlay.get_local_mouse_position(), 64) + overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white) - func _forward_spatial_gui_input(camera, event): + func _forward_canvas_gui_input(event): if event is InputEventMouseMotion: # Redraw viewport when cursor is moved. update_overlays() @@ -150,13 +151,13 @@ return false [/gdscript] [csharp] - public override void ForwardSpatialDrawOverViewport(Godot.Control overlay) + public override void ForwardCanvasDrawOverViewport(Godot.Control overlay) { // Draw a circle at cursor position. overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); } - public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event) + public override bool ForwardCanvasGuiInput(InputEvent @event) { if (@event is InputEventMouseMotion) { @@ -169,29 +170,28 @@ [/codeblocks] </description> </method> - <method name="_forward_spatial_force_draw_over_viewport" qualifiers="virtual"> + <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - This method is the same as [method _forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. </description> </method> - <method name="_forward_spatial_gui_input" qualifiers="virtual"> + <method name="_forward_canvas_gui_input" qualifiers="virtual"> <return type="bool" /> - <argument index="0" name="camera" type="Camera3D" /> - <argument index="1" name="event" type="InputEvent" /> + <argument index="0" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: [codeblocks] [gdscript] - # Prevents the InputEvent to reach other Editor classes. - func _forward_spatial_gui_input(camera, event): + # Prevents the InputEvent to reach other Editor classes + func _forward_canvas_gui_input(event): return true [/gdscript] [csharp] - // Prevents the InputEvent to reach other Editor classes. - public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) + // Prevents the InputEvent to reach other Editor classes + public override bool ForwardCanvasGuiInput(InputEvent @event) { return true; } @@ -201,12 +201,12 @@ [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. - func _forward_spatial_gui_input(camera, event): + func _forward_canvas_gui_input(event): return event is InputEventMouseMotion [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. - public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) + public override bool ForwardCanvasGuiInput(InputEvent @event) { return @event is InputEventMouseMotion; } @@ -214,13 +214,13 @@ [/codeblocks] </description> </method> - <method name="_get_breakpoints" qualifiers="virtual"> + <method name="_get_breakpoints" qualifiers="virtual const"> <return type="PackedStringArray" /> <description> This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code]. </description> </method> - <method name="_get_plugin_icon" qualifiers="virtual"> + <method name="_get_plugin_icon" qualifiers="virtual const"> <return type="Texture2D" /> <description> Override this method in your plugin to return a [Texture2D] in order to give it an icon. @@ -246,14 +246,14 @@ [/codeblocks] </description> </method> - <method name="_get_plugin_name" qualifiers="virtual"> + <method name="_get_plugin_name" qualifiers="virtual const"> <return type="String" /> <description> Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. </description> </method> - <method name="_get_state" qualifiers="virtual"> + <method name="_get_state" qualifiers="virtual const"> <return type="Dictionary" /> <description> Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). @@ -261,19 +261,19 @@ </method> <method name="_get_window_layout" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="layout" type="ConfigFile" /> + <argument index="0" name="configuration" type="ConfigFile" /> <description> Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). </description> </method> - <method name="_handles" qualifiers="virtual"> + <method name="_handles" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="object" type="Object" /> + <argument index="0" name="object" type="Variant" /> <description> - Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_spatial_gui_input] these will be called too. + Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_3d_gui_input] these will be called too. </description> </method> - <method name="_has_main_screen" qualifiers="virtual"> + <method name="_has_main_screen" qualifiers="virtual const"> <return type="bool" /> <description> Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]). @@ -302,7 +302,7 @@ </method> <method name="_set_window_layout" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="layout" type="ConfigFile" /> + <argument index="0" name="configuration" type="ConfigFile" /> <description> Restore the plugin GUI layout saved by [method _get_window_layout]. </description> @@ -586,19 +586,19 @@ <method name="set_force_draw_over_forwarding_enabled"> <return type="void" /> <description> - Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. + Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_3d_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. </description> </method> <method name="set_input_event_forwarding_always_enabled"> <return type="void" /> <description> - Use this method if you always want to receive inputs from 3D view screen inside [method _forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. + Use this method if you always want to receive inputs from 3D view screen inside [method _forward_3d_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. </description> </method> <method name="update_overlays" qualifiers="const"> <return type="int" /> <description> - Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_spatial_draw_over_viewport] and [method _forward_spatial_force_draw_over_viewport] to be called. + Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_3d_draw_over_viewport] and [method _forward_3d_force_draw_over_viewport] to be called. </description> </method> </methods> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 725b0ba8ff..6af6507606 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -57,6 +57,11 @@ Puts the [code]editor[/code] control below the property label. The control must be previously added using [method Node.add_child]. </description> </method> + <method name="update_property"> + <return type="void" /> + <description> + </description> + </method> </methods> <members> <member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false"> @@ -144,6 +149,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml index 3de508c88d..820c7775f7 100644 --- a/doc/classes/EditorResourceConversionPlugin.xml +++ b/doc/classes/EditorResourceConversionPlugin.xml @@ -7,18 +7,22 @@ <tutorials> </tutorials> <methods> - <method name="_convert" qualifiers="virtual"> + <method name="_convert" qualifiers="virtual const"> <return type="Resource" /> <argument index="0" name="resource" type="Resource" /> <description> </description> </method> - <method name="_converts_to" qualifiers="virtual"> + <method name="_converts_to" qualifiers="virtual const"> <return type="String" /> <description> </description> </method> + <method name="_handles" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="resource" type="Resource" /> + <description> + </description> + </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml index a0f2df1f0c..9c490cbb3e 100644 --- a/doc/classes/EditorResourcePicker.xml +++ b/doc/classes/EditorResourcePicker.xml @@ -67,6 +67,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index c2693b4e1e..4dc46945cf 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -62,6 +62,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index 7054b1f4d0..53c692aad9 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -9,41 +9,41 @@ <tutorials> </tutorials> <methods> - <method name="_can_generate_small_preview" qualifiers="virtual"> + <method name="_can_generate_small_preview" qualifiers="virtual const"> <return type="bool" /> <description> If this function returns [code]true[/code], the generator will call [method _generate] or [method _generate_from_path] for small previews as well. By default, it returns [code]false[/code]. </description> </method> - <method name="_generate" qualifiers="virtual"> + <method name="_generate" qualifiers="virtual const"> <return type="Texture2D" /> - <argument index="0" name="from" type="Resource" /> - <argument index="1" name="size" type="Vector2" /> + <argument index="0" name="resource" type="Resource" /> + <argument index="1" name="size" type="Vector2i" /> <description> Generate a preview from a given resource with the specified size. This must always be implemented. Returning an empty texture is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). </description> </method> - <method name="_generate_from_path" qualifiers="virtual"> + <method name="_generate_from_path" qualifiers="virtual const"> <return type="Texture2D" /> <argument index="0" name="path" type="String" /> - <argument index="1" name="size" type="Vector2" /> + <argument index="1" name="size" type="Vector2i" /> <description> Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate]. Returning an empty texture is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). </description> </method> - <method name="_generate_small_preview_automatically" qualifiers="virtual"> + <method name="_generate_small_preview_automatically" qualifiers="virtual const"> <return type="bool" /> <description> If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path]. By default, it returns [code]false[/code]. </description> </method> - <method name="_handles" qualifiers="virtual"> + <method name="_handles" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="type" type="String" /> <description> @@ -51,6 +51,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml index 2e9d6a43d8..a400db551f 100644 --- a/doc/classes/EditorSceneImporter.xml +++ b/doc/classes/EditorSceneImporter.xml @@ -8,12 +8,12 @@ <tutorials> </tutorials> <methods> - <method name="_get_extensions" qualifiers="virtual"> - <return type="Array" /> + <method name="_get_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> </description> </method> - <method name="_get_import_flags" qualifiers="virtual"> + <method name="_get_import_flags" qualifiers="virtual const"> <return type="int" /> <description> </description> @@ -27,7 +27,7 @@ </description> </method> <method name="_import_scene" qualifiers="virtual"> - <return type="Node" /> + <return type="Object" /> <argument index="0" name="path" type="String" /> <argument index="1" name="flags" type="int" /> <argument index="2" name="bake_fps" type="int" /> diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml index 3a9eea87bb..5d57a76d5f 100644 --- a/doc/classes/EditorSceneImporterMesh.xml +++ b/doc/classes/EditorSceneImporterMesh.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSceneImporterMesh" inherits="Resource" version="4.0"> <brief_description> + A [Resource] that contains vertex array-based geometry during the import process. </brief_description> <description> + EditorSceneImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. + + Unlike its runtime counterpart, [EditorSceneImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface. </description> <tutorials> </tutorials> @@ -11,6 +15,7 @@ <return type="void" /> <argument index="0" name="name" type="String" /> <description> + Adds name for a blend shape that will be added with [method add_surface]. Must be called before surface is added. </description> </method> <method name="add_surface"> @@ -22,45 +27,58 @@ }" /> <argument index="4" name="material" type="Material" default="null" /> <argument index="5" name="name" type="String" default="""" /> + <argument index="6" name="flags" type="int" default="0" /> <description> + Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays]. + Surfaces are created to be rendered using a [code]primitive[/code], 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. + The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. </description> </method> <method name="clear"> <return type="void" /> <description> + Removes all surfaces and blend shapes from this [EditorSceneImporterMesh]. </description> </method> <method name="get_blend_shape_count" qualifiers="const"> <return type="int" /> <description> + Returns the number of blend shapes that the mesh holds. </description> </method> <method name="get_blend_shape_mode" qualifiers="const"> <return type="int" enum="Mesh.BlendShapeMode" /> <description> + Returns the blend shape mode for this Mesh. </description> </method> <method name="get_blend_shape_name" qualifiers="const"> <return type="String" /> <argument index="0" name="blend_shape_idx" type="int" /> <description> + Returns the name of the blend shape at this index. </description> </method> <method name="get_lightmap_size_hint" qualifiers="const"> <return type="Vector2i" /> <description> + Returns the size hint of this mesh for lightmap-unwrapping in UV-space. </description> </method> <method name="get_mesh"> <return type="ArrayMesh" /> - <argument index="0" name="arg0" type="Mesh" /> + <argument index="0" name="base_mesh" type="ArrayMesh" default="null" /> <description> + Returns the mesh data represented by this [EditorSceneImporterMesh] as a usable [ArrayMesh]. + This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called. + If not yet cached and [code]base_mesh[/code] is provided, [code]base_mesh[/code] will be used and mutated. </description> </method> <method name="get_surface_arrays" qualifiers="const"> <return type="Array" /> <argument index="0" name="surface_idx" type="int" /> <description> + Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface. See [method add_surface]. </description> </method> <method name="get_surface_blend_shape_arrays" qualifiers="const"> @@ -68,17 +86,27 @@ <argument index="0" name="surface_idx" type="int" /> <argument index="1" name="blend_shape_idx" type="int" /> <description> + Returns a single set of blend shape arrays for the requested blend shape index for a surface. </description> </method> <method name="get_surface_count" qualifiers="const"> <return type="int" /> <description> + Returns the amount of surfaces that the mesh holds. + </description> + </method> + <method name="get_surface_format" qualifiers="const"> + <return type="int" /> + <argument index="0" name="surface_idx" type="int" /> + <description> + Returns the format of the surface that the mesh holds. </description> </method> <method name="get_surface_lod_count" qualifiers="const"> <return type="int" /> <argument index="0" name="surface_idx" type="int" /> <description> + Returns the amount of lods that the mesh holds on a given surface. </description> </method> <method name="get_surface_lod_indices" qualifiers="const"> @@ -86,6 +114,7 @@ <argument index="0" name="surface_idx" type="int" /> <argument index="1" name="lod_idx" type="int" /> <description> + Returns the index buffer of a lod for a surface. </description> </method> <method name="get_surface_lod_size" qualifiers="const"> @@ -93,36 +122,58 @@ <argument index="0" name="surface_idx" type="int" /> <argument index="1" name="lod_idx" type="int" /> <description> + Returns the screen ratio which activates a lod for a surface. </description> </method> <method name="get_surface_material" qualifiers="const"> <return type="Material" /> <argument index="0" name="surface_idx" type="int" /> <description> + Returns a [Material] in a given surface. Surface is rendered using this material. </description> </method> <method name="get_surface_name" qualifiers="const"> <return type="String" /> <argument index="0" name="surface_idx" type="int" /> <description> + Gets the name assigned to this surface. </description> </method> <method name="get_surface_primitive_type"> <return type="int" enum="Mesh.PrimitiveType" /> <argument index="0" name="surface_idx" type="int" /> <description> + Returns the primitive type of the requested surface (see [method add_surface]). </description> </method> <method name="set_blend_shape_mode"> <return type="void" /> <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode" /> <description> + Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. </description> </method> <method name="set_lightmap_size_hint"> <return type="void" /> <argument index="0" name="size" type="Vector2i" /> <description> + Sets the size hint of this mesh for lightmap-unwrapping in UV-space. + </description> + </method> + <method name="set_surface_material"> + <return type="void" /> + <argument index="0" name="surface_idx" type="int" /> + <argument index="1" name="material" type="Material" /> + <description> + Sets a [Material] for a given surface. Surface will be rendered using this material. + </description> + </method> + <method name="set_surface_name"> + <return type="void" /> + <argument index="0" name="surface_idx" type="int" /> + <argument index="1" name="name" type="String" /> + <description> + Sets a name for a given surface. </description> </method> </methods> @@ -130,6 +181,4 @@ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"surfaces": []}"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/EditorSceneImporterMeshNode3D.xml b/doc/classes/EditorSceneImporterMeshNode3D.xml index 1e459c1cee..848448110e 100644 --- a/doc/classes/EditorSceneImporterMeshNode3D.xml +++ b/doc/classes/EditorSceneImporterMeshNode3D.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh"> </member> @@ -16,6 +14,4 @@ <member name="skin" type="Skin" setter="set_skin" getter="get_skin"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 95b0b42d9f..241531c35f 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -57,7 +57,7 @@ <methods> <method name="_post_import" qualifiers="virtual"> <return type="Object" /> - <argument index="0" name="scene" type="Object" /> + <argument index="0" name="scene" type="Node" /> <description> Called after the scene was imported. This method must return the modified version of the scene. </description> @@ -69,6 +69,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml index 6d793fe961..a2508118c6 100644 --- a/doc/classes/EditorScript.xml +++ b/doc/classes/EditorScript.xml @@ -61,6 +61,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorScriptPicker.xml b/doc/classes/EditorScriptPicker.xml index 8334676d92..6c0538a5ab 100644 --- a/doc/classes/EditorScriptPicker.xml +++ b/doc/classes/EditorScriptPicker.xml @@ -9,13 +9,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="script_owner" type="Node" setter="set_script_owner" getter="get_script_owner"> The owner [Node] of the script property that holds the edited resource. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index 69ae865d5d..28c8ff7d7f 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -51,6 +51,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index b86e5e5c6e..9341b514c7 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> </member> @@ -22,6 +20,4 @@ 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> - <constants> - </constants> </class> diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml index 37644a8595..8880ce4d44 100644 --- a/doc/classes/EditorSyntaxHighlighter.xml +++ b/doc/classes/EditorSyntaxHighlighter.xml @@ -5,30 +5,22 @@ </brief_description> <description> Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor]. - Add a syntax highlighter to an individual script by calling [method ScriptEditorBase._add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter] + Add a syntax highlighter to an individual script by calling ScriptEditorBase._add_syntax_highlighter (currently not working). To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter] </description> <tutorials> </tutorials> <methods> - <method name="_get_name" qualifiers="virtual"> + <method name="_get_name" qualifiers="virtual const"> <return type="String" /> <description> Virtual method which can be overridden to return the syntax highlighter name. </description> </method> - <method name="_get_supported_extentions" qualifiers="virtual"> - <return type="Array" /> - <description> - Virtual method which can be overridden to return the supported file extensions. - </description> - </method> - <method name="_get_supported_languages" qualifiers="virtual"> + <method name="_get_supported_languages" qualifiers="virtual const"> <return type="Array" /> <description> Virtual method which can be overridden to return the supported language names. </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml index 47da8ec37b..de8204def3 100644 --- a/doc/classes/EditorTranslationParserPlugin.xml +++ b/doc/classes/EditorTranslationParserPlugin.xml @@ -102,8 +102,8 @@ <tutorials> </tutorials> <methods> - <method name="_get_recognized_extensions" qualifiers="virtual"> - <return type="Array" /> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code]. </description> @@ -118,6 +118,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml index 5dd4901e3e..bd932bede4 100644 --- a/doc/classes/EditorVCSInterface.xml +++ b/doc/classes/EditorVCSInterface.xml @@ -94,6 +94,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml index e3e36590a3..fb056f4631 100644 --- a/doc/classes/EncodedObjectAsID.xml +++ b/doc/classes/EncodedObjectAsID.xml @@ -9,13 +9,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="object_id" type="int" setter="set_object_id" getter="get_object_id" default="0"> The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GlobalScope.instance_from_id]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 886a18900e..6e22c58024 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -37,7 +37,7 @@ <method name="get_frames_drawn"> <return type="int" /> <description> - Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_process_frames]. + Returns the total number of frames drawn. On headless platforms, or if the render loop is disabled with [code]--disable-render-loop[/code] via command line, [method get_frames_drawn] always returns [code]0[/code]. See [method get_process_frames]. </description> </method> <method name="get_frames_per_second" qualifiers="const"> @@ -67,7 +67,13 @@ <method name="get_physics_frames" qualifiers="const"> <return type="int" /> <description> - Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. + Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. See also [method get_process_frames]. + [method get_physics_frames] can be used to run expensive logic less often without relying on a [Timer]: + [codeblock] + func _physics_process(_delta): + if Engine.get_physics_frames() % 2 == 0: + pass # Run expensive logic only once every 2 physics frames here. + [/codeblock] </description> </method> <method name="get_physics_interpolation_fraction" qualifiers="const"> @@ -79,16 +85,27 @@ <method name="get_process_frames" qualifiers="const"> <return type="int" /> <description> - Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn]. + Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn] and [method get_physics_frames]. + [method get_process_frames] can be used to run expensive logic less often without relying on a [Timer]: + [codeblock] + func _process(_delta): + if Engine.get_process_frames() % 2 == 0: + pass # Run expensive logic only once every 2 process (render) frames here. + [/codeblock] </description> </method> <method name="get_singleton" qualifiers="const"> <return type="Object" /> - <argument index="0" name="name" type="String" /> + <argument index="0" name="name" type="StringName" /> <description> Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments. </description> </method> + <method name="get_singleton_list" qualifiers="const"> + <return type="PackedStringArray" /> + <description> + </description> + </method> <method name="get_version_info" qualifiers="const"> <return type="Dictionary" /> <description> @@ -125,7 +142,7 @@ </method> <method name="has_singleton" qualifiers="const"> <return type="bool" /> - <argument index="0" name="name" type="String" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope. </description> @@ -136,6 +153,19 @@ Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop. </description> </method> + <method name="register_singleton"> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="instance" type="Object" /> + <description> + </description> + </method> + <method name="unregister_singleton"> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <description> + </description> + </method> </methods> <members> <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint" default="true"> @@ -168,6 +198,4 @@ Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml index 30d5193384..861053b1c9 100644 --- a/doc/classes/EngineDebugger.xml +++ b/doc/classes/EngineDebugger.xml @@ -98,6 +98,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index 809a5bb80c..f0b0775753 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -83,6 +83,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 6622619fb3..cf08029c72 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -58,8 +58,20 @@ <method name="eof_reached" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the file cursor has read past the end of the file. - [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_length] and [method get_position] to implement a custom logic. + Returns [code]true[/code] if the file cursor has already read past the end of the file. + [b]Note:[/b] [code]eof_reached() == false[/code] cannot be used to check whether there is more data available. To loop while there is more data available, use: + [codeblocks] + [gdscript] + while file.get_position() < file.get_length(): + # Read data + [/gdscript] + [csharp] + while (file.GetPosition() < file.GetLength()) + { + // Read data + } + [/csharp] + [/codeblocks] </description> </method> <method name="file_exists" qualifiers="const"> @@ -438,7 +450,7 @@ Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file. </constant> <constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode"> - Uses the [url=http://fastlz.org/]FastLZ[/url] compression method. + Uses the [url=https://fastlz.org/]FastLZ[/url] compression method. </constant> <constant name="COMPRESSION_DEFLATE" value="1" enum="CompressionMode"> Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method. diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml index a164415245..b6e708cc03 100644 --- a/doc/classes/FileSystemDock.xml +++ b/doc/classes/FileSystemDock.xml @@ -52,6 +52,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 06dcaca846..e8ff0f60ec 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -70,6 +70,12 @@ Add font data source to the set. </description> </method> + <method name="clear_data"> + <return type="void" /> + <description> + Removes all font data sourcers for the set. + </description> + </method> <method name="draw_char" qualifiers="const"> <return type="float" /> <argument index="0" name="canvas_item" type="RID" /> @@ -151,6 +157,13 @@ Returns the number of font data sources. </description> </method> + <method name="get_data_rid" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="idx" type="int" /> + <description> + Returns TextServer RID of the font data resources. + </description> + </method> <method name="get_descent" qualifiers="const"> <return type="float" /> <argument index="0" name="size" type="int" default="-1" /> @@ -180,15 +193,18 @@ </method> <method name="get_spacing" qualifiers="const"> <return type="int" /> - <argument index="0" name="type" type="int" /> + <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" /> <description> - Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). + Returns the spacing for the given [code]type[/code] (see [enum TextServer.SpacingType]). </description> </method> <method name="get_string_size" qualifiers="const"> <return type="Vector2" /> <argument index="0" name="text" type="String" /> <argument index="1" name="size" type="int" default="-1" /> + <argument index="2" name="align" type="int" enum="HAlign" default="0" /> + <argument index="3" name="width" type="float" default="-1" /> + <argument index="4" name="flags" type="int" default="3" /> <description> Returns the size of a bounding box of a string, taking kerning and advance into account. [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height]. @@ -242,10 +258,10 @@ </method> <method name="set_spacing"> <return type="void" /> - <argument index="0" name="type" type="int" /> + <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" /> <argument index="1" name="value" type="int" /> <description> - Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size). </description> </method> <method name="update_changes"> @@ -256,19 +272,17 @@ </method> </methods> <members> - <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> + <member name="base_size" type="int" setter="set_base_size" getter="get_base_size" default="16"> + Default font size. + </member> + <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra spacing at the bottom of the line in pixels. </member> - <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> + <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra spacing at the top of the line in pixels. </member> + <member name="variation_coordinates" type="Dictionary" setter="set_variation_coordinates" getter="get_variation_coordinates" default="{}"> + Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url]. + </member> </members> - <constants> - <constant name="SPACING_TOP" value="0" enum="SpacingType"> - Spacing at the top of the line. - </constant> - <constant name="SPACING_BOTTOM" value="1" enum="SpacingType"> - Spacing at the bottom of the line. - </constant> - </constants> </class> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index 7a845a698f..a814685388 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -1,122 +1,179 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="FontData" inherits="Resource" version="4.0"> <brief_description> - Font data source, file or memory buffer. + Font source data and prerendered glyph cache, imported from dynamic or bitmap font. + Supported font formats: + - Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), Type 1 (.pfb, .pfm). + - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants. + - Monospace image font importer: All supported image formats. </brief_description> <description> - Built-in text servers support font data sources of the following formats: - - Bitmap fonts in the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. Handles [code].fnt, *.font[/code] fonts containing texture atlases. Non-scalable. Supports distance fields. Complex text shaping support is limited. - - Dynamic fonts using the [url=https://www.freetype.org/]FreeType[/url] and [url=https://github.com/silnrsi/graphite/]Graphite[/url] library for rasterization. Handles [code]*.ttf, *.otf[/code] fonts. Scalable. Doesn't support distance fields. Supports complex text shaping and OpenType features. </description> <tutorials> </tutorials> <methods> - <method name="bitmap_add_char"> + <method name="clear_cache"> <return type="void" /> - <argument index="0" name="char" type="int" /> - <argument index="1" name="texture_idx" type="int" /> - <argument index="2" name="rect" type="Rect2" /> - <argument index="3" name="align" type="Vector2" /> - <argument index="4" name="advance" type="float" /> <description> - Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. + Removes all font cache entries. </description> </method> - <method name="bitmap_add_kerning_pair"> + <method name="clear_glyphs"> <return type="void" /> - <argument index="0" name="A" type="int" /> - <argument index="1" name="B" type="int" /> - <argument index="2" name="kerning" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> <description> - Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. </description> </method> - <method name="bitmap_add_texture"> + <method name="clear_kerning_map"> <return type="void" /> - <argument index="0" name="texture" type="Texture" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> - Adds a texture to the bitmap font. + Removes all kerning overrides. </description> </method> - <method name="draw_glyph" qualifiers="const"> - <return type="Vector2" /> - <argument index="0" name="canvas" type="RID" /> - <argument index="1" name="size" type="int" /> - <argument index="2" name="pos" type="Vector2" /> - <argument index="3" name="index" type="int" /> - <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <method name="clear_size_cache"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> <description> - Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. - Returns advance of the glyph for horizontal and vertical layouts. - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. + Removes all font sizes from the cache entry </description> </method> - <method name="draw_glyph_outline" qualifiers="const"> - <return type="Vector2" /> - <argument index="0" name="canvas" type="RID" /> - <argument index="1" name="size" type="int" /> - <argument index="2" name="outline_size" type="int" /> - <argument index="3" name="pos" type="Vector2" /> - <argument index="4" name="index" type="int" /> - <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <method name="clear_textures"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually. + </description> + </method> + <method name="find_cache" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="variation_coordinates" type="Dictionary" /> <description> - Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn. - Returns advance of the glyph for horizontal and vertical layouts (regardless of outline drawing support). - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. + Returns existing or creates a new font cache entry for the specified variation coordinates. </description> </method> <method name="get_ascent" qualifiers="const"> <return type="float" /> - <argument index="0" name="size" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> Returns the font ascent (number of pixels above the baseline). </description> </method> - <method name="get_base_size" qualifiers="const"> - <return type="float" /> + <method name="get_cache_count" qualifiers="const"> + <return type="int" /> <description> - Returns the base size of the font (the only size supported for non-scalable fonts, meaningless for scalable fonts). + Returns number of the font cache entries. + </description> + </method> + <method name="get_cache_rid" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="cache_index" type="int" /> + <description> + Returns text server font cache entry resource id. + </description> + </method> + <method name="get_data" qualifiers="const"> + <return type="PackedByteArray" /> + <description> + Returns contents of the dynamic font source file. </description> </method> <method name="get_descent" qualifiers="const"> <return type="float" /> - <argument index="0" name="size" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> - Returns the font descent (number of pixels below the baseline). + Returns font descent (number of pixels below the baseline). </description> </method> <method name="get_glyph_advance" qualifiers="const"> <return type="Vector2" /> - <argument index="0" name="index" type="int" /> + <argument index="0" name="cache_index" type="int" /> <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns advance of the glyph for horizontal and vertical layouts. - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. + Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. </description> </method> <method name="get_glyph_index" qualifiers="const"> <return type="int" /> <argument index="0" name="char" type="int" /> - <argument index="1" name="variation_selector" type="int" default="0" /> + <argument index="1" name="variation_selector" type="int" /> + <argument index="2" name="arg2" type="int" /> <description> - Return the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. + Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. </description> </method> - <method name="get_glyph_kerning" qualifiers="const"> + <method name="get_glyph_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Returns list of rendered glyphs in the cache entry. + </description> + </method> + <method name="get_glyph_offset" qualifiers="const"> <return type="Vector2" /> - <argument index="0" name="index_a" type="int" /> - <argument index="1" name="index_b" type="int" /> - <argument index="2" name="size" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns a kerning of the pair of glyphs for horizontal and vertical layouts. - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. + Returns glyph offset from the baseline. </description> </method> - <method name="get_height" qualifiers="const"> - <return type="float" /> - <argument index="0" name="size" type="int" /> + <method name="get_glyph_size" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns the total font height (ascent plus descent) in pixels. + Returns glyph size. + </description> + </method> + <method name="get_glyph_texture_idx" qualifiers="const"> + <return type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns index of the cache texture containing the glyph. + </description> + </method> + <method name="get_glyph_uv_rect" qualifiers="const"> + <return type="Rect2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns rectangle in the cache texture containing the glyph. + </description> + </method> + <method name="get_hinting" qualifiers="const"> + <return type="int" enum="TextServer.Hinting" /> + <description> + Returns the font hinting mode. Used by dynamic fonts only. + </description> + </method> + <method name="get_kerning" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <description> + Returns kerning for the pair of glyphs. + </description> + </method> + <method name="get_kerning_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <description> + Returns list of the kerning overrides. </description> </method> <method name="get_language_support_override" qualifiers="const"> @@ -132,6 +189,32 @@ Returns list of language support overrides. </description> </method> + <method name="get_msdf_pixel_range" qualifiers="const"> + <return type="int" /> + <description> + Returns the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="get_msdf_size" qualifiers="const"> + <return type="int" /> + <description> + Returns source font size used to generate MSDF textures. + </description> + </method> + <method name="get_oversampling" qualifiers="const"> + <return type="float" /> + <description> + Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="get_scale" qualifiers="const"> + <return type="float" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <description> + Returns scaling factor of the color bitmap font. + </description> + </method> <method name="get_script_support_override" qualifiers="const"> <return type="bool" /> <argument index="0" name="script" type="String" /> @@ -145,11 +228,20 @@ Returns list of script support overrides. </description> </method> + <method name="get_size_cache_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="cache_index" type="int" /> + <description> + Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. + </description> + </method> <method name="get_spacing" qualifiers="const"> <return type="int" /> - <argument index="0" name="type" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="arg2" type="int" enum="TextServer.SpacingType" /> <description> - Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). + Returns extra spacing added between glyphs in pixels. </description> </method> <method name="get_supported_chars" qualifiers="const"> @@ -158,32 +250,66 @@ Returns a string containing all the characters available in the font. </description> </method> - <method name="get_underline_position" qualifiers="const"> - <return type="float" /> - <argument index="0" name="size" type="int" /> + <method name="get_supported_feature_list" qualifiers="const"> + <return type="Dictionary" /> <description> - Returns underline offset (number of pixels below the baseline). + Returns list of OpenType features supported by font. </description> </method> - <method name="get_underline_thickness" qualifiers="const"> + <method name="get_supported_variation_list" qualifiers="const"> + <return type="Dictionary" /> + <description> + Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code]. + Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + </description> + </method> + <method name="get_texture_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Returns number of textures used by font cache entry. + </description> + </method> + <method name="get_texture_image" qualifiers="const"> + <return type="Image" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Returns a copy of the font cache texture image. + </description> + </method> + <method name="get_texture_offsets" qualifiers="const"> + <return type="PackedInt32Array" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + </description> + </method> + <method name="get_underline_position" qualifiers="const"> <return type="float" /> - <argument index="0" name="size" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> - Returns underline thickness in pixels. + Returns pixel offset of the underline below the baseline. </description> </method> - <method name="get_variation" qualifiers="const"> + <method name="get_underline_thickness" qualifiers="const"> <return type="float" /> - <argument index="0" name="tag" type="String" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> - Returns variation coordinate [code]tag[/code]. + Returns thickness of the underline in pixels. </description> </method> - <method name="get_variation_list" qualifiers="const"> + <method name="get_variation_coordinates" qualifiers="const"> <return type="Dictionary" /> + <argument index="0" name="cache_index" type="int" /> <description> - Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code]. - Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info. </description> </method> <method name="has_char" qualifiers="const"> @@ -193,10 +319,16 @@ Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> - <method name="has_outline" qualifiers="const"> + <method name="is_antialiased" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled. + </description> + </method> + <method name="is_force_autohinter" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code], if font supports drawing glyph outlines. + Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. </description> </method> <method name="is_language_supported" qualifiers="const"> @@ -206,6 +338,12 @@ Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). </description> </method> + <method name="is_multichannel_signed_distance_field" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + </description> + </method> <method name="is_script_supported" qualifiers="const"> <return type="bool" /> <argument index="0" name="script" type="String" /> @@ -213,32 +351,29 @@ Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code). </description> </method> - <method name="load_memory"> + <method name="remove_cache"> <return type="void" /> - <argument index="0" name="data" type="PackedByteArray" /> - <argument index="1" name="type" type="String" /> - <argument index="2" name="base_size" type="int" default="16" /> + <argument index="0" name="cache_index" type="int" /> <description> - Creates new font from the data in memory. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size. + Removes specified font cache entry. </description> </method> - <method name="load_resource"> + <method name="remove_glyph"> <return type="void" /> - <argument index="0" name="filename" type="String" /> - <argument index="1" name="base_size" type="int" default="16" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> <description> - Creates new font from the file. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size. + Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. </description> </method> - <method name="new_bitmap"> + <method name="remove_kerning"> <return type="void" /> - <argument index="0" name="height" type="float" /> - <argument index="1" name="ascent" type="float" /> - <argument index="2" name="base_size" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> <description> - Creates new, empty bitmap font. + Removes kerning override for the pair of glyphs. </description> </method> <method name="remove_language_support_override"> @@ -255,6 +390,148 @@ Removes script support override. </description> </method> + <method name="remove_size_cache"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes specified font size from the cache entry. + </description> + </method> + <method name="remove_texture"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph]. + </description> + </method> + <method name="render_glyph"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="index" type="int" /> + <description> + Renders specified glyph the the font cache texture. + </description> + </method> + <method name="render_range"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="start" type="int" /> + <argument index="3" name="end" type="int" /> + <description> + Renders the range of characters to the font cache texture. + </description> + </method> + <method name="set_antialiased"> + <return type="void" /> + <argument index="0" name="antialiased" type="bool" /> + <description> + If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only. + </description> + </method> + <method name="set_ascent"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="ascent" type="float" /> + <description> + Sets the font ascent (number of pixels above the baseline). + </description> + </method> + <method name="set_data"> + <return type="void" /> + <argument index="0" name="data" type="PackedByteArray" /> + <description> + Sets font source data, e.g contents of the dynamic font source file. + </description> + </method> + <method name="set_descent"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="descent" type="float" /> + <description> + Sets the font descent (number of pixels below the baseline). + </description> + </method> + <method name="set_force_autohinter"> + <return type="void" /> + <argument index="0" name="force_autohinter" type="bool" /> + <description> + If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + </description> + </method> + <method name="set_glyph_advance"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="advance" type="Vector2" /> + <description> + Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. + </description> + </method> + <method name="set_glyph_offset"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="offset" type="Vector2" /> + <description> + Sets glyph offset from the baseline. + </description> + </method> + <method name="set_glyph_size"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="gl_size" type="Vector2" /> + <description> + Sets glyph size. + </description> + </method> + <method name="set_glyph_texture_idx"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="texture_idx" type="int" /> + <description> + Sets index of the cache texture containing the glyph. + </description> + </method> + <method name="set_glyph_uv_rect"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="uv_rect" type="Rect2" /> + <description> + Sets rectangle in the cache texture containing the glyph. + </description> + </method> + <method name="set_hinting"> + <return type="void" /> + <argument index="0" name="hinting" type="int" enum="TextServer.Hinting" /> + <description> + Sets font hinting mode. Used by dynamic fonts only. + </description> + </method> + <method name="set_kerning"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <argument index="3" name="kerning" type="Vector2" /> + <description> + Sets kerning for the pair of glyphs. + </description> + </method> <method name="set_language_support_override"> <return type="void" /> <argument index="0" name="language" type="String" /> @@ -263,6 +540,44 @@ Adds override for [method is_language_supported]. </description> </method> + <method name="set_msdf_pixel_range"> + <return type="void" /> + <argument index="0" name="msdf_pixel_range" type="int" /> + <description> + Sets the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="set_msdf_size"> + <return type="void" /> + <argument index="0" name="msdf_size" type="int" /> + <description> + Sets source font size used to generate MSDF textures. + </description> + </method> + <method name="set_multichannel_signed_distance_field"> + <return type="void" /> + <argument index="0" name="msdf" type="bool" /> + <description> + 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. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). 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] 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. + </description> + </method> + <method name="set_oversampling"> + <return type="void" /> + <argument index="0" name="oversampling" type="float" /> + <description> + Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="set_scale"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="scale" type="float" /> + <description> + Sets scaling factor of the color bitmap font. + </description> + </method> <method name="set_script_support_override"> <return type="void" /> <argument index="0" name="script" type="String" /> @@ -273,52 +588,59 @@ </method> <method name="set_spacing"> <return type="void" /> - <argument index="0" name="type" type="int" /> - <argument index="1" name="value" type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" /> + <argument index="3" name="arg3" type="int" /> + <description> + Sets extra spacing added between glyphs in pixels. + </description> + </method> + <method name="set_texture_image"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="image" type="Image" /> + <description> + Sets font cache texture image. + </description> + </method> + <method name="set_texture_offsets"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="offset" type="PackedInt32Array" /> + <description> + Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support). + </description> + </method> + <method name="set_underline_position"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_position" type="float" /> + <description> + Sets pixel offset of the underline below the baseline. + </description> + </method> + <method name="set_underline_thickness"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_thickness" type="float" /> <description> - Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + Sets thickness of the underline in pixels. </description> </method> - <method name="set_variation"> + <method name="set_variation_coordinates"> <return type="void" /> - <argument index="0" name="tag" type="String" /> - <argument index="1" name="value" type="float" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="variation_coordinates" type="Dictionary" /> <description> - Sets variation coordinate [code]tag[/code]. + Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info. </description> </method> </methods> - <members> - <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false"> - If [code]true[/code], the font is rendered with anti-aliasing. - </member> - <member name="data_path" type="String" setter="set_data_path" getter="get_data_path" default=""""> - The path to the font data file. If font data was loaded from memory location is set to [code]"(Memory)"[/code]. - </member> - <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false"> - If [code]true[/code], distance field hint is enabled. - </member> - <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing for each glyph in pixels. - This can be a negative number to make the distance between glyphs smaller. - </member> - <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing for the space character in pixels. - This can be a negative number to make the distance between words smaller. - </member> - <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false"> - If [code]true[/code], default autohinter is used for font hinting. - </member> - <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="0"> - The font hinting mode used by FreeType. See [enum TextServer.Hinting] for options. - </member> - </members> - <constants> - <constant name="SPACING_GLYPH" value="0" enum="SpacingType"> - Spacing for each glyph. - </constant> - <constant name="SPACING_SPACE" value="1" enum="SpacingType"> - Spacing for the space character. - </constant> - </constants> </class> diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml index 111827d294..7de52eedd7 100644 --- a/doc/classes/GPUParticlesAttractor3D.xml +++ b/doc/classes/GPUParticlesAttractor3D.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0"> </member> @@ -18,6 +16,4 @@ <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GPUParticlesAttractorBox.xml b/doc/classes/GPUParticlesAttractorBox.xml index 49e6111c29..93fdc45e56 100644 --- a/doc/classes/GPUParticlesAttractorBox.xml +++ b/doc/classes/GPUParticlesAttractorBox.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GPUParticlesAttractorSphere.xml b/doc/classes/GPUParticlesAttractorSphere.xml index 6984427a96..4398de55e9 100644 --- a/doc/classes/GPUParticlesAttractorSphere.xml +++ b/doc/classes/GPUParticlesAttractorSphere.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GPUParticlesAttractorVectorField.xml b/doc/classes/GPUParticlesAttractorVectorField.xml index 7364a4b09f..e164343528 100644 --- a/doc/classes/GPUParticlesAttractorVectorField.xml +++ b/doc/classes/GPUParticlesAttractorVectorField.xml @@ -6,14 +6,10 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml index dce9a32fc4..1a7901839c 100644 --- a/doc/classes/GPUParticlesCollision3D.xml +++ b/doc/classes/GPUParticlesCollision3D.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionBox.xml b/doc/classes/GPUParticlesCollisionBox.xml index 58de18556e..d2bf4ef538 100644 --- a/doc/classes/GPUParticlesCollisionBox.xml +++ b/doc/classes/GPUParticlesCollisionBox.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionHeightField.xml b/doc/classes/GPUParticlesCollisionHeightField.xml index 0ddddda8e4..99b2ad3ce0 100644 --- a/doc/classes/GPUParticlesCollisionHeightField.xml +++ b/doc/classes/GPUParticlesCollisionHeightField.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> diff --git a/doc/classes/GPUParticlesCollisionSDF.xml b/doc/classes/GPUParticlesCollisionSDF.xml index 7ef6f5f3cd..8d798a9d28 100644 --- a/doc/classes/GPUParticlesCollisionSDF.xml +++ b/doc/classes/GPUParticlesCollisionSDF.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> diff --git a/doc/classes/GPUParticlesCollisionSphere.xml b/doc/classes/GPUParticlesCollisionSphere.xml index 41150960d2..ddb2391fd9 100644 --- a/doc/classes/GPUParticlesCollisionSphere.xml +++ b/doc/classes/GPUParticlesCollisionSphere.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml index 9d0234529a..5b2e065d1a 100644 --- a/doc/classes/Geometry3D.xml +++ b/doc/classes/Geometry3D.xml @@ -125,6 +125,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index a9577fda90..93cef07b79 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -76,6 +76,4 @@ Gradient's offsets returned as a [PackedFloat32Array]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml index 242a78b2e4..0f0f0b1a37 100644 --- a/doc/classes/GradientTexture.xml +++ b/doc/classes/GradientTexture.xml @@ -8,16 +8,15 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> The [Gradient] that will be used to fill the texture. </member> + <member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false"> + If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format). + </member> <member name="width" type="int" setter="set_width" getter="get_width" default="2048"> The number of color samples that will be obtained from the [Gradient]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 907cf8587d..2213b9b8b2 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -10,6 +10,14 @@ <tutorials> </tutorials> <methods> + <method name="_get_connection_line" qualifiers="virtual const"> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> + <description> + Virtual method which can be overridden to customize how connections are drawn. + </description> + </method> <method name="add_valid_connection_type"> <return type="void" /> <argument index="0" name="from_type" type="int" /> @@ -64,6 +72,14 @@ Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed. </description> </method> + <method name="get_connection_line"> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> + <description> + Returns the points which would make up a connection between [code]from[/code] and [code]to[/code]. + </description> + </method> <method name="get_connection_list" qualifiers="const"> <return type="Array" /> <description> @@ -271,8 +287,6 @@ </description> </signal> </signals> - <constants> - </constants> <theme_items> <theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> </theme_item> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index 34e7cbcd79..758bab465d 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -11,15 +11,11 @@ <tutorials> <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> - <methods> - </methods> <members> <member name="columns" type="int" setter="set_columns" getter="get_columns" default="1"> The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its Control-derived children to accommodate the new layout. </member> </members> - <constants> - </constants> <theme_items> <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal separation of children nodes. diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml index 643b7aefea..1683842d65 100644 --- a/doc/classes/GrooveJoint2D.xml +++ b/doc/classes/GrooveJoint2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset" default="25.0"> The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's Y axis (along the groove). @@ -18,6 +16,4 @@ The groove's length. The groove is from the joint's origin towards [member length] along the joint's local Y axis. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml index 9c3efb384e..ce254d8a15 100644 --- a/doc/classes/HBoxContainer.xml +++ b/doc/classes/HBoxContainer.xml @@ -8,10 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="separation" data_type="constant" type="int" default="4"> The horizontal space between the [HBoxContainer]'s elements. diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index 88d3c5e2f3..69ad194fe0 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -77,6 +77,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml index 3bdd739cdf..fa9961710f 100644 --- a/doc/classes/HScrollBar.xml +++ b/doc/classes/HScrollBar.xml @@ -8,10 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property. @@ -19,6 +15,9 @@ <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> + <theme_item name="decrement_pressed" data_type="icon" type="Texture2D"> + Displayed when the decrement button is being pressed. + </theme_item> <theme_item name="grabber" data_type="style" type="StyleBox"> Used as texture for the grabber, the draggable element representing current scroll. </theme_item> @@ -34,6 +33,9 @@ <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> + <theme_item name="increment_pressed" data_type="icon" type="Texture2D"> + Displayed when the increment button is being pressed. + </theme_item> <theme_item name="scroll" data_type="style" type="StyleBox"> Used as background of this [ScrollBar]. </theme_item> diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml index 24495d208e..5a1011525c 100644 --- a/doc/classes/HSeparator.xml +++ b/doc/classes/HSeparator.xml @@ -8,10 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="separation" data_type="constant" type="int" default="4"> The height of the area covered by the separator. Effectively works like a minimum height. diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 37aa968161..fa88085a70 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -9,10 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="grabber" data_type="icon" type="Texture2D"> The texture for the grabber (the draggable element). diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index 6bc9913344..379d4cfbdb 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -8,10 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="autohide" data_type="constant" type="int" default="1"> Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 22398cc3ce..29aaf3c756 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -8,6 +8,7 @@ [b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started. A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). + [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. [b]Note:[/b] SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. @@ -138,7 +139,7 @@ <argument index="3" name="body" type="String" default="""" /> <description> Sends a request to the connected host. - The URL parameter is usually just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). + The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). Headers are HTTP request headers. For available HTTP methods, see [enum Method]. To create a POST request with query strings to push to the server, do: [codeblocks] @@ -166,7 +167,7 @@ <argument index="3" name="body" type="PackedByteArray" /> <description> Sends a raw request to the connected host. - The URL parameter is usually just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). + The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). Headers are HTTP request headers. For available HTTP methods, see [enum Method]. Sends the body data raw, as a byte array and does not encode it in any way. </description> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index f45ddd0abb..00927b98c5 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -192,7 +192,8 @@ <description> Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. - [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example. + [b]Note:[/b] When [code]method[/code] is [constant HTTPClient.METHOD_GET], the payload sent via [code]request_data[/code] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example). + [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. </description> </method> <method name="request_raw"> diff --git a/doc/classes/HeightMapShape3D.xml b/doc/classes/HeightMapShape3D.xml index 9a9d3bf8f4..705415171f 100644 --- a/doc/classes/HeightMapShape3D.xml +++ b/doc/classes/HeightMapShape3D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array(0, 0, 0, 0)"> Height map data, pool array must be of [member map_width] * [member map_depth] size. @@ -21,6 +19,4 @@ Width of the height map data. Changing this will resize the [member map_data]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 34c5fb582e..5d79e22c49 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -180,6 +180,7 @@ <argument index="0" name="renormalize" type="bool" default="false" /> <description> Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code]. + [b]Note:[/b] Mipmap generation is done on the CPU, is single-threaded and is [i]always[/i] done on the main thread. This means generating mipmaps will result in noticeable stuttering during gameplay, even if [method generate_mipmaps] is called from a [Thread]. </description> </method> <method name="get_data" qualifiers="const"> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 435fec6a50..af7178db95 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -61,6 +61,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml index 538a836c1c..ca4178f97a 100644 --- a/doc/classes/ImageTexture3D.xml +++ b/doc/classes/ImageTexture3D.xml @@ -25,6 +25,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml index 1b7400803d..f6ebc43d13 100644 --- a/doc/classes/ImageTextureLayered.xml +++ b/doc/classes/ImageTextureLayered.xml @@ -21,6 +21,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml index 69637d5bdd..75a3ec65c2 100644 --- a/doc/classes/ImmediateMesh.xml +++ b/doc/classes/ImmediateMesh.xml @@ -79,6 +79,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index cd14965d1b..9dc8fbeffa 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -106,6 +106,4 @@ [b]Note:[/b] This device ID will always be [code]-1[/code] for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 42326f344f..f09af1a34d 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -11,8 +11,6 @@ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> - <methods> - </methods> <members> <member name="action" type="StringName" setter="set_action" getter="get_action" default="&"""> The action's name. Actions are accessed via this [String]. @@ -24,6 +22,4 @@ The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventFromWindow.xml b/doc/classes/InputEventFromWindow.xml index 7cd5b7d179..0d897b9699 100644 --- a/doc/classes/InputEventFromWindow.xml +++ b/doc/classes/InputEventFromWindow.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="window_id" type="int" setter="set_window_id" getter="get_window_id" default="0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml index fbde318ada..2d57b84cc8 100644 --- a/doc/classes/InputEventGesture.xml +++ b/doc/classes/InputEventGesture.xml @@ -7,13 +7,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] that received this gesture. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index f9afe42a7a..ff82913385 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -9,8 +9,6 @@ <tutorials> <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> - <methods> - </methods> <members> <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="JoyButton" default="0"> Button identifier. One of the [enum JoyButton] button constants. @@ -22,6 +20,4 @@ Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from [code]0[/code] to [code]1[/code]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index 398b9eb6f6..92161974ba 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -9,8 +9,6 @@ <tutorials> <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> - <methods> - </methods> <members> <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="JoyAxis" default="0"> Axis identifier. Use one of the [enum JoyAxis] axis constants. @@ -19,6 +17,4 @@ Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index f670d907fc..9cf6872655 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -44,6 +44,4 @@ The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method Window.set_ime_active] for more information. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml index afc9d476da..040eee7b98 100644 --- a/doc/classes/InputEventMIDI.xml +++ b/doc/classes/InputEventMIDI.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="channel" type="int" setter="set_channel" getter="get_channel" default="0"> </member> @@ -26,6 +24,4 @@ <member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml index 3e539b2f97..ed0860a63a 100644 --- a/doc/classes/InputEventMagnifyGesture.xml +++ b/doc/classes/InputEventMagnifyGesture.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="factor" type="float" setter="set_factor" getter="get_factor" default="1.0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index b8043118b7..b06068aff3 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -9,8 +9,6 @@ <tutorials> <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> - <methods> - </methods> <members> <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0"> The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks. @@ -22,6 +20,4 @@ The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index 7a6c7410ef..dcfe0d6c71 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -9,8 +9,6 @@ <tutorials> <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> </tutorials> - <methods> - </methods> <members> <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="MouseButton" default="0"> The mouse button identifier, one of the [enum MouseButton] button or button wheel constants. @@ -25,6 +23,4 @@ If [code]true[/code], the mouse button's state is pressed. If [code]false[/code], the mouse button's state is released. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 881d74ac7b..9a0156510e 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -11,8 +11,6 @@ <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> - <methods> - </methods> <members> <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]. @@ -28,6 +26,4 @@ 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> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml index ffb1901dad..2de3459df7 100644 --- a/doc/classes/InputEventPanGesture.xml +++ b/doc/classes/InputEventPanGesture.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="delta" type="Vector2" setter="set_delta" getter="get_delta" default="Vector2(0, 0)"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index 079ac03f45..373936225b 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -9,8 +9,6 @@ <tutorials> <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> - <methods> - </methods> <members> <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. @@ -25,6 +23,4 @@ The drag speed. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 7aa5f62b05..c731044c98 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -10,8 +10,6 @@ <tutorials> <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> - <methods> - </methods> <members> <member name="index" type="int" setter="set_index" getter="get_index" default="0"> The touch index in the case of a multi-touch event. One index = one finger. @@ -23,6 +21,4 @@ If [code]true[/code], the touch's state is pressed. If [code]false[/code], the touch's state is released. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputEventShortcut.xml b/doc/classes/InputEventShortcut.xml new file mode 100644 index 0000000000..ea84db541c --- /dev/null +++ b/doc/classes/InputEventShortcut.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="InputEventShortcut" inherits="InputEvent" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut"> + </member> + </members> +</class> diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index 3beea7f9a0..1b9212bf65 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -9,8 +9,6 @@ <tutorials> <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> - <methods> - </methods> <members> <member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false"> State of the [kbd]Alt[/kbd] modifier. @@ -32,6 +30,4 @@ This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 16c2695613..855d5b5d71 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -109,6 +109,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index 75892895d7..e67232ebac 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -31,6 +31,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/IntervalTweener.xml b/doc/classes/IntervalTweener.xml index 1c59003c70..f2f58b4ca6 100644 --- a/doc/classes/IntervalTweener.xml +++ b/doc/classes/IntervalTweener.xml @@ -9,8 +9,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 06e98f7e57..e3e4a9fa7d 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -403,6 +403,9 @@ <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0"> Allows single or multiple item selection. See the [enum SelectMode] constants. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0"> + Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextParagraph.OverrunBehavior] for a description of all modes. + </member> </members> <signals> <signal name="item_activated"> diff --git a/doc/classes/JNISingleton.xml b/doc/classes/JNISingleton.xml index 84ab1a49c1..ce39e1f567 100644 --- a/doc/classes/JNISingleton.xml +++ b/doc/classes/JNISingleton.xml @@ -1,13 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="JNISingleton" inherits="Object" version="4.0"> <brief_description> + Singleton that connects the engine with Android plugins to interface with native Android code. </brief_description> <description> + The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See [url=https://en.wikipedia.org/wiki/Java_Native_Interface]Java Native Interface - Wikipedia[/url] for more information. </description> <tutorials> + <link title="Creating Android plugins">https://docs.godotengine.org/en/latest/tutorials/platform/android/android_plugin.html#doc-android-plugin</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index cee7db08e9..63e6307b39 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -91,6 +91,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/JavaClass.xml b/doc/classes/JavaClass.xml index 0b6a44fe14..b024f0ccd4 100644 --- a/doc/classes/JavaClass.xml +++ b/doc/classes/JavaClass.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml index 90d988f9bb..f532207f03 100644 --- a/doc/classes/JavaClassWrapper.xml +++ b/doc/classes/JavaClassWrapper.xml @@ -14,6 +14,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index d68b4492c7..5865ad734e 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -54,6 +54,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml index 087fe163b4..5aa54a7d0c 100644 --- a/doc/classes/JavaScriptObject.xml +++ b/doc/classes/JavaScriptObject.xml @@ -35,8 +35,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml index b055293b9d..b003224ad4 100644 --- a/doc/classes/Joint2D.xml +++ b/doc/classes/Joint2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0"> When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. @@ -24,6 +22,4 @@ The second body attached to the joint. Must derive from [PhysicsBody2D]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml index 94cdda586c..4b2c1ab4cb 100644 --- a/doc/classes/Joint3D.xml +++ b/doc/classes/Joint3D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link> </tutorials> - <methods> - </methods> <members> <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> If [code]true[/code], the two bodies of the nodes are not able to collide with each other. @@ -25,6 +23,4 @@ The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index 721b840e99..c558c541ad 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -56,6 +56,4 @@ The distance the moving object traveled before collision. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml index 5477736c25..db32cf57bc 100644 --- a/doc/classes/KinematicCollision3D.xml +++ b/doc/classes/KinematicCollision3D.xml @@ -12,41 +12,114 @@ <methods> <method name="get_angle" qualifiers="const"> <return type="float" /> - <argument index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <argument index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" /> <description> The collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive. </description> </method> + <method name="get_collider" qualifiers="const"> + <return type="Object" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider by index (the latest by default). + </description> + </method> + <method name="get_collider_id" qualifiers="const"> + <return type="int" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider ID by index (the latest by default). + </description> + </method> + <method name="get_collider_metadata" qualifiers="const"> + <return type="Variant" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider metadata by index (the latest by default). + </description> + </method> + <method name="get_collider_rid" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider RID by index (the latest by default). + </description> + </method> + <method name="get_collider_shape" qualifiers="const"> + <return type="Object" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider shape by index (the latest by default). + </description> + </method> + <method name="get_collider_shape_index" qualifiers="const"> + <return type="int" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider shape index by index (the latest by default). + </description> + </method> + <method name="get_collider_velocity" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider velocity by index (the latest by default). + </description> + </method> + <method name="get_local_shape" qualifiers="const"> + <return type="Object" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider velocity by index (the latest by default). + </description> + </method> + <method name="get_normal" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider normal by index (the latest by default). + </description> + </method> + <method name="get_position" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + Returns the collider collision point by index (the latest by default). + </description> + </method> </methods> <members> - <member name="collider" type="Object" setter="" getter="get_collider"> + <member name="collider" type="Object" setter="" getter="get_best_collider"> The colliding body. </member> - <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> + <member name="collider_id" type="int" setter="" getter="get_best_collider_id" default="0"> The colliding body's unique instance ID. See [method Object.get_instance_id]. </member> - <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> + <member name="collider_metadata" type="Variant" setter="" getter="get_best_collider_metadata"> The colliding body's metadata. See [Object]. </member> - <member name="collider_rid" type="RID" setter="" getter="get_collider_rid"> + <member name="collider_rid" type="RID" setter="" getter="get_best_collider_rid"> The colliding body's [RID] used by the [PhysicsServer3D]. </member> - <member name="collider_shape" type="Object" setter="" getter="get_collider_shape"> + <member name="collider_shape" type="Object" setter="" getter="get_best_collider_shape"> The colliding body's shape. </member> - <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0"> + <member name="collider_shape_index" type="int" setter="" getter="get_best_collider_shape_index" default="0"> The colliding shape's index. See [CollisionObject3D]. </member> - <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3(0, 0, 0)"> + <member name="collider_velocity" type="Vector3" setter="" getter="get_best_collider_velocity" default="Vector3(0, 0, 0)"> The colliding object's velocity. </member> - <member name="local_shape" type="Object" setter="" getter="get_local_shape"> + <member name="collision_count" type="int" setter="" getter="get_collision_count" default="0"> + </member> + <member name="local_shape" type="Object" setter="" getter="get_best_local_shape"> The moving object's colliding shape. </member> - <member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3(0, 0, 0)"> + <member name="normal" type="Vector3" setter="" getter="get_best_normal" default="Vector3(0, 0, 0)"> The colliding body's shape's normal at the point of collision. </member> - <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3(0, 0, 0)"> + <member name="position" type="Vector3" setter="" getter="get_best_position" default="Vector3(0, 0, 0)"> The point of collision, in global coordinates. </member> <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)"> @@ -56,6 +129,4 @@ The distance the moving object traveled before collision. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index cd2f4eca18..52359b0ede 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -47,7 +47,8 @@ The light's strength multiplier (this is not a physical unit). For [OmniLight3D] and [SpotLight3D], changing this value will only change the light color's intensity, not the light's radius. </member> <member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0"> - Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI]. + Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]). + [b]Note:[/b] This property is ignored if [member light_energy] is equal to [code]0.0[/code], as the light won't be present at all in the GI shader. </member> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false"> If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml index 550daf9225..ba795a29a1 100644 --- a/doc/classes/LightOccluder2D.xml +++ b/doc/classes/LightOccluder2D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> </tutorials> - <methods> - </methods> <members> <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon"> The [OccluderPolygon2D] used to compute the shadow. @@ -21,6 +19,4 @@ <member name="sdf_collision" type="bool" setter="set_as_sdf_collision" getter="is_set_as_sdf_collision" default="true"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml index d7722a83b0..0cdf9f820f 100644 --- a/doc/classes/LightmapGI.xml +++ b/doc/classes/LightmapGI.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005"> </member> diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml index c577439c8f..f678ae48d9 100644 --- a/doc/classes/LightmapGIData.xml +++ b/doc/classes/LightmapGIData.xml @@ -48,6 +48,4 @@ <member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml index 3af71f3774..465e645216 100644 --- a/doc/classes/LightmapProbe.xml +++ b/doc/classes/LightmapProbe.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml index 79fae42d68..d9a9a55f6a 100644 --- a/doc/classes/Lightmapper.xml +++ b/doc/classes/Lightmapper.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml index 0993b28f19..cfa9a4e2df 100644 --- a/doc/classes/LightmapperRD.xml +++ b/doc/classes/LightmapperRD.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 093ba51755..4d9abbbb19 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -58,6 +58,7 @@ <members> <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false"> If [code]true[/code], the line's border will be anti-aliased. + [b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased. </member> <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0"> Controls the style of the line's first point. Use [enum LineCapMode] constants. diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 11124a1436..1df00f556a 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -5,15 +5,14 @@ </brief_description> <description> [MainLoop] is the abstract base class for a Godot project's game loop. It is inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree. - Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation. + Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a [MainLoop] [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code] or the "Main Loop Type" project setting is overwritten. Here is an example script implementing a simple [MainLoop]: - [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring. - [codeblock] + [codeblocks] + [gdscript] + class_name CustomMainLoop extends MainLoop var time_elapsed = 0 - var keys_typed = [] - var quit = false func _initialize(): print("Initialized:") @@ -22,24 +21,41 @@ func _process(delta): time_elapsed += delta # Return true to end the main loop. - return quit - - func _input_event(event): - # Record keys. - if event is InputEventKey and event.pressed and !event.echo: - keys_typed.append(OS.get_keycode_string(event.keycode)) - # Quit on Escape press. - if event.keycode == KEY_ESCAPE: - quit = true - # Quit on any mouse click. - if event is InputEventMouseButton: - quit = true + return Input.get_mouse_button_mask() != 0 || Input.is_key_pressed(KEY_ESCAPE) func _finalize(): print("Finalized:") print(" End time: %s" % str(time_elapsed)) - print(" Keys typed: %s" % var2str(keys_typed)) - [/codeblock] + [/gdscript] + [csharp] + using Godot; + using System; + + public class CustomMainLoop : MainLoop + { + public float TimeElapsed = 0; + + public override void _Initialize() + { + GD.Print("Initialized:"); + GD.Print($" Starting Time: {TimeElapsed}"); + } + + public override bool _Process(float delta) + { + TimeElapsed += delta; + // Return true to end the main loop. + return Input.GetMouseButtonMask() != 0 || Input.IsKeyPressed((int)KeyList.Escape); + } + + private void _Finalize() + { + GD.Print("Finalized:"); + GD.Print($" End Time: {TimeElapsed}"); + } + } + [/csharp] + [/codeblocks] </description> <tutorials> </tutorials> diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml index 419857c13f..2948e58f50 100644 --- a/doc/classes/MarginContainer.xml +++ b/doc/classes/MarginContainer.xml @@ -27,10 +27,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="margin_bottom" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a bottom margin of [code]margin_bottom[/code] pixels. diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml index 0f36dd11ca..eb6635f03f 100644 --- a/doc/classes/Marshalls.xml +++ b/doc/classes/Marshalls.xml @@ -55,6 +55,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 1c7e6f1f19..5bdc9cccd9 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -41,8 +41,6 @@ </description> </signal> </signals> - <constants> - </constants> <theme_items> <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is disabled. diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index bfa55c2d35..c774528a39 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -210,6 +210,8 @@ </constant> <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> </constant> + <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat"> + </constant> <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> </constant> <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 338deed0be..35e4451918 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -332,6 +332,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 59b312f69a..c7b66c8ea3 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="2D meshes">https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link> </tutorials> - <methods> - </methods> <members> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> The [Mesh] that will be drawn by the [MeshInstance2D]. @@ -30,6 +28,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml index 665d5d3c77..507a76197a 100644 --- a/doc/classes/MeshInstance3D.xml +++ b/doc/classes/MeshInstance3D.xml @@ -81,6 +81,4 @@ Sets the skin to be used by this instance. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index 9e0292f946..9fde19588a 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -45,6 +45,13 @@ Returns the item's mesh. </description> </method> + <method name="get_item_mesh_transform" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="id" type="int" /> + <description> + Returns the transform applied to the item's mesh. + </description> + </method> <method name="get_item_name" qualifiers="const"> <return type="String" /> <argument index="0" name="id" type="int" /> @@ -102,6 +109,14 @@ Sets the item's mesh. </description> </method> + <method name="set_item_mesh_transform"> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="mesh_transform" type="Transform3D" /> + <description> + Sets the transform to apply to the item's mesh. + </description> + </method> <method name="set_item_name"> <return type="void" /> <argument index="0" name="id" type="int" /> @@ -145,6 +160,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml index 57f2397874..eb0451fea6 100644 --- a/doc/classes/MeshTexture.xml +++ b/doc/classes/MeshTexture.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="base_texture" type="Texture2D" setter="set_base_texture" getter="get_base_texture"> Sets the base texture that the Mesh will use to draw. @@ -21,6 +19,4 @@ Sets the mesh used to draw. It must be a mesh using 2D vertices. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml index 1b93b20d9f..5780aa00d9 100644 --- a/doc/classes/MethodTweener.xml +++ b/doc/classes/MethodTweener.xml @@ -32,6 +32,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index a461c8e056..328ddff0eb 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. @@ -30,6 +28,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml index 7d8035ba77..7bf05d2d34 100644 --- a/doc/classes/MultiMeshInstance3D.xml +++ b/doc/classes/MultiMeshInstance3D.xml @@ -12,13 +12,9 @@ <link title="Using MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link> <link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> - <methods> - </methods> <members> <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance3D]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 610b00efe9..0da461dd61 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -4,8 +4,8 @@ High-level multiplayer API. </brief_description> <description> - This class implements most of the logic behind the high-level multiplayer API. See also [MultiplayerPeer]. - By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. + This class implements the high-level multiplayer API. See also [MultiplayerPeer]. + By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene. It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene. [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. </description> @@ -18,49 +18,49 @@ Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing). </description> </method> - <method name="get_network_connected_peers" qualifiers="const"> + <method name="get_peers" qualifiers="const"> <return type="PackedInt32Array" /> <description> - Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer]. + Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer]. </description> </method> - <method name="get_network_unique_id" qualifiers="const"> + <method name="get_remote_sender_id" qualifiers="const"> <return type="int" /> <description> - Returns the unique peer ID of this MultiplayerAPI's [member network_peer]. + Returns the sender's peer ID for the RPC currently being executed. + [b]Note:[/b] If not inside an RPC this method will return 0. </description> </method> - <method name="get_rpc_sender_id" qualifiers="const"> + <method name="get_unique_id" qualifiers="const"> <return type="int" /> <description> - Returns the sender's peer ID for the RPC currently being executed. - [b]Note:[/b] If not inside an RPC this method will return 0. + Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer]. </description> </method> - <method name="has_network_peer" qualifiers="const"> + <method name="has_multiplayer_peer" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if there is a [member network_peer] set. + Returns [code]true[/code] if there is a [member multiplayer_peer] set. </description> </method> - <method name="is_network_server" qualifiers="const"> + <method name="is_server" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if this MultiplayerAPI's [member network_peer] is in server mode (listening for connections). + Returns [code]true[/code] if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections). </description> </method> <method name="poll"> <return type="void" /> <description> Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default, [SceneTree] will poll its MultiplayerAPI for you. - [b]Note:[/b] This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]). + [b]Note:[/b] This method results in RPCs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]). </description> </method> <method name="send_bytes"> <return type="int" enum="Error" /> <argument index="0" name="bytes" type="PackedByteArray" /> <argument index="1" name="id" type="int" default="0" /> - <argument index="2" name="mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" /> + <argument index="2" name="mode" type="int" enum="TransferMode" default="2" /> <argument index="3" name="channel" type="int" default="0" /> <description> Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers. @@ -69,14 +69,14 @@ </methods> <members> <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false"> - If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. + If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> - <member name="network_peer" type="MultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + <member name="multiplayer_peer" type="MultiplayerPeer" setter="set_multiplayer_peer" getter="get_multiplayer_peer"> + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. </member> - <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> - If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections. + <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false"> + If [code]true[/code], the MultiplayerAPI's [member multiplayer_peer] refuses new incoming connections. </member> <member name="replicator" type="MultiplayerReplicator" setter="" getter="get_replicator"> </member> @@ -88,51 +88,37 @@ <signals> <signal name="connected_to_server"> <description> - Emitted when this MultiplayerAPI's [member network_peer] successfully connected to a server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member multiplayer_peer] successfully connected to a server. Only emitted on clients. </description> </signal> <signal name="connection_failed"> <description> - Emitted when this MultiplayerAPI's [member network_peer] fails to establish a connection to a server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member multiplayer_peer] fails to establish a connection to a server. Only emitted on clients. </description> </signal> - <signal name="network_peer_connected"> + <signal name="peer_connected"> <argument index="0" name="id" type="int" /> <description> - Emitted when this MultiplayerAPI's [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). + Emitted when this MultiplayerAPI's [member multiplayer_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). </description> </signal> - <signal name="network_peer_disconnected"> + <signal name="peer_disconnected"> <argument index="0" name="id" type="int" /> <description> - Emitted when this MultiplayerAPI's [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. + Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. </description> </signal> - <signal name="network_peer_packet"> + <signal name="peer_packet"> <argument index="0" name="id" type="int" /> <argument index="1" name="packet" type="PackedByteArray" /> <description> - Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. + Emitted when this MultiplayerAPI's [member multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. </description> </signal> <signal name="server_disconnected"> <description> - Emitted when this MultiplayerAPI's [member network_peer] disconnects from server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from server. Only emitted on clients. </description> </signal> </signals> - <constants> - <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode"> - Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods. - </constant> - <constant name="RPC_MODE_REMOTE" value="1" enum="RPCMode"> - Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets. - </constant> - <constant name="RPC_MODE_MASTER" value="2" enum="RPCMode"> - Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master]. - </constant> - <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode"> - Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. - </constant> - </constants> </class> diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml index adaa359168..411317cdc8 100644 --- a/doc/classes/MultiplayerPeer.xml +++ b/doc/classes/MultiplayerPeer.xml @@ -4,7 +4,7 @@ A high-level network interface to simplify multiplayer interactions. </brief_description> <description> - Manages the connection to network peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI]. + Manages the connection to multiplayer peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI]. [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. </description> <tutorials> @@ -57,9 +57,9 @@ </member> <member name="transfer_channel" type="int" setter="set_transfer_channel" getter="get_transfer_channel" default="0"> The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games. - [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. + [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. </member> - <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="0"> + <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="0"> The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. </member> </members> @@ -93,15 +93,6 @@ </signal> </signals> <constants> - <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> - Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters. - </constant> - <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode"> - Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. - </constant> - <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode"> - Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. - </constant> <constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus"> The ongoing connection disconnected. </constant> diff --git a/doc/classes/MultiplayerReplicator.xml b/doc/classes/MultiplayerReplicator.xml index 15029e181f..e0c309ef39 100644 --- a/doc/classes/MultiplayerReplicator.xml +++ b/doc/classes/MultiplayerReplicator.xml @@ -12,6 +12,7 @@ <argument index="0" name="scene_id" type="int" /> <argument index="1" name="object" type="Object" /> <argument index="2" name="data" type="PackedByteArray" /> + <argument index="3" name="initial" type="bool" default="true" /> <description> Decode the given [code]data[/code] representing a spawnable state into [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when a client receives a server spawn for a scene with [constant REPLICATION_MODE_SERVER]. See [method spawn_config]. Tip: You may find this function useful in servers when parsing spawn requests from clients, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM]. @@ -23,12 +24,14 @@ <argument index="1" name="object" type="Object" /> <argument index="2" name="peer_id" type="int" default="0" /> <description> + Request a despawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_despawn] for the default behavior. </description> </method> <method name="encode_state"> <return type="PackedByteArray" /> <argument index="0" name="scene_id" type="int" /> <argument index="1" name="object" type="Object" /> + <argument index="2" name="initial" type="bool" default="true" /> <description> Encode the given [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when the server spawns scenes with [constant REPLICATION_MODE_SERVER]. See [method spawn_config]. Tip: You may find this function useful when requesting spawns from clients to server, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM]. @@ -41,7 +44,7 @@ <argument index="2" name="data" type="Variant" default="null" /> <argument index="3" name="path" type="NodePath" default="NodePath("")" /> <description> - Sends a despawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_network_server]), the receiving peer(s) will automatically queue for deletion the node at [code]path[/code] and emit the signal [signal despawned]. In all other cases no deletion happens, and the signal [signal despawn_requested] is emitted instead. + Sends a despawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically queue for deletion the node at [code]path[/code] and emit the signal [signal despawned]. In all other cases no deletion happens, and the signal [signal despawn_requested] is emitted instead. </description> </method> <method name="send_spawn"> @@ -51,7 +54,18 @@ <argument index="2" name="data" type="Variant" default="null" /> <argument index="3" name="path" type="NodePath" default="NodePath("")" /> <description> - Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_network_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal spawned]. In all other cases no instantiation happens, and the signal [signal spawn_requested] is emitted instead. + Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal spawned]. In all other cases no instantiation happens, and the signal [signal spawn_requested] is emitted instead. + </description> + </method> + <method name="send_sync"> + <return type="int" enum="Error" /> + <argument index="0" name="peer_id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="data" type="PackedByteArray" /> + <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" /> + <argument index="4" name="channel" type="int" default="0" /> + <description> + Sends a sync request for the instances of the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). This function can only be called manually when overriding the send and receive sync functions (see [method sync_config]). </description> </method> <method name="spawn"> @@ -60,6 +74,7 @@ <argument index="1" name="object" type="Object" /> <argument index="2" name="peer_id" type="int" default="0" /> <description> + Request a spawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_spawn] for the default behavior. </description> </method> <method name="spawn_config"> @@ -70,10 +85,47 @@ <argument index="3" name="custom_send" type="Callable" /> <argument index="4" name="custom_receive" type="Callable" /> <description> - Configures the MultiplayerAPI to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. + Configures the MultiplayerReplicator to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the spawn/despawn proecess. Tip: You can use a custom property in the scene main script to return a customly optimized state representation. </description> </method> + <method name="sync_all"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="peer_id" type="int" default="0" /> + <description> + Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behaviour, or call your send custom send callable if specified in [method sync_config]. + Note: The default implementation only allow syncing from server to clients. + </description> + </method> + <method name="sync_config"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="interval" type="int" /> + <argument index="2" name="properties" type="StringName[]" default="[]" /> + <argument index="3" name="custom_send" type="Callable" /> + <argument index="4" name="custom_receive" type="Callable" /> + <description> + Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the syncronization proecess. + Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is higly recommended when dealing with many instances). + </description> + </method> + <method name="track"> + <return type="void" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <description> + Track the given [code]object[/code] as an instance of the scene identified by [code]scene_id[/code]. This object will be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER]. + </description> + </method> + <method name="untrack"> + <return type="void" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <description> + Untrack the given [code]object[/code]. This object will no longer be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER]. + </description> + </method> </methods> <signals> <signal name="despawn_requested"> diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index f97b2344a5..eb9bec1104 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -14,21 +14,22 @@ <return type="void" /> <description> Locks this [Mutex], blocks until it is unlocked by the current owner. + [b]Note:[/b] This function returns without blocking if the thread already has ownership of the mutex. </description> </method> <method name="try_lock"> <return type="int" enum="Error" /> <description> Tries locking this [Mutex], but does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise. + [b]Note:[/b] This function returns [constant OK] if the thread already has ownership of the mutex. </description> </method> <method name="unlock"> <return type="void" /> <description> Unlocks this [Mutex], leaving it to other threads. + [b]Note:[/b] If a thread called [method lock] or [method try_lock] multiple times while already having ownership of the mutex, it must also call [method unlock] the same number of times in order to unlock it correctly. </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml index c14ce94aff..42246619f6 100644 --- a/doc/classes/NativeExtensionManager.xml +++ b/doc/classes/NativeExtensionManager.xml @@ -18,6 +18,12 @@ <description> </description> </method> + <method name="is_extension_loaded" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> <method name="load_extension"> <return type="int" enum="NativeExtensionManager.LoadStatus" /> <argument index="0" name="path" type="String" /> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index c05f7c2094..068854024c 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -129,6 +129,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index af4a058489..f429134a71 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -135,6 +135,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 9931033260..ca285c030c 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -21,6 +21,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index 2e94eb0bba..462532d49a 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml index d7454a7bea..c0cb7befef 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index e1e2c34a63..5b5b7c42ef 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -141,6 +141,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index 33a3f04c3d..6c78b25744 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -10,8 +10,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion2D] is enabled or disabled. @@ -23,6 +21,4 @@ The [NavigationPolygon] resource to use. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index da06641b48..f91069fa9d 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -40,6 +40,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 042ab06e6f..1740093eb2 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -272,6 +272,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index 73ca18655a..3e10657838 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -329,6 +329,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 096fbbf2c0..608d76cd9f 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -35,8 +35,8 @@ Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]. </description> </method> - <method name="_get_configuration_warnings" qualifiers="virtual"> - <return type="String[]" /> + <method name="_get_configuration_warnings" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script. Returning an empty array produces no warnings. @@ -96,9 +96,9 @@ </method> <method name="_unhandled_key_input" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="event" type="InputEventKey" /> + <argument index="0" name="event" type="InputEvent" /> <description> - Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it. + Called when an [InputEventKey] or [InputEventShortcut] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it. It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first. @@ -109,9 +109,11 @@ <return type="void" /> <argument index="0" name="node" type="Node" /> <argument index="1" name="legible_unique_name" type="bool" default="false" /> + <argument index="2" name="internal" type="int" enum="Node.InternalMode" default="0" /> <description> Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type. + If [code]internal[/code] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes. [b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example: [codeblocks] [gdscript] @@ -141,6 +143,7 @@ Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it. If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type. Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. + [b]Note:[/b] If this node is internal, the new sibling will be internal too (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="add_to_group"> @@ -150,6 +153,7 @@ <description> Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree]. The [code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored. + [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs. </description> </method> <method name="can_process" qualifiers="const"> @@ -200,22 +204,28 @@ <method name="get_child" qualifiers="const"> <return type="Node" /> <argument index="0" name="idx" type="int" /> + <argument index="1" name="include_internal" type="bool" default="false" /> <description> Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. Negative indices access the children from the last one. + If [code]include_internal[/code] is [code]true[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]). To access a child node via its name, use [method get_node]. </description> </method> <method name="get_child_count" qualifiers="const"> <return type="int" /> + <argument index="0" name="include_internal" type="bool" default="false" /> <description> Returns the number of child nodes. + If [code]include_internal[/code] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="get_children" qualifiers="const"> <return type="Node[]" /> + <argument index="0" name="include_internal" type="bool" default="false" /> <description> Returns an array of references to node's children. + If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="get_editor_description" qualifiers="const"> @@ -227,18 +237,21 @@ <return type="Array" /> <description> Returns an array listing the groups that the node is a member of. + [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs. </description> </method> <method name="get_index" qualifiers="const"> <return type="int" /> + <argument index="0" name="include_internal" type="bool" default="false" /> <description> Returns the node's order in the scene tree branch. For example, if called on the first child node the position is [code]0[/code]. + If [code]include_internal[/code] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]). </description> </method> - <method name="get_network_master" qualifiers="const"> + <method name="get_multiplayer_authority" qualifiers="const"> <return type="int" /> <description> - Returns the peer ID of the network master for this node. See [method set_network_master]. + Returns the peer ID of the multiplayer authority for this node. See [method set_multiplayer_authority]. </description> </method> <method name="get_node" qualifiers="const"> @@ -376,7 +389,14 @@ <method name="is_displayed_folded" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock. + Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling. + </description> + </method> + <method name="is_editable_instance" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="node" type="Node" /> + <description> + Returns [code]true[/code] if [code]node[/code] has editable children enabled relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="is_greater_than" qualifiers="const"> @@ -399,10 +419,10 @@ Returns [code]true[/code] if this node is currently inside a [SceneTree]. </description> </method> - <method name="is_network_master" qualifiers="const"> + <method name="is_multiplayer_authority" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the local system is the master of this node. + Returns [code]true[/code] if the local system is the multiplayer authority of this node. </description> </method> <method name="is_physics_processing" qualifiers="const"> @@ -453,6 +473,7 @@ <argument index="1" name="to_position" type="int" /> <description> Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. + [b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="print_stray_nodes"> @@ -559,17 +580,17 @@ <argument index="0" name="method" type="StringName" /> <description> Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant]. - [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]. + [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> <method name="rpc_config"> <return type="int" /> <argument index="0" name="method" type="StringName" /> - <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode" /> - <argument index="2" name="transfer_mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" /> + <argument index="1" name="rpc_mode" type="int" enum="RPCMode" /> + <argument index="2" name="transfer_mode" type="int" enum="TransferMode" default="2" /> <argument index="3" name="channel" type="int" default="0" /> <description> - Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum MultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). + Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(auth)[/code]). By default, methods are not exposed to networking (and RPCs). </description> </method> <method name="rpc_id" qualifiers="vararg"> @@ -584,7 +605,15 @@ <return type="void" /> <argument index="0" name="fold" type="bool" /> <description> - Sets the folded state of the node in the Scene dock. + Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling. + </description> + </method> + <method name="set_editable_instance"> + <return type="void" /> + <argument index="0" name="node" type="Node" /> + <argument index="1" name="is_editable" type="bool" /> + <description> + Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="set_editor_description"> @@ -593,12 +622,12 @@ <description> </description> </method> - <method name="set_network_master"> + <method name="set_multiplayer_authority"> <return type="void" /> <argument index="0" name="id" type="int" /> <argument index="1" name="recursive" type="bool" default="true" /> <description> - Sets the node's network master to the peer with the given peer ID. The network master is the peer that has authority over the node on the network. Useful in conjunction with the [code]master[/code] and [code]puppet[/code] keywords. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the master for all children of this node. + Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the authority for all children of this node. </description> </method> <method name="set_physics_process"> @@ -873,5 +902,14 @@ Duplicate using instancing. An instance stays linked to the original so when the original changes, the instance changes too. </constant> + <constant name="INTERNAL_MODE_DISABLED" value="0" enum="InternalMode"> + Node will not be internal. + </constant> + <constant name="INTERNAL_MODE_FRONT" value="1" enum="InternalMode"> + Node will be placed at the front of parent's node list, before any non-internal sibling. + </constant> + <constant name="INTERNAL_MODE_BACK" value="2" enum="InternalMode"> + Node will be placed at the back of parent's node list, after any non-internal sibling. + </constant> </constants> </class> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index cc790b7c28..ef5f9ee5c9 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -23,6 +23,7 @@ <argument index="0" name="point" type="Vector2" /> <description> Returns the angle between the node and the [code]point[/code] in radians. + [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url] </description> </method> <method name="get_relative_transform_to_parent" qualifiers="const"> @@ -129,6 +130,4 @@ Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [constant RenderingServer.CANVAS_ITEM_Z_MIN] and [constant RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive). </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Node3DGizmo.xml b/doc/classes/Node3DGizmo.xml index c561047332..00298976a8 100644 --- a/doc/classes/Node3DGizmo.xml +++ b/doc/classes/Node3DGizmo.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index d05630d277..17c6ba38b7 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -168,17 +168,25 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="NodePath" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="NodePath" /> <description> </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml index d275f93196..7ca4f5d363 100644 --- a/doc/classes/ORMMaterial3D.xml +++ b/doc/classes/ORMMaterial3D.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 757730f6c8..e2ac8568c9 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -55,14 +55,18 @@ <return type="void" /> <argument index="0" name="msec" type="int" /> <description> - Delay execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. + Delays execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. + [b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Yielding with [method SceneTree.create_timer] will delay the execution of code placed below the [code]yield[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). + [b]Note:[/b] When [method delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_msec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). </description> </method> <method name="delay_usec" qualifiers="const"> <return type="void" /> <argument index="0" name="usec" type="int" /> <description> - Delay execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message. + Delays execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message. + [b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Yielding with [method SceneTree.create_timer] will delay the execution of code placed below the [code]yield[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). + [b]Note:[/b] When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). </description> </method> <method name="dump_memory_to_file"> @@ -215,7 +219,7 @@ <method name="get_locale" qualifiers="const"> <return type="String" /> <description> - Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code]. + Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code]. If you want only the language code and not the fully specified locale from the OS, you can use [method get_locale_language]. [code]language[/code] - 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case. [code]Script[/code] - optional, 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case. [code]COUNTRY[/code] - optional, 2 or 3-letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case. @@ -223,6 +227,13 @@ [code]extra[/code] - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information. </description> </method> + <method name="get_locale_language" qualifiers="const"> + <return type="String" /> + <description> + Returns the host OS locale's 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url] as a string which should be consistent on all platforms. This is equivalent to extracting the [code]language[/code] part of the [method get_locale] string. + This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with [code]fr_CA[/code] locale, this would return [code]fr[/code]. + </description> + </method> <method name="get_model_name" qualifiers="const"> <return type="String" /> <description> @@ -331,7 +342,7 @@ <method name="is_stdout_verbose" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the engine was executed with [code]-v[/code] (verbose stdout). + Returns [code]true[/code] if the engine was executed with the [code]--verbose[/code] or [code]-v[/code] command line argument, or if [member ProjectSettings.debug/settings/stdout/verbose_stdout] is [code]true[/code]. See also [method @GlobalScope.print_verbose]. </description> </method> <method name="is_userfs_persistent" qualifiers="const"> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 9ad79dc17a..ed045f8390 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -13,15 +13,15 @@ [codeblocks] [gdscript] var n = Node2D.new() - print("position" in n) # Prints "True". - print("other_property" in n) # Prints "False". + print("position" in n) # Prints "true". + print("other_property" in n) # Prints "false". [/gdscript] [csharp] var node = new Node2D(); // C# has no direct equivalent to GDScript's `in` operator here, but we // can achieve the same behavior by performing `Get` with a null check. - GD.Print(node.Get("position") != null); // Prints "True". - GD.Print(node.Get("other_property") != null); // Prints "False". + GD.Print(node.Get("position") != null); // Prints "true". + GD.Print(node.Get("other_property") != null); // Prints "false". [/csharp] [/codeblocks] The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code]. @@ -92,12 +92,12 @@ Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] [gdscript] - var node = Node2D.new() - node.call("set", "position", Vector2(42, 0)) + var node = Node3D.new() + node.call("rotate", Vector3(1.0, 0.0, 0.0), 1.571) [/gdscript] [csharp] - var node = new Node2D(); - node.Call("set", "position", new Vector2(42, 0)); + var node = new Node3D(); + node.Call("rotate", new Vector3(1f, 0f, 0f), 1.571f); [/csharp] [/codeblocks] [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). @@ -110,12 +110,12 @@ Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] [gdscript] - var node = Node2D.new() - node.call_deferred("set", "position", Vector2(42, 0)) + var node = Node3D.new() + node.call_deferred("rotate", Vector3(1.0, 0.0, 0.0), 1.571) [/gdscript] [csharp] - var node = new Node2D(); - node.CallDeferred("set", "position", new Vector2(42, 0)); + var node = new Node3D(); + node.CallDeferred("rotate", new Vector3(1f, 0f, 0f), 1.571f); [/csharp] [/codeblocks] [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). @@ -129,12 +129,12 @@ Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array]. [codeblocks] [gdscript] - var node = Node2D.new() - node.callv("set", ["position", Vector2(42, 0)]) + var node = Node3D.new() + node.callv("rotate", [Vector3(1.0, 0.0, 0.0), 1.571]) [/gdscript] [csharp] - var node = new Node2D(); - node.Callv("set", new Godot.Collections.Array { "position", new Vector2(42, 0) }); + var node = new Node3D(); + node.Callv("rotate", new Godot.Collections.Array { new Vector3(1f, 0f, 0f), 1.571f }); [/csharp] [/codeblocks] </description> @@ -331,7 +331,8 @@ <method name="get_class" qualifiers="const"> <return type="String" /> <description> - Returns the object's class as a [String]. + Returns the object's class as a [String]. See also [method is_class]. + [b]Note:[/b] [method get_class] does not take [code]class_name[/code] declarations into account. If the object has a [code]class_name[/code] defined, the base class name will be returned instead. </description> </method> <method name="get_incoming_connections" qualifiers="const"> @@ -441,7 +442,8 @@ <return type="bool" /> <argument index="0" name="class" type="String" /> <description> - Returns [code]true[/code] if the object inherits from the given [code]class[/code]. + Returns [code]true[/code] if the object inherits from the given [code]class[/code]. See also [method get_class]. + [b]Note:[/b] [method is_class] does not take [code]class_name[/code] declarations into account. If the object has a [code]class_name[/code] defined, [method is_class] will return [code]false[/code] for that name. </description> </method> <method name="is_connected" qualifiers="const"> diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml index 501c4a3ccf..69fb3002e3 100644 --- a/doc/classes/Occluder3D.xml +++ b/doc/classes/Occluder3D.xml @@ -6,14 +6,10 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()"> </member> <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index cc4bddc229..d97aa4312f 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -29,6 +29,4 @@ <member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index 28d3ed433a..e347888414 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="closed" type="bool" setter="set_closed" getter="is_closed" default="true"> If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml index dfcb19a287..e8d5977199 100644 --- a/doc/classes/OmniLight3D.xml +++ b/doc/classes/OmniLight3D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> - <methods> - </methods> <members> <member name="omni_attenuation" type="float" setter="set_param" getter="get_param" default="1.0"> The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. diff --git a/doc/classes/OptimizedTranslation.xml b/doc/classes/OptimizedTranslation.xml index 195fa28188..8302a564ed 100644 --- a/doc/classes/OptimizedTranslation.xml +++ b/doc/classes/OptimizedTranslation.xml @@ -17,6 +17,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 8aa0ad073d..264ef9975a 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -183,8 +183,6 @@ </description> </signal> </signals> - <constants> - </constants> <theme_items> <theme_item name="arrow" data_type="icon" type="Texture2D"> The arrow icon to be drawn on the right end of the button. diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index 0af329983d..28508c85e0 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -51,6 +51,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index af92590da3..8e94254a1f 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -270,7 +270,7 @@ Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> <description> @@ -316,6 +316,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedByteArray" /> <description> </description> @@ -328,6 +333,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedByteArray" /> <description> </description> @@ -426,6 +436,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index a5a5703bfa..4bccdcd939 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -56,7 +56,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Color" /> <description> @@ -79,6 +79,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedColorArray" /> <description> </description> @@ -91,6 +96,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedColorArray" /> <description> </description> @@ -161,6 +171,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml index 0a765fcc75..2454e565e6 100644 --- a/doc/classes/PackedDataContainer.xml +++ b/doc/classes/PackedDataContainer.xml @@ -23,6 +23,4 @@ <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray()"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml index 5e42079b97..131a6be4e2 100644 --- a/doc/classes/PackedDataContainerRef.xml +++ b/doc/classes/PackedDataContainerRef.xml @@ -14,6 +14,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index 9e7dd8f99e..51e14ea3d4 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -57,7 +57,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="float" /> <description> @@ -80,6 +80,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedFloat32Array" /> <description> </description> @@ -92,6 +97,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedFloat32Array" /> <description> </description> @@ -164,6 +174,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index ff4cf0edf8..25c9c025f7 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -57,7 +57,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="float" /> <description> @@ -80,6 +80,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedFloat64Array" /> <description> </description> @@ -92,6 +97,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedFloat64Array" /> <description> </description> @@ -164,6 +174,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index 2e9716b665..1a61ce0ead 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -57,7 +57,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> <description> @@ -80,6 +80,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedInt32Array" /> <description> </description> @@ -92,6 +97,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedInt32Array" /> <description> </description> @@ -164,6 +174,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 1e7fff3bc6..06f7900237 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -57,7 +57,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> <description> @@ -80,6 +80,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedInt64Array" /> <description> </description> @@ -92,6 +97,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedInt64Array" /> <description> </description> @@ -164,6 +174,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 1374496b52..618123855f 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -22,23 +22,23 @@ AddChild(scene); [/csharp] [/codeblocks] - [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. + [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidDynamicBody2D[/code] ([code]body[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. [codeblocks] [gdscript] # Create the objects. var node = Node2D.new() - var rigid = RigidBody2D.new() + var body = RigidDynamicBody2D.new() var collision = CollisionShape2D.new() # Create the object hierarchy. - rigid.add_child(collision) - node.add_child(rigid) + body.add_child(collision) + node.add_child(body) - # Change owner of `rigid`, but not of `collision`. - rigid.owner = node + # Change owner of `body`, but not of `collision`. + body.owner = node var scene = PackedScene.new() - # Only `node` and `rigid` are now packed. + # Only `node` and `body` are now packed. var result = scene.pack(node) if result == OK: var error = ResourceSaver.save("res://path/name.tscn", scene) # Or "user://..." @@ -48,18 +48,18 @@ [csharp] // Create the objects. var node = new Node2D(); - var rigid = new RigidBody2D(); + var body = new RigidDynamicBody2D(); var collision = new CollisionShape2D(); // Create the object hierarchy. - rigid.AddChild(collision); - node.AddChild(rigid); + body.AddChild(collision); + node.AddChild(body); - // Change owner of `rigid`, but not of `collision`. - rigid.Owner = node; + // Change owner of `body`, but not of `collision`. + body.Owner = node; var scene = new PackedScene(); - // Only `node` and `rigid` are now packed. + // Only `node` and `body` are now packed. Error result = scene.Pack(node); if (result == Error.Ok) { diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 04113d4a2e..763ed0cc55 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -57,7 +57,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="String" /> <description> @@ -80,6 +80,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedStringArray" /> <description> </description> @@ -92,6 +97,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedStringArray" /> <description> </description> @@ -162,6 +172,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 76d3aff20e..3f0797bb59 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -57,7 +57,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Vector2" /> <description> @@ -80,6 +80,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedVector2Array" /> <description> </description> @@ -98,6 +103,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedVector2Array" /> <description> </description> @@ -168,6 +178,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 1a35f71619..6b950cad61 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -56,7 +56,7 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Vector3" /> <description> @@ -79,6 +79,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedVector3Array" /> <description> </description> @@ -97,6 +102,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="PackedVector3Array" /> <description> </description> @@ -167,6 +177,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index 8d0aa89287..fb94209d72 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -57,6 +57,4 @@ The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [code]encode_buffer_max_size[/code], the method will error out with [constant ERR_OUT_OF_MEMORY]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml index ec1ee175f7..a92aaf037e 100644 --- a/doc/classes/PacketPeerStream.xml +++ b/doc/classes/PacketPeerStream.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="input_buffer_max_size" type="int" setter="set_input_buffer_max_size" getter="get_input_buffer_max_size" default="65532"> </member> @@ -19,6 +17,4 @@ The wrapped [StreamPeer] object. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index e2acb91058..ecaddc5b9f 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -139,6 +139,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index 9906abf895..21ac7dfac1 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -11,8 +11,6 @@ <link title="2D Finite State Machine Demo">https://godotengine.org/asset-library/asset/516</link> <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link> </tutorials> - <methods> - </methods> <members> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Panel.Mode" default="0"> </member> diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml index f3f2f6839a..95d038e2af 100644 --- a/doc/classes/PanelContainer.xml +++ b/doc/classes/PanelContainer.xml @@ -9,13 +9,9 @@ <tutorials> <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> </tutorials> - <methods> - </methods> <members> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" /> </members> - <constants> - </constants> <theme_items> <theme_item name="panel" data_type="style" type="StyleBox"> The style of [PanelContainer]'s background. diff --git a/doc/classes/PanoramaSkyMaterial.xml b/doc/classes/PanoramaSkyMaterial.xml index 905a2dd506..6707c03fac 100644 --- a/doc/classes/PanoramaSkyMaterial.xml +++ b/doc/classes/PanoramaSkyMaterial.xml @@ -10,13 +10,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="panorama" type="Texture2D" setter="set_panorama" getter="get_panorama"> [Texture2D] to be applied to the [PanoramaSkyMaterial]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index b8097343f4..5670660d01 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="layer" type="int" setter="set_layer" getter="get_layer" override="true" default="-100" /> <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2(0, 0)"> @@ -31,6 +29,4 @@ The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml index 6b1e013851..459518ab1c 100644 --- a/doc/classes/ParallaxLayer.xml +++ b/doc/classes/ParallaxLayer.xml @@ -10,8 +10,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2(0, 0)"> The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored. @@ -23,6 +21,4 @@ Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 3520d3b966..3b583f5c89 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -11,18 +11,18 @@ <tutorials> </tutorials> <methods> - <method name="get_param" qualifiers="const"> + <method name="get_param_max" qualifiers="const"> <return type="float" /> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <description> - Returns the value of the specified parameter. + Return the maximum value range for the given prameter. </description> </method> - <method name="get_param_randomness" qualifiers="const"> + <method name="get_param_min" qualifiers="const"> <return type="float" /> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <description> - Returns the randomness ratio associated with the specified parameter. + Return the minimum value range for the given parameter. </description> </method> <method name="get_param_texture" qualifiers="const"> @@ -39,20 +39,20 @@ Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options. </description> </method> - <method name="set_param"> + <method name="set_param_max"> <return type="void" /> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <argument index="1" name="value" type="float" /> <description> - Sets the specified [enum Parameter]. + Sets the maximum value range for the given parameter. </description> </method> - <method name="set_param_randomness"> + <method name="set_param_min"> <return type="void" /> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> - <argument index="1" name="randomness" type="float" /> + <argument index="1" name="value" type="float" /> <description> - Sets the randomness ratio for the specified [enum Parameter]. + Sets the minimum value range for the given parameter. </description> </method> <method name="set_param_texture"> @@ -73,53 +73,56 @@ </method> </methods> <members> - <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial rotation applied to each particle, in degrees. - Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. - </member> <member name="angle_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's rotation will be animated along this [CurveTexture]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Rotation randomness ratio. + <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angle. </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. - Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. + <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angle. </member> <member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's angular velocity will vary along this [CurveTexture]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Angular velocity randomness ratio. + <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angular velocity. </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation offset. + <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angular velocity. </member> <member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's animation offset will vary along this [CurveTexture]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation offset randomness ratio. + <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum animation offset. </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation speed. + <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum animation offset. </member> <member name="anim_speed_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's animation speed will vary along this [CurveTexture]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation speed randomness ratio. + <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum particle animation speed. + </member> + <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum particle animation speed. </member> <member name="attractor_interaction_enabled" type="bool" setter="set_attractor_interaction_enabled" getter="is_attractor_interaction_enabled" default="true"> + True if the interaction with particle attractors is enabled. </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> + Collision bouncyness. </member> <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false"> + True if collisions are enabled for this particle system. </member> <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0"> + Collision friction. </member> <member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false"> + Should collision take scale into account. </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. @@ -127,14 +130,12 @@ <member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp"> Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). </member> - <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> - The rate at which particles lose velocity. - </member> <member name="damping_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Damping will vary along this [CurveTexture]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Damping randomness ratio. + <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)"> Unit vector specifying the particles' emission direction. @@ -178,42 +179,41 @@ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)"> Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial hue variation applied to each particle. - </member> <member name="hue_variation_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's hue will vary along this [CurveTexture]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Hue variation randomness ratio. + <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum hue variation. + </member> + <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum hue variation. </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum initial velocity. </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Initial velocity randomness ratio. + <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum initial velocity. </member> <member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0"> Particle lifetime randomness ratio. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Linear acceleration applied to each particle in the direction of motion. - </member> <member name="linear_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's linear acceleration will vary along this [CurveTexture]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Linear acceleration randomness ratio. + <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum linear acceleration. </member> - <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> - Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. - Only available when [member particle_flag_disable_z] is [code]true[/code]. + <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum linear acceleration. </member> <member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's orbital velocity will vary along this [CurveTexture]. </member> - <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Orbital velocity randomness ratio. + <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max"> + Maximum orbit velocity. + </member> + <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min"> + Minimum orbit velocity. </member> <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> Align Y axis of particle with the direction of its velocity. @@ -222,25 +222,25 @@ If [code]true[/code], particles will not move on the z axis. </member> <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - If [code]true[/code], particles rotate around Y axis by [member angle]. - </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Radial acceleration applied to each particle. Makes particle accelerate away from origin. + If [code]true[/code], particles rotate around Y axis by [member angle_min]. </member> <member name="radial_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's radial acceleration will vary along this [CurveTexture]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Radial acceleration randomness ratio. + <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum radial acceleration. </member> - <member name="scale" type="float" setter="set_param" getter="get_param" default="1.0"> - Initial scale applied to each particle. + <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum radial acceleration. </member> <member name="scale_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> - Each particle's scale will vary along this [CurveTexture]. + Each particle's scale will vary along this [CurveTexture]. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis. </member> - <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Scale randomness ratio. + <member name="scale_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0"> + Maximum scale. + </member> + <member name="scale_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0"> + Minimum scale. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. @@ -253,52 +253,52 @@ </member> <member name="sub_emitter_mode" type="int" setter="set_sub_emitter_mode" getter="get_sub_emitter_mode" enum="ParticlesMaterial.SubEmitterMode" default="0"> </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - </member> <member name="tangential_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's tangential acceleration will vary along this [CurveTexture]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Tangential acceleration randomness ratio. + <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum tangential acceleration. + </member> + <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum tangential acceleration. </member> </members> <constants> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml index 57e2091268..297fe69986 100644 --- a/doc/classes/Path2D.xml +++ b/doc/classes/Path2D.xml @@ -9,13 +9,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="curve" type="Curve2D" setter="set_curve" getter="get_curve"> A [Curve2D] describing the path. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Path3D.xml b/doc/classes/Path3D.xml index b97e7efd5d..ce5774acab 100644 --- a/doc/classes/Path3D.xml +++ b/doc/classes/Path3D.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="curve" type="Curve3D" setter="set_curve" getter="get_curve"> A [Curve3D] describing the path. @@ -23,6 +21,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml index 4b55e7b781..98106fd580 100644 --- a/doc/classes/PathFollow2D.xml +++ b/doc/classes/PathFollow2D.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true"> If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. @@ -39,6 +37,4 @@ The node's offset perpendicular to the curve. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml index f405bdedfc..781e861203 100644 --- a/doc/classes/PathFollow3D.xml +++ b/doc/classes/PathFollow3D.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true"> If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 335c3d254b..6e905eace6 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -169,7 +169,7 @@ <constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor"> </constant> <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor"> - Number of active [RigidBody2D] nodes in the game. + Number of active [RigidDynamicBody2D] nodes in the game. </constant> <constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor"> Number of collision pairs in the 2D physics engine. @@ -178,7 +178,7 @@ Number of islands in the 2D physics engine. </constant> <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor"> - Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game. + Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. </constant> <constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor"> Number of collision pairs in the 3D physics engine. diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml index b4d92475a1..339739b267 100644 --- a/doc/classes/PhysicalBone2D.xml +++ b/doc/classes/PhysicalBone2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicalBone2D" inherits="RigidBody2D" version="4.0"> +<class name="PhysicalBone2D" inherits="RigidDynamicBody2D" version="4.0"> <brief_description> A 2D node that can be used for physically aware bones in 2D. </brief_description> <description> - The [code]PhysicalBone2D[/code] node is a [RigidBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D. + The [code]PhysicalBone2D[/code] node is a [RigidDynamicBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D. [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes. [b]Note:[/b] The PhysicalBone2D node does not automatically create a [Joint2D] node to keep [code]PhysicalBone2D[/code] nodes together. You will need to create these manually. For most cases, you want to use a [PinJoint2D] node. The [code]PhysicalBone2D[/code] node can automatically configure the [Joint2D] node once it's been created as a child node. </description> @@ -42,6 +42,4 @@ [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 20ab998d35..b90f52a70d 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -10,8 +10,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0"> Sets the amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible, higher amounts may add fuzziness to the sky. @@ -47,6 +45,4 @@ Sets the thickness of the atmosphere. High turbidity creates a foggy looking atmosphere, while a low turbidity results in a clearer atmosphere. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index e00c473bcd..ee28500838 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -57,6 +57,4 @@ <members> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" /> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index ea2553e28a..174e49ea2d 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -35,10 +35,12 @@ <argument index="0" name="rel_vec" type="Vector3" /> <argument index="1" name="test_only" type="bool" default="false" /> <argument index="2" name="safe_margin" type="float" default="0.001" /> + <argument index="3" name="max_collisions" type="int" default="1" /> <description> Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision. If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). + [code]max_collisions[/code] allows to retrieve more than one collision result. </description> </method> <method name="remove_collision_exception_with"> @@ -62,10 +64,12 @@ <argument index="1" name="rel_vec" type="Vector3" /> <argument index="2" name="collision" type="KinematicCollision3D" default="null" /> <argument index="3" name="safe_margin" type="float" default="0.001" /> + <argument index="4" name="max_collisions" type="int" default="1" /> <description> Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one). [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). + [code]max_collisions[/code] allows to retrieve more than one collision result. </description> </method> </methods> @@ -89,6 +93,4 @@ Lock the body's linear movement in the Z axis. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index 4c6adfca32..bbb708c9b4 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -4,9 +4,10 @@ Direct access object to a physics body in the [PhysicsServer2D]. </brief_description> <description> - Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. + Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody2D._integrate_forces]. </description> <tutorials> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> @@ -107,7 +108,7 @@ <return type="int" /> <description> Returns the number of contacts this body has with other bodies. - [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor]. + [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidDynamicBody2D.contact_monitor]. </description> </method> <method name="get_contact_local_normal" qualifiers="const"> @@ -155,6 +156,9 @@ <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity"> The body's rotational velocity. </member> + <member name="center_of_mass" type="Vector2" setter="" getter="get_center_of_mass"> + The body's center of mass. + </member> <member name="inverse_inertia" type="float" setter="" getter="get_inverse_inertia"> The inverse of the inertia of the body. </member> @@ -183,6 +187,4 @@ The body's transformation matrix. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index 271668e339..9bc5dbd6b9 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -4,9 +4,11 @@ Direct access object to a physics body in the [PhysicsServer3D]. </brief_description> <description> - Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces]. + Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody3D._integrate_forces]. </description> <tutorials> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="add_central_force"> @@ -101,7 +103,7 @@ <return type="int" /> <description> Returns the number of contacts this body has with other bodies. - [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor]. + [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidDynamicBody3D.contact_monitor]. </description> </method> <method name="get_contact_impulse" qualifiers="const"> @@ -157,6 +159,7 @@ The body's rotational velocity. </member> <member name="center_of_mass" type="Vector3" setter="" getter="get_center_of_mass"> + The body's center of mass. </member> <member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia"> The inverse of the inertia of the body. @@ -188,6 +191,4 @@ The body's transformation matrix. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index e84b3e0e49..0264249dab 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -7,7 +7,8 @@ Direct access object to a space in the [PhysicsServer2D]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> - <link title="Ray-Casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="cast_motion"> @@ -47,7 +48,7 @@ <argument index="0" name="point" type="Vector2" /> <argument index="1" name="max_results" type="int" default="32" /> <argument index="2" name="exclude" type="Array" default="[]" /> - <argument index="3" name="collision_mask" type="int" default="2147483647" /> + <argument index="3" name="collision_mask" type="int" default="4294967295" /> <argument index="4" name="collide_with_bodies" type="bool" default="true" /> <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> @@ -57,7 +58,7 @@ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected. </description> </method> @@ -67,10 +68,18 @@ <argument index="1" name="canvas_instance_id" type="int" /> <argument index="2" name="max_results" type="int" default="32" /> <argument index="3" name="exclude" type="Array" default="[]" /> - <argument index="4" name="collision_mask" type="int" default="2147483647" /> + <argument index="4" name="collision_mask" type="int" default="4294967295" /> <argument index="5" name="collide_with_bodies" type="bool" default="true" /> <argument index="6" name="collide_with_areas" type="bool" default="false" /> <description> + Checks whether a point is inside any solid shape, in a specific canvas layer given by [code]canvas_instance_id[/code]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + [code]collider[/code]: The colliding object. + [code]collider_id[/code]: The colliding object's ID. + [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected. </description> </method> <method name="intersect_ray"> @@ -78,7 +87,7 @@ <argument index="0" name="from" type="Vector2" /> <argument index="1" name="to" type="Vector2" /> <argument index="2" name="exclude" type="Array" default="[]" /> - <argument index="3" name="collision_mask" type="int" default="2147483647" /> + <argument index="3" name="collision_mask" type="int" default="4294967295" /> <argument index="4" name="collide_with_bodies" type="bool" default="true" /> <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> @@ -91,7 +100,7 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. </description> </method> <method name="intersect_shape"> @@ -110,6 +119,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index 13db50a2c7..137e7bbf39 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -7,6 +7,7 @@ Direct access object to a space in the [PhysicsServer3D]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> @@ -47,7 +48,7 @@ <argument index="0" name="from" type="Vector3" /> <argument index="1" name="to" type="Vector3" /> <argument index="2" name="exclude" type="Array" default="[]" /> - <argument index="3" name="collision_mask" type="int" default="2147483647" /> + <argument index="3" name="collision_mask" type="int" default="4294967295" /> <argument index="4" name="collide_with_bodies" type="bool" default="true" /> <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> @@ -59,7 +60,7 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. </description> </method> <method name="intersect_shape"> @@ -76,6 +77,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml index 0889c238dc..b557b083c7 100644 --- a/doc/classes/PhysicsMaterial.xml +++ b/doc/classes/PhysicsMaterial.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent" default="false"> If [code]true[/code], subtracts the bounciness from the colliding object's bounciness instead of adding it. @@ -24,6 +22,4 @@ If [code]true[/code], the physics engine will use the friction of the object marked as "rough" when two objects collide. If [code]false[/code], the physics engine will use the lowest friction of all colliding objects instead. If [code]true[/code] for both colliding objects, the physics engine will use the highest friction. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 1df2fd0158..7e5d7ca704 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -373,7 +373,7 @@ </description> </method> <method name="body_get_param" qualifiers="const"> - <return type="float" /> + <return type="Variant" /> <argument index="0" name="body" type="RID" /> <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" /> <description> @@ -449,6 +449,13 @@ Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. </description> </method> + <method name="body_reset_mass_properties"> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <description> + Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param]. + </description> + </method> <method name="body_set_axis_velocity"> <return type="void" /> <argument index="0" name="body" type="RID" /> @@ -489,6 +496,9 @@ <argument index="2" name="userdata" type="Variant" default="null" /> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). + The force integration function takes 2 arguments: + [code]state:[/code] [PhysicsDirectBodyState2D] used to retrieve and modify the body's state. + [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code]. </description> </method> <method name="body_set_max_contacts_reported"> @@ -519,7 +529,7 @@ <return type="void" /> <argument index="0" name="body" type="RID" /> <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" /> - <argument index="2" name="value" type="float" /> + <argument index="2" name="value" type="Variant" /> <description> Sets a body parameter. See [enum BodyParameter] for a list of available parameters. </description> @@ -595,7 +605,8 @@ <argument index="2" name="motion" type="Vector2" /> <argument index="3" name="margin" type="float" default="0.08" /> <argument index="4" name="result" type="PhysicsTestMotionResult2D" default="null" /> - <argument index="5" name="exclude" type="Array" default="[]" /> + <argument index="5" name="collide_separation_ray" type="bool" default="false" /> + <argument index="6" name="exclude" type="Array" default="[]" /> <description> Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in. </description> @@ -726,6 +737,11 @@ <description> </description> </method> + <method name="separation_ray_shape_create"> + <return type="RID" /> + <description> + </description> + </method> <method name="set_active"> <return type="void" /> <argument index="0" name="active" type="bool" /> @@ -807,7 +823,7 @@ Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters. </description> </method> - <method name="world_margin_shape_create"> + <method name="world_boundary_shape_create"> <return type="RID" /> <description> </description> @@ -837,28 +853,31 @@ </constant> <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter"> </constant> - <constant name="SHAPE_WORLD_MARGIN" value="0" enum="ShapeType"> - This is the constant for creating world margin shapes. A world margin shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks. + <constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType"> + This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks. + </constant> + <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType"> + This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers. </constant> - <constant name="SHAPE_SEGMENT" value="1" enum="ShapeType"> + <constant name="SHAPE_SEGMENT" value="2" enum="ShapeType"> This is the constant for creating segment shapes. A segment shape is a [i]finite[/i] line from a point A to a point B. It can be checked for intersections. </constant> - <constant name="SHAPE_CIRCLE" value="2" enum="ShapeType"> + <constant name="SHAPE_CIRCLE" value="3" enum="ShapeType"> This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_RECTANGLE" value="3" enum="ShapeType"> + <constant name="SHAPE_RECTANGLE" value="4" enum="ShapeType"> This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> + <constant name="SHAPE_CAPSULE" value="5" enum="ShapeType"> This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType"> + <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. </constant> - <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType"> + <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. </constant> - <constant name="SHAPE_CUSTOM" value="7" enum="ShapeType"> + <constant name="SHAPE_CUSTOM" value="8" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> @@ -901,7 +920,7 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. </constant> <constant name="BODY_MODE_STATIC" value="0" enum="BodyMode"> - Constant for static bodies. In this mode, a body can be only moved by user code. + Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. </constant> <constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode"> Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. @@ -924,16 +943,19 @@ <constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter"> Constant to set/get a body's inertia. </constant> - <constant name="BODY_PARAM_GRAVITY_SCALE" value="4" enum="BodyParameter"> + <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter"> + Constant to set/get a body's center of mass. + </constant> + <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter"> Constant to set/get a body's gravity multiplier. </constant> - <constant name="BODY_PARAM_LINEAR_DAMP" value="5" enum="BodyParameter"> + <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter"> Constant to set/get a body's linear dampening factor. </constant> - <constant name="BODY_PARAM_ANGULAR_DAMP" value="6" enum="BodyParameter"> + <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter"> Constant to set/get a body's angular dampening factor. </constant> - <constant name="BODY_PARAM_MAX" value="7" enum="BodyParameter"> + <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter"> Represents the size of the [enum BodyParameter] enum. </constant> <constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index d46e38ac5f..9f48c36b62 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -347,7 +347,7 @@ </description> </method> <method name="body_get_param" qualifiers="const"> - <return type="float" /> + <return type="Variant" /> <argument index="0" name="body" type="RID" /> <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" /> <description> @@ -430,6 +430,13 @@ Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. </description> </method> + <method name="body_reset_mass_properties"> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <description> + Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param]. + </description> + </method> <method name="body_set_axis_lock"> <return type="void" /> <argument index="0" name="body" type="RID" /> @@ -478,6 +485,9 @@ <argument index="2" name="userdata" type="Variant" default="null" /> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). + The force integration function takes 2 arguments: + [code]state:[/code] [PhysicsDirectBodyState3D] used to retrieve and modify the body's state. + [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code]. </description> </method> <method name="body_set_max_contacts_reported"> @@ -508,7 +518,7 @@ <return type="void" /> <argument index="0" name="body" type="RID" /> <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" /> - <argument index="2" name="value" type="float" /> + <argument index="2" name="value" type="Variant" /> <description> Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> @@ -571,7 +581,9 @@ <argument index="2" name="motion" type="Vector3" /> <argument index="3" name="margin" type="float" default="0.001" /> <argument index="4" name="result" type="PhysicsTestMotionResult3D" default="null" /> - <argument index="5" name="exclude" type="Array" default="[]" /> + <argument index="5" name="collide_separation_ray" type="bool" default="false" /> + <argument index="6" name="exclude" type="Array" default="[]" /> + <argument index="7" name="max_collisions" type="int" default="1" /> <description> Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in. </description> @@ -844,7 +856,7 @@ Sets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> - <method name="plane_shape_create"> + <method name="separation_ray_shape_create"> <return type="RID" /> <description> </description> @@ -959,6 +971,11 @@ <description> </description> </method> + <method name="world_boundary_shape_create"> + <return type="RID" /> + <description> + </description> + </method> </methods> <constants> <constant name="JOINT_TYPE_PIN" value="0" enum="JointType"> @@ -1168,34 +1185,37 @@ <constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="G6DOFJointAxisFlag"> If [code]set[/code] there is a linear motor on this axis that targets a specific velocity. </constant> - <constant name="SHAPE_PLANE" value="0" enum="ShapeType"> - The [Shape3D] is a [WorldMarginShape3D]. + <constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType"> + The [Shape3D] is a [WorldBoundaryShape3D]. </constant> - <constant name="SHAPE_SPHERE" value="1" enum="ShapeType"> + <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType"> + The [Shape3D] is a [SeparationRayShape3D]. + </constant> + <constant name="SHAPE_SPHERE" value="2" enum="ShapeType"> The [Shape3D] is a [SphereShape3D]. </constant> - <constant name="SHAPE_BOX" value="2" enum="ShapeType"> + <constant name="SHAPE_BOX" value="3" enum="ShapeType"> The [Shape3D] is a [BoxShape3D]. </constant> - <constant name="SHAPE_CAPSULE" value="3" enum="ShapeType"> + <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> The [Shape3D] is a [CapsuleShape3D]. </constant> - <constant name="SHAPE_CYLINDER" value="4" enum="ShapeType"> + <constant name="SHAPE_CYLINDER" value="5" enum="ShapeType"> The [Shape3D] is a [CylinderShape3D]. </constant> - <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType"> + <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> The [Shape3D] is a [ConvexPolygonShape3D]. </constant> - <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType"> + <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> The [Shape3D] is a [ConcavePolygonShape3D]. </constant> - <constant name="SHAPE_HEIGHTMAP" value="7" enum="ShapeType"> + <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType"> The [Shape3D] is a [HeightMapShape3D]. </constant> - <constant name="SHAPE_SOFT_BODY" value="8" enum="ShapeType"> - The [Shape3D] is a [SoftBody3D]. + <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType"> + The [Shape3D] is used internally for a soft body. Any attempt to create this kind of shape results in an error. </constant> - <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType"> + <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> @@ -1222,6 +1242,18 @@ <constant name="AREA_PARAM_PRIORITY" value="7" enum="AreaParameter"> Constant to set/get the priority (order of processing) of an area. </constant> + <constant name="AREA_PARAM_WIND_FORCE_MAGNITUDE" value="8" enum="AreaParameter"> + Constant to set/get the magnitude of area-specific wind force. + </constant> + <constant name="AREA_PARAM_WIND_SOURCE" value="9" enum="AreaParameter"> + Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows. + </constant> + <constant name="AREA_PARAM_WIND_DIRECTION" value="10" enum="AreaParameter"> + Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows. + </constant> + <constant name="AREA_PARAM_WIND_ATTENUATION_FACTOR" value="11" enum="AreaParameter"> + Constant to set/get the exponential rate at which wind force decreases with distance from its origin. + </constant> <constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0" enum="AreaSpaceOverrideMode"> This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. </constant> @@ -1238,7 +1270,7 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. </constant> <constant name="BODY_MODE_STATIC" value="0" enum="BodyMode"> - Constant for static bodies. In this mode, a body can be only moved by user code. + Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. </constant> <constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode"> Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. @@ -1258,16 +1290,22 @@ <constant name="BODY_PARAM_MASS" value="2" enum="BodyParameter"> Constant to set/get a body's mass. </constant> - <constant name="BODY_PARAM_GRAVITY_SCALE" value="3" enum="BodyParameter"> + <constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter"> + Constant to set/get a body's inertia. + </constant> + <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter"> + Constant to set/get a body's center of mass. + </constant> + <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter"> Constant to set/get a body's gravity multiplier. </constant> - <constant name="BODY_PARAM_LINEAR_DAMP" value="4" enum="BodyParameter"> + <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter"> Constant to set/get a body's linear dampening factor. </constant> - <constant name="BODY_PARAM_ANGULAR_DAMP" value="5" enum="BodyParameter"> + <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter"> Constant to set/get a body's angular dampening factor. </constant> - <constant name="BODY_PARAM_MAX" value="6" enum="BodyParameter"> + <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter"> Represents the size of the [enum BodyParameter] enum. </constant> <constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState"> diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 8b006c68e7..6035b662ea 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> If [code]true[/code], the query will take [Area2D]s into account. @@ -17,7 +15,7 @@ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> If [code]true[/code], the query will take [PhysicsBody2D]s into account. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295"> The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> @@ -67,6 +65,4 @@ The queried shape's transform matrix. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index de9b623591..1a289ff9d0 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> If [code]true[/code], the query will take [Area3D]s into account. @@ -17,7 +15,7 @@ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> If [code]true[/code], the query will take [PhysicsBody3D]s into account. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295"> The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> @@ -64,6 +62,4 @@ The queried shape's transform matrix. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml index 9c5d525f85..8d594af673 100644 --- a/doc/classes/PhysicsTestMotionResult2D.xml +++ b/doc/classes/PhysicsTestMotionResult2D.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="collider" type="Object" setter="" getter="get_collider"> </member> @@ -34,6 +32,4 @@ <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2(0, 0)"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml index 6c18a097a1..8aa087e99a 100644 --- a/doc/classes/PhysicsTestMotionResult3D.xml +++ b/doc/classes/PhysicsTestMotionResult3D.xml @@ -7,33 +7,81 @@ <tutorials> </tutorials> <methods> + <method name="get_collider" qualifiers="const"> + <return type="Object" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> + <method name="get_collider_id" qualifiers="const"> + <return type="int" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> + <method name="get_collider_rid" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> + <method name="get_collider_shape" qualifiers="const"> + <return type="int" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> + <method name="get_collider_velocity" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> + <method name="get_collision_depth" qualifiers="const"> + <return type="float" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> + <method name="get_collision_normal" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> + <method name="get_collision_point" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="collision_index" type="int" default="0" /> + <description> + </description> + </method> </methods> <members> - <member name="collider" type="Object" setter="" getter="get_collider"> + <member name="collider" type="Object" setter="" getter="get_best_collider"> </member> - <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> + <member name="collider_id" type="int" setter="" getter="get_best_collider_id" default="0"> </member> - <member name="collider_rid" type="RID" setter="" getter="get_collider_rid"> + <member name="collider_rid" type="RID" setter="" getter="get_best_collider_rid"> </member> - <member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0"> + <member name="collider_shape" type="int" setter="" getter="get_best_collider_shape" default="0"> </member> - <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3(0, 0, 0)"> + <member name="collider_velocity" type="Vector3" setter="" getter="get_best_collider_velocity" default="Vector3(0, 0, 0)"> </member> - <member name="collision_depth" type="float" setter="" getter="get_collision_depth" default="0.0"> + <member name="collision_count" type="int" setter="" getter="get_collision_count" default="0"> </member> - <member name="collision_normal" type="Vector3" setter="" getter="get_collision_normal" default="Vector3(0, 0, 0)"> + <member name="collision_depth" type="float" setter="" getter="get_best_collision_depth" default="0.0"> </member> - <member name="collision_point" type="Vector3" setter="" getter="get_collision_point" default="Vector3(0, 0, 0)"> + <member name="collision_normal" type="Vector3" setter="" getter="get_best_collision_normal" default="Vector3(0, 0, 0)"> </member> - <member name="collision_safe_fraction" type="float" setter="" getter="get_collision_safe_fraction" default="0.0"> - </member> - <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0"> + <member name="collision_point" type="Vector3" setter="" getter="get_best_collision_point" default="Vector3(0, 0, 0)"> </member> <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)"> </member> + <member name="safe_fraction" type="float" setter="" getter="get_safe_fraction" default="0.0"> + </member> <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3(0, 0, 0)"> </member> + <member name="unsafe_fraction" type="float" setter="" getter="get_unsafe_fraction" default="0.0"> + </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml index ed45149cdf..d5890fe912 100644 --- a/doc/classes/PinJoint2D.xml +++ b/doc/classes/PinJoint2D.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="softness" type="float" setter="set_softness" getter="get_softness" default="0.0"> The higher this value, the more the bond to the pinned partner can flex. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index c243c3ad15..bc9b3cafb5 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -125,12 +125,22 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Plane" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Plane" /> <description> </description> diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml index 56bf98772b..ff0385dbdb 100644 --- a/doc/classes/PlaneMesh.xml +++ b/doc/classes/PlaneMesh.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> Offset of the generated plane. Useful for particles. @@ -25,6 +23,4 @@ Number of subdivision along the X axis. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PointLight2D.xml b/doc/classes/PointLight2D.xml index a7207a3c80..9c13179056 100644 --- a/doc/classes/PointLight2D.xml +++ b/doc/classes/PointLight2D.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" default="0.0"> The height of the light. Used with 2D normal mapping. @@ -22,6 +20,4 @@ The [member texture]'s scale factor. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PointMesh.xml b/doc/classes/PointMesh.xml index 266ab2a898..7d1fa6ac35 100644 --- a/doc/classes/PointMesh.xml +++ b/doc/classes/PointMesh.xml @@ -10,8 +10,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 23106cddf7..cbffd9e554 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -114,6 +114,4 @@ Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml index f77912bafe..945849e4df 100644 --- a/doc/classes/PolygonPathFinder.xml +++ b/doc/classes/PolygonPathFinder.xml @@ -59,6 +59,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index 89695989c8..a47f72b2b6 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" /> <member name="close_on_parent_focus" type="bool" setter="set_close_on_parent_focus" getter="get_close_on_parent_focus" default="true"> @@ -27,6 +25,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 61b5aa89a6..2208c12e56 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -535,8 +535,6 @@ </description> </signal> </signals> - <constants> - </constants> <theme_items> <theme_item name="checked" data_type="icon" type="Texture2D"> [Texture2D] icon for the checked checkbox items. diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml index 56833f3f79..71753ffcc6 100644 --- a/doc/classes/PopupPanel.xml +++ b/doc/classes/PopupPanel.xml @@ -8,10 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="panel" data_type="style" type="StyleBox"> The background panel style of this [PopupPanel]. diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml index 9fadb73a15..03d94b5db9 100644 --- a/doc/classes/Position2D.xml +++ b/doc/classes/Position2D.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml index ca61a57483..22dc261520 100644 --- a/doc/classes/Position3D.xml +++ b/doc/classes/Position3D.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 36bec3ff61..6d63f56f1c 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -40,6 +40,4 @@ The current [Material] of the primitive mesh. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index 0e66281fd1..e369bfe1b2 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" default="0.5"> Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. @@ -27,6 +25,4 @@ Number of added edge loops along the X axis. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index c598a2c266..02e6a2d9f8 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -10,8 +10,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.12, 0.12, 0.13, 1)"> Color of the ground at the bottom. Blends with [member ground_horizon_color]. @@ -44,6 +42,4 @@ How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 8bd013c86c..88132967a0 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" default="true"> If [code]true[/code], the fill percentage is displayed on the bar. @@ -17,8 +15,6 @@ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" /> <member name="step" type="float" setter="set_step" getter="get_step" override="true" default="0.01" /> </members> - <constants> - </constants> <theme_items> <theme_item name="bg" data_type="style" type="StyleBox"> The style of the background. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 0d1fa0e70f..b3872121bf 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -279,6 +279,9 @@ <member name="audio/driver/mix_rate" type="int" setter="" getter="" default="44100"> The mixing rate used for audio (in Hz). In general, it's better to not touch this and leave it to the host operating system. </member> + <member name="audio/driver/mix_rate.web" type="int" setter="" getter="" default="0"> + Safer override for [member audio/driver/mix_rate] in the Web platform. Here [code]0[/code] means "let the browser choose" (since some browsers do not like forcing the mix rate). + </member> <member name="audio/driver/output_latency" type="int" setter="" getter="" default="15"> Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware. </member> @@ -328,6 +331,9 @@ <member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when deprecated keywords are used. </member> + <member name="debug/gdscript/warnings/empty_file" type="bool" setter="" getter="" default="true"> + If [code]true[/code], enables warnings when an empty file is parsed. + </member> <member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings. </member> @@ -426,7 +432,7 @@ <member name="debug/settings/stdout/print_gpu_profile" type="bool" setter="" getter="" default="false"> </member> <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false"> - Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. + Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] command line argument, even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose]. </member> <member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter="" default="1024"> Maximum call stack in visual scripting, to avoid infinite recursion. @@ -625,19 +631,19 @@ </member> <member name="input/ui_text_backspace_all_to_left" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_backspace_all_to_left.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_backspace_all_to_left.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_backspace_word" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_backspace_word.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_backspace_word.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_document_end.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_document_end.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_document_start" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_document_start.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_document_start.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_down" type="Dictionary" setter="" getter=""> </member> @@ -645,11 +651,11 @@ </member> <member name="input/ui_text_caret_line_end" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_line_end.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_line_end.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_line_start" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_line_start.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_line_start.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_page_down" type="Dictionary" setter="" getter=""> </member> @@ -661,11 +667,11 @@ </member> <member name="input/ui_text_caret_word_left" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_word_left.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_word_left.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_word_right" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_word_right.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_word_right.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter=""> </member> @@ -679,11 +685,11 @@ </member> <member name="input/ui_text_delete_all_to_right" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_delete_all_to_right.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_delete_all_to_right.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_delete_word" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_delete_word.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_delete_word.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_indent" type="Dictionary" setter="" getter=""> </member> @@ -695,11 +701,11 @@ </member> <member name="input/ui_text_scroll_down" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_scroll_down.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_scroll_down.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_scroll_up" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_scroll_up.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_scroll_up.macos" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_select_all" type="Dictionary" setter="" getter=""> </member> @@ -726,7 +732,7 @@ <member name="input_devices/pen_tablet/driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. </member> - <member name="input_devices/pen_tablet/driver.Windows" type="String" setter="" getter=""> + <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter=""> Override for [member input_devices/pen_tablet/driver] on Windows. </member> <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true"> @@ -1473,6 +1479,9 @@ </member> <member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false"> </member> + <member name="rendering/3d/viewport/scale" type="int" setter="" getter="" default="0"> + Scale the 3D render buffer based on the viewport size. The smaller the faster 3D rendering is performed but at the cost of quality. + </member> <member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0"> Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. </member> @@ -1769,6 +1778,4 @@ If [code]true[/code], XR support is enabled in Godot, this ensures required shaders are compiled. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml index 7914b26676..71f56690d5 100644 --- a/doc/classes/PropertyTweener.xml +++ b/doc/classes/PropertyTweener.xml @@ -63,6 +63,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml index 4f25fbcdf9..09a9efaa7a 100644 --- a/doc/classes/ProxyTexture.xml +++ b/doc/classes/ProxyTexture.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="base" type="Texture2D" setter="set_base" getter="get_base"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 4209e3db14..da7e74537a 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -10,8 +10,6 @@ <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link> </tutorials> - <methods> - </methods> <members> <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> Offset of the generated Quad. Useful for particles. @@ -20,6 +18,4 @@ Size on the X and Y axes. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 720188f67e..7858ac732b 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -135,6 +135,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Quaternion" /> <description> </description> @@ -189,6 +194,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Quaternion" /> <description> </description> diff --git a/doc/classes/RDAttachmentFormat.xml b/doc/classes/RDAttachmentFormat.xml index b73377bf77..0dea57b4ce 100644 --- a/doc/classes/RDAttachmentFormat.xml +++ b/doc/classes/RDAttachmentFormat.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="36"> </member> @@ -16,6 +14,4 @@ <member name="usage_flags" type="int" setter="set_usage_flags" getter="get_usage_flags" default="0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDFramebufferPass.xml b/doc/classes/RDFramebufferPass.xml index c26c41f93f..4469a5d447 100644 --- a/doc/classes/RDFramebufferPass.xml +++ b/doc/classes/RDFramebufferPass.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="color_attachments" type="PackedInt32Array" setter="set_color_attachments" getter="get_color_attachments" default="PackedInt32Array()"> Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip. diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml index b672a053c7..6c740fb672 100644 --- a/doc/classes/RDPipelineColorBlendState.xml +++ b/doc/classes/RDPipelineColorBlendState.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="attachments" type="RDPipelineColorBlendStateAttachment[]" setter="set_attachments" getter="get_attachments" default="[]"> </member> @@ -18,6 +16,4 @@ <member name="logic_op" type="int" setter="set_logic_op" getter="get_logic_op" enum="RenderingDevice.LogicOperation" default="0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml index 30430d6670..c81da31367 100644 --- a/doc/classes/RDPipelineColorBlendStateAttachment.xml +++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml @@ -37,6 +37,4 @@ <member name="write_r" type="bool" setter="set_write_r" getter="get_write_r" default="true"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDPipelineDepthStencilState.xml b/doc/classes/RDPipelineDepthStencilState.xml index 76e0506bca..678b576dea 100644 --- a/doc/classes/RDPipelineDepthStencilState.xml +++ b/doc/classes/RDPipelineDepthStencilState.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="back_op_compare" type="int" setter="set_back_op_compare" getter="get_back_op_compare" enum="RenderingDevice.CompareOperator" default="7"> </member> @@ -52,6 +50,4 @@ <member name="front_op_write_mask" type="int" setter="set_front_op_write_mask" getter="get_front_op_write_mask" default="0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml index b4345f1f8b..fc9b617956 100644 --- a/doc/classes/RDPipelineMultisampleState.xml +++ b/doc/classes/RDPipelineMultisampleState.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="enable_alpha_to_coverage" type="bool" setter="set_enable_alpha_to_coverage" getter="get_enable_alpha_to_coverage" default="false"> </member> @@ -22,6 +20,4 @@ <member name="sample_masks" type="int[]" setter="set_sample_masks" getter="get_sample_masks" default="[]"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml index 3f8c50cf42..54a6923f87 100644 --- a/doc/classes/RDPipelineRasterizationState.xml +++ b/doc/classes/RDPipelineRasterizationState.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="RenderingDevice.PolygonCullMode" default="0"> </member> @@ -32,6 +30,4 @@ <member name="wireframe" type="bool" setter="set_wireframe" getter="get_wireframe" default="false"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDPipelineSpecializationConstant.xml b/doc/classes/RDPipelineSpecializationConstant.xml index 4d9481b846..301a860f26 100644 --- a/doc/classes/RDPipelineSpecializationConstant.xml +++ b/doc/classes/RDPipelineSpecializationConstant.xml @@ -6,14 +6,10 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant_id" type="int" setter="set_constant_id" getter="get_constant_id" default="0"> </member> <member name="value" type="Variant" setter="set_value" getter="get_value"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDSamplerState.xml b/doc/classes/RDSamplerState.xml index 9a9d55948c..259bf159a3 100644 --- a/doc/classes/RDSamplerState.xml +++ b/doc/classes/RDSamplerState.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="anisotropy_max" type="float" setter="set_anisotropy_max" getter="get_anisotropy_max" default="1.0"> </member> @@ -40,6 +38,4 @@ <member name="use_anisotropy" type="bool" setter="set_use_anisotropy" getter="get_use_anisotropy" default="false"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml index 22fcf9867c..c46ab55b57 100644 --- a/doc/classes/RDShaderFile.xml +++ b/doc/classes/RDShaderFile.xml @@ -30,6 +30,4 @@ <member name="base_error" type="String" setter="set_base_error" getter="get_base_error" default=""""> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDShaderSPIRV.xml b/doc/classes/RDShaderSPIRV.xml index 20de8230aa..434b09b188 100644 --- a/doc/classes/RDShaderSPIRV.xml +++ b/doc/classes/RDShaderSPIRV.xml @@ -56,6 +56,4 @@ <member name="compile_error_vertex" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default=""""> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml index 2d37ce37f2..4788bca7f4 100644 --- a/doc/classes/RDShaderSource.xml +++ b/doc/classes/RDShaderSource.xml @@ -35,6 +35,4 @@ <member name="source_vertex" type="String" setter="set_stage_source" getter="get_stage_source" default=""""> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml index 2588dcfc40..e4a6df199f 100644 --- a/doc/classes/RDTextureFormat.xml +++ b/doc/classes/RDTextureFormat.xml @@ -40,6 +40,4 @@ <member name="width" type="int" setter="set_width" getter="get_width" default="1"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDTextureView.xml b/doc/classes/RDTextureView.xml index db140ae775..441d1f4079 100644 --- a/doc/classes/RDTextureView.xml +++ b/doc/classes/RDTextureView.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="format_override" type="int" setter="set_format_override" getter="get_format_override" enum="RenderingDevice.DataFormat" default="226"> </member> @@ -20,6 +18,4 @@ <member name="swizzle_r" type="int" setter="set_swizzle_r" getter="get_swizzle_r" enum="RenderingDevice.TextureSwizzle" default="3"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml index 93adecc7de..4de90aa3dc 100644 --- a/doc/classes/RDUniform.xml +++ b/doc/classes/RDUniform.xml @@ -30,6 +30,4 @@ <member name="uniform_type" type="int" setter="set_uniform_type" getter="get_uniform_type" enum="RenderingDevice.UniformType" default="3"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml index 3499918cc8..17a55260c7 100644 --- a/doc/classes/RDVertexAttribute.xml +++ b/doc/classes/RDVertexAttribute.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="226"> </member> @@ -20,6 +18,4 @@ <member name="stride" type="int" setter="set_stride" getter="get_stride" default="0"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index ddd30dbc82..b4ba74f7e5 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -30,6 +30,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="RID" /> <description> </description> @@ -48,6 +53,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="RID" /> <description> </description> @@ -65,6 +75,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index 2cf3cbb83d..c011755df1 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -4,7 +4,7 @@ A class for generating pseudo-random numbers. </brief_description> <description> - RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses [url=http://www.pcg-random.org/]PCG32[/url]. + RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses [url=https://www.pcg-random.org/]PCG32[/url]. [b]Note:[/b] The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. To generate a random float number (within a given range) based on a time-dependant seed: [codeblock] @@ -86,6 +86,4 @@ [b]Note:[/b] Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use [member seed] instead. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 30b915b437..2926f93c8a 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -68,6 +68,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index 1d32db8078..ce5d48cfa4 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -122,6 +122,4 @@ The ray's destination point, relative to the RayCast's [code]position[/code]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 8628ab7dac..c7253e81c4 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -131,6 +131,4 @@ The ray's destination point, relative to the RayCast's [code]position[/code]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index e6c8ff86b6..e585224818 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -78,6 +78,12 @@ Returns the area of the [Rect2]. </description> </method> + <method name="get_center" qualifiers="const"> + <return type="Vector2" /> + <description> + Returns the center of the [Rect2], which is equal to [member position] + ([member size] / 2). + </description> + </method> <method name="grow" qualifiers="const"> <return type="Rect2" /> <argument index="0" name="amount" type="float" /> @@ -149,6 +155,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Rect2" /> <description> </description> @@ -161,6 +172,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Rect2" /> <description> </description> @@ -178,6 +194,4 @@ If the size is negative, you can use [method abs] to fix it. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index a75c31a007..2f6f4de66d 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -76,6 +76,13 @@ Returns the area of the [Rect2i]. </description> </method> + <method name="get_center" qualifiers="const"> + <return type="Vector2i" /> + <description> + Returns the center of the [Rect2i], which is equal to [member position] + ([member size] / 2). + If [member size] is an odd number, the returned center value will be rounded towards [member position]. + </description> + </method> <method name="grow" qualifiers="const"> <return type="Rect2i" /> <argument index="0" name="amount" type="int" /> @@ -139,12 +146,22 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Rect2i" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Rect2i" /> <description> </description> @@ -162,6 +179,4 @@ If the size is negative, you can use [method abs] to fix it. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml index f2795ae4a1..add8da181a 100644 --- a/doc/classes/RectangleShape2D.xml +++ b/doc/classes/RectangleShape2D.xml @@ -10,13 +10,9 @@ <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link> <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> - <methods> - </methods> <members> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(20, 20)"> The rectangle's width and height. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml index bf52c34777..5f18ccc14d 100644 --- a/doc/classes/RefCounted.xml +++ b/doc/classes/RefCounted.xml @@ -35,6 +35,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml index df9a6f0a46..1db6879b45 100644 --- a/doc/classes/ReferenceRect.xml +++ b/doc/classes/ReferenceRect.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color(1, 0, 0, 1)"> Sets the border [Color] of the [ReferenceRect]. @@ -21,6 +19,4 @@ If set to [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index db01faced8..7f2bd118d6 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -10,8 +10,6 @@ <tutorials> <link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link> </tutorials> - <methods> - </methods> <members> <member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color(0, 0, 0, 1)"> </member> diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml index 613726b555..c9be26a985 100644 --- a/doc/classes/RemoteTransform2D.xml +++ b/doc/classes/RemoteTransform2D.xml @@ -34,6 +34,4 @@ If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml index cc19d5c25d..de727e719d 100644 --- a/doc/classes/RemoteTransform3D.xml +++ b/doc/classes/RemoteTransform3D.xml @@ -34,6 +34,4 @@ If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 24f7f4274e..428fa2575c 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -359,6 +359,14 @@ <description> </description> </method> + <method name="get_driver_resource"> + <return type="int" /> + <argument index="0" name="resource" type="int" enum="RenderingDevice.DriverResource" /> + <argument index="1" name="rid" type="RID" /> + <argument index="2" name="index" type="int" /> + <description> + </description> + </method> <method name="get_frame_delay" qualifiers="const"> <return type="int" /> <description> @@ -646,6 +654,32 @@ </constant> <constant name="BARRIER_MASK_NO_BARRIER" value="8"> </constant> + <constant name="DRIVER_RESOURCE_VULKAN_DEVICE" value="0" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE" value="1" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_INSTANCE" value="2" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_QUEUE" value="3" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX" value="4" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_IMAGE" value="5" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_IMAGE_VIEW" value="6" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT" value="7" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_SAMPLER" value="8" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET" value="9" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_BUFFER" value="10" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE" value="11" enum="DriverResource"> + </constant> + <constant name="DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE" value="12" enum="DriverResource"> + </constant> <constant name="DATA_FORMAT_R4G4_UNORM_PACK8" value="0" enum="DataFormat"> </constant> <constant name="DATA_FORMAT_R4G4B4A4_UNORM_PACK16" value="1" enum="DataFormat"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index df8bfb7e34..b5be04fb01 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1156,6 +1156,11 @@ <description> </description> </method> + <method name="get_rendering_device" qualifiers="const"> + <return type="RenderingDevice" /> + <description> + </description> + </method> <method name="get_rendering_info"> <return type="int" /> <argument index="0" name="info" type="int" enum="RenderingServer.RenderingInfo" /> @@ -3082,6 +3087,14 @@ If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. </description> </method> + <method name="viewport_set_scale_3d"> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="scale" type="int" enum="RenderingServer.ViewportScale3D" /> + <description> + Sets the scale at which we render 3D contents. + </description> + </method> <method name="viewport_set_scenario"> <return type="void" /> <argument index="0" name="viewport" type="RID" /> @@ -3788,21 +3801,18 @@ <constant name="VIEWPORT_SDF_SCALE_MAX" value="3" enum="ViewportSDFScale"> </constant> <constant name="VIEWPORT_MSAA_DISABLED" value="0" enum="ViewportMSAA"> - Multisample antialiasing is disabled. + Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting. </constant> <constant name="VIEWPORT_MSAA_2X" value="1" enum="ViewportMSAA"> - Multisample antialiasing uses 2 samples per pixel. + Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance. </constant> <constant name="VIEWPORT_MSAA_4X" value="2" enum="ViewportMSAA"> - Multisample antialiasing uses 4 samples per pixel. + Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance. </constant> <constant name="VIEWPORT_MSAA_8X" value="3" enum="ViewportMSAA"> - Multisample antialiasing uses 8 samples per pixel. - </constant> - <constant name="VIEWPORT_MSAA_16X" value="4" enum="ViewportMSAA"> - Multisample antialiasing uses 16 samples per pixel. + Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware. </constant> - <constant name="VIEWPORT_MSAA_MAX" value="5" enum="ViewportMSAA"> + <constant name="VIEWPORT_MSAA_MAX" value="4" enum="ViewportMSAA"> </constant> <constant name="VIEWPORT_SCREEN_SPACE_AA_DISABLED" value="0" enum="ViewportScreenSpaceAA"> </constant> @@ -3896,6 +3906,16 @@ </constant> <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw"> </constant> + <constant name="VIEWPORT_SCALE_3D_DISABLED" value="0" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_75_PERCENT" value="1" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_50_PERCENT" value="2" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_33_PERCENT" value="3" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_25_PERCENT" value="4" enum="ViewportScale3D"> + </constant> <constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode"> </constant> <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 701ecf815c..45b68f342c 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -12,17 +12,12 @@ <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link> </tutorials> <methods> - <method name="_setup_local_to_scene" qualifiers="virtual"> - <return type="void" /> - <description> - Virtual function which can be overridden to customize the behavior value of [method setup_local_to_scene]. - </description> - </method> <method name="duplicate" qualifiers="const"> <return type="Resource" /> <argument index="0" name="subresources" type="bool" default="false" /> <description> - Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. + Duplicates the resource, returning a new resource with the exported members copied. [b]Note:[/b] To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values. + By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. [b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource. </description> @@ -54,7 +49,7 @@ <method name="setup_local_to_scene"> <return type="void" /> <description> - This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script. + This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by connecting [signal setup_local_to_scene_requested] from script. For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport. </description> </method> @@ -84,7 +79,9 @@ [b]Note:[/b] This signal is not emitted automatically for custom resources, which means that you need to create a setter and emit the signal yourself. </description> </signal> + <signal name="setup_local_to_scene_requested"> + <description> + </description> + </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index bce5785cc1..0c2bb26c02 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -11,22 +11,28 @@ <tutorials> </tutorials> <methods> - <method name="_get_dependencies" qualifiers="virtual"> - <return type="void" /> + <method name="_exists" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> + <method name="_get_dependencies" qualifiers="virtual const"> + <return type="PackedStringArray" /> <argument index="0" name="path" type="String" /> - <argument index="1" name="add_types" type="String" /> + <argument index="1" name="add_types" type="bool" /> <description> If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> - <method name="_get_recognized_extensions" qualifiers="virtual"> + <method name="_get_recognized_extensions" qualifiers="virtual const"> <return type="PackedStringArray" /> <description> Gets the list of extensions for files this loader is able to read. </description> </method> - <method name="_get_resource_type" qualifiers="virtual"> + <method name="_get_resource_type" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="path" type="String" /> <description> @@ -34,15 +40,21 @@ [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> - <method name="_handles_type" qualifiers="virtual"> + <method name="_get_resource_uid" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> + <method name="_handles_type" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="typename" type="StringName" /> + <argument index="0" name="type" type="StringName" /> <description> Tells which resource class this loader can load. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them. </description> </method> - <method name="_load" qualifiers="virtual"> + <method name="_load" qualifiers="virtual const"> <return type="Variant" /> <argument index="0" name="path" type="String" /> <argument index="1" name="original_path" type="String" /> @@ -53,10 +65,10 @@ The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. </description> </method> - <method name="_rename_dependencies" qualifiers="virtual"> + <method name="_rename_dependencies" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="path" type="String" /> - <argument index="1" name="renames" type="String" /> + <argument index="1" name="renames" type="Dictionary" /> <description> If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. Returns [constant OK] on success, or an [enum Error] constant in case of failure. diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index ef9eebc953..8d48de9378 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -10,14 +10,14 @@ <tutorials> </tutorials> <methods> - <method name="_get_recognized_extensions" qualifiers="virtual"> + <method name="_get_recognized_extensions" qualifiers="virtual const"> <return type="PackedStringArray" /> <argument index="0" name="resource" type="Resource" /> <description> Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]). </description> </method> - <method name="_recognize" qualifiers="virtual"> + <method name="_recognize" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="resource" type="Resource" /> <description> @@ -35,6 +35,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml index 03d47ee518..9f551ad1d2 100644 --- a/doc/classes/ResourceImporter.xml +++ b/doc/classes/ResourceImporter.xml @@ -9,8 +9,6 @@ <tutorials> <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link> </tutorials> - <methods> - </methods> <constants> <constant name="IMPORT_ORDER_DEFAULT" value="0" enum="ImportOrder"> The default import order. diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 8ac8717581..565578cb22 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -54,6 +54,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/RibbonTrailMesh.xml b/doc/classes/RibbonTrailMesh.xml index 771f2e444b..c2e9c14bab 100644 --- a/doc/classes/RibbonTrailMesh.xml +++ b/doc/classes/RibbonTrailMesh.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> </member> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index 142afbb860..cf4b4f4a48 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -23,7 +23,7 @@ <link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> - <method name="_process_custom_fx" qualifiers="virtual"> + <method name="_process_custom_fx" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="char_fx" type="CharFXTransform" /> <description> @@ -31,6 +31,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 7bbcc5e0b5..50db1dc122 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -5,8 +5,9 @@ </brief_description> <description> Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. - [b]Note:[/b] Assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods. + [b]Note:[/b] Assignments to [member text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member text] will erase previous edits made from other manual sources such as [method append_text] and the [code]push_*[/code] / [method pop] methods. [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code][b]bold[i]bold italic[/b]italic[/i][/code], use [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code]. + [b]Note:[/b] [code]push_*/pop[/code] functions won't affect BBCode. [b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property. </description> <tutorials> @@ -34,18 +35,18 @@ Adds raw non-BBCode-parsed text to the tag stack. </description> </method> - <method name="append_bbcode"> + <method name="append_text"> <return type="int" enum="Error" /> <argument index="0" name="bbcode" type="String" /> <description> Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful. - [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_bbcode] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member bbcode_text] instead of using [method append_bbcode]. + [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text]. </description> </method> <method name="clear"> <return type="void" /> <description> - Clears the tag stack and sets [member bbcode_text] to an empty string. + Clears the tag stack and sets [member text] to an empty string. </description> </method> <method name="get_content_height" qualifiers="const"> @@ -66,6 +67,12 @@ Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph. </description> </method> + <method name="get_parsed_text" qualifiers="const"> + <return type="String" /> + <description> + Returns the text without BBCode mark-up. + </description> + </method> <method name="get_selected_text" qualifiers="const"> <return type="String" /> <description> @@ -125,7 +132,7 @@ <return type="int" enum="Error" /> <argument index="0" name="bbcode" type="String" /> <description> - The assignment version of [method append_bbcode]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] successfully. + The assignment version of [method append_text]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] successfully. </description> </method> <method name="parse_expressions_for_values"> @@ -367,10 +374,6 @@ <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false"> If [code]true[/code], the label uses BBCode formatting. </member> - <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default=""""> - The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. - [b]Note:[/b] It is unadvised to use the [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. - </member> <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[]"> The currently installed custom effects. This is an array of [RichTextEffect]s. To add a custom effect, it's more convenient to use [method install_effect]. @@ -412,8 +415,8 @@ The number of spaces associated with a single tab length. Does not affect [code]\t[/code] in text tags, only indent tags. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> - The raw text of the label. - When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]. + The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. + [b]Note:[/b] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [code]text[/code] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. </member> <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> Base text writing direction. @@ -555,7 +558,7 @@ <theme_item name="italics_font_size" data_type="font_size" type="int"> The font size used for italics text. </theme_item> - <theme_item name="line_separation" data_type="constant" type="int" default="1"> + <theme_item name="line_separation" data_type="constant" type="int" default="0"> The vertical space between lines. </theme_item> <theme_item name="mono_font" data_type="font" type="Font"> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidDynamicBody2D.xml index db16552db3..059379242b 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidDynamicBody2D.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RigidBody2D" inherits="PhysicsBody2D" version="4.0"> +<class name="RigidDynamicBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> - A body that is controlled by the 2D physics engine. + Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects. </brief_description> <description> - This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. - A RigidBody2D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic. - [b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. + This node implements simulated 2D physics. You do not control a RigidDynamicBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. + A RigidDynamicBody2D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic. + [b]Note:[/b] You should not change a RigidDynamicBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime. If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See [member custom_integrator]. The center of mass is always located at the node's origin without taking into account the [CollisionShape2D] centroid offsets. @@ -99,14 +99,21 @@ <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. </member> + <member name="center_of_mass" type="Vector2" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector2(0, 0)"> + The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. + </member> + <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody2D.CenterOfMassMode" default="0"> + Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. + </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> - If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. + If [code]true[/code], the body will emit signals when it collides with another RigidDynamicBody2D. See also [member contacts_reported]. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end). </member> - <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0"> + <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidDynamicBody2D.CCDMode" default="0"> Continuous collision detection mode. Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [enum CCDMode] for details. </member> @@ -116,8 +123,9 @@ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project > Project Settings > Physics > 2d[/b] and/or any additional gravity vector applied by [Area2D]s. </member> - <member name="inertia" type="float" setter="set_inertia" getter="get_inertia"> - The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it. + <member name="inertia" type="float" setter="set_inertia" getter="get_inertia" default="0.0"> + The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + If set to [code]0[/code], inertia is automatically computed (default value). </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project > Project Settings > Physics > 2d[/b]. @@ -129,8 +137,9 @@ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> The body's mass. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode" default="0"> + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidDynamicBody2D.Mode" default="0"> The body's mode. See [enum Mode] for possible values. + For a body that uses only Static or Kinematic mode, use [StaticBody2D] or [AnimatableBody2D] instead. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. @@ -161,11 +170,11 @@ <argument index="2" name="body_shape" type="int" /> <argument index="3" name="local_shape" type="int" /> <description> - Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. - [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. </description> </signal> <signal name="body_shape_exited"> @@ -174,11 +183,11 @@ <argument index="2" name="body_shape" type="int" /> <argument index="3" name="local_shape" type="int" /> <description> - Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. - [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. </description> </signal> <signal name="sleeping_state_changed"> @@ -199,7 +208,13 @@ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate. </constant> <constant name="MODE_KINEMATIC" value="3" enum="Mode"> - Kinematic body mode. The body behaves like a [StaticBody2D] with [member StaticBody2D.kinematic_motion] enabled, and must be moved by user code. + Kinematic body mode. The body behaves like a [AnimatableBody2D], and must be moved by code. + </constant> + <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode"> + In this mode, the body's center of mass is calculated automatically based on its shapes. + </constant> + <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode"> + In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. </constant> <constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode"> Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidDynamicBody3D.xml index f4299335bf..9b6bcd840b 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidDynamicBody3D.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RigidBody3D" inherits="PhysicsBody3D" version="4.0"> +<class name="RigidDynamicBody3D" inherits="PhysicsBody3D" version="4.0"> <brief_description> - Physics Body whose position is determined through physics simulation in 3D space. + Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects. </brief_description> <description> - This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. - A RigidBody3D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic. - [b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. + This is the node that implements full 3D physics. This means that you do not control a RigidDynamicBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. + A RigidDynamicBody3D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic. + [b]Note:[/b] Don't change a RigidDynamicBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator]. - With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape3D] centers. + With Bullet physics (the default), the center of mass is the RigidDynamicBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape3D] centers. </description> <tutorials> <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> @@ -80,7 +80,7 @@ <method name="get_inverse_inertia_tensor" qualifiers="const"> <return type="Basis" /> <description> - Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D]. + Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidDynamicBody3D]. </description> </method> <method name="set_axis_velocity"> @@ -93,17 +93,24 @@ </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> - Damps RigidBody3D's rotational forces. + Damps RigidDynamicBody3D's rotational forces. See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping. </member> <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)"> - RigidBody3D's rotational velocity. + RigidDynamicBody3D's rotational velocity. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. </member> + <member name="center_of_mass" type="Vector3" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector3(0, 0, 0)"> + The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. + </member> + <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody3D.CenterOfMassMode" default="0"> + Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. + </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> - If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported]. + If [code]true[/code], the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. See also [member contacts_reported]. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. @@ -117,7 +124,11 @@ If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. </member> <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> - This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce RigidDynamicBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + </member> + <member name="inertia" type="Vector3" setter="set_inertia" getter="get_inertia" default="Vector3(0, 0, 0)"> + The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + If set to [code]Vector3.ZERO[/code], inertia is automatically computed (default value). </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden. @@ -129,8 +140,9 @@ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> The body's mass. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody3D.Mode" default="0"> - The body mode. See [enum Mode] for possible values. + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidDynamicBody3D.Mode" default="0"> + The body's mode. See [enum Mode] for possible values. + For a body that uses only Static or Kinematic mode, use [StaticBody3D] or [AnimatableBody3D] instead. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. @@ -161,11 +173,11 @@ <argument index="2" name="body_shape" type="int" /> <argument index="3" name="local_shape" type="int" /> <description> - Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. - [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices. </description> </signal> @@ -175,11 +187,11 @@ <argument index="2" name="body_shape" type="int" /> <argument index="3" name="local_shape" type="int" /> <description> - Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. - [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices. </description> </signal> @@ -201,7 +213,13 @@ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate. </constant> <constant name="MODE_KINEMATIC" value="3" enum="Mode"> - Kinematic body mode. The body behaves like a [StaticBody3D] with [member StaticBody3D.kinematic_motion] enabled, and can only move by user code. + Kinematic body mode. The body behaves like a [AnimatableBody3D], and can only move by user code. + </constant> + <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode"> + In this mode, the body's center of mass is calculated automatically based on its shapes. + </constant> + <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode"> + In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. </constant> </constants> </class> diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml index e31ea9265e..5db13de44f 100644 --- a/doc/classes/RootMotionView.xml +++ b/doc/classes/RootMotionView.xml @@ -10,8 +10,6 @@ <tutorials> <link title="Using AnimationTree - Root motion">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#root-motion</link> </tutorials> - <methods> - </methods> <members> <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path"> Path to an [AnimationTree] node to use as a basis for root motion. @@ -29,6 +27,4 @@ If [code]true[/code], the grid's points will all be on the same Y coordinate ([i]local[/i] Y = 0). If [code]false[/code], the points' original Y coordinate is preserved. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 59e3190213..8d7427611a 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -18,7 +18,7 @@ <argument index="0" name="group" type="StringName" /> <argument index="1" name="method" type="StringName" /> <description> - Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. + Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. This method is equivalent of calling [method call_group_flags] with [constant GROUP_CALL_DEFAULT] flag. [b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag. </description> </method> @@ -29,7 +29,9 @@ <argument index="2" name="method" type="StringName" /> <description> Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. - [b]Note:[/b] Group call flags are used to control the method calling behavior. If the [constant GROUP_CALL_REALTIME] flag is present in the [code]flags[/code] argument, methods will be called immediately. If this flag isn't present in [code]flags[/code], methods will be called with a one-frame delay in a way similar to [method call_group]. + [codeblock] + get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy") # Call the method immediately and in reverse order. + [/codeblock] </description> </method> <method name="change_scene"> @@ -215,11 +217,11 @@ </member> <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled" default="true"> If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame]. - If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. + If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false"> If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior: - - 2D and 3D physics will be stopped. + - 2D and 3D physics will be stopped. This includes signals and collision detection. - [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes. </member> <member name="root" type="Window" setter="" getter="get_root"> diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml index 4eef754345..f97c5e42b5 100644 --- a/doc/classes/SceneTreeTimer.xml +++ b/doc/classes/SceneTreeTimer.xml @@ -25,8 +25,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="time_left" type="float" setter="set_time_left" getter="get_time_left"> The time remaining. @@ -39,6 +37,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 843d8ef9cb..b7a4f448b0 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -99,6 +99,4 @@ The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index 189bfdc3b8..349adb9111 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -50,6 +50,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 628be54e1d..faad8f8cae 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -79,6 +79,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml index 0efcde5638..1e72fe9090 100644 --- a/doc/classes/ScriptEditorBase.xml +++ b/doc/classes/ScriptEditorBase.xml @@ -9,13 +9,6 @@ <tutorials> </tutorials> <methods> - <method name="_add_syntax_highlighter" qualifiers="virtual"> - <return type="void" /> - <argument index="0" name="highlighter" type="Object" /> - <description> - Adds a [EditorSyntaxHighlighter] to the open script. - </description> - </method> <method name="get_base_editor" qualifiers="const"> <return type="Control" /> <description> @@ -71,6 +64,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml index b1eb9c012b..1f1415bebe 100644 --- a/doc/classes/ScrollBar.xml +++ b/doc/classes/ScrollBar.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0"> Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused. @@ -24,6 +22,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 953ab24748..1cf8c6cb54 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -69,8 +69,6 @@ </description> </signal> </signals> - <constants> - </constants> <theme_items> <theme_item name="bg" data_type="style" type="StyleBox"> The background [StyleBox] of the [ScrollContainer]. diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml index 341c5e9d20..799884257f 100644 --- a/doc/classes/SegmentShape2D.xml +++ b/doc/classes/SegmentShape2D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="a" type="Vector2" setter="set_a" getter="get_a" default="Vector2(0, 0)"> The segment's first point position. @@ -18,6 +16,4 @@ The segment's second point position. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index 7794161ac4..2f3fa021d4 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -29,6 +29,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/SeparationRayShape2D.xml b/doc/classes/SeparationRayShape2D.xml new file mode 100644 index 0000000000..ccb7a12882 --- /dev/null +++ b/doc/classes/SeparationRayShape2D.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SeparationRayShape2D" inherits="Shape2D" version="4.0"> + <brief_description> + Separation ray shape for 2D collisions. + </brief_description> + <description> + Separation ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + </description> + <tutorials> + </tutorials> + <members> + <member name="length" type="float" setter="set_length" getter="get_length" default="20.0"> + The ray's length. + </member> + <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false"> + If [code]false[/code] (default), the shape always separates and returns a normal along its own direction. + If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes. + </member> + </members> +</class> diff --git a/doc/classes/SeparationRayShape3D.xml b/doc/classes/SeparationRayShape3D.xml new file mode 100644 index 0000000000..877e8545eb --- /dev/null +++ b/doc/classes/SeparationRayShape3D.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SeparationRayShape3D" inherits="Shape3D" version="4.0"> + <brief_description> + Separation ray shape for 3D collisions. + </brief_description> + <description> + Separation ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + </description> + <tutorials> + </tutorials> + <members> + <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> + The ray's length. + </member> + <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false"> + If [code]false[/code] (default), the shape always separates and returns a normal along its own direction. + If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes. + </member> + </members> +</class> diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml index ef79851aab..80310e912f 100644 --- a/doc/classes/Separator.xml +++ b/doc/classes/Separator.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ShaderGlobalsOverride.xml b/doc/classes/ShaderGlobalsOverride.xml index 2aa00aa5a9..babda1707e 100644 --- a/doc/classes/ShaderGlobalsOverride.xml +++ b/doc/classes/ShaderGlobalsOverride.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index fe3ddc1b60..13f2e2fe5f 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -45,6 +45,4 @@ The [Shader] program used to render this material. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index c1191aa9de..04f91d19da 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -68,6 +68,4 @@ The shape's custom solver bias. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml index 5fd16d8d36..96f8833486 100644 --- a/doc/classes/Shape3D.xml +++ b/doc/classes/Shape3D.xml @@ -23,6 +23,4 @@ Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml index d9f7f98888..9fbe91f38b 100644 --- a/doc/classes/Shortcut.xml +++ b/doc/classes/Shortcut.xml @@ -36,6 +36,4 @@ Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent], including an [InputEventAction]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index 0e44abef42..b70725123b 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -89,17 +89,25 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Signal" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Signal" /> <description> </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index 828d24338b..7aa06985bf 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -5,6 +5,7 @@ </brief_description> <description> Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones. + To setup different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. They can be applied by creating the desired number of modifications, which can be done by increasing [member SkeletonModificationStack2D.modification_count]. </description> <tutorials> <link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link> @@ -77,6 +78,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 2f340adb9f..c2b514f232 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -216,7 +216,7 @@ <argument index="0" name="exception" type="RID" /> <description> Adds a collision exception to the physical bone. - Works just like the [RigidBody3D] node. + Works just like the [RigidDynamicBody3D] node. </description> </method> <method name="physical_bones_remove_collision_exception"> @@ -224,7 +224,7 @@ <argument index="0" name="exception" type="RID" /> <description> Removes a collision exception to the physical bone. - Works just like the [RigidBody3D] node. + Works just like the [RigidDynamicBody3D] node. </description> </method> <method name="physical_bones_start_simulation"> diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml index 93cdd770cc..6673e0657c 100644 --- a/doc/classes/SkeletonIK3D.xml +++ b/doc/classes/SkeletonIK3D.xml @@ -52,6 +52,4 @@ <member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml index cff55b6a17..815b97a271 100644 --- a/doc/classes/SkeletonModification2D.xml +++ b/doc/classes/SkeletonModification2D.xml @@ -82,6 +82,4 @@ 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> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml index f876615de7..ab9a482609 100644 --- a/doc/classes/SkeletonModification2DCCDIK.xml +++ b/doc/classes/SkeletonModification2DCCDIK.xml @@ -130,6 +130,4 @@ The end position of the CCDIK chain. Typically, this should be a child of a [Bone2D] node attached to the final [Bone2D] in the CCDIK chain. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml index 314405498a..16c22a45d3 100644 --- a/doc/classes/SkeletonModification2DFABRIK.xml +++ b/doc/classes/SkeletonModification2DFABRIK.xml @@ -83,6 +83,4 @@ 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> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml index 8d3732e225..13dfbc0633 100644 --- a/doc/classes/SkeletonModification2DJiggle.xml +++ b/doc/classes/SkeletonModification2DJiggle.xml @@ -181,6 +181,4 @@ Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml index 998a897d20..90b727e194 100644 --- a/doc/classes/SkeletonModification2DLookAt.xml +++ b/doc/classes/SkeletonModification2DLookAt.xml @@ -87,6 +87,4 @@ The NodePath to the node that is the target for the LookAt modification. This node is what the modification will rotate the [Bone2D] to. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml index e6bcb3c9d7..44572f2c67 100644 --- a/doc/classes/SkeletonModification2DPhysicalBones.xml +++ b/doc/classes/SkeletonModification2DPhysicalBones.xml @@ -53,6 +53,4 @@ The amount of [PhysicalBone2D] nodes linked in this modification. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml index e5d9f2194a..35ab52ea99 100644 --- a/doc/classes/SkeletonModification2DStackHolder.xml +++ b/doc/classes/SkeletonModification2DStackHolder.xml @@ -24,6 +24,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml index 25ee981d5d..b7a2faedbb 100644 --- a/doc/classes/SkeletonModification2DTwoBoneIK.xml +++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml @@ -77,6 +77,4 @@ The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will use when bending the [Bone2D] nodes. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml index 48b8a905b9..c544473163 100644 --- a/doc/classes/SkeletonModification3D.xml +++ b/doc/classes/SkeletonModification3D.xml @@ -63,6 +63,4 @@ The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml index aa7ddad56e..ef3200a07a 100644 --- a/doc/classes/SkeletonModification3DCCDIK.xml +++ b/doc/classes/SkeletonModification3DCCDIK.xml @@ -133,6 +133,4 @@ 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> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml index 7058e37e94..4c4e01e9d1 100644 --- a/doc/classes/SkeletonModification3DFABRIK.xml +++ b/doc/classes/SkeletonModification3DFABRIK.xml @@ -158,6 +158,4 @@ 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> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml index e48e382cd4..3c724229bd 100644 --- a/doc/classes/SkeletonModification3DJiggle.xml +++ b/doc/classes/SkeletonModification3DJiggle.xml @@ -175,19 +175,19 @@ </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 overriden. Higher values lead to more of the calculated velocity being applied. + 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 overriden. + 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 overriden. Higher values lead to faster movements and more overshooting. + 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 overriden. Higher values act more like springs, quickly moving into the correct position. + 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. @@ -196,6 +196,4 @@ Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml index c01d764cff..9b34644757 100644 --- a/doc/classes/SkeletonModification3DLookAt.xml +++ b/doc/classes/SkeletonModification3DLookAt.xml @@ -61,6 +61,4 @@ The NodePath to the node that is the target for the modification. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml index bb923b680d..138f9818ab 100644 --- a/doc/classes/SkeletonModification3DStackHolder.xml +++ b/doc/classes/SkeletonModification3DStackHolder.xml @@ -24,6 +24,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml index 5c863367df..80f8ba4e5b 100644 --- a/doc/classes/SkeletonModification3DTwoBoneIK.xml +++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml @@ -188,6 +188,4 @@ 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> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml index 97b8e3b945..9b96c9e6d5 100644 --- a/doc/classes/SkeletonModificationStack2D.xml +++ b/doc/classes/SkeletonModificationStack2D.xml @@ -86,6 +86,4 @@ 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 [Skeleton2D] [Bone2D] poses. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml index 4e5e9d72d8..4035e39410 100644 --- a/doc/classes/SkeletonModificationStack3D.xml +++ b/doc/classes/SkeletonModificationStack3D.xml @@ -85,6 +85,4 @@ 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> - <constants> - </constants> </class> diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml index 67ca36f4d6..d24963a887 100644 --- a/doc/classes/Skin.xml +++ b/doc/classes/Skin.xml @@ -70,6 +70,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml index d0634c543c..f8bbc27363 100644 --- a/doc/classes/SkinReference.xml +++ b/doc/classes/SkinReference.xml @@ -18,6 +18,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml index d9553a3be3..79a9bd4b31 100644 --- a/doc/classes/Sky.xml +++ b/doc/classes/Sky.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Sky.ProcessMode" default="0"> Sets the method for generating the radiance map from the sky. The radiance map is a cubemap with increasingly blurry versions of the sky corresponding to different levels of roughness. Radiance maps can be expensive to calculate. See [enum ProcessMode] for options. diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml index f18b2ce39f..21a45645b8 100644 --- a/doc/classes/Slider.xml +++ b/doc/classes/Slider.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code. @@ -27,6 +25,4 @@ If [code]true[/code], the slider will display ticks for minimum and maximum values. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftDynamicBody3D.xml index ddfc14ceac..f999f77e78 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftDynamicBody3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SoftBody3D" inherits="MeshInstance3D" version="4.0"> +<class name="SoftDynamicBody3D" inherits="MeshInstance3D" version="4.0"> <brief_description> A soft mesh physics body. </brief_description> @@ -42,6 +42,20 @@ <description> </description> </method> + <method name="get_point_transform"> + <return type="Vector3" /> + <argument index="0" name="point_index" type="int" /> + <description> + Returns local translation of a vertex in the surface array. + </description> + </method> + <method name="is_point_pinned" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="point_index" type="int" /> + <description> + Returns [code]true[/code] if vertex is set to pinned. + </description> + </method> <method name="remove_collision_exception_with"> <return type="void" /> <argument index="0" name="body" type="Node" /> @@ -65,19 +79,28 @@ Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> + <method name="set_point_pinned"> + <return type="void" /> + <argument index="0" name="point_index" type="int" /> + <argument index="1" name="pinned" type="bool" /> + <argument index="2" name="attachment_path" type="NodePath" default="NodePath("")" /> + <description> + Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to. + </description> + </method> </methods> <members> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The physics layers this SoftBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + The physics layers this SoftDynamicBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this SoftBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + The physics layers this SoftDynamicBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> </member> - <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftBody3D.DisableMode" default="0"> + <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftDynamicBody3D.DisableMode" default="0"> Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. </member> <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0"> @@ -85,23 +108,23 @@ <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5"> </member> <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath("")"> - [NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping. + [NodePath] to a [CollisionObject3D] this SoftDynamicBody3D should avoid clipping. </member> <member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0"> </member> <member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true"> - If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s. + If [code]true[/code], the [SoftDynamicBody3D] will respond to [RayCast3D]s. </member> <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5"> Increasing this value will improve the resulting simulation, but can affect performance. Use with care. </member> <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0"> - The SoftBody3D's mass. + The SoftDynamicBody3D's mass. </member> </members> <constants> <constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode"> - When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftBody3D]. + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftDynamicBody3D]. Automatically re-added to the physics simulation when the [Node] is processed again. </constant> <constant name="DISABLE_MODE_KEEP_ACTIVE" value="1" enum="DisableMode"> diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml index 439fe11861..674b583e3d 100644 --- a/doc/classes/SphereMesh.xml +++ b/doc/classes/SphereMesh.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> Full height of the sphere. @@ -28,6 +26,4 @@ Number of segments along the height of the sphere. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml index e90493fca2..5f0f5c1052 100644 --- a/doc/classes/SphereShape3D.xml +++ b/doc/classes/SphereShape3D.xml @@ -9,13 +9,9 @@ <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> - <methods> - </methods> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> The sphere's radius. The shape's diameter is double the radius. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 4303fa52f1..33d2b472b5 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -55,9 +55,10 @@ <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]. </member> + <member name="update_on_text_changed" type="bool" setter="set_update_on_text_changed" getter="get_update_on_text_changed" default="false"> + Sets the value of the [Range] for this [SpinBox] when the [LineEdit] text is [i]changed[/i] instead of [i]submitted[/i]. See [signal LineEdit.text_changed] and [signal LineEdit.text_submitted]. + </member> </members> - <constants> - </constants> <theme_items> <theme_item name="updown" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for up and down arrows of the [SpinBox]. diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml index fde40ba6de..8c10ec36a8 100644 --- a/doc/classes/SpotLight3D.xml +++ b/doc/classes/SpotLight3D.xml @@ -10,8 +10,6 @@ <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <methods> - </methods> <members> <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.03" /> <member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0"> @@ -27,6 +25,4 @@ The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the [member spot_attenuation] in use. No matter the [member spot_attenuation] in use, the light will never reach anything outside this range. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml index 50aa3d39b8..2cd8fa71cf 100644 --- a/doc/classes/SpringArm3D.xml +++ b/doc/classes/SpringArm3D.xml @@ -57,6 +57,4 @@ To know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState3D] documentation. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index 0b26fdc055..b9d13a1287 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -98,6 +98,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index ddb9d543e8..5a7fd537e0 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. @@ -39,6 +37,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 3bd40ff6f4..660afb5a89 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -135,6 +135,4 @@ Compatibility property, always equals to an empty array. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml index 4ed9146e0f..8a36a734f1 100644 --- a/doc/classes/StandardMaterial3D.xml +++ b/doc/classes/StandardMaterial3D.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 326bf58e22..0a90f430e6 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -1,38 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StaticBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> - Static body for 2D physics. + Physics body for 2D physics which is static or moves only by script. Useful for floor and walls. </brief_description> <description> - Static body for 2D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], they don't consume any CPU resources as long as they don't move. - They however have extra functionalities to move and affect other bodies: - [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path. - [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path. + Static body for 2D physics. + A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidDynamicBody2D], it doesn't consume any CPU resources as long as they don't move. + They have extra functionalities to move and affect other bodies: + [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. + [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0"> - The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. + The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2(0, 0)"> - The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. - </member> - <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> - If [code]true[/code], the body will act the same as a [RigidBody2D] in [constant RigidBody2D.MODE_KINEMATIC] mode. - When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> - <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> - If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide]. - </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml index 69c123002f..d1ef8cd321 100644 --- a/doc/classes/StaticBody3D.xml +++ b/doc/classes/StaticBody3D.xml @@ -1,41 +1,30 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StaticBody3D" inherits="PhysicsBody3D" version="4.0"> <brief_description> - Static body for 3D physics. + Physics body for 3D physics which is static or moves only by script. Useful for floor and walls. </brief_description> <description> - Static body for 3D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move. - They however have extra functionalities to move and affect other bodies: - [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path. - [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path. + Static body for 3D physics. + A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidDynamicBody3D], it doesn't consume any CPU resources as long as they don't move. + They have extra functionalities to move and affect other bodies: + [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. + [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. </description> <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> - <methods> - </methods> <members> <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3(0, 0, 0)"> - The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. + The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3(0, 0, 0)"> - The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. - </member> - <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> - If [code]true[/code], the body will act the same as a [RigidBody3D] in [constant RigidBody3D.MODE_KINEMATIC] mode. - When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> - <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> - If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide]. - </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StreamCubemap.xml b/doc/classes/StreamCubemap.xml index 16648266eb..2e7ee8e6db 100644 --- a/doc/classes/StreamCubemap.xml +++ b/doc/classes/StreamCubemap.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/StreamCubemapArray.xml b/doc/classes/StreamCubemapArray.xml index b84973fd14..326226b5ab 100644 --- a/doc/classes/StreamCubemapArray.xml +++ b/doc/classes/StreamCubemapArray.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index e3d77d22c5..316bd77a16 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -241,6 +241,4 @@ If [code]true[/code], this [StreamPeer] will using big-endian format for encoding and decoding. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 62476ca166..989864760f 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -44,6 +44,4 @@ <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray()"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StreamTexture2D.xml b/doc/classes/StreamTexture2D.xml index 7b6c594786..fb32f1e5d9 100644 --- a/doc/classes/StreamTexture2D.xml +++ b/doc/classes/StreamTexture2D.xml @@ -22,6 +22,4 @@ The StreamTexture's file path to a [code].stex[/code] file. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StreamTexture2DArray.xml b/doc/classes/StreamTexture2DArray.xml index ec545b24d0..7ecd3734f7 100644 --- a/doc/classes/StreamTexture2DArray.xml +++ b/doc/classes/StreamTexture2DArray.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/StreamTexture3D.xml b/doc/classes/StreamTexture3D.xml index 4b2eb16ba3..1892676935 100644 --- a/doc/classes/StreamTexture3D.xml +++ b/doc/classes/StreamTexture3D.xml @@ -18,6 +18,4 @@ <member name="load_path" type="String" setter="load" getter="get_load_path" default=""""> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StreamTextureLayered.xml b/doc/classes/StreamTextureLayered.xml index 888fb339db..7793bf8420 100644 --- a/doc/classes/StreamTextureLayered.xml +++ b/doc/classes/StreamTextureLayered.xml @@ -18,6 +18,4 @@ <member name="load_path" type="String" setter="load" getter="get_load_path" default=""""> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 97efc24bd1..0991788483 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -239,7 +239,7 @@ <method name="is_absolute_path" qualifiers="const"> <return type="bool" /> <description> - If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute. + Returns [code]true[/code] if the string is a path to a file or directory and its starting point is explicitly defined. This includes [code]res://[/code], [code]user://[/code], [code]C:\[/code], [code]/[/code], etc. </description> </method> <method name="is_empty" qualifiers="const"> @@ -248,10 +248,10 @@ Returns [code]true[/code] if the length of the string equals [code]0[/code]. </description> </method> - <method name="is_rel_path" qualifiers="const"> + <method name="is_relative_path" qualifiers="const"> <return type="bool" /> <description> - If the string is a path to a file or directory, returns [code]true[/code] if the path is relative. + Returns [code]true[/code] if the string is a path to a file or directory and its starting point is implicitly defined within the context it is being used. The starting point may refer to the current directory ([code]./[/code]), or the current [Node]. </description> </method> <method name="is_subsequence_of" qualifiers="const"> @@ -445,6 +445,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="String" /> <description> </description> @@ -481,6 +486,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="String" /> <description> </description> @@ -503,6 +513,12 @@ <description> </description> </method> + <method name="operator []" qualifiers="operator"> + <return type="String" /> + <argument index="0" name="index" type="int" /> + <description> + </description> + </method> <method name="pad_decimals" qualifiers="const"> <return type="String" /> <argument index="0" name="digits" type="int" /> @@ -646,6 +662,12 @@ Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. </description> </method> + <method name="simplify_path" qualifiers="const"> + <return type="String" /> + <description> + Returns a simplified canonical path. + </description> + </method> <method name="split" qualifiers="const"> <return type="PackedStringArray" /> <argument index="0" name="delimiter" type="String" /> @@ -821,6 +843,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index 4c2619e782..113195d91c 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -31,6 +31,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="String" /> <description> </description> @@ -43,6 +48,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="String" /> <description> </description> @@ -54,6 +64,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index 024524251d..6bcd485656 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -95,6 +95,4 @@ Refer to [member content_margin_bottom] for extra considerations. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml index 8781cdcde3..91a9f37f53 100644 --- a/doc/classes/StyleBoxEmpty.xml +++ b/doc/classes/StyleBoxEmpty.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 59ab724f48..7bd68aa583 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -120,6 +120,7 @@ <members> <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" default="true"> Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners. + [b]Note:[/b] When using beveled corners with 45-degree angles ([member corner_detail] = 1), it is recommended to set [member anti_aliasing] to [code]false[/code] to ensure crisp visuals and avoid possible visual glitches. </member> <member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="0.625"> This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. @@ -187,6 +188,4 @@ The shadow size in pixels. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml index 850c656720..f2f8679b3e 100644 --- a/doc/classes/StyleBoxLine.xml +++ b/doc/classes/StyleBoxLine.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)"> The line's color. @@ -27,6 +25,4 @@ If [code]true[/code], the line will be vertical. If [code]false[/code], the line will be horizontal. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml index 9c5610e2c7..28866699f6 100644 --- a/doc/classes/SubViewport.xml +++ b/doc/classes/SubViewport.xml @@ -15,8 +15,6 @@ <link title="Dynamic Split Screen Demo">https://godotengine.org/asset-library/asset/541</link> <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link> </tutorials> - <methods> - </methods> <members> <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="SubViewport.ClearMode" default="0"> The clear mode when the sub-viewport is used as a render target. diff --git a/doc/classes/SubViewportContainer.xml b/doc/classes/SubViewportContainer.xml index 16d483e7f8..9a4985c98c 100644 --- a/doc/classes/SubViewportContainer.xml +++ b/doc/classes/SubViewportContainer.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false"> If [code]true[/code], the sub-viewport will be scaled to the control's size. @@ -21,6 +19,4 @@ [b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml index ea0d1c27a3..9bb8aabb1f 100644 --- a/doc/classes/SyntaxHighlighter.xml +++ b/doc/classes/SyntaxHighlighter.xml @@ -17,7 +17,7 @@ Virtual method which can be overridden to clear any local caches. </description> </method> - <method name="_get_line_syntax_highlighting" qualifiers="virtual"> + <method name="_get_line_syntax_highlighting" qualifiers="virtual const"> <return type="Dictionary" /> <argument index="0" name="line" type="int" /> <description> @@ -72,6 +72,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/TCPServer.xml b/doc/classes/TCPServer.xml index 9692693eff..8676e33bb4 100644 --- a/doc/classes/TCPServer.xml +++ b/doc/classes/TCPServer.xml @@ -51,6 +51,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index fbda005865..77bd7b1a0a 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -57,6 +57,13 @@ Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D]. </description> </method> + <method name="get_tab_idx_at_point" qualifiers="const"> + <return type="int" /> + <argument index="0" name="point" type="Vector2" /> + <description> + Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position. + </description> + </method> <method name="get_tab_title" qualifiers="const"> <return type="String" /> <argument index="0" name="tab_idx" type="int" /> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 7aa627b7d0..6a38c1a117 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -30,7 +30,7 @@ </method> <method name="_handle_unicode_input" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="unicode" type="int" /> + <argument index="0" name="unicode_char" type="int" /> <description> Override this method to define what happens when the types in the provided key [code]unicode[/code]. </description> @@ -1212,6 +1212,12 @@ <theme_item name="read_only" data_type="style" type="StyleBox"> Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled. </theme_item> + <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)"> + [Color] of the border around text that matches the search query. + </theme_item> + <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)"> + [Color] behind the text that matches the search query. + </theme_item> <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Sets the highlight [Color] of text selections. </theme_item> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index fb94e14c8d..aa35acdbd2 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -220,13 +220,13 @@ <method name="get_spacing_bottom" qualifiers="const"> <return type="int" /> <description> - Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom]. + Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom]. </description> </method> <method name="get_spacing_top" qualifiers="const"> <return type="int" /> <description> - Returns extra spacing at the top of the line. See [member Font.extra_spacing_top]. + Returns extra spacing at the top of the line. See [member Font.spacing_top]. </description> </method> <method name="hit_test" qualifiers="const"> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index ac56be4392..7fe9278f2c 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -9,42 +9,10 @@ <tutorials> </tutorials> <methods> - <method name="create_font_bitmap"> + <method name="create_font"> <return type="RID" /> - <argument index="0" name="height" type="float" /> - <argument index="1" name="ascent" type="float" /> - <argument index="2" name="base_size" type="int" /> <description> - Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method. - </description> - </method> - <method name="create_font_memory"> - <return type="RID" /> - <argument index="0" name="data" type="PackedByteArray" /> - <argument index="1" name="type" type="String" /> - <argument index="2" name="base_size" type="int" default="16" /> - <description> - Creates new font from the data in memory. To free the resulting font, use [method free_rid] method. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size. - </description> - </method> - <method name="create_font_resource"> - <return type="RID" /> - <argument index="0" name="filename" type="String" /> - <argument index="1" name="base_size" type="int" default="16" /> - <description> - Creates new font from the file. To free the resulting font, use [method free_rid] method. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size. - </description> - </method> - <method name="create_font_system"> - <return type="RID" /> - <argument index="0" name="name" type="String" /> - <argument index="1" name="base_size" type="int" default="16" /> - <description> - Creates new font from the system font. To free the resulting font, use [method free_rid] method. - Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size. + Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method. </description> </method> <method name="create_shaped_text"> @@ -68,52 +36,53 @@ Draws box displaying character hexadecimal code. Used for replacing missing characters. </description> </method> - <method name="font_bitmap_add_char"> + <method name="font_clear_glyphs"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="char" type="int" /> - <argument index="2" name="texture_idx" type="int" /> - <argument index="3" name="rect" type="Rect2" /> - <argument index="4" name="align" type="Vector2" /> - <argument index="5" name="advance" type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> <description> - Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. + Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually. </description> </method> - <method name="font_bitmap_add_kerning_pair"> + <method name="font_clear_kerning_map"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="A" type="int" /> - <argument index="2" name="B" type="int" /> - <argument index="3" name="kerning" type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> - Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + Removes all kerning overrides. </description> </method> - <method name="font_bitmap_add_texture"> + <method name="font_clear_size_cache"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="texture" type="Texture" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Removes all font sizes from the cache entry + </description> + </method> + <method name="font_clear_textures"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> <description> - Adds a texture to the bitmap font. + Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually. </description> </method> <method name="font_draw_glyph" qualifiers="const"> - <return type="Vector2" /> - <argument index="0" name="font" type="RID" /> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="canvas" type="RID" /> <argument index="2" name="size" type="int" /> <argument index="3" name="pos" type="Vector2" /> <argument index="4" name="index" type="int" /> <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. + Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code]. Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. </description> </method> <method name="font_draw_glyph_outline" qualifiers="const"> - <return type="Vector2" /> - <argument index="0" name="font" type="RID" /> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="canvas" type="RID" /> <argument index="2" name="size" type="int" /> <argument index="3" name="outline_size" type="int" /> @@ -121,68 +90,46 @@ <argument index="5" name="index" type="int" /> <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. + Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code]. Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. </description> </method> - <method name="font_get_antialiased" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="font" type="RID" /> - <description> - Returns [code]true[/code], if font anti-aliasing is supported and enabled. - </description> - </method> <method name="font_get_ascent" qualifiers="const"> <return type="float" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="size" type="int" /> <description> Returns the font ascent (number of pixels above the baseline). </description> </method> - <method name="font_get_base_size" qualifiers="const"> - <return type="float" /> - <argument index="0" name="font" type="RID" /> - <description> - Returns the default size of the font. - </description> - </method> <method name="font_get_descent" qualifiers="const"> <return type="float" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="size" type="int" /> <description> Returns the font descent (number of pixels below the baseline). </description> </method> - <method name="font_get_distance_field_hint" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="font" type="RID" /> - <description> - Returns [code]true[/code], if distance field hint is enabled. - </description> - </method> - <method name="font_get_feature_list" qualifiers="const"> - <return type="Dictionary" /> - <argument index="0" name="font" type="RID" /> + <method name="font_get_fixed_size" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns list of OpenType features supported by font. + Returns bitmap font fixed size. </description> </method> - <method name="font_get_force_autohinter" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="font" type="RID" /> + <method name="font_get_global_oversampling" qualifiers="const"> + <return type="float" /> <description> - Returns [code]true[/code], if autohinter is supported and enabled. + Returns the font oversampling factor, shared by all fonts in the TextServer. </description> </method> <method name="font_get_glyph_advance" qualifiers="const"> <return type="Vector2" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="index" type="int" /> - <argument index="2" name="size" type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns advance of the glyph. + Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. </description> </method> <method name="font_get_glyph_contours" qualifiers="const"> @@ -191,7 +138,7 @@ <argument index="1" name="size" type="int" /> <argument index="2" name="index" type="int" /> <description> - Returns outline contours of the glyph in a Dictionary. + Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents: [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values. [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour. [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled. @@ -199,41 +146,85 @@ </method> <method name="font_get_glyph_index" qualifiers="const"> <return type="int" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="char" type="int" /> - <argument index="2" name="variation_selector" type="int" default="0" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="char" type="int" /> + <argument index="3" name="variation_selector" type="int" /> <description> Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. </description> </method> - <method name="font_get_glyph_kerning" qualifiers="const"> + <method name="font_get_glyph_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Returns list of rendered glyphs in the cache entry. + </description> + </method> + <method name="font_get_glyph_offset" qualifiers="const"> <return type="Vector2" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="index_a" type="int" /> - <argument index="2" name="index_b" type="int" /> - <argument index="3" name="size" type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns a kerning of the pair of glyphs. + Returns glyph offset from the baseline. </description> </method> - <method name="font_get_height" qualifiers="const"> - <return type="float" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="size" type="int" /> + <method name="font_get_glyph_size" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns the total font height (ascent plus descent) in pixels. + Returns size of the glyph. + </description> + </method> + <method name="font_get_glyph_texture_idx" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns index of the cache texture containing the glyph. + </description> + </method> + <method name="font_get_glyph_uv_rect" qualifiers="const"> + <return type="Rect2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns rectangle in the cache texture containing the glyph. </description> </method> <method name="font_get_hinting" qualifiers="const"> <return type="int" enum="TextServer.Hinting" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns the font hinting. + Returns the font hinting mode. Used by dynamic fonts only. + </description> + </method> + <method name="font_get_kerning" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <description> + Returns kerning for the pair of glyphs. + </description> + </method> + <method name="font_get_kerning_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <description> + Returns list of the kerning overrides. </description> </method> <method name="font_get_language_support_override"> <return type="bool" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="language" type="String" /> <description> Returns [code]true[/code] if support override is enabled for the [code]language[/code]. @@ -241,20 +232,43 @@ </method> <method name="font_get_language_support_overrides"> <return type="PackedStringArray" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <description> Returns list of language support overrides. </description> </method> + <method name="font_get_msdf_pixel_range" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Return the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="font_get_msdf_size" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns source font size used to generate MSDF textures. + </description> + </method> <method name="font_get_oversampling" qualifiers="const"> <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns the font oversampling factor, shared by all fonts in the TextServer. + Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="font_get_scale" qualifiers="const"> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <description> + Returns scaling factor of the color bitmap font. </description> </method> <method name="font_get_script_support_override"> <return type="bool" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="script" type="String" /> <description> Returns [code]true[/code] if support override is enabled for the [code]script[/code]. @@ -262,98 +276,149 @@ </method> <method name="font_get_script_support_overrides"> <return type="PackedStringArray" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <description> Returns list of script support overrides. </description> </method> - <method name="font_get_spacing_glyph" qualifiers="const"> - <return type="int" /> - <argument index="0" name="font" type="RID" /> + <method name="font_get_size_cache_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns extra spacing for each glyph in pixels. + Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. </description> </method> - <method name="font_get_spacing_space" qualifiers="const"> + <method name="font_get_spacing" qualifiers="const"> <return type="int" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" /> <description> - Sets extra spacing for each glyph in pixels. + Returns extra spacing added between glyphs in pixels. </description> </method> <method name="font_get_supported_chars" qualifiers="const"> <return type="String" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <description> Returns a string containing all the characters available in the font. </description> </method> - <method name="font_get_underline_position" qualifiers="const"> - <return type="float" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="size" type="int" /> + <method name="font_get_texture_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> <description> - Returns underline offset (number of pixels below the baseline). + Returns number of textures used by font cache entry. </description> </method> - <method name="font_get_underline_thickness" qualifiers="const"> + <method name="font_get_texture_image" qualifiers="const"> + <return type="Image" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Returns font cache texture image data. + </description> + </method> + <method name="font_get_texture_offsets" qualifiers="const"> + <return type="PackedInt32Array" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + </description> + </method> + <method name="font_get_underline_position" qualifiers="const"> <return type="float" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="size" type="int" /> <description> - Returns underline thickness in pixels. + Returns pixel offset of the underline below the baseline. </description> </method> - <method name="font_get_variation" qualifiers="const"> + <method name="font_get_underline_thickness" qualifiers="const"> <return type="float" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="tag" type="String" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> - Returns variation coordinate [code]tag[/code]. + Returns thickness of the underline in pixels. </description> </method> - <method name="font_get_variation_list" qualifiers="const"> + <method name="font_get_variation_coordinates" qualifiers="const"> <return type="Dictionary" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code]. - Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info. </description> </method> <method name="font_has_char" qualifiers="const"> <return type="bool" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="char" type="int" /> <description> - Returns [code]true[/code] if [code]char[/code] is available in the font. + Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> - <method name="font_has_outline" qualifiers="const"> + <method name="font_is_antialiased" qualifiers="const"> <return type="bool" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled. + </description> + </method> + <method name="font_is_force_autohinter" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns [code]true[/code], if font supports glyph outlines. + Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. </description> </method> <method name="font_is_language_supported" qualifiers="const"> <return type="bool" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="language" type="String" /> <description> - Returns [code]true[/code], if font supports given language (ISO 639 code). + Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). + </description> + </method> + <method name="font_is_multichannel_signed_distance_field" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. </description> </method> <method name="font_is_script_supported" qualifiers="const"> <return type="bool" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="script" type="String" /> <description> Returns [code]true[/code], if font supports given script (ISO 15924 code). </description> </method> + <method name="font_remove_glyph"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually. + </description> + </method> + <method name="font_remove_kerning"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <description> + Removes kerning override for the pair of glyphs. + </description> + </method> <method name="font_remove_language_support_override"> <return type="void" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="language" type="String" /> <description> Remove language support override. @@ -361,92 +426,300 @@ </method> <method name="font_remove_script_support_override"> <return type="void" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="script" type="String" /> <description> Removes script support override. </description> </method> + <method name="font_remove_size_cache"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes specified font size from the cache entry. + </description> + </method> + <method name="font_remove_texture"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph]. + </description> + </method> + <method name="font_render_glyph"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="index" type="int" /> + <description> + Renders specified glyph the the font cache texture. + </description> + </method> + <method name="font_render_range"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="start" type="int" /> + <argument index="3" name="end" type="int" /> + <description> + Renders the range of characters to the font cache texture. + </description> + </method> <method name="font_set_antialiased"> <return type="void" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="antialiased" type="bool" /> <description> - Sets font anti-aliasing. + If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only. </description> </method> - <method name="font_set_distance_field_hint"> + <method name="font_set_ascent"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="distance_field" type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="ascent" type="float" /> <description> - Sets font distance field hint. + Sets the font ascent (number of pixels above the baseline). + </description> + </method> + <method name="font_set_data"> + <return type="void" /> + <argument index="0" name="data" type="RID" /> + <argument index="1" name="arg1" type="PackedByteArray" /> + <description> + Sets font source data, e.g contents of the dynamic font source file. + </description> + </method> + <method name="font_set_descent"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="descent" type="float" /> + <description> + Sets the font descent (number of pixels below the baseline). + </description> + </method> + <method name="font_set_fixed_size"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="fixed_size" type="int" /> + <description> + Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. </description> </method> <method name="font_set_force_autohinter"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="enabeld" type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="force_autohinter" type="bool" /> <description> - Enables/disables default autohinter. + If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + </description> + </method> + <method name="font_set_global_oversampling"> + <return type="void" /> + <argument index="0" name="oversampling" type="float" /> + <description> + Sets oversampling factor, shared by all font in the TextServer. + Note: This value can be automaticaly changed by display server. + </description> + </method> + <method name="font_set_glyph_advance"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="advance" type="Vector2" /> + <description> + Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. + </description> + </method> + <method name="font_set_glyph_offset"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="offset" type="Vector2" /> + <description> + Sets glyph offset from the baseline. + </description> + </method> + <method name="font_set_glyph_size"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="gl_size" type="Vector2" /> + <description> + Sets size of the glyph. + </description> + </method> + <method name="font_set_glyph_texture_idx"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="texture_idx" type="int" /> + <description> + Sets index of the cache texture containing the glyph. + </description> + </method> + <method name="font_set_glyph_uv_rect"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="uv_rect" type="Rect2" /> + <description> + Sets rectangle in the cache texture containing the glyph. </description> </method> <method name="font_set_hinting"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="_hinting" type="int" enum="TextServer.Hinting" /> + <description> + Sets font hinting mode. Used by dynamic fonts only. + </description> + </method> + <method name="font_set_kerning"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <argument index="3" name="kerning" type="Vector2" /> <description> - Sets font hinting. + Sets kerning for the pair of glyphs. </description> </method> <method name="font_set_language_support_override"> <return type="void" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="language" type="String" /> <argument index="2" name="supported" type="bool" /> <description> Adds override for [method font_is_language_supported]. </description> </method> + <method name="font_set_msdf_pixel_range"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="msdf_pixel_range" type="int" /> + <description> + Sets the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="font_set_msdf_size"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="msdf_size" type="int" /> + <description> + Sets source font size used to generate MSDF textures. + </description> + </method> + <method name="font_set_multichannel_signed_distance_field"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="msdf" type="bool" /> + <description> + 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. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). 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] 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. + </description> + </method> <method name="font_set_oversampling"> <return type="void" /> - <argument index="0" name="oversampling" type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="oversampling" type="float" /> <description> - Sets oversampling factor, shared by all font in the TextServer. + Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="font_set_scale"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="scale" type="float" /> + <description> + Sets scaling factor of the color bitmap font. </description> </method> <method name="font_set_script_support_override"> <return type="void" /> - <argument index="0" name="font" type="RID" /> + <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="script" type="String" /> <argument index="2" name="supported" type="bool" /> <description> Adds override for [method font_is_script_supported]. </description> </method> - <method name="font_set_spacing_glyph"> + <method name="font_set_spacing"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="value" type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" /> + <argument index="3" name="value" type="int" /> <description> - Returns extra spacing for the space character in pixels. + Sets extra spacing added between glyphs in pixels. </description> </method> - <method name="font_set_spacing_space"> + <method name="font_set_texture_image"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="value" type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="image" type="Image" /> <description> - Sets extra spacing for the space character in pixels. + Sets font cache texture image data. </description> </method> - <method name="font_set_variation"> + <method name="font_set_texture_offsets"> <return type="void" /> - <argument index="0" name="font" type="RID" /> - <argument index="1" name="tag" type="String" /> - <argument index="2" name="value" type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="offset" type="PackedInt32Array" /> + <description> + Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + </description> + </method> + <method name="font_set_underline_position"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_position" type="float" /> + <description> + Sets pixel offset of the underline below the baseline. + </description> + </method> + <method name="font_set_underline_thickness"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_thickness" type="float" /> + <description> + Sets thickness of the underline in pixels. + </description> + </method> + <method name="font_set_variation_coordinates"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="variation_coordinates" type="Dictionary" /> + <description> + Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info. + </description> + </method> + <method name="font_supported_feature_list" qualifiers="const"> + <return type="Dictionary" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + </description> + </method> + <method name="font_supported_variation_list" qualifiers="const"> + <return type="Dictionary" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Sets variation coordinate [code]name[/code]. Unsupported coordinates will be silently ignored. </description> </method> <method name="format_number" qualifiers="const"> @@ -478,13 +751,6 @@ Returns the name of the server interface. </description> </method> - <method name="get_system_fonts" qualifiers="const"> - <return type="PackedStringArray" /> - <description> - Returns list of available system fonts. - Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature. - </description> - </method> <method name="has"> <return type="bool" /> <argument index="0" name="rid" type="RID" /> @@ -514,7 +780,7 @@ Note: This function should be called before any other TextServer functions used, otherwise it won't have any effect. </description> </method> - <method name="name_to_tag"> + <method name="name_to_tag" qualifiers="const"> <return type="int" /> <argument index="0" name="name" type="String" /> <description> @@ -890,7 +1156,7 @@ Aligns shaped text to the given tab-stops. </description> </method> - <method name="tag_to_name"> + <method name="tag_to_name" qualifiers="const"> <return type="String" /> <argument index="0" name="tag" type="int" /> <description> @@ -981,6 +1247,12 @@ <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag"> Grapheme is punctuation character. </constant> + <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag"> + Grapheme is underscore character. + </constant> + <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag"> + Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe. + </constant> <constant name="HINTING_NONE" value="0" enum="Hinting"> Disables font hinting (smoother but less crisp). </constant> @@ -1023,5 +1295,17 @@ <constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag"> Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc. </constant> + <constant name="SPACING_GLYPH" value="0" enum="SpacingType"> + Spacing for each glyph. + </constant> + <constant name="SPACING_SPACE" value="1" enum="SpacingType"> + Spacing for the space character. + </constant> + <constant name="SPACING_TOP" value="2" enum="SpacingType"> + Spacing at the top of the line. + </constant> + <constant name="SPACING_BOTTOM" value="3" enum="SpacingType"> + Spacing at the bottom of the line. + </constant> </constants> </class> diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml index b1dd314544..0e7b6d15d3 100644 --- a/doc/classes/TextServerManager.xml +++ b/doc/classes/TextServerManager.xml @@ -64,6 +64,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index e19d611ea9..3387de30b7 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index bf5ddeb4ab..b77365e2df 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -76,6 +76,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml index bb9283803d..bbadbc29a1 100644 --- a/doc/classes/Texture2DArray.xml +++ b/doc/classes/Texture2DArray.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml index 8ba0d7d4b9..51cd377648 100644 --- a/doc/classes/Texture3D.xml +++ b/doc/classes/Texture3D.xml @@ -38,6 +38,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 70bf138f27..2be27617ab 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -11,8 +11,6 @@ <tutorials> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> - <methods> - </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="get_expand" default="false"> If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml index 9da89ebe43..ee47557b39 100644 --- a/doc/classes/TextureProgressBar.xml +++ b/doc/classes/TextureProgressBar.xml @@ -60,6 +60,9 @@ [Texture2D] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code]. The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value]. </member> + <member name="texture_progress_offset" type="Vector2" setter="set_texture_progress_offset" getter="get_texture_progress_offset" default="Vector2(0, 0)"> + The offset of [member texture_progress]. Useful for [member texture_over] and [member texture_under] with fancy borders, to avoid transparent margins in your progress texture. + </member> <member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture"> [Texture2D] that draws under the progress bar. The bar's background. </member> diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 743e7f6d1e..4f18f43ddf 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -9,8 +9,6 @@ <tutorials> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> - <methods> - </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false"> If [code]true[/code], the texture scales to fit its bounding rectangle. diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index b553aad518..9c9119c664 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -40,6 +40,8 @@ <return type="Variant" /> <description> Joins the [Thread] and waits for it to finish. Returns what the method called returned. + Should either be used when you want to retrieve the value returned from the method called by the [Thread] or before freeing the instance that contains the [Thread]. + [b]Note:[/b] After the [Thread] finishes joining it will be disposed. If you want to use it again you will have to create a new instance of it. </description> </method> </methods> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml index b5031cfc63..0d3282c6d3 100644 --- a/doc/classes/TileData.xml +++ b/doc/classes/TileData.xml @@ -11,6 +11,7 @@ <return type="void" /> <argument index="0" name="layer_id" type="int" /> <description> + Adds a collision polygon to the tile on the given TileSet physics layer. </description> </method> <method name="get_collision_polygon_one_way_margin" qualifiers="const"> @@ -18,6 +19,7 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="polygon_index" type="int" /> <description> + Returns the one-way margin (for one-way platforms) of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="get_collision_polygon_points" qualifiers="const"> @@ -25,42 +27,49 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="polygon_index" type="int" /> <description> + Returns the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="get_collision_polygons_count" qualifiers="const"> <return type="int" /> <argument index="0" name="layer_id" type="int" /> <description> + Returns how many polygons the tile has for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="get_custom_data" qualifiers="const"> <return type="Variant" /> <argument index="0" name="layer_name" type="String" /> <description> + Returns the custom data value for custom data layer named [code]layer_name[/code]. </description> </method> <method name="get_custom_data_by_layer_id" qualifiers="const"> <return type="Variant" /> <argument index="0" name="layer_id" type="int" /> <description> + Returns the custom data value for custom data layer with index [code]layer_id[/code]. </description> </method> <method name="get_navigation_polygon" qualifiers="const"> <return type="NavigationPolygon" /> <argument index="0" name="layer_id" type="int" /> <description> + Returns the navigation polygon of the tile for the TileSet navigation layer with index [code]layer_id[/code]. </description> </method> <method name="get_occluder" qualifiers="const"> <return type="OccluderPolygon2D" /> <argument index="0" name="layer_id" type="int" /> <description> + Returns the occluder polygon of the tile for the TileSet occlusion layer with index [code]layer_id[/code]. </description> </method> <method name="get_peering_bit_terrain" qualifiers="const"> <return type="int" /> <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" /> <description> + Returns the tile's terrain bit for the given [code]peering_bit[/code] direction. </description> </method> <method name="is_collision_polygon_one_way" qualifiers="const"> @@ -68,6 +77,7 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="polygon_index" type="int" /> <description> + Returns whether one-way collisions are enabled for the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="remove_collision_polygon"> @@ -75,6 +85,7 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="polygon_index" type="int" /> <description> + Removes the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="set_collision_polygon_one_way"> @@ -83,6 +94,7 @@ <argument index="1" name="polygon_index" type="int" /> <argument index="2" name="one_way" type="bool" /> <description> + Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="set_collision_polygon_one_way_margin"> @@ -91,6 +103,7 @@ <argument index="1" name="polygon_index" type="int" /> <argument index="2" name="one_way_margin" type="float" /> <description> + Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="set_collision_polygon_points"> @@ -99,6 +112,7 @@ <argument index="1" name="polygon_index" type="int" /> <argument index="2" name="polygon" type="PackedVector2Array" /> <description> + Sets the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="set_collision_polygons_count"> @@ -106,6 +120,7 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="polygons_count" type="int" /> <description> + Sets the polygons count for TileSet physics layer with index [code]layer_id[/code]. </description> </method> <method name="set_custom_data"> @@ -113,6 +128,7 @@ <argument index="0" name="layer_name" type="String" /> <argument index="1" name="value" type="Variant" /> <description> + Sets the tile's custom data value for the TileSet custom data layer with name [code]layer_name[/code]. </description> </method> <method name="set_custom_data_by_layer_id"> @@ -120,6 +136,7 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="value" type="Variant" /> <description> + Sets the tile's custom data value for the TileSet custom data layer with index [code]layer_id[/code]. </description> </method> <method name="set_navigation_polygon"> @@ -127,6 +144,7 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="navigation_polygon" type="NavigationPolygon" /> <description> + Sets the navigation polygon for the TileSet navigation layer with index [code]layer_id[/code]. </description> </method> <method name="set_occluder"> @@ -134,6 +152,7 @@ <argument index="0" name="layer_id" type="int" /> <argument index="1" name="occluder_polygon" type="OccluderPolygon2D" /> <description> + Sets the occluder for the TileSet occlusion layer with index [code]layer_id[/code]. </description> </method> <method name="set_peering_bit_terrain"> @@ -141,17 +160,7 @@ <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" /> <argument index="1" name="terrain" type="int" /> <description> - </description> - </method> - <method name="tile_get_material" qualifiers="const"> - <return type="ShaderMaterial" /> - <description> - </description> - </method> - <method name="tile_set_material"> - <return type="void" /> - <argument index="0" name="material" type="ShaderMaterial" /> - <description> + Sets the tile's terrain bit for the given [code]peering_bit[/code] direction. </description> </method> </methods> @@ -160,6 +169,8 @@ </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false"> </member> + <member name="material" type="ShaderMaterial" setter="set_material" getter="get_material"> + </member> <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> </member> <member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0"> @@ -181,6 +192,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index f3c64c3c7d..4621d138ac 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -4,8 +4,7 @@ Node for 2D tile-based maps. </brief_description> <description> - Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. - When doing physics queries against the tilemap, the cell coordinates are encoded as [code]metadata[/code] for each detected collision shape returned by methods such as [method PhysicsDirectSpaceState2D.intersect_shape], [method PhysicsDirectBodyState2D.get_contact_collider_shape_metadata] etc. + Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other. </description> <tutorials> <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> @@ -17,6 +16,13 @@ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> + <method name="add_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" /> + <description> + Adds a layer at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array. + </description> + </method> <method name="clear"> <return type="void" /> <description> @@ -35,6 +41,7 @@ <argument index="1" name="coords" type="Vector2i" /> <argument index="2" name="use_proxies" type="bool" /> <description> + Returns the tile alternative ID of the cell on layer [code]layer[/code] at [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. </description> </method> <method name="get_cell_atlas_coords" qualifiers="const"> @@ -43,6 +50,7 @@ <argument index="1" name="coords" type="Vector2i" /> <argument index="2" name="use_proxies" type="bool" /> <description> + Returns the tile atlas coordinates ID of the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. </description> </method> <method name="get_cell_source_id" qualifiers="const"> @@ -51,24 +59,33 @@ <argument index="1" name="coords" type="Vector2i" /> <argument index="2" name="use_proxies" type="bool" /> <description> + Returns the tile source ID of the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. </description> </method> <method name="get_layer_name" qualifiers="const"> <return type="String" /> <argument index="0" name="layer" type="int" /> <description> + Returns a TileMap layer's name. </description> </method> <method name="get_layer_y_sort_origin" qualifiers="const"> <return type="int" /> <argument index="0" name="layer" type="int" /> <description> + Returns a TileMap layer's Y sort origin. </description> </method> - <method name="get_layer_z_indexd" qualifiers="const"> + <method name="get_layer_z_index" qualifiers="const"> <return type="int" /> <argument index="0" name="layer" type="int" /> <description> + Returns a TileMap layer's Z-index value. + </description> + </method> + <method name="get_layers_count" qualifiers="const"> + <return type="int" /> + <description> </description> </method> <method name="get_neighbor_cell" qualifiers="const"> @@ -76,37 +93,41 @@ <argument index="0" name="coords" type="Vector2i" /> <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" /> <description> + Returns the neighboring cell to the one at coordinates [code]coords[/code], indentified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take. </description> </method> <method name="get_surrounding_tiles"> <return type="Vector2i[]" /> <argument index="0" name="coords" type="Vector2i" /> <description> + Returns the list of all neighbourings cells to the one at [code]coords[/code] </description> </method> <method name="get_used_cells" qualifiers="const"> <return type="Vector2i[]" /> <argument index="0" name="layer" type="int" /> <description> - Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]). + Returns a [Vector2] array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is [code]Vector2(-1, -1)[/code] and its alternative identifier is -1. </description> </method> <method name="get_used_rect"> <return type="Rect2" /> <description> - Returns a rectangle enclosing the used (non-empty) tiles of the map. + Returns a rectangle enclosing the used (non-empty) tiles of the map, including all layers. </description> </method> <method name="is_layer_enabled" qualifiers="const"> <return type="bool" /> <argument index="0" name="layer" type="int" /> <description> + Returns if a layer is enabled. </description> </method> <method name="is_layer_y_sort_enabled" qualifiers="const"> <return type="bool" /> <argument index="0" name="layer" type="int" /> <description> + Returns if a layer Y-sorts its tiles. </description> </method> <method name="map_to_world" qualifiers="const"> @@ -116,6 +137,21 @@ Returns the local position corresponding to the given tilemap (grid-based) coordinates. </description> </method> + <method name="move_layer"> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + Moves the layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. + </description> + </method> + <method name="remove_layer"> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <description> + Moves the layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. + </description> + </method> <method name="set_cell"> <return type="void" /> <argument index="0" name="layer" type="int" /> @@ -124,7 +160,10 @@ <argument index="3" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> <argument index="4" name="alternative_tile" type="int" default="-1" /> <description> - Sets the tile index for the cell given by a Vector2i. + Sets the tile indentifiers for the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. Each tile of the [TileSet] is identified using three parts: + - The source indentifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id], + - The atlas coordinates identifier [code]atlas_coords[/code] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0), + - The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource]. </description> </method> <method name="set_layer_enabled"> @@ -132,6 +171,7 @@ <argument index="0" name="layer" type="int" /> <argument index="1" name="enabled" type="bool" /> <description> + Enables or disables the layer [code]layer[/code]. A disabled layer is not processed at all (no rendering, no physics, etc...). </description> </method> <method name="set_layer_name"> @@ -139,6 +179,7 @@ <argument index="0" name="layer" type="int" /> <argument index="1" name="name" type="String" /> <description> + Sets a layer's name. This is mostly useful in the editor. </description> </method> <method name="set_layer_y_sort_enabled"> @@ -146,6 +187,8 @@ <argument index="0" name="layer" type="int" /> <argument 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. </description> </method> <method name="set_layer_y_sort_origin"> @@ -153,6 +196,8 @@ <argument index="0" name="layer" type="int" /> <argument index="1" name="y_sort_origin" type="int" /> <description> + Sets a layer's Y-sort origin value. This Y-sort origin value is added to each tile's Y-sort origin value. + This allows, for example, to fake a different height level on each layer. This can be useful for top-down view games. </description> </method> <method name="set_layer_z_index"> @@ -160,6 +205,7 @@ <argument index="0" name="layer" type="int" /> <argument index="1" name="z_index" type="int" /> <description> + Sets a layers Z-index value. This Z-index is added to each tile's Z-index value. </description> </method> <method name="world_to_map" qualifiers="const"> @@ -175,10 +221,10 @@ The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. </member> <member name="collision_visibility_mode" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0"> - </member> - <member name="layers_count" type="int" setter="set_layers_count" getter="get_layers_count" default="1"> + Show or hide the TileMap's collision shapes. If set to [code]VISIBILITY_MODE_DEFAULT[/code], this depends on the show collision debug settings. </member> <member name="navigation_visibility_mode" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0"> + Show or hide the TileMap's collision shapes. If set to [code]VISIBILITY_MODE_DEFAULT[/code], this depends on the show navigation debug settings. </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset"> The assigned [TileSet]. @@ -193,10 +239,13 @@ </signals> <constants> <constant name="VISIBILITY_MODE_DEFAULT" value="0" enum="VisibilityMode"> + Use the debug settings to determine visibility. </constant> <constant name="VISIBILITY_MODE_FORCE_HIDE" value="2" enum="VisibilityMode"> + Always hide. </constant> <constant name="VISIBILITY_MODE_FORCE_SHOW" value="1" enum="VisibilityMode"> + Always show. </constant> </constants> </class> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 439c6e3830..02baded019 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -4,8 +4,13 @@ Tile library for tilemaps. </brief_description> <description> - A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes. - Tiles are referenced by a unique integer ID. + A TileSet is a library of tiles for a [TileMap]. A TileSet handles a list of [TileSetSource], each of them storing a set of tiles. + Tiles can either be from a [TileSetAtlasSource], that render tiles out of a texture with support for physics, navigation, etc... or from a [TileSetScenesCollectionSource] which exposes scene-based tiles. + Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID and their alternative tile ID. + + A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs. + For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer an mask), you may add several TileSet physics layers for each type of collision you need. + See the functions to add new layers for more information. </description> <tutorials> <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> @@ -17,21 +22,72 @@ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> + <method name="add_custom_data_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + Adds a custom data layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array. + Custom data layers allow assigning custom properties to atlas tiles. + </description> + </method> + <method name="add_navigation_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + Adds a navigation layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array. + Navigation layers allow assigning a navigable area to atlas tiles. + </description> + </method> + <method name="add_occlusion_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + Adds an occlusion layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array. + Occlusion layers allow assigning occlusion polygons to atlas tiles. + </description> + </method> + <method name="add_physics_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + Adds a physics layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array. + Physics layers allow assigning collision polygons to atlas tiles. + </description> + </method> <method name="add_source"> <return type="int" /> - <argument index="0" name="atlas_source_id_override" type="TileSetSource" /> - <argument index="1" name="arg1" type="int" default="-1" /> + <argument index="0" name="source" type="TileSetSource" /> + <argument index="1" name="atlas_source_id_override" type="int" default="-1" /> <description> + Adds a [TileSetSource] to the TileSet. If [code]atlas_source_id_override[/code] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. + The function returns the added source source ID or -1 if the source could not be added. + </description> + </method> + <method name="add_terrain"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="to_position" type="int" default="-1" /> + <description> + Adds a new terrain to the given terrain set [code]terrain_set[/code] at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array. + </description> + </method> + <method name="add_terrain_set"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + Adds a new terrain set at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array. </description> </method> <method name="cleanup_invalid_tile_proxies"> <return type="void" /> <description> + Clears tile proxies pointing to invalid tiles. </description> </method> <method name="clear_tile_proxies"> <return type="void" /> <description> + Clears all tile proxies. </description> </method> <method name="get_alternative_level_tile_proxy"> @@ -40,6 +96,8 @@ <argument index="1" name="coords_from" type="Vector2i" /> <argument index="2" name="alternative_from" type="int" /> <description> + Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID). + If the TileSet has no proxy for the given identifiers, returns an empty Array. </description> </method> <method name="get_coords_level_tile_proxy"> @@ -47,70 +105,108 @@ <argument index="0" name="source_from" type="int" /> <argument index="1" name="coords_from" type="Vector2i" /> <description> + Returns the coodinate-level proxy for the given identifiers. The returned array contains the two proxie's target identifiers (source ID and atlas coords ID). + If the TileSet has no proxy for the given identifiers, returns an empty Array. + </description> + </method> + <method name="get_custom_data_layers_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the custom data layers count. </description> </method> <method name="get_navigation_layer_layers" qualifiers="const"> <return type="int" /> <argument index="0" name="layer_index" type="int" /> <description> + Returns the navigation layers (as in the Navigation server) of the gives TileSet navigation layer. + </description> + </method> + <method name="get_navigation_layers_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the navigation layers count. </description> </method> <method name="get_next_source_id" qualifiers="const"> <return type="int" /> <description> + Returns a new unused source ID. This generated ID is the same that a call to [code]add_source[/code] would return. </description> </method> <method name="get_occlusion_layer_light_mask" qualifiers="const"> <return type="int" /> - <argument index="0" name="arg0" type="int" /> + <argument index="0" name="layer_index" type="int" /> <description> + Returns the light mask of the occlusion layer. </description> </method> <method name="get_occlusion_layer_sdf_collision" qualifiers="const"> <return type="bool" /> - <argument index="0" name="arg0" type="int" /> + <argument index="0" name="layer_index" type="int" /> + <description> + Returns if the occluders from this layer use [code]sdf_collision[/code]. + </description> + </method> + <method name="get_occlusion_layers_count" qualifiers="const"> + <return type="int" /> <description> + Returns the occlusion layers count. </description> </method> <method name="get_physics_layer_collision_layer" qualifiers="const"> <return type="int" /> <argument index="0" name="layer_index" type="int" /> <description> + Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in. </description> </method> <method name="get_physics_layer_collision_mask" qualifiers="const"> <return type="int" /> <argument index="0" name="layer_index" type="int" /> <description> + Returns the collision mask of bodies on the given TileSet's physics layer. </description> </method> <method name="get_physics_layer_physics_material" qualifiers="const"> <return type="PhysicsMaterial" /> <argument index="0" name="layer_index" type="int" /> <description> + Returns the physics material of bodies on the given TileSet's physics layer. + </description> + </method> + <method name="get_physics_layers_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the physics layers count. </description> </method> <method name="get_source" qualifiers="const"> <return type="TileSetSource" /> - <argument index="0" name="index" type="int" /> + <argument index="0" name="source_id" type="int" /> <description> + Returns the [TileSetSource] with ID [code]source_id[/code]. </description> </method> <method name="get_source_count" qualifiers="const"> <return type="int" /> <description> + Returns the number of [TileSetSource] in this TileSet. </description> </method> <method name="get_source_id" qualifiers="const"> <return type="int" /> <argument index="0" name="index" type="int" /> <description> + Returns the source ID for source with index [code]index[/code]. </description> </method> <method name="get_source_level_tile_proxy"> <return type="int" /> <argument index="0" name="source_from" type="int" /> <description> + Returns the source-level proxy for the given source identifier. + If the TileSet has no proxy for the given identifier, returns -1. </description> </method> <method name="get_terrain_color" qualifiers="const"> @@ -118,6 +214,7 @@ <argument index="0" name="terrain_set" type="int" /> <argument index="1" name="terrain_index" type="int" /> <description> + Returns a terrain's color. </description> </method> <method name="get_terrain_name" qualifiers="const"> @@ -125,18 +222,27 @@ <argument index="0" name="terrain_set" type="int" /> <argument index="1" name="terrain_index" type="int" /> <description> + Returns a terrain's name. </description> </method> <method name="get_terrain_set_mode" qualifiers="const"> <return type="int" enum="TileSet.TerrainMode" /> <argument index="0" name="terrain_set" type="int" /> <description> + Returns a terrain set mode. + </description> + </method> + <method name="get_terrain_sets_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the terrain sets count. </description> </method> <method name="get_terrains_count" qualifiers="const"> <return type="int" /> <argument index="0" name="terrain_set" type="int" /> <description> + Returns the number of terrains in the given terrain set. </description> </method> <method name="has_alternative_level_tile_proxy"> @@ -145,6 +251,7 @@ <argument index="1" name="coords_from" type="Vector2i" /> <argument index="2" name="alternative_from" type="int" /> <description> + Returns if there is and alternative-level proxy for the given identifiers. </description> </method> <method name="has_coords_level_tile_proxy"> @@ -152,18 +259,21 @@ <argument index="0" name="source_from" type="int" /> <argument index="1" name="coords_from" type="Vector2i" /> <description> + Returns if there is a coodinates-level proxy for the given identifiers. </description> </method> <method name="has_source" qualifiers="const"> <return type="bool" /> - <argument index="0" name="index" type="int" /> + <argument index="0" name="source_id" type="int" /> <description> + Returns if this TileSet has a source for the given source ID. </description> </method> <method name="has_source_level_tile_proxy"> <return type="bool" /> <argument index="0" name="source_from" type="int" /> <description> + Returns if there is a source-level proxy for the given source ID. </description> </method> <method name="map_tile_proxy" qualifiers="const"> @@ -172,6 +282,58 @@ <argument index="1" name="coords_from" type="Vector2i" /> <argument index="2" name="alternative_from" type="int" /> <description> + According to the configured proxies, maps the provided indentifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. + This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. + If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments. + </description> + </method> + <method name="move_custom_data_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + Moves the custom data layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="move_navigation_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + Moves the navigation layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="move_occlusion_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + Moves the occlusion layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="move_physics_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + Moves the physics layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="move_terrain"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> + <argument index="2" name="to_position" type="int" /> + <description> + Moves the terrain at index [code]terrain_index[/code] for terrain set [code]terrain_set[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="move_terrain_set"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + Moves the terrain set at index [code]terrain_set[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly. </description> </method> <method name="remove_alternative_level_tile_proxy"> @@ -180,6 +342,7 @@ <argument index="1" name="coords_from" type="Vector2i" /> <argument index="2" name="alternative_from" type="int" /> <description> + Removes an alternative-level proxy for the given identifiers. </description> </method> <method name="remove_coords_level_tile_proxy"> @@ -187,18 +350,64 @@ <argument index="0" name="source_from" type="int" /> <argument index="1" name="coords_from" type="Vector2i" /> <description> + Removes a coordinates-level proxy for the given identifiers. + </description> + </method> + <method name="remove_custom_data_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + Removes the custom data layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="remove_navigation_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + Removes the navigation layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="remove_occlusion_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + Removes the occlusion layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="remove_physics_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + Removes the physics layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly. </description> </method> <method name="remove_source"> <return type="void" /> <argument index="0" name="source_id" type="int" /> <description> + Removes the source with the given source ID. </description> </method> <method name="remove_source_level_tile_proxy"> <return type="void" /> <argument index="0" name="source_from" type="int" /> <description> + Removes a source-level tile proxy. + </description> + </method> + <method name="remove_terrain"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> + <description> + Removes the terrain at index [code]terrain_index[/code] in the given terrain set [code]terrain_set[/code]. Also updates the atlas tiles accordingly. + </description> + </method> + <method name="remove_terrain_set"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <description> + Removes the terrain set at index [code]terrain_set[/code]. Also updates the atlas tiles accordingly. </description> </method> <method name="set_alternative_level_tile_proxy"> @@ -210,6 +419,9 @@ <argument index="4" name="coords_to" type="Vector2i" /> <argument index="5" name="alternative_to" type="int" /> <description> + Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. + This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available. + Proxied tiles can be automatically replaced in TileMap nodes using the editor. </description> </method> <method name="set_coords_level_tile_proxy"> @@ -219,6 +431,9 @@ <argument index="2" name="source_to" type="int" /> <argument index="3" name="coords_to" type="Vector2i" /> <description> + Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies. + This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available. + Proxied tiles can be automatically replaced in TileMap nodes using the editor. </description> </method> <method name="set_navigation_layer_layers"> @@ -226,6 +441,7 @@ <argument index="0" name="layer_index" type="int" /> <argument index="1" name="layers" type="int" /> <description> + Sets the navigation layers (as in the navigation server) for navigation regions is the given TileSet navigation layer. </description> </method> <method name="set_occlusion_layer_light_mask"> @@ -233,13 +449,15 @@ <argument index="0" name="layer_index" type="int" /> <argument index="1" name="light_mask" type="int" /> <description> + Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer. </description> </method> <method name="set_occlusion_layer_sdf_collision"> <return type="void" /> <argument index="0" name="layer_index" type="int" /> - <argument index="1" name="sdf_collision" type="int" /> + <argument index="1" name="sdf_collision" type="bool" /> <description> + Enables or disables sdf collision for occluders in the given TileSet occlusion layer. </description> </method> <method name="set_physics_layer_collision_layer"> @@ -247,6 +465,7 @@ <argument index="0" name="layer_index" type="int" /> <argument index="1" name="layer" type="int" /> <description> + Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer. </description> </method> <method name="set_physics_layer_collision_mask"> @@ -254,6 +473,7 @@ <argument index="0" name="layer_index" type="int" /> <argument index="1" name="mask" type="int" /> <description> + Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer. </description> </method> <method name="set_physics_layer_physics_material"> @@ -261,13 +481,15 @@ <argument index="0" name="layer_index" type="int" /> <argument index="1" name="physics_material" type="PhysicsMaterial" /> <description> + Sets the physics material for bodies in the given TileSet physics layer. </description> </method> <method name="set_source_id"> <return type="void" /> <argument index="0" name="source_id" type="int" /> - <argument index="1" name="arg1" type="int" /> + <argument index="1" name="new_source_id" type="int" /> <description> + Changes a source's ID. </description> </method> <method name="set_source_level_tile_proxy"> @@ -275,6 +497,9 @@ <argument index="0" name="source_from" type="int" /> <argument index="1" name="source_to" type="int" /> <description> + Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlac coordinates ID and the alternative tile ID are kept the same when using source-level proxies. + This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available. + Proxied tiles can be automatically replaced in TileMap nodes using the editor. </description> </method> <method name="set_terrain_color"> @@ -283,6 +508,7 @@ <argument index="1" name="terrain_index" type="int" /> <argument index="2" name="color" type="Color" /> <description> + Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor. </description> </method> <method name="set_terrain_name"> @@ -291,6 +517,7 @@ <argument index="1" name="terrain_index" type="int" /> <argument index="2" name="name" type="String" /> <description> + Sets a terrain's name. </description> </method> <method name="set_terrain_set_mode"> @@ -298,103 +525,120 @@ <argument index="0" name="terrain_set" type="int" /> <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode" /> <description> - </description> - </method> - <method name="set_terrains_count"> - <return type="void" /> - <argument index="0" name="terrain_set" type="int" /> - <argument index="1" name="terrains_count" type="int" /> - <description> + Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighbouring tiles' terrains. </description> </method> </methods> <members> - <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0"> - </member> - <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0"> - </member> - <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0"> - </member> - <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0"> - </member> - <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0"> - </member> <member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0"> + For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the TileMap grid. </member> <member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0"> + For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis. </member> <member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0"> + The tile shape. </member> <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i(16, 16)"> + The tile size, in pixels. For all tile shapes, this size corresponds to the encompassing rectangle of the tile shape. This is thus the minimal cell size required in an atlas. </member> <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false"> + Enables/Disable uv clipping when rendering the tiles. </member> </members> <constants> <constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape"> - Orthogonal orientation mode. + Rectangular tile shape. </constant> <constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape"> - Isometric orientation mode. + Diamond tile shape (for isometric look). </constant> <constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape"> + Rectangular tile shape with one row/colum out of two offset by half a tile. </constant> <constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape"> - Hexagon orientation mode. + Hexagonal tile shape. </constant> <constant name="TILE_LAYOUT_STACKED" value="0" enum="TileLayout"> + Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis. </constant> <constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout"> + Same as [code]TILE_LAYOUT_STAKED[/code], but the first half-offset is negative instead of positive. </constant> <constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout"> + Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right. </constant> <constant name="TILE_LAYOUT_STAIRS_DOWN" value="3" enum="TileLayout"> + Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right. </constant> <constant name="TILE_LAYOUT_DIAMOND_RIGHT" value="4" enum="TileLayout"> + Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right. </constant> <constant name="TILE_LAYOUT_DIAMOND_DOWN" value="5" enum="TileLayout"> + Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left. </constant> <constant name="TILE_OFFSET_AXIS_HORIZONTAL" value="0" enum="TileOffsetAxis"> + Horizontal half-offset. </constant> <constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis"> + Vertical half-offset. </constant> <constant name="CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor"> + Neighbor on the right side. </constant> <constant name="CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor"> + Neighbor in the right corner. </constant> <constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor"> + Neighbor on the bottom right side. </constant> <constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor"> + Neighbor in the bottom right corner. </constant> <constant name="CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor"> + Neighbor on the bottom side. </constant> <constant name="CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor"> + Neighbor in the bottom corner. </constant> <constant name="CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor"> + Neighbor on the bottom left side. </constant> <constant name="CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor"> + Neighbor in the bottom left corner. </constant> <constant name="CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor"> + Neighbor on the left side. </constant> <constant name="CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor"> + Neighbor in the left corner. </constant> <constant name="CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor"> + Neighbor on the top left side. </constant> <constant name="CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor"> + Neighbor in the top left corner. </constant> <constant name="CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor"> + Neighbor on the top side. </constant> <constant name="CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor"> + Neighbor in the top corner. </constant> <constant name="CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor"> + Neighbor on the top right side. </constant> <constant name="CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor"> + Neighbor in the top right corner. </constant> <constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode"> + Requires both corners and side to match with neighboring tiles' terrains. </constant> <constant name="TERRAIN_MODE_MATCH_CORNERS" value="1" enum="TerrainMode"> + Requires corners to match with neighboring tiles' terrains. </constant> <constant name="TERRAIN_MODE_MATCH_SIDES" value="2" enum="TerrainMode"> + Requires sides to match with neighboring tiles' terrains. </constant> </constants> </class> diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml index 8caa3a7c39..75f7d19b31 100644 --- a/doc/classes/TileSetAtlasSource.xml +++ b/doc/classes/TileSetAtlasSource.xml @@ -1,8 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0"> <brief_description> + Exposes a 2D atlas texture as a set of tiles for a [TileSet] resource. </brief_description> <description> + An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using [method create_tile]. Those tiles are then indexed using their coordinates in the grid. + Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas. + + Alternatives version of a tile can be created using [method create_alternative_tile], which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0. + + Each tile alternate has a set of properties that is defined by the source's [TileSet] layers. Those properties are stored in a TileData object that can be accessed and modified using [method get_tile_data]. + As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using [code]TileSetAtlasSource.set("<coords_x>:<coords_y>/<alternative_id>/<tile_data_property>")[/code]. </description> <tutorials> </tutorials> @@ -13,11 +21,14 @@ <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" /> <description> + Returns true if the tile at the [code]atlas_coords[/code] coordinates can be moved to the [code]new_atlas_coords[/code] coordinates with the [code]new_size[/code] size. This functions returns false if a tile is already present in the given area, or if this area is outside the atlas boundaries. + If [code]new_atlas_coords[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [code]new_size[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's size. </description> </method> <method name="clear_tiles_outside_texture"> <return type="void" /> <description> + Clears all tiles that are defined outside the texture boundaries. </description> </method> <method name="create_alternative_tile"> @@ -25,6 +36,8 @@ <argument index="0" name="atlas_coords" type="Vector2i" /> <argument index="1" name="alternative_id_override" type="int" default="-1" /> <description> + Creates an alternative tile for the tile at coords [code]atlas_coords[/code]. If [code]alternative_id_override[/code] is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise. + Returns the new alternative identifier, or -1 if the alternative could not be created with a provided [code]alternative_id_override[/code]. </description> </method> <method name="create_tile"> @@ -32,84 +45,55 @@ <argument index="0" name="atlas_coords" type="Vector2i" /> <argument index="1" name="size" type="Vector2i" default="Vector2i(1, 1)" /> <description> - </description> - </method> - <method name="get_alternative_tile_id" qualifiers="const"> - <return type="int" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <argument index="1" name="index" type="int" /> - <description> - </description> - </method> - <method name="get_alternative_tiles_count" qualifiers="const"> - <return type="int" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <description> + Creates a new tile at coords [code]atlas_coords[/code] with size [code]size[/code]. </description> </method> <method name="get_atlas_grid_size" qualifiers="const"> <return type="Vector2i" /> <description> + Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the Texture's size, the atlas [code]margins[/code] the tiles' [code]texture_region_size[/code]. </description> </method> <method name="get_next_alternative_tile_id" qualifiers="const"> <return type="int" /> <argument index="0" name="atlas_coords" type="Vector2i" /> <description> + Returns the alternative ID a following call to [method create_alternative_tile] would return. </description> </method> <method name="get_tile_at_coords" qualifiers="const"> <return type="Vector2i" /> <argument index="0" name="atlas_coords" type="Vector2i" /> <description> + If there is a tile covering the [code]atlas_coords[/code] coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns [code]Vector2i(-1, -1)[/code] otherwise. </description> </method> <method name="get_tile_data" qualifiers="const"> <return type="Object" /> <argument index="0" name="atlas_coords" type="Vector2i" /> - <argument index="1" name="index" type="int" /> - <description> - </description> - </method> - <method name="get_tile_id" qualifiers="const"> - <return type="Vector2i" /> - <argument index="0" name="index" type="int" /> + <argument index="1" name="alternative_tile" type="int" /> <description> + Returns the [TileData] object for the given atlas coordinates and alternative ID. </description> </method> <method name="get_tile_size_in_atlas" qualifiers="const"> <return type="Vector2i" /> <argument index="0" name="atlas_coords" type="Vector2i" /> <description> + Returns the size of the tile (in the grid coordinates system) at coordinates [code]atlas_coords[/code]. </description> </method> <method name="get_tile_texture_region" qualifiers="const"> <return type="Rect2i" /> <argument index="0" name="atlas_coords" type="Vector2i" /> <description> - </description> - </method> - <method name="get_tiles_count" qualifiers="const"> - <return type="int" /> - <description> - </description> - </method> - <method name="has_alternative_tile" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <argument index="1" name="alternative_tile" type="int" /> - <description> - </description> - </method> - <method name="has_tile" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <description> + Returns a tile's texture region in the atlas texture. </description> </method> <method name="has_tiles_outside_texture"> <return type="bool" /> <description> + Returns if this atlas has tiles outside of its texture. </description> </method> <method name="move_tile_in_atlas"> @@ -118,6 +102,9 @@ <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" /> <description> + Move the tile and its alternatives at the [code]atlas_coords[/code] coordinates to the [code]new_atlas_coords[/code] coordinates with the [code]new_size[/code] size. This functions will fail if a tile is already present in the given area. + If [code]new_atlas_coords[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [code]new_size[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's size. + To avoid an error, first check if a move is possible using [method can_move_tile_in_atlas]. </description> </method> <method name="remove_alternative_tile"> @@ -125,12 +112,15 @@ <argument index="0" name="atlas_coords" type="Vector2i" /> <argument index="1" name="alternative_tile" type="int" /> <description> + Remove a tile's alternative with alternative ID [code]alternative_tile[/code]. + Calling this function with [code]alternative_tile[/code] equals to 0 will fail, as the base tile alternative cannot be removed. </description> </method> <method name="remove_tile"> <return type="void" /> <argument index="0" name="atlas_coords" type="Vector2i" /> <description> + Remove a tile and its alternative at coordinates [code]atlas_coords[/code]. </description> </method> <method name="set_alternative_tile_id"> @@ -139,19 +129,23 @@ <argument index="1" name="alternative_tile" type="int" /> <argument index="2" name="new_id" type="int" /> <description> + Change a tile's alternative ID from [code]alternative_tile[/code] to [code]new_id[/code]. + Calling this function with [code]alternative_id[/code] equals to 0 will fail, as the base tile alternative cannot be moved. </description> </method> </methods> <members> <member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i(0, 0)"> + Margins, in pixels, to offset the origin of the grid in the texture. </member> <member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i(0, 0)"> + Separation, in pixels, between each tile texture region of the grid. </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The atlas texture. </member> - <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)"> + <member name="texture_region_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)"> + The base tile size in the texture (in pixel). This size must be bigger than the TileSet's [code]tile_size[/code] value. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml index a44f519a4c..3451519ff6 100644 --- a/doc/classes/TileSetScenesCollectionSource.xml +++ b/doc/classes/TileSetScenesCollectionSource.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0"> <brief_description> + Exposes a set of scenes as tiles for a [TileSet] resource. </brief_description> <description> + When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instanciate an assiciated scene at the cell's position in the TileMap. + Scenes are instanciated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instanciate/free the scene accordingly. </description> <tutorials> </tutorials> @@ -12,83 +15,55 @@ <argument index="0" name="packed_scene" type="PackedScene" /> <argument index="1" name="id_override" type="int" default="-1" /> <description> - </description> - </method> - <method name="get_alternative_tile_id" qualifiers="const"> - <return type="int" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <argument index="1" name="index" type="int" /> - <description> - </description> - </method> - <method name="get_alternative_tiles_count" qualifiers="const"> - <return type="int" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <description> + Creates a scene-based tile out of the given scene. + Returns a newly generated unique ID. </description> </method> <method name="get_next_scene_tile_id" qualifiers="const"> <return type="int" /> <description> + Returns the scene ID a following call to [method create_scene_tile] would return. </description> </method> <method name="get_scene_tile_display_placeholder" qualifiers="const"> <return type="bool" /> <argument index="0" name="id" type="int" /> <description> + Returns whether the scene tile with id [code]id[/code] displays a placeholder in the editor. </description> </method> <method name="get_scene_tile_id"> <return type="int" /> <argument index="0" name="index" type="int" /> <description> + Returns the scene tile ID of the scene tile at index [code]index[/code]. </description> </method> <method name="get_scene_tile_scene" qualifiers="const"> <return type="PackedScene" /> <argument index="0" name="id" type="int" /> <description> + Returns the [PackedScene] resource of scene tile with id [code]id[/code]. </description> </method> <method name="get_scene_tiles_count"> <return type="int" /> <description> - </description> - </method> - <method name="get_tile_id" qualifiers="const"> - <return type="Vector2i" /> - <argument index="0" name="index" type="int" /> - <description> - </description> - </method> - <method name="get_tiles_count" qualifiers="const"> - <return type="int" /> - <description> - </description> - </method> - <method name="has_alternative_tile" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <argument index="1" name="alternative_tile" type="int" /> - <description> + Returns the number or scene tiles this TileSet source has. </description> </method> <method name="has_scene_tile_id"> <return type="bool" /> <argument index="0" name="id" type="int" /> <description> - </description> - </method> - <method name="has_tile" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="atlas_coords" type="Vector2i" /> - <description> + Returns whether this TileSet source has a scene tile with id [code]id[/code]. </description> </method> <method name="remove_scene_tile"> <return type="void" /> <argument index="0" name="id" type="int" /> <description> + Remove the scene tile with id [code]id[/code]. </description> </method> <method name="set_scene_tile_display_placeholder"> @@ -96,6 +71,7 @@ <argument index="0" name="id" type="int" /> <argument index="1" name="display_placeholder" type="bool" /> <description> + Sets whether or not the scene tile with id [code]id[/code] should display a placeholder in the editor. This might be useful for scenes that are not visible. </description> </method> <method name="set_scene_tile_id"> @@ -103,6 +79,7 @@ <argument index="0" name="id" type="int" /> <argument index="1" name="new_id" type="int" /> <description> + Changes a scene tile's ID from [code]id[/code] to [code]new_id[/code]. This will fail if there is already a tile with a ID equal to [code]new_id[/code]. </description> </method> <method name="set_scene_tile_scene"> @@ -110,9 +87,8 @@ <argument index="0" name="id" type="int" /> <argument index="1" name="packed_scene" type="PackedScene" /> <description> + Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positionning properties are needed to place the scene on the TileMap. </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml index 6a3029bb3f..ed47684f14 100644 --- a/doc/classes/TileSetSource.xml +++ b/doc/classes/TileSetSource.xml @@ -1,13 +1,62 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TileSetSource" inherits="Resource" version="4.0"> <brief_description> + Exposes a set of tiles for a [TileSet] resource. </brief_description> <description> + Exposes a set of tiles for a [TileSet] resource. + Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the [TileSetAtlasSource] class. + Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base [TileSetSource] class only exposes getters for them. + + You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using [method get_tiles_count] and [method get_tile_id], then over alternative IDs using [method get_alternative_tiles_count] and [method get_alternative_tile_id]. </description> <tutorials> </tutorials> <methods> + <method name="get_alternative_tile_id" qualifiers="const"> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="index" type="int" /> + <description> + Returns the alternative ID for the tile with coordinates ID [code]atlas_coords[/code] at index [code]index[/code]. + </description> + </method> + <method name="get_alternative_tiles_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <description> + Returns the number of alternatives tiles for the coordinates ID [code]atlas_coords[/code]. + For [TileSetAtlasSource], this always return at least 1, as the base tile with ID 0 is always part of the alternatives list. + Returns -1 if there is not tile at the given coords. + </description> + </method> + <method name="get_tile_id" qualifiers="const"> + <return type="Vector2i" /> + <argument index="0" name="index" type="int" /> + <description> + Returns the tile coordinates ID of the tile with index [code]index[/code]. + </description> + </method> + <method name="get_tiles_count" qualifiers="const"> + <return type="int" /> + <description> + Returns how many tiles this atlas source defines (not including alternative tiles). + </description> + </method> + <method name="has_alternative_tile" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="alternative_tile" type="int" /> + <description> + Returns if the base tile at coordinates [code]atlas_coords[/code] has an alternative with ID [code]alternative_tile[/code]. + </description> + </method> + <method name="has_tile" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <description> + Returns if this atlas has a tile with coordinates ID [code]atlas_coordinates[/code]. + </description> + </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 948585aecb..4fd788467d 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -37,6 +37,16 @@ </method> <method name="Transform2D" qualifiers="constructor"> <return type="Transform2D" /> + <argument index="0" name="rotation" type="float" /> + <argument index="1" name="scale" type="Vector2" /> + <argument index="2" name="skew" type="float" /> + <argument index="3" name="position" type="Vector2" /> + <description> + Constructs the transform from a given angle (in radians), scale, skew (in radians) and position. + </description> + </method> + <method name="Transform2D" qualifiers="constructor"> + <return type="Transform2D" /> <argument index="0" name="x_axis" type="Vector2" /> <argument index="1" name="y_axis" type="Vector2" /> <argument index="2" name="origin" type="Vector2" /> @@ -84,6 +94,12 @@ Returns the scale. </description> </method> + <method name="get_skew" qualifiers="const"> + <return type="float" /> + <description> + Returns the transform's skew (in radians). + </description> + </method> <method name="interpolate_with" qualifiers="const"> <return type="Transform2D" /> <argument index="0" name="xform" type="Transform2D" /> @@ -115,19 +131,18 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> - <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> - <method name="operator *" qualifiers="operator"> - <return type="Vector2" /> - <argument index="0" name="right" type="Vector2" /> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> + <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Rect2" /> - <argument index="0" name="right" type="Rect2" /> + <return type="PackedVector2Array" /> + <argument index="0" name="right" type="PackedVector2Array" /> <description> </description> </method> @@ -138,8 +153,14 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="PackedVector2Array" /> - <argument index="0" name="right" type="PackedVector2Array" /> + <return type="Rect2" /> + <argument index="0" name="right" type="Rect2" /> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> @@ -159,6 +180,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Transform2D" /> <description> </description> @@ -196,6 +222,20 @@ Sets the transform's rotation (in radians). </description> </method> + <method name="set_scale"> + <return type="void" /> + <argument index="0" name="scale" type="Vector2" /> + <description> + Sets the transform's scale. + </description> + </method> + <method name="set_skew"> + <return type="void" /> + <argument index="0" name="skew" type="float" /> + <description> + Sets the transform's skew (in radians). + </description> + </method> <method name="translated" qualifiers="const"> <return type="Transform2D" /> <argument index="0" name="offset" type="Vector2" /> diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 1c906f6a51..337e7d2693 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -85,6 +85,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Transform3D" /> <description> </description> @@ -129,6 +134,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Transform3D" /> <description> </description> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index 4b83a2abf5..c27d6f5667 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -76,6 +76,4 @@ The locale of the translation. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 029848be33..8a6fa3571a 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -27,13 +27,14 @@ <method name="get_loaded_locales" qualifiers="const"> <return type="Array" /> <description> - Returns an Array of all loaded locales of the game. + Returns an array of all loaded locales of the project. </description> </method> <method name="get_locale" qualifiers="const"> <return type="String" /> <description> - Returns the current locale of the game. + Returns the current locale of the project. + See also [method OS.get_locale] and [method OS.get_locale_language] to query the locale of the user system. </description> </method> <method name="get_locale_name" qualifiers="const"> @@ -75,7 +76,8 @@ <return type="void" /> <argument index="0" name="locale" type="String" /> <description> - Sets the locale of the game. + Sets the locale of the project. The [code]locale[/code] string will be standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]). + If translations have been loaded beforehand for the new locale, they will be applied. </description> </method> <method name="translate" qualifiers="const"> @@ -103,6 +105,4 @@ If [code]true[/code], enables the use of pseudolocalization. See [member ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization] for details. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 406c074758..b997d87ac0 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -140,6 +140,14 @@ <return type="Font" /> <argument index="0" name="column" type="int" /> <description> + Returns custom font used to draw text in the column [code]column[/code]. + </description> + </method> + <method name="get_custom_font_size" qualifiers="const"> + <return type="int" /> + <argument index="0" name="column" type="int" /> + <description> + Returns custom font size used to draw text in the column [code]column[/code]. </description> </method> <method name="get_expand_right" qualifiers="const"> @@ -464,6 +472,15 @@ <argument index="0" name="column" type="int" /> <argument index="1" name="font" type="Font" /> <description> + Sets custom font used to draw text in the column [code]column[/code]. + </description> + </method> + <method name="set_custom_font_size"> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="font_size" type="int" /> + <description> + Sets custom font size used to draw text in the column [code]column[/code]. </description> </method> <method name="set_editable"> diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml index cfdb6fe33e..f615f7965f 100644 --- a/doc/classes/TriangleMesh.xml +++ b/doc/classes/TriangleMesh.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml index 2782791a62..2c84a79557 100644 --- a/doc/classes/TubeTrailMesh.xml +++ b/doc/classes/TubeTrailMesh.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> </member> @@ -22,6 +20,4 @@ <member name="sections" type="int" setter="set_sections" getter="get_sections" default="5"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 372a6e7ebf..ede6e2fdd5 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -58,8 +58,8 @@ [codeblock] var tween = create_tween().set_parallel(true) tween.tween_property(...) - tween.tween_property(...) #will run parallelly with above - tween.chain().tween_property(...) #will run after two above are finished + tween.tween_property(...) # Will run parallelly with above. + tween.chain().tween_property(...) # Will run after two above are finished. [/codeblock] </description> </method> @@ -215,11 +215,9 @@ Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds. Example: creating an interval in code execution. [codeblock] - #... some code - var tween = create_tween() - tween.tween_interval(2) - await tween.finished - #... more code + # ... some code + await create_tween().tween_interval(2).finished + # ... more code [/codeblock] Example: creating an object that moves back and forth and jumps every few seconds. [codeblock] @@ -236,15 +234,15 @@ <method name="tween_method"> <return type="MethodTweener" /> <argument index="0" name="method" type="Callable" /> - <argument index="1" name="from" type="float" /> - <argument index="2" name="to" type="float" /> + <argument index="1" name="from" type="Variant" /> + <argument index="2" name="to" type="Variant" /> <argument index="3" name="duration" type="float" /> <description> Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening. Example: making a 3D object look from one point to another point. [codeblock] var tween = create_tween() - tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) #the look_at() method takes up vector as second argument + tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) # The look_at() method takes up vector as second argument. [/codeblock] Example: setting a text of a [Label], using an intermediate method and after a delay. [codeblock] diff --git a/doc/classes/Tweener.xml b/doc/classes/Tweener.xml index a3279502e0..ad599c4d02 100644 --- a/doc/classes/Tweener.xml +++ b/doc/classes/Tweener.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <signals> <signal name="finished"> <description> @@ -17,6 +15,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml index eb6d42fb0f..66f752b97a 100644 --- a/doc/classes/UDPServer.xml +++ b/doc/classes/UDPServer.xml @@ -173,6 +173,4 @@ Define the maximum number of pending connections, during [method poll], any new pending connection exceeding that value will be automatically dropped. Setting this value to [code]0[/code] effectively prevents any new pending connection to be accepted (e.g. when all your players have connected). </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml index aa6c5fc8a4..b62fb4707e 100644 --- a/doc/classes/VBoxContainer.xml +++ b/doc/classes/VBoxContainer.xml @@ -9,10 +9,6 @@ <tutorials> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="separation" data_type="constant" type="int" default="4"> The vertical space between the [VBoxContainer]'s elements. diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index 98a0aea0c7..0cf06576f6 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -8,14 +8,10 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" /> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" /> </members> - <constants> - </constants> <theme_items> <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property. @@ -23,6 +19,9 @@ <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> + <theme_item name="decrement_pressed" data_type="icon" type="Texture2D"> + Displayed when the decrement button is being pressed. + </theme_item> <theme_item name="grabber" data_type="style" type="StyleBox"> Used as texture for the grabber, the draggable element representing current scroll. </theme_item> @@ -38,6 +37,9 @@ <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> + <theme_item name="increment_pressed" data_type="icon" type="Texture2D"> + Displayed when the increment button is being pressed. + </theme_item> <theme_item name="scroll" data_type="style" type="StyleBox"> Used as background of this [ScrollBar]. </theme_item> diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml index d59c7229ac..d9299bfe92 100644 --- a/doc/classes/VSeparator.xml +++ b/doc/classes/VSeparator.xml @@ -8,10 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="separation" data_type="constant" type="int" default="4"> The width of the area covered by the separator. Effectively works like a minimum width. diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index becf3d1052..286674a9b4 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -9,14 +9,10 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" /> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" /> </members> - <constants> - </constants> <theme_items> <theme_item name="grabber" data_type="icon" type="Texture2D"> The texture for the grabber (the draggable element). diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 143f5b6b0a..323ce1fe80 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -8,10 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> <theme_items> <theme_item name="autohide" data_type="constant" type="int" default="1"> Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index 240c1c909f..88644e2f8a 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -74,8 +74,4 @@ <tutorials> <link title="Variant class">https://docs.godotengine.org/en/latest/development/cpp/variant_class.html</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index cb5662419e..b61d5bea0e 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -56,6 +56,7 @@ <description> Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians. For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees). + [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle.png]Illustration of the returned angle.[/url] Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code]. </description> </method> @@ -64,6 +65,7 @@ <argument index="0" name="to" type="Vector2" /> <description> Returns the angle to the given vector, in radians. + [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to.png]Illustration of the returned angle.[/url] </description> </method> <method name="angle_to_point" qualifiers="const"> @@ -71,6 +73,7 @@ <argument index="0" name="to" type="Vector2" /> <description> Returns the angle between the line connecting the two points and the X axis, in radians. + [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url] </description> </method> <method name="aspect" qualifiers="const"> @@ -155,6 +158,18 @@ Returns the vector with all components rounded down (towards negative infinity). </description> </method> + <method name="from_angle" qualifiers="static"> + <return type="Vector2" /> + <argument index="0" name="angle" type="float" /> + <description> + Creates a unit [Vector2] rotated to the given [code]angle[/code] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code]. + [codeblock] + print(Vector2.from_angle(0)) # Prints (1, 0). + print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above. + print(Vector2.from_angle(PI / 2)) # Prints (0, 1). + [/codeblock] + </description> + </method> <method name="is_equal_approx" qualifiers="const"> <return type="bool" /> <argument index="0" name="to" type="Vector2" /> @@ -212,6 +227,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector2" /> <description> </description> @@ -284,6 +304,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector2" /> <description> </description> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 212b1fd22b..2e69d6efdf 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -64,6 +64,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector2i" /> <description> </description> @@ -142,6 +147,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector2i" /> <description> </description> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 78251b0342..9f2ea7b2a0 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -210,6 +210,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector3" /> <description> </description> @@ -294,6 +299,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector3" /> <description> </description> @@ -412,13 +422,6 @@ Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals. </description> </method> - <method name="to_diagonal_matrix" qualifiers="const"> - <return type="Basis" /> - <description> - Returns a diagonal matrix with the vector as main diagonal. - This is equivalent to a Basis with no rotation or shearing and this vector's components set as the scale. - </description> - </method> </methods> <members> <member name="x" type="float" setter="" getter="" default="0.0"> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 75df182025..bc3712ba3e 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -70,6 +70,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector3i" /> <description> </description> @@ -148,6 +153,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="Vector3i" /> <description> </description> diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml index 90d0591949..9315f6e6ad 100644 --- a/doc/classes/VehicleBody3D.xml +++ b/doc/classes/VehicleBody3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VehicleBody3D" inherits="RigidBody3D" version="4.0"> +<class name="VehicleBody3D" inherits="RigidDynamicBody3D" version="4.0"> <brief_description> Physics body that simulates the behavior of a car. </brief_description> @@ -11,14 +11,12 @@ <tutorials> <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link> </tutorials> - <methods> - </methods> <members> <member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0"> - Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. + Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. </member> <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0"> - Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the vehicle reversing. </member> @@ -27,6 +25,4 @@ The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml index 35f1189a06..951f4f8275 100644 --- a/doc/classes/VehicleWheel3D.xml +++ b/doc/classes/VehicleWheel3D.xml @@ -32,7 +32,7 @@ </methods> <members> <member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0"> - Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. + Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. </member> <member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" default="0.83"> The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. @@ -41,7 +41,7 @@ The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5. </member> <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0"> - Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the wheel reversing. </member> @@ -49,7 +49,7 @@ The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving. </member> <member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force" default="6000.0"> - The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. + The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidDynamicBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. </member> <member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness" default="5.88"> This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. @@ -77,6 +77,4 @@ This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml index 7e97cad5bf..5d8dcc6742 100644 --- a/doc/classes/VelocityTracker3D.xml +++ b/doc/classes/VelocityTracker3D.xml @@ -29,6 +29,4 @@ <member name="track_physics_step" type="bool" setter="set_track_physics_step" getter="is_tracking_physics_step" default="false"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 86b2dd102b..4f60b9d567 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -85,6 +85,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml index 7f522bfdf0..39fefa8d95 100644 --- a/doc/classes/VideoStream.xml +++ b/doc/classes/VideoStream.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 4a62d3ec7b..06a7177bfc 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -113,26 +113,34 @@ Returns [code]true[/code] if the viewport is currently performing a drag operation. </description> </method> - <method name="input"> + <method name="is_embedding_subwindows" qualifiers="const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="is_input_handled" qualifiers="const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="push_input"> <return type="void" /> <argument index="0" name="event" type="InputEvent" /> <argument index="1" name="in_local_coords" type="bool" default="false" /> <description> </description> </method> - <method name="input_text"> + <method name="push_text_input"> <return type="void" /> <argument index="0" name="text" type="String" /> <description> + Returns [code]true[/code] if the viewport is currently embedding windows. </description> </method> - <method name="is_embedding_subwindows" qualifiers="const"> - <return type="bool" /> - <description> - </description> - </method> - <method name="is_input_handled" qualifiers="const"> - <return type="bool" /> + <method name="push_unhandled_input"> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> + <argument index="1" name="in_local_coords" type="bool" default="false" /> <description> </description> </method> @@ -150,13 +158,6 @@ Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible. </description> </method> - <method name="unhandled_input"> - <return type="void" /> - <argument index="0" name="event" type="InputEvent" /> - <argument index="1" name="in_local_coords" type="bool" default="false" /> - <description> - </description> - </method> <method name="warp_mouse"> <return type="void" /> <argument index="0" name="to_position" type="Vector2" /> @@ -211,6 +212,9 @@ <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false"> If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. </member> + <member name="scale_3d" type="int" setter="set_scale_3d" getter="get_scale_3d" enum="Viewport.Scale3D" default="0"> + The scale at which 3D content is rendered. + </member> <member name="screen_space_aa" type="int" setter="set_screen_space_aa" getter="get_screen_space_aa" enum="Viewport.ScreenSpaceAA" default="0"> Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. </member> @@ -271,6 +275,16 @@ </signal> </signals> <constants> + <constant name="SCALE_3D_DISABLED" value="0" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_75_PERCENT" value="1" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_50_PERCENT" value="2" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_33_PERCENT" value="3" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_25_PERCENT" value="4" enum="Scale3D"> + </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv"> This quadrant will not be used. </constant> @@ -307,10 +321,7 @@ <constant name="MSAA_8X" value="3" enum="MSAA"> Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware. </constant> - <constant name="MSAA_16X" value="4" enum="MSAA"> - Use 16× Multisample Antialiasing. This has a very high performance cost. The difference between 8× and 16× MSAA may not always be visible in real gameplay conditions. Likely unsupported on medium and low-end hardware. - </constant> - <constant name="MSAA_MAX" value="5" enum="MSAA"> + <constant name="MSAA_MAX" value="4" enum="MSAA"> Represents the size of the [enum MSAA] enum. </constant> <constant name="SCREEN_SPACE_AA_DISABLED" value="0" enum="ScreenSpaceAA"> diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml index 393f1bb0b8..c0cf3b3c7b 100644 --- a/doc/classes/ViewportTexture.xml +++ b/doc/classes/ViewportTexture.xml @@ -13,14 +13,10 @@ <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link> <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link> </tutorials> - <methods> - </methods> <members> <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" /> <member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene" default="NodePath("")"> The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml index c6ae8227d2..523a3a2578 100644 --- a/doc/classes/VisibleOnScreenEnabler2D.xml +++ b/doc/classes/VisibleOnScreenEnabler2D.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0"> </member> diff --git a/doc/classes/VisibleOnScreenEnabler3D.xml b/doc/classes/VisibleOnScreenEnabler3D.xml index 3205d6b415..2000d54d74 100644 --- a/doc/classes/VisibleOnScreenEnabler3D.xml +++ b/doc/classes/VisibleOnScreenEnabler3D.xml @@ -4,15 +4,13 @@ Enables certain nodes only when approximately visible. </brief_description> <description> - The VisibleOnScreenEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself. + The VisibleOnScreenEnabler3D will disable [RigidDynamicBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself. If you just want to receive notifications, use [VisibleOnScreenNotifier3D] instead. [b]Note:[/b] VisibleOnScreenEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. [b]Note:[/b] VisibleOnScreenEnabler3D will not affect nodes added after scene initialization. </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler3D.EnableMode" default="0"> </member> diff --git a/doc/classes/VisibleOnScreenNotifier2D.xml b/doc/classes/VisibleOnScreenNotifier2D.xml index 995bd9e9d7..d82e64fa91 100644 --- a/doc/classes/VisibleOnScreenNotifier2D.xml +++ b/doc/classes/VisibleOnScreenNotifier2D.xml @@ -36,6 +36,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/VisibleOnScreenNotifier3D.xml b/doc/classes/VisibleOnScreenNotifier3D.xml index 03db449c80..328db15231 100644 --- a/doc/classes/VisibleOnScreenNotifier3D.xml +++ b/doc/classes/VisibleOnScreenNotifier3D.xml @@ -36,6 +36,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index f949fbe7c0..bbcf2f4730 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -63,6 +63,4 @@ This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualScriptCustomNodes.xml b/doc/classes/VisualScriptCustomNodes.xml new file mode 100644 index 0000000000..1681da7653 --- /dev/null +++ b/doc/classes/VisualScriptCustomNodes.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualScriptCustomNodes" inherits="Object" version="4.0"> + <brief_description> + Manages custom nodes for the Visual Script editor. + </brief_description> + <description> + This singleton can be used to manage (i.e., add or remove) custom nodes for the Visual Script editor. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_custom_node"> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="category" type="String" /> + <argument index="2" name="script" type="Script" /> + <description> + Add a custom Visual Script node to the editor. It'll be placed under "Custom Nodes" with the [code]category[/code] as the parameter. + </description> + </method> + <method name="remove_custom_node"> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="category" type="String" /> + <description> + Remove a custom Visual Script node from the editor. Custom nodes already placed on scripts won't be removed. + </description> + </method> + </methods> + <signals> + <signal name="custom_nodes_updated"> + <description> + Emitted when a custom Visual Script node is added or removed. + </description> + </signal> + </signals> +</class> diff --git a/doc/classes/VisualShaderNodeBillboard.xml b/doc/classes/VisualShaderNodeBillboard.xml index 53bcfa7b5c..77069975ef 100644 --- a/doc/classes/VisualShaderNodeBillboard.xml +++ b/doc/classes/VisualShaderNodeBillboard.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="billboard_type" type="int" setter="set_billboard_type" getter="get_billboard_type" enum="VisualShaderNodeBillboard.BillboardType" default="1"> Controls how the object faces the camera. See [enum BillboardType]. diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml index 688679f2a3..73a423b93a 100644 --- a/doc/classes/VisualShaderNodeBooleanConstant.xml +++ b/doc/classes/VisualShaderNodeBooleanConstant.xml @@ -9,13 +9,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant" type="bool" setter="set_constant" getter="get_constant" default="false"> A boolean constant which represents a state of this node. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeBooleanUniform.xml b/doc/classes/VisualShaderNodeBooleanUniform.xml index 7d72f13f9d..86f61dde83 100644 --- a/doc/classes/VisualShaderNodeBooleanUniform.xml +++ b/doc/classes/VisualShaderNodeBooleanUniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="default_value" type="bool" setter="set_default_value" getter="get_default_value" default="false"> A default value to be assigned within the shader. @@ -18,6 +16,4 @@ Enables usage of the [member default_value]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml index 504171bb13..a68cbbec49 100644 --- a/doc/classes/VisualShaderNodeClamp.xml +++ b/doc/classes/VisualShaderNodeClamp.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeClamp.OpType" default="0"> A type of operands and returned value. diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml index fa1a11c488..d9f5167bd6 100644 --- a/doc/classes/VisualShaderNodeColorConstant.xml +++ b/doc/classes/VisualShaderNodeColorConstant.xml @@ -9,13 +9,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color(1, 1, 1, 1)"> A [Color] constant which represents a state of this node. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index 8d410104b8..0d7698f755 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeColorFunc.Function" default="0"> A function to be applied to the input color. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml index 55b006b098..378897d3cc 100644 --- a/doc/classes/VisualShaderNodeColorOp.xml +++ b/doc/classes/VisualShaderNodeColorOp.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeColorOp.Operator" default="0"> An operator to be applied to the inputs. See [enum Operator] for options. diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml index bdaf301f09..9c126fe700 100644 --- a/doc/classes/VisualShaderNodeColorUniform.xml +++ b/doc/classes/VisualShaderNodeColorUniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="default_value" type="Color" setter="set_default_value" getter="get_default_value" default="Color(1, 1, 1, 1)"> A default value to be assigned within the shader. @@ -18,6 +16,4 @@ Enables usage of the [member default_value]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeComment.xml b/doc/classes/VisualShaderNodeComment.xml index 8970e2fabb..daffd24f93 100644 --- a/doc/classes/VisualShaderNodeComment.xml +++ b/doc/classes/VisualShaderNodeComment.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="description" type="String" setter="set_description" getter="get_description" default=""""> An additional description which placed below the title. @@ -18,6 +16,4 @@ A title of the node. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index 96bb3df494..49bf952b31 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="condition" type="int" setter="set_condition" getter="get_condition" enum="VisualShaderNodeCompare.Condition" default="0"> Extra condition which is applied if [member type] is set to [constant CTYPE_VECTOR]. diff --git a/doc/classes/VisualShaderNodeConstant.xml b/doc/classes/VisualShaderNodeConstant.xml index 8c61529dd1..d5f63be691 100644 --- a/doc/classes/VisualShaderNodeConstant.xml +++ b/doc/classes/VisualShaderNodeConstant.xml @@ -7,8 +7,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeCubemap.xml b/doc/classes/VisualShaderNodeCubemap.xml index 4a5f58261d..23d98ee4be 100644 --- a/doc/classes/VisualShaderNodeCubemap.xml +++ b/doc/classes/VisualShaderNodeCubemap.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="cube_map" type="Cubemap" setter="set_cube_map" getter="get_cube_map"> The [Cubemap] texture to sample when using [constant SOURCE_TEXTURE] as [member source]. diff --git a/doc/classes/VisualShaderNodeCubemapUniform.xml b/doc/classes/VisualShaderNodeCubemapUniform.xml index d4bcdc9006..bfc62469a8 100644 --- a/doc/classes/VisualShaderNodeCubemapUniform.xml +++ b/doc/classes/VisualShaderNodeCubemapUniform.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeCurveTexture.xml b/doc/classes/VisualShaderNodeCurveTexture.xml index 4839ceab92..b039da1671 100644 --- a/doc/classes/VisualShaderNodeCurveTexture.xml +++ b/doc/classes/VisualShaderNodeCurveTexture.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="texture" type="CurveTexture" setter="set_texture" getter="get_texture"> The source texture. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeCurveXYZTexture.xml b/doc/classes/VisualShaderNodeCurveXYZTexture.xml index 11cdc541bb..48ff6ba800 100644 --- a/doc/classes/VisualShaderNodeCurveXYZTexture.xml +++ b/doc/classes/VisualShaderNodeCurveXYZTexture.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="texture" type="CurveXYZTexture" setter="set_texture" getter="get_texture"> The source texture. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index f6dbd2ad43..b87b59c3e4 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -16,17 +16,17 @@ <link title="Visual Shader plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link> </tutorials> <methods> - <method name="_get_category" qualifiers="virtual"> + <method name="_get_category" qualifiers="virtual const"> <return type="String" /> <description> Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like [code]"MyGame/MyFunctions/Noise"[/code]. Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category. </description> </method> - <method name="_get_code" qualifiers="virtual"> + <method name="_get_code" qualifiers="virtual const"> <return type="String" /> - <argument index="0" name="input_vars" type="Array" /> - <argument index="1" name="output_vars" type="Array" /> + <argument index="0" name="input_vars" type="PackedStringArray" /> + <argument index="1" name="output_vars" type="String[]" /> <argument index="2" name="mode" type="int" /> <argument index="3" name="type" type="int" /> <description> @@ -37,14 +37,14 @@ Defining this method is [b]required[/b]. </description> </method> - <method name="_get_description" qualifiers="virtual"> + <method name="_get_description" qualifiers="virtual const"> <return type="String" /> <description> Override this method to define the description of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. </description> </method> - <method name="_get_global_code" qualifiers="virtual"> + <method name="_get_global_code" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="mode" type="int" /> <description> @@ -54,22 +54,22 @@ Defining this method is [b]optional[/b]. </description> </method> - <method name="_get_input_port_count" qualifiers="virtual"> + <method name="_get_input_port_count" qualifiers="virtual const"> <return type="int" /> <description> Override this method to define the amount of input ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no input ports. </description> </method> - <method name="_get_input_port_name" qualifiers="virtual"> - <return type="StringName" /> + <method name="_get_input_port_name" qualifiers="virtual const"> + <return type="String" /> <argument index="0" name="port" type="int" /> <description> Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the [code]input_vars[/code] array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, input ports are named as [code]"in" + str(port)[/code]. </description> </method> - <method name="_get_input_port_type" qualifiers="virtual"> + <method name="_get_input_port_type" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="port" type="int" /> <description> @@ -77,29 +77,29 @@ Defining this method is [b]optional[/b], but recommended. If not overridden, input ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type. </description> </method> - <method name="_get_name" qualifiers="virtual"> + <method name="_get_name" qualifiers="virtual const"> <return type="String" /> <description> Override this method to define the name of the associated custom node in the Visual Shader Editor's members dialog and graph. Defining this method is [b]optional[/b], but recommended. If not overridden, the node will be named as "Unnamed". </description> </method> - <method name="_get_output_port_count" qualifiers="virtual"> + <method name="_get_output_port_count" qualifiers="virtual const"> <return type="int" /> <description> Override this method to define the amount of output ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no output ports. </description> </method> - <method name="_get_output_port_name" qualifiers="virtual"> - <return type="StringName" /> + <method name="_get_output_port_name" qualifiers="virtual const"> + <return type="String" /> <argument index="0" name="port" type="int" /> <description> Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the [code]output_vars[/code] array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, output ports are named as [code]"out" + str(port)[/code]. </description> </method> - <method name="_get_output_port_type" qualifiers="virtual"> + <method name="_get_output_port_type" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="port" type="int" /> <description> @@ -107,14 +107,14 @@ Defining this method is [b]optional[/b], but recommended. If not overridden, output ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type. </description> </method> - <method name="_get_return_icon_type" qualifiers="virtual"> + <method name="_get_return_icon_type" qualifiers="virtual const"> <return type="int" /> <description> Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. If not overridden, no return icon is shown. </description> </method> - <method name="_is_highend" qualifiers="virtual"> + <method name="_is_highend" qualifiers="virtual const"> <return type="bool" /> <description> Override this method to enable high-end mark in the Visual Shader Editor's members dialog. @@ -122,6 +122,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml index 06b05addfa..47afbbb11c 100644 --- a/doc/classes/VisualShaderNodeDeterminant.xml +++ b/doc/classes/VisualShaderNodeDeterminant.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeDotProduct.xml b/doc/classes/VisualShaderNodeDotProduct.xml index 51166ab58f..49c26735c8 100644 --- a/doc/classes/VisualShaderNodeDotProduct.xml +++ b/doc/classes/VisualShaderNodeDotProduct.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml index c2cbf41f45..4fde6d3aaf 100644 --- a/doc/classes/VisualShaderNodeExpression.xml +++ b/doc/classes/VisualShaderNodeExpression.xml @@ -9,13 +9,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="expression" type="String" setter="set_expression" getter="get_expression" default=""""> An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), and thus cannot be used to declare functions, varyings, uniforms, or global constants. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeFaceForward.xml b/doc/classes/VisualShaderNodeFaceForward.xml index 48f84e5495..80cb8aea4e 100644 --- a/doc/classes/VisualShaderNodeFaceForward.xml +++ b/doc/classes/VisualShaderNodeFaceForward.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeFloatConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml index a71563af54..581155b013 100644 --- a/doc/classes/VisualShaderNodeFloatConstant.xml +++ b/doc/classes/VisualShaderNodeFloatConstant.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0"> A floating-point constant which represents a state of this node. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml index ff499d25a6..884954e85e 100644 --- a/doc/classes/VisualShaderNodeFloatFunc.xml +++ b/doc/classes/VisualShaderNodeFloatFunc.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13"> A function to be applied to the scalar. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml index ba000f258b..3b16363f70 100644 --- a/doc/classes/VisualShaderNodeFloatOp.xml +++ b/doc/classes/VisualShaderNodeFloatOp.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0"> An operator to be applied to the inputs. See [enum Operator] for options. diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml index fcfd78dbea..244b8c9830 100644 --- a/doc/classes/VisualShaderNodeFloatUniform.xml +++ b/doc/classes/VisualShaderNodeFloatUniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="default_value" type="float" setter="set_default_value" getter="get_default_value" default="0.0"> A default value to be assigned within the shader. diff --git a/doc/classes/VisualShaderNodeFresnel.xml b/doc/classes/VisualShaderNodeFresnel.xml index c396b4574c..1e4479f841 100644 --- a/doc/classes/VisualShaderNodeFresnel.xml +++ b/doc/classes/VisualShaderNodeFresnel.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeGlobalExpression.xml b/doc/classes/VisualShaderNodeGlobalExpression.xml index 8023ba1890..0d95824158 100644 --- a/doc/classes/VisualShaderNodeGlobalExpression.xml +++ b/doc/classes/VisualShaderNodeGlobalExpression.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml index a692d47638..cbe4dc2ae6 100644 --- a/doc/classes/VisualShaderNodeGroupBase.xml +++ b/doc/classes/VisualShaderNodeGroupBase.xml @@ -157,6 +157,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml index 418999863b..75fd797a06 100644 --- a/doc/classes/VisualShaderNodeIf.xml +++ b/doc/classes/VisualShaderNodeIf.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index dd62d668eb..68f64ad98e 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -29,6 +29,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml index 18d6e96ab5..e4a8a4447f 100644 --- a/doc/classes/VisualShaderNodeIntConstant.xml +++ b/doc/classes/VisualShaderNodeIntConstant.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0"> An integer constant which represents a state of this node. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml index 358a3f3512..d2782efa96 100644 --- a/doc/classes/VisualShaderNodeIntFunc.xml +++ b/doc/classes/VisualShaderNodeIntFunc.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="2"> A function to be applied to the scalar. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml index 2d55cdaf78..e5fcafca81 100644 --- a/doc/classes/VisualShaderNodeIntOp.xml +++ b/doc/classes/VisualShaderNodeIntOp.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0"> An operator to be applied to the inputs. See [enum Operator] for options. diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml index 4070553884..36a3fbd4c1 100644 --- a/doc/classes/VisualShaderNodeIntUniform.xml +++ b/doc/classes/VisualShaderNodeIntUniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="0"> A default value to be assigned within the shader. diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml index f46267677e..1f52e25d50 100644 --- a/doc/classes/VisualShaderNodeIs.xml +++ b/doc/classes/VisualShaderNodeIs.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIs.Function" default="0"> The comparison function. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeMix.xml b/doc/classes/VisualShaderNodeMix.xml index c70ac7e599..1ef580a983 100644 --- a/doc/classes/VisualShaderNodeMix.xml +++ b/doc/classes/VisualShaderNodeMix.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMix.OpType" default="0"> A type of operands and returned value. diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml index daa9e02753..a0e9aef703 100644 --- a/doc/classes/VisualShaderNodeMultiplyAdd.xml +++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMultiplyAdd.OpType" default="0"> A type of operands and returned value. diff --git a/doc/classes/VisualShaderNodeOuterProduct.xml b/doc/classes/VisualShaderNodeOuterProduct.xml index ba6822bfce..adc32aff10 100644 --- a/doc/classes/VisualShaderNodeOuterProduct.xml +++ b/doc/classes/VisualShaderNodeOuterProduct.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml index 83da6f29f9..8193ed6167 100644 --- a/doc/classes/VisualShaderNodeOutput.xml +++ b/doc/classes/VisualShaderNodeOutput.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml index 2f3f58c0cf..da8c505719 100644 --- a/doc/classes/VisualShaderNodeParticleAccelerator.xml +++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="VisualShaderNodeParticleAccelerator.Mode" default="0"> </member> diff --git a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml index af33b285d2..acfd8e5572 100644 --- a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleConeVelocity.xml b/doc/classes/VisualShaderNodeParticleConeVelocity.xml index 7a40c2a7d0..4755b19046 100644 --- a/doc/classes/VisualShaderNodeParticleConeVelocity.xml +++ b/doc/classes/VisualShaderNodeParticleConeVelocity.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleEmit.xml b/doc/classes/VisualShaderNodeParticleEmit.xml index 120b12d643..d6e4c384aa 100644 --- a/doc/classes/VisualShaderNodeParticleEmit.xml +++ b/doc/classes/VisualShaderNodeParticleEmit.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="flags" type="int" setter="set_flags" getter="get_flags" enum="VisualShaderNodeParticleEmit.EmitFlags" default="31"> </member> diff --git a/doc/classes/VisualShaderNodeParticleEmitter.xml b/doc/classes/VisualShaderNodeParticleEmitter.xml index 3a25fc1c7f..03ceb3adea 100644 --- a/doc/classes/VisualShaderNodeParticleEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleEmitter.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml index 89a53699c9..5cd3d8f0b8 100644 --- a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml +++ b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml @@ -6,12 +6,8 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="degrees_mode" type="bool" setter="set_degrees_mode" getter="is_degrees_mode" default="true"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleOutput.xml b/doc/classes/VisualShaderNodeParticleOutput.xml index c8fc66f2ff..24eb6bf825 100644 --- a/doc/classes/VisualShaderNodeParticleOutput.xml +++ b/doc/classes/VisualShaderNodeParticleOutput.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml index 75736992ee..2dec41105c 100644 --- a/doc/classes/VisualShaderNodeParticleRandomness.xml +++ b/doc/classes/VisualShaderNodeParticleRandomness.xml @@ -6,8 +6,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeParticleRandomness.OpType" default="0"> </member> diff --git a/doc/classes/VisualShaderNodeParticleRingEmitter.xml b/doc/classes/VisualShaderNodeParticleRingEmitter.xml index ee3fbe7faf..9aabf1ed27 100644 --- a/doc/classes/VisualShaderNodeParticleRingEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleRingEmitter.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml index d43ac518cf..e2db81ff17 100644 --- a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeResizableBase.xml b/doc/classes/VisualShaderNodeResizableBase.xml index f42289a10e..ef734ef857 100644 --- a/doc/classes/VisualShaderNodeResizableBase.xml +++ b/doc/classes/VisualShaderNodeResizableBase.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(0, 0)"> The size of the node in the visual shader graph. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeSDFRaymarch.xml b/doc/classes/VisualShaderNodeSDFRaymarch.xml index 775f2814c2..64a3e5a310 100644 --- a/doc/classes/VisualShaderNodeSDFRaymarch.xml +++ b/doc/classes/VisualShaderNodeSDFRaymarch.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeSDFToScreenUV.xml b/doc/classes/VisualShaderNodeSDFToScreenUV.xml index 40fb66e364..07e267b990 100644 --- a/doc/classes/VisualShaderNodeSDFToScreenUV.xml +++ b/doc/classes/VisualShaderNodeSDFToScreenUV.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeSample3D.xml b/doc/classes/VisualShaderNodeSample3D.xml index 82bcac5f69..85d2367eac 100644 --- a/doc/classes/VisualShaderNodeSample3D.xml +++ b/doc/classes/VisualShaderNodeSample3D.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeSample3D.Source" default="0"> An input source type. diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml index 305586ac49..8d108a5d28 100644 --- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarDerivativeFunc.Function" default="0"> The derivative type. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeScreenUVToSDF.xml b/doc/classes/VisualShaderNodeScreenUVToSDF.xml index 2e121ffc54..8f1f4f486c 100644 --- a/doc/classes/VisualShaderNodeScreenUVToSDF.xml +++ b/doc/classes/VisualShaderNodeScreenUVToSDF.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeSmoothStep.xml b/doc/classes/VisualShaderNodeSmoothStep.xml index 0ed53a8c26..2f8c7e0f33 100644 --- a/doc/classes/VisualShaderNodeSmoothStep.xml +++ b/doc/classes/VisualShaderNodeSmoothStep.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSmoothStep.OpType" default="0"> A type of operands and returned value. diff --git a/doc/classes/VisualShaderNodeStep.xml b/doc/classes/VisualShaderNodeStep.xml index 694c144445..5d8b464814 100644 --- a/doc/classes/VisualShaderNodeStep.xml +++ b/doc/classes/VisualShaderNodeStep.xml @@ -9,8 +9,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeStep.OpType" default="0"> A type of operands and returned value. diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml index 3961070a74..921092cd07 100644 --- a/doc/classes/VisualShaderNodeSwitch.xml +++ b/doc/classes/VisualShaderNodeSwitch.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSwitch.OpType" default="0"> A type of operands and returned value. diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index 17c079f385..0a2af30f67 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0"> Determines the source for the lookup. See [enum Source] for options. diff --git a/doc/classes/VisualShaderNodeTexture2DArray.xml b/doc/classes/VisualShaderNodeTexture2DArray.xml index 3c6d328ed0..cd7c526e1f 100644 --- a/doc/classes/VisualShaderNodeTexture2DArray.xml +++ b/doc/classes/VisualShaderNodeTexture2DArray.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="texture_array" type="Texture2DArray" setter="set_texture_array" getter="get_texture_array"> A source texture array. Used if [member VisualShaderNodeSample3D.source] is set to [constant VisualShaderNodeSample3D.SOURCE_TEXTURE]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml b/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml index 976fcf26c8..ba320afd18 100644 --- a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml +++ b/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml @@ -6,8 +6,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTexture3D.xml b/doc/classes/VisualShaderNodeTexture3D.xml index 17929e823e..2f5b750ce1 100644 --- a/doc/classes/VisualShaderNodeTexture3D.xml +++ b/doc/classes/VisualShaderNodeTexture3D.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> A source texture. Used if [member VisualShaderNodeSample3D.source] is set to [constant VisualShaderNodeSample3D.SOURCE_TEXTURE]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTexture3DUniform.xml b/doc/classes/VisualShaderNodeTexture3DUniform.xml index d9e9acf117..3b002c5449 100644 --- a/doc/classes/VisualShaderNodeTexture3DUniform.xml +++ b/doc/classes/VisualShaderNodeTexture3DUniform.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTextureSDF.xml b/doc/classes/VisualShaderNodeTextureSDF.xml index b5c89c2c31..09a5851ef7 100644 --- a/doc/classes/VisualShaderNodeTextureSDF.xml +++ b/doc/classes/VisualShaderNodeTextureSDF.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTextureSDFNormal.xml b/doc/classes/VisualShaderNodeTextureSDFNormal.xml index 25fe1c4b28..e66492cebf 100644 --- a/doc/classes/VisualShaderNodeTextureSDFNormal.xml +++ b/doc/classes/VisualShaderNodeTextureSDFNormal.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index 492c6010df..26c72d2714 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureUniform.ColorDefault" default="0"> Sets the default color if no texture is assigned to the uniform. diff --git a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml index 28504cc7ac..76b5506cba 100644 --- a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml +++ b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml index b82ce9bdd8..4ec59962e9 100644 --- a/doc/classes/VisualShaderNodeTransformCompose.xml +++ b/doc/classes/VisualShaderNodeTransformCompose.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index 30178752d0..66eda94fbe 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant" type="Transform3D" setter="set_constant" getter="get_constant" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> A [Transform3D] constant which represents the state of this node. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml index b815efc67a..e1bfa94a07 100644 --- a/doc/classes/VisualShaderNodeTransformDecompose.xml +++ b/doc/classes/VisualShaderNodeTransformDecompose.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index 51b1100e22..bbc36fc8d5 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeTransformFunc.Function" default="0"> The function to be computed. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeTransformOp.xml b/doc/classes/VisualShaderNodeTransformOp.xml index 02debd890f..65d5b9cbbd 100644 --- a/doc/classes/VisualShaderNodeTransformOp.xml +++ b/doc/classes/VisualShaderNodeTransformOp.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformOp.Operator" default="0"> The type of the operation to be performed on the transforms. See [enum Operator] for options. diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml index 2f7818ec8a..b6d8801932 100644 --- a/doc/classes/VisualShaderNodeTransformUniform.xml +++ b/doc/classes/VisualShaderNodeTransformUniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="default_value" type="Transform3D" setter="set_default_value" getter="get_default_value" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> A default value to be assigned within the shader. @@ -18,6 +16,4 @@ Enables usage of the [member default_value]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index d8f7ebbd55..02fe18c7a0 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformVecMult.Operator" default="0"> The multiplication type to be performed. See [enum Operator] for options. diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml index 042644feb0..26bcea07e8 100644 --- a/doc/classes/VisualShaderNodeUVFunc.xml +++ b/doc/classes/VisualShaderNodeUVFunc.xml @@ -7,8 +7,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeUVFunc.Function" default="0"> A function to be applied to the texture coordinates. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml index 561d87af45..15c760656e 100644 --- a/doc/classes/VisualShaderNodeUniform.xml +++ b/doc/classes/VisualShaderNodeUniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeUniform.Qualifier" default="0"> </member> diff --git a/doc/classes/VisualShaderNodeUniformRef.xml b/doc/classes/VisualShaderNodeUniformRef.xml index db02e398ab..44a28ed53c 100644 --- a/doc/classes/VisualShaderNodeUniformRef.xml +++ b/doc/classes/VisualShaderNodeUniformRef.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default=""[None]""> The name of the uniform which this reference points to. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml index 28c3d22345..0a64357962 100644 --- a/doc/classes/VisualShaderNodeVec3Constant.xml +++ b/doc/classes/VisualShaderNodeVec3Constant.xml @@ -8,13 +8,9 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3(0, 0, 0)"> A [Vector3] constant which represents the state of this node. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml index 215e2cfbea..2b72e5252a 100644 --- a/doc/classes/VisualShaderNodeVec3Uniform.xml +++ b/doc/classes/VisualShaderNodeVec3Uniform.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="default_value" type="Vector3" setter="set_default_value" getter="get_default_value" default="Vector3(0, 0, 0)"> A default value to be assigned within the shader. @@ -18,6 +16,4 @@ Enables usage of the [member default_value]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorCompose.xml b/doc/classes/VisualShaderNodeVectorCompose.xml index c9ff3cd38e..ebc30d03f4 100644 --- a/doc/classes/VisualShaderNodeVectorCompose.xml +++ b/doc/classes/VisualShaderNodeVectorCompose.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorDecompose.xml b/doc/classes/VisualShaderNodeVectorDecompose.xml index 95af323c9b..09986bf969 100644 --- a/doc/classes/VisualShaderNodeVectorDecompose.xml +++ b/doc/classes/VisualShaderNodeVectorDecompose.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml index 9fd8ba2806..e0c7c8618c 100644 --- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorDerivativeFunc.Function" default="0"> A derivative type. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeVectorDistance.xml b/doc/classes/VisualShaderNodeVectorDistance.xml index 2da04b122e..098787e583 100644 --- a/doc/classes/VisualShaderNodeVectorDistance.xml +++ b/doc/classes/VisualShaderNodeVectorDistance.xml @@ -9,8 +9,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index 79bf3f6a07..27ae82e11b 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorFunc.Function" default="0"> The function to be performed. See [enum Function] for options. diff --git a/doc/classes/VisualShaderNodeVectorLen.xml b/doc/classes/VisualShaderNodeVectorLen.xml index 77261d3190..165455e622 100644 --- a/doc/classes/VisualShaderNodeVectorLen.xml +++ b/doc/classes/VisualShaderNodeVectorLen.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml index 263485d38e..5e8f0abda3 100644 --- a/doc/classes/VisualShaderNodeVectorOp.xml +++ b/doc/classes/VisualShaderNodeVectorOp.xml @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeVectorOp.Operator" default="0"> The operator to be used. See [enum Operator] for options. diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml index 178c35f49a..59e98fb000 100644 --- a/doc/classes/VisualShaderNodeVectorRefract.xml +++ b/doc/classes/VisualShaderNodeVectorRefract.xml @@ -8,8 +8,4 @@ </description> <tutorials> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml index 5c2c7f9dc6..f0bd2a0601 100644 --- a/doc/classes/VoxelGIData.xml +++ b/doc/classes/VoxelGIData.xml @@ -67,6 +67,4 @@ <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false"> </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml index 339c1620bf..56617b581f 100644 --- a/doc/classes/WeakRef.xml +++ b/doc/classes/WeakRef.xml @@ -16,6 +16,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index d7b156cc57..15d844aacb 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Window" inherits="Viewport" version="4.0"> <brief_description> + Base class for all windows. </brief_description> <description> + A node that creates a window. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ <method name="can_draw" qualifiers="const"> <return type="bool" /> <description> + Returns whether the window is being drawn to the screen. </description> </method> <method name="child_controls_changed"> @@ -27,6 +30,7 @@ <return type="bool" /> <argument index="0" name="flag" type="int" enum="Window.Flags" /> <description> + Returns [code]true[/code] if the flag is set. </description> </method> <method name="get_layout_direction" qualifiers="const"> @@ -38,6 +42,7 @@ <method name="get_real_size" qualifiers="const"> <return type="Vector2i" /> <description> + Returns the window's size including its border. </description> </method> <method name="get_theme_color" qualifiers="const"> @@ -87,11 +92,13 @@ <method name="grab_focus"> <return type="void" /> <description> + Causes the window to grab focus, allowing it to receive user input. </description> </method> <method name="has_focus" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if the window is focused. </description> </method> <method name="has_theme_color" qualifiers="const"> @@ -148,6 +155,7 @@ <method name="is_embedded" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if the window is currently embedded in another window. </description> </method> <method name="is_layout_rtl" qualifiers="const"> @@ -212,6 +220,7 @@ <argument index="0" name="flag" type="int" enum="Window.Flags" /> <argument index="1" name="enabled" type="bool" /> <description> + Sets a specified window flag. </description> </method> <method name="set_ime_active"> @@ -247,11 +256,13 @@ </methods> <members> <member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the window will be on top of all other windows. </member> <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true"> Toggles if any text should automatically change to its translated version depending on the current locale. </member> <member name="borderless" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the window will have no borders. </member> <member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0"> </member> @@ -260,6 +271,7 @@ <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)"> </member> <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0"> + The screen the window is currently on. </member> <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false"> </member> @@ -268,16 +280,21 @@ <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)"> </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0"> + Set's the window's current mode. + [b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux. </member> <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)"> + The window's position in pixels. </member> <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(100, 100)"> + The window's size in pixels. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> </member> <member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&"""> </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> + The window's title. </member> <member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false"> </member> @@ -286,8 +303,10 @@ <member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the window can't be resized. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> + If [code]true[/code], the window is visible. </member> <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false"> </member> @@ -340,20 +359,26 @@ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30"> </constant> <constant name="MODE_WINDOWED" value="0" enum="Mode"> + Windowed mode. </constant> <constant name="MODE_MINIMIZED" value="1" enum="Mode"> + Minimized window mode. </constant> <constant name="MODE_MAXIMIZED" value="2" enum="Mode"> + Maximized window mode. </constant> <constant name="MODE_FULLSCREEN" value="3" enum="Mode"> Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project. Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. </constant> <constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags"> + The window's ability to be resized. </constant> <constant name="FLAG_BORDERLESS" value="1" enum="Flags"> + Borderless window. </constant> <constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags"> + Flag for making the window always on top of all other windows. </constant> <constant name="FLAG_TRANSPARENT" value="3" enum="Flags"> </constant> diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index 20b3afbd0b..a6a4701dd4 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> - <methods> - </methods> <members> <member name="canvas" type="RID" setter="" getter="get_canvas"> The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing. @@ -25,6 +23,4 @@ The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml index 610ecacff4..136ca2c598 100644 --- a/doc/classes/World3D.xml +++ b/doc/classes/World3D.xml @@ -9,8 +9,6 @@ <tutorials> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> - <methods> - </methods> <members> <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects"> </member> @@ -33,6 +31,4 @@ The World3D's physics space. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/WorldMarginShape2D.xml b/doc/classes/WorldBoundaryShape2D.xml index 1839ab16ad..cfbab4dcf8 100644 --- a/doc/classes/WorldMarginShape2D.xml +++ b/doc/classes/WorldBoundaryShape2D.xml @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="WorldMarginShape2D" inherits="Shape2D" version="4.0"> +<class name="WorldBoundaryShape2D" inherits="Shape2D" version="4.0"> <brief_description> - Line shape for 2D collisions. + World boundary shape for 2D collisions. </brief_description> <description> - Line shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. + World boundary shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. </description> <tutorials> </tutorials> - <methods> - </methods> <members> <member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0"> The line's distance from the origin. @@ -18,6 +16,4 @@ The line's normal. Defaults to [code]Vector2.UP[/code]. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/WorldBoundaryShape3D.xml b/doc/classes/WorldBoundaryShape3D.xml new file mode 100644 index 0000000000..a916ac03d0 --- /dev/null +++ b/doc/classes/WorldBoundaryShape3D.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="WorldBoundaryShape3D" inherits="Shape3D" version="4.0"> + <brief_description> + World boundary shape for 3D collisions. + </brief_description> + <description> + World boundary shape for 3D collisions. It works like an infinite plane and will not allow any physics body to go to the negative side. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldBoundaryShape3D] is used in a [PhysicsBody3D], it will cause colliding objects placed "below" it to teleport "above" the plane. + </description> + <tutorials> + </tutorials> + <members> + <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane(0, 1, 0, 0)"> + The [Plane] used by the [WorldBoundaryShape3D] for collision. + </member> + </members> +</class> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index 6aa2db00b4..bd25a74c5b 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -14,8 +14,6 @@ <link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <methods> - </methods> <members> <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects"> </member> @@ -23,6 +21,4 @@ The [Environment] resource used by this [WorldEnvironment], defining the default properties. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/WorldMarginShape3D.xml b/doc/classes/WorldMarginShape3D.xml deleted file mode 100644 index 9a26f254f1..0000000000 --- a/doc/classes/WorldMarginShape3D.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="WorldMarginShape3D" inherits="Shape3D" version="4.0"> - <brief_description> - Infinite plane shape for 3D collisions. - </brief_description> - <description> - An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldMarginShape3D] is used in a [PhysicsBody3D], it will cause colliding objects placed "below" it to teleport "above" the plane. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane(0, 1, 0, 0)"> - The [Plane] used by the [WorldMarginShape3D] for collision. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index 5900e68339..0af7094ee1 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -26,6 +26,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/XRAnchor3D.xml b/doc/classes/XRAnchor3D.xml index ccbfab1273..94fc8fc13d 100644 --- a/doc/classes/XRAnchor3D.xml +++ b/doc/classes/XRAnchor3D.xml @@ -55,6 +55,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/XRCamera3D.xml b/doc/classes/XRCamera3D.xml index b2682f7a90..682a797b5e 100644 --- a/doc/classes/XRCamera3D.xml +++ b/doc/classes/XRCamera3D.xml @@ -10,8 +10,4 @@ <tutorials> <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> - <methods> - </methods> - <constants> - </constants> </class> diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml index 47ddc22823..1a05a7b651 100644 --- a/doc/classes/XRController3D.xml +++ b/doc/classes/XRController3D.xml @@ -89,6 +89,4 @@ </description> </signal> </signals> - <constants> - </constants> </class> diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml index 1fb73e59b4..2a740ab1e8 100644 --- a/doc/classes/XRInterface.xml +++ b/doc/classes/XRInterface.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="XRInterface" inherits="RefCounted" version="4.0"> <brief_description> - Base class for an AR/VR interface implementation. + Base class for an XR interface implementation. </brief_description> <description> This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass XRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. @@ -26,17 +26,17 @@ <method name="get_name" qualifiers="const"> <return type="StringName" /> <description> - Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc). + Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc). </description> </method> - <method name="get_render_targetsize"> + <method name="get_render_target_size"> <return type="Vector2" /> <description> Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. </description> </method> <method name="get_tracking_status" qualifiers="const"> - <return type="int" enum="XRInterface.Tracking_status" /> + <return type="int" enum="XRInterface.TrackingStatus" /> <description> If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking. </description> @@ -52,11 +52,17 @@ <description> Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. - [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. + [b]Note:[/b] You must enable the XR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different. While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. </description> </method> + <method name="is_initialized" qualifiers="const"> + <return type="bool" /> + <description> + Is [code]true[/code] if this interface has been initialised. + </description> + </method> <method name="uninitialize"> <return type="void" /> <description> @@ -68,10 +74,7 @@ <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false"> On an AR interface, [code]true[/code] if anchor detection is enabled. </member> - <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false"> - [code]true[/code] if this interface been initialized. - </member> - <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false"> + <member name="interface_is_primary" type="bool" setter="set_primary" getter="is_primary" default="false"> [code]true[/code] if this is the primary interface. </member> </members> @@ -89,7 +92,7 @@ This interface supports AR (video background and real world tracking). </constant> <constant name="XR_EXTERNAL" value="8" enum="Capabilities"> - This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. + This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_target_size]). Using a separate viewport node frees up the main viewport for other purposes. </constant> <constant name="EYE_MONO" value="0" enum="Eyes"> Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. @@ -100,19 +103,19 @@ <constant name="EYE_RIGHT" value="2" enum="Eyes"> Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information. </constant> - <constant name="XR_NORMAL_TRACKING" value="0" enum="Tracking_status"> + <constant name="XR_NORMAL_TRACKING" value="0" enum="TrackingStatus"> Tracking is behaving as expected. </constant> - <constant name="XR_EXCESSIVE_MOTION" value="1" enum="Tracking_status"> + <constant name="XR_EXCESSIVE_MOTION" value="1" enum="TrackingStatus"> Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up). </constant> - <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status"> + <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="TrackingStatus"> Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. </constant> - <constant name="XR_UNKNOWN_TRACKING" value="3" enum="Tracking_status"> + <constant name="XR_UNKNOWN_TRACKING" value="3" enum="TrackingStatus"> We don't know the status of the tracking or this interface does not provide feedback. </constant> - <constant name="XR_NOT_TRACKING" value="4" enum="Tracking_status"> + <constant name="XR_NOT_TRACKING" value="4" enum="TrackingStatus"> Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.). </constant> </constants> diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml new file mode 100644 index 0000000000..84b46e0ddd --- /dev/null +++ b/doc/classes/XRInterfaceExtension.xml @@ -0,0 +1,131 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="XRInterfaceExtension" inherits="XRInterface" version="4.0"> + <brief_description> + Base class for XR interface extensions (plugins). + </brief_description> + <description> + External XR interface plugins should inherit from this class. + </description> + <tutorials> + </tutorials> + <methods> + <method name="_commit_views" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="render_target" type="RID" /> + <argument index="1" name="screen_rect" type="Rect2" /> + <description> + </description> + </method> + <method name="_get_anchor_detection_is_enabled" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_get_camera_feed_id" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_camera_transform" qualifiers="virtual"> + <return type="Transform3D" /> + <description> + </description> + </method> + <method name="_get_capabilities" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_name" qualifiers="virtual const"> + <return type="StringName" /> + <description> + </description> + </method> + <method name="_get_projection_for_view" qualifiers="virtual"> + <return type="PackedFloat64Array" /> + <argument index="0" name="view" type="int" /> + <argument index="1" name="aspect" type="float" /> + <argument index="2" name="z_near" type="float" /> + <argument index="3" name="z_far" type="float" /> + <description> + </description> + </method> + <method name="_get_render_target_size" qualifiers="virtual"> + <return type="Vector2" /> + <description> + </description> + </method> + <method name="_get_tracking_status" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_transform_for_view" qualifiers="virtual"> + <return type="Transform3D" /> + <argument index="0" name="view" type="int" /> + <argument index="1" name="cam_transform" type="Transform3D" /> + <description> + </description> + </method> + <method name="_get_view_count" qualifiers="virtual"> + <return type="int" /> + <description> + </description> + </method> + <method name="_initialize" qualifiers="virtual"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_is_initialized" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_notification" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="what" type="int" /> + <description> + </description> + </method> + <method name="_process" qualifiers="virtual"> + <return type="void" /> + <description> + </description> + </method> + <method name="_set_anchor_detection_is_enabled" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> + <description> + </description> + </method> + <method name="_uninitialize" qualifiers="virtual"> + <return type="void" /> + <description> + </description> + </method> + <method name="add_blit"> + <return type="void" /> + <argument index="0" name="render_target" type="RID" /> + <argument index="1" name="src_rect" type="Rect2" /> + <argument index="2" name="dst_rect" type="Rect2i" /> + <argument index="3" name="use_layer" type="bool" /> + <argument index="4" name="layer" type="int" /> + <argument index="5" name="apply_lens_distortion" type="bool" /> + <argument index="6" name="eye_center" type="Vector2" /> + <argument index="7" name="k1" type="float" /> + <argument index="8" name="k2" type="float" /> + <argument index="9" name="upscale" type="float" /> + <argument index="10" name="aspect_ratio" type="float" /> + <description> + Blits our render results to screen optionally applying lens distortion. This can only be called while processing [code]_commit_views[/code]. + </description> + </method> + <method name="get_render_target_texture"> + <return type="RID" /> + <argument index="0" name="render_target" type="RID" /> + <description> + </description> + </method> + </methods> +</class> diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml index 3e075e99b9..cdf319093c 100644 --- a/doc/classes/XROrigin3D.xml +++ b/doc/classes/XROrigin3D.xml @@ -12,14 +12,10 @@ <tutorials> <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> - <methods> - </methods> <members> <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0"> Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. [b]Note:[/b] This method is a passthrough to the [XRServer] itself. </member> </members> - <constants> - </constants> </class> diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index 5dd9b75ad2..85170804cc 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -37,13 +37,6 @@ You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. </description> </method> - <method name="clear_primary_interface_if"> - <return type="void" /> - <argument index="0" name="interface" type="XRInterface" /> - <description> - Clears our current primary interface if it is set to the provided interface. - </description> - </method> <method name="find_interface" qualifiers="const"> <return type="XRInterface" /> <argument index="0" name="name" type="String" /> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index f3b16217e5..39e34a7b96 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -121,6 +121,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="bool" /> <description> Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code]. @@ -135,6 +140,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="bool" /> <description> Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code]. @@ -148,6 +158,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 4bf04fe25f..b45cdd2099 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -42,6 +42,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if two floats are different from each other. @@ -191,6 +196,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if both floats are exactly equal. @@ -245,6 +255,4 @@ </description> </method> </methods> - <constants> - </constants> </class> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 32b5fe1012..a75d11ba4a 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -68,6 +68,11 @@ </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if operands are different from each other. @@ -173,17 +178,17 @@ </description> </method> <method name="operator +" qualifiers="operator"> - <return type="float" /> - <argument index="0" name="right" type="float" /> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> - Adds an [int] to a [float]. The result is a [float]. + Adds two integers. </description> </method> <method name="operator +" qualifiers="operator"> - <return type="int" /> - <argument index="0" name="right" type="int" /> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> - Adds two integers. + Adds an [int] to a [float]. The result is a [float]. </description> </method> <method name="operator -" qualifiers="operator"> @@ -262,6 +267,11 @@ </method> <method name="operator ==" qualifiers="operator"> <return type="bool" /> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool" /> <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if the integer is equal to the given [float]. @@ -365,6 +375,4 @@ </description> </method> </methods> - <constants> - </constants> </class> |