| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="SkeletonModifier3D" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A node that may modify a Skeleton3D's bones. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | [SkeletonModifier3D] retrieves a target [Skeleton3D] by having a [Skeleton3D] parent. |
| 8 | If there is an [AnimationMixer], a modification always performs after playback process of the [AnimationMixer]. |
| 9 | This node should be used to implement custom IK solvers, constraints, or skeleton physics. |
| 10 | </description> |
| 11 | <tutorials> |
| 12 | <link title="Design of the Skeleton Modifier 3D">https://godotengine.org/article/design-of-the-skeleton-modifier-3d/</link> |
| 13 | </tutorials> |
| 14 | <methods> |
| 15 | <method name="_process_modification" qualifiers="virtual" deprecated="Use [method _process_modification_with_delta] instead."> |
| 16 | <return type="void" /> |
| 17 | <description> |
| 18 | Override this virtual method to implement a custom skeleton modifier. You should do things like get the [Skeleton3D]'s current pose and apply the pose here. |
| 19 | [method _process_modification] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier. |
| 20 | </description> |
| 21 | </method> |
| 22 | <method name="_process_modification_with_delta" qualifiers="virtual"> |
| 23 | <return type="void" /> |
| 24 | <param index="0" name="delta" type="float" /> |
| 25 | <description> |
| 26 | Override this virtual method to implement a custom skeleton modifier. You should do things like get the [Skeleton3D]'s current pose and apply the pose here. |
| 27 | [method _process_modification_with_delta] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier. |
| 28 | [param delta] is passed from parent [Skeleton3D]. See also [method Skeleton3D.advance]. |
| 29 | [b]Note:[/b] This method may be called outside [method Node._process] and [method Node._physics_process] with [param delta] is [code]0.0[/code], since the modification should be processed immediately after initialization of the [Skeleton3D]. |
| 30 | </description> |
| 31 | </method> |
| 32 | <method name="_skeleton_changed" qualifiers="virtual"> |
| 33 | <return type="void" /> |
| 34 | <param index="0" name="old_skeleton" type="Skeleton3D" /> |
| 35 | <param index="1" name="new_skeleton" type="Skeleton3D" /> |
| 36 | <description> |
| 37 | Called when the skeleton is changed. |
| 38 | </description> |
| 39 | </method> |
| 40 | <method name="_validate_bone_names" qualifiers="virtual"> |
| 41 | <return type="void" /> |
| 42 | <description> |
| 43 | Called when bone names and indices need to be validated, such as when entering the scene tree or changing skeleton. |
| 44 | </description> |
| 45 | </method> |
| 46 | <method name="get_skeleton" qualifiers="const"> |
| 47 | <return type="Skeleton3D" /> |
| 48 | <description> |
| 49 | Returns the parent [Skeleton3D] node if it exists. Otherwise, returns [code]null[/code]. |
| 50 | </description> |
| 51 | </method> |
| 52 | </methods> |
| 53 | <members> |
| 54 | <member name="active" type="bool" setter="set_active" getter="is_active" default="true"> |
| 55 | If [code]true[/code], the [SkeletonModifier3D] will be processing. |
| 56 | </member> |
| 57 | <member name="influence" type="float" setter="set_influence" getter="get_influence" default="1.0"> |
| 58 | Sets the influence of the modification. |
| 59 | [b]Note:[/b] This value is used by [Skeleton3D] to blend, so the [SkeletonModifier3D] should always apply only 100% of the result without interpolation. |
| 60 | </member> |
| 61 | </members> |
| 62 | <signals> |
| 63 | <signal name="modification_processed"> |
| 64 | <description> |
| 65 | Notifies when the modification have been finished. |
| 66 | [b]Note:[/b] If you want to get the modified bone pose by the modifier, you must use [method Skeleton3D.get_bone_pose] or [method Skeleton3D.get_bone_global_pose] at the moment this signal is fired. |
| 67 | </description> |
| 68 | </signal> |
| 69 | </signals> |
| 70 | <constants> |
| 71 | <constant name="BONE_AXIS_PLUS_X" value="0" enum="BoneAxis"> |
| 72 | Enumerated value for the +X axis. |
| 73 | </constant> |
| 74 | <constant name="BONE_AXIS_MINUS_X" value="1" enum="BoneAxis"> |
| 75 | Enumerated value for the -X axis. |
| 76 | </constant> |
| 77 | <constant name="BONE_AXIS_PLUS_Y" value="2" enum="BoneAxis"> |
| 78 | Enumerated value for the +Y axis. |
| 79 | </constant> |
| 80 | <constant name="BONE_AXIS_MINUS_Y" value="3" enum="BoneAxis"> |
| 81 | Enumerated value for the -Y axis. |
| 82 | </constant> |
| 83 | <constant name="BONE_AXIS_PLUS_Z" value="4" enum="BoneAxis"> |
| 84 | Enumerated value for the +Z axis. |
| 85 | </constant> |
| 86 | <constant name="BONE_AXIS_MINUS_Z" value="5" enum="BoneAxis"> |
| 87 | Enumerated value for the -Z axis. |
| 88 | </constant> |
| 89 | <constant name="BONE_DIRECTION_PLUS_X" value="0" enum="BoneDirection"> |
| 90 | Enumerated value for the +X axis. |
| 91 | </constant> |
| 92 | <constant name="BONE_DIRECTION_MINUS_X" value="1" enum="BoneDirection"> |
| 93 | Enumerated value for the -X axis. |
| 94 | </constant> |
| 95 | <constant name="BONE_DIRECTION_PLUS_Y" value="2" enum="BoneDirection"> |
| 96 | Enumerated value for the +Y axis. |
| 97 | </constant> |
| 98 | <constant name="BONE_DIRECTION_MINUS_Y" value="3" enum="BoneDirection"> |
| 99 | Enumerated value for the -Y axis. |
| 100 | </constant> |
| 101 | <constant name="BONE_DIRECTION_PLUS_Z" value="4" enum="BoneDirection"> |
| 102 | Enumerated value for the +Z axis. |
| 103 | </constant> |
| 104 | <constant name="BONE_DIRECTION_MINUS_Z" value="5" enum="BoneDirection"> |
| 105 | Enumerated value for the -Z axis. |
| 106 | </constant> |
| 107 | <constant name="BONE_DIRECTION_FROM_PARENT" value="6" enum="BoneDirection"> |
| 108 | Enumerated value for the axis from a parent bone to the child bone. |
| 109 | </constant> |
| 110 | <constant name="SECONDARY_DIRECTION_NONE" value="0" enum="SecondaryDirection"> |
| 111 | Enumerated value for the case when the axis is undefined. |
| 112 | </constant> |
| 113 | <constant name="SECONDARY_DIRECTION_PLUS_X" value="1" enum="SecondaryDirection"> |
| 114 | Enumerated value for the +X axis. |
| 115 | </constant> |
| 116 | <constant name="SECONDARY_DIRECTION_MINUS_X" value="2" enum="SecondaryDirection"> |
| 117 | Enumerated value for the -X axis. |
| 118 | </constant> |
| 119 | <constant name="SECONDARY_DIRECTION_PLUS_Y" value="3" enum="SecondaryDirection"> |
| 120 | Enumerated value for the +Y axis. |
| 121 | </constant> |
| 122 | <constant name="SECONDARY_DIRECTION_MINUS_Y" value="4" enum="SecondaryDirection"> |
| 123 | Enumerated value for the -Y axis. |
| 124 | </constant> |
| 125 | <constant name="SECONDARY_DIRECTION_PLUS_Z" value="5" enum="SecondaryDirection"> |
| 126 | Enumerated value for the +Z axis. |
| 127 | </constant> |
| 128 | <constant name="SECONDARY_DIRECTION_MINUS_Z" value="6" enum="SecondaryDirection"> |
| 129 | Enumerated value for the -Z axis. |
| 130 | </constant> |
| 131 | <constant name="SECONDARY_DIRECTION_CUSTOM" value="7" enum="SecondaryDirection"> |
| 132 | Enumerated value for an optional axis. |
| 133 | </constant> |
| 134 | <constant name="ROTATION_AXIS_X" value="0" enum="RotationAxis"> |
| 135 | Enumerated value for the rotation of the X axis. |
| 136 | </constant> |
| 137 | <constant name="ROTATION_AXIS_Y" value="1" enum="RotationAxis"> |
| 138 | Enumerated value for the rotation of the Y axis. |
| 139 | </constant> |
| 140 | <constant name="ROTATION_AXIS_Z" value="2" enum="RotationAxis"> |
| 141 | Enumerated value for the rotation of the Z axis. |
| 142 | </constant> |
| 143 | <constant name="ROTATION_AXIS_ALL" value="3" enum="RotationAxis"> |
| 144 | Enumerated value for the unconstrained rotation. |
| 145 | </constant> |
| 146 | <constant name="ROTATION_AXIS_CUSTOM" value="4" enum="RotationAxis"> |
| 147 | Enumerated value for an optional rotation axis. |
| 148 | </constant> |
| 149 | </constants> |
| 150 | </class> |