diff options
Diffstat (limited to 'doc/classes/SkeletonModificationStack2D.xml')
-rw-r--r-- | doc/classes/SkeletonModificationStack2D.xml | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml new file mode 100644 index 0000000000..35b899fe08 --- /dev/null +++ b/doc/classes/SkeletonModificationStack2D.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModificationStack2D" inherits="Resource" version="4.0"> + <brief_description> + A resource that holds a stack of [SkeletonModification2D]s. + </brief_description> + <description> + This resource is used by the Skeleton and holds a stack of [SkeletonModification2D]s. + This controls the order of the modifications and how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton. + This resource also controls how strongly all of the modifications are applied to the [Skeleton2D]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_modification"> + <return type="void"> + </return> + <argument index="0" name="modification" type="SkeletonModification2D"> + </argument> + <description> + Adds the passed-in [SkeletonModification2D] to the stack. + </description> + </method> + <method name="delete_modification"> + <return type="void"> + </return> + <argument index="0" name="mod_idx" type="int"> + </argument> + <description> + Deletes the [SkeletonModification2D] at the index position [code]mod_idx[/code], if it exists. + </description> + </method> + <method name="enable_all_modifications"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + Enables all [SkeletonModification2D]s in the stack. + </description> + </method> + <method name="execute"> + <return type="void"> + </return> + <argument index="0" name="delta" type="float"> + </argument> + <argument index="1" name="execution_mode" type="int"> + </argument> + <description> + Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count]. + [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. + </description> + </method> + <method name="get_is_setup" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns a boolean that indiciates whether the modification stack is setup and can execute. + </description> + </method> + <method name="get_modification" qualifiers="const"> + <return type="SkeletonModification2D"> + </return> + <argument index="0" name="mod_idx" type="int"> + </argument> + <description> + Returns the [SkeletonModification2D] at the passed-in index, [code]mod_idx[/code]. + </description> + </method> + <method name="get_skeleton" qualifiers="const"> + <return type="Skeleton2D"> + </return> + <description> + Returns the [Skeleton2D] node that the SkeletonModificationStack2D is bound to. + </description> + </method> + <method name="set_modification"> + <return type="void"> + </return> + <argument index="0" name="mod_idx" type="int"> + </argument> + <argument index="1" name="modification" type="SkeletonModification2D"> + </argument> + <description> + Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code]. + </description> + </method> + <method name="setup"> + <return type="void"> + </return> + <description> + Sets up the modification stack so it can execute. This function should be called by [Skeleton2D] and shouldn't be manually called unless you know what you are doing. + </description> + </method> + </methods> + <members> + <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false"> + If [code]true[/code], the modification's in the stack will be called. This is handled automatically through the [Skeleton2D] node. + </member> + <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0"> + The number of modifications in the stack. + </member> + <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> + The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the [Skeleton2D] [Bone2D] poses. + </member> + </members> + <constants> + </constants> +</class> |