class_skeletonmodifier3d.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SkeletonModifier3D.xml.
  6. .. _class_SkeletonModifier3D:
  7. SkeletonModifier3D
  8. ==================
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`BoneConstraint3D<class_BoneConstraint3D>`, :ref:`LookAtModifier3D<class_LookAtModifier3D>`, :ref:`ModifierBoneTarget3D<class_ModifierBoneTarget3D>`, :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>`, :ref:`RetargetModifier3D<class_RetargetModifier3D>`, :ref:`SkeletonIK3D<class_SkeletonIK3D>`, :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>`, :ref:`XRBodyModifier3D<class_XRBodyModifier3D>`, :ref:`XRHandModifier3D<class_XRHandModifier3D>`
  11. A node that may modify a Skeleton3D's bones.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **SkeletonModifier3D** retrieves a target :ref:`Skeleton3D<class_Skeleton3D>` by having a :ref:`Skeleton3D<class_Skeleton3D>` parent.
  16. If there is an :ref:`AnimationMixer<class_AnimationMixer>`, a modification always performs after playback process of the :ref:`AnimationMixer<class_AnimationMixer>`.
  17. This node should be used to implement custom IK solvers, constraints, or skeleton physics.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - `Design of the Skeleton Modifier 3D <https://godotengine.org/article/design-of-the-skeleton-modifier-3d/>`__
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +---------------------------+---------------------------------------------------------------+----------+
  28. | :ref:`bool<class_bool>` | :ref:`active<class_SkeletonModifier3D_property_active>` | ``true`` |
  29. +---------------------------+---------------------------------------------------------------+----------+
  30. | :ref:`float<class_float>` | :ref:`influence<class_SkeletonModifier3D_property_influence>` | ``1.0`` |
  31. +---------------------------+---------------------------------------------------------------+----------+
  32. .. rst-class:: classref-reftable-group
  33. Methods
  34. -------
  35. .. table::
  36. :widths: auto
  37. +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`_process_modification<class_SkeletonModifier3D_private_method__process_modification>`\ (\ ) |virtual| |
  39. +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`_process_modification_with_delta<class_SkeletonModifier3D_private_method__process_modification_with_delta>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| |
  41. +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`_skeleton_changed<class_SkeletonModifier3D_private_method__skeleton_changed>`\ (\ old_skeleton\: :ref:`Skeleton3D<class_Skeleton3D>`, new_skeleton\: :ref:`Skeleton3D<class_Skeleton3D>`\ ) |virtual| |
  43. +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`_validate_bone_names<class_SkeletonModifier3D_private_method__validate_bone_names>`\ (\ ) |virtual| |
  45. +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_skeleton<class_SkeletonModifier3D_method_get_skeleton>`\ (\ ) |const| |
  47. +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. .. rst-class:: classref-section-separator
  49. ----
  50. .. rst-class:: classref-descriptions-group
  51. Signals
  52. -------
  53. .. _class_SkeletonModifier3D_signal_modification_processed:
  54. .. rst-class:: classref-signal
  55. **modification_processed**\ (\ ) :ref:`🔗<class_SkeletonModifier3D_signal_modification_processed>`
  56. Notifies when the modification have been finished.
  57. \ **Note:** If you want to get the modified bone pose by the modifier, you must use :ref:`Skeleton3D.get_bone_pose()<class_Skeleton3D_method_get_bone_pose>` or :ref:`Skeleton3D.get_bone_global_pose()<class_Skeleton3D_method_get_bone_global_pose>` at the moment this signal is fired.
  58. .. rst-class:: classref-section-separator
  59. ----
  60. .. rst-class:: classref-descriptions-group
  61. Enumerations
  62. ------------
  63. .. _enum_SkeletonModifier3D_BoneAxis:
  64. .. rst-class:: classref-enumeration
  65. enum **BoneAxis**: :ref:`🔗<enum_SkeletonModifier3D_BoneAxis>`
  66. .. _class_SkeletonModifier3D_constant_BONE_AXIS_PLUS_X:
  67. .. rst-class:: classref-enumeration-constant
  68. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_PLUS_X** = ``0``
  69. Enumerated value for the +X axis.
  70. .. _class_SkeletonModifier3D_constant_BONE_AXIS_MINUS_X:
  71. .. rst-class:: classref-enumeration-constant
  72. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_MINUS_X** = ``1``
  73. Enumerated value for the -X axis.
  74. .. _class_SkeletonModifier3D_constant_BONE_AXIS_PLUS_Y:
  75. .. rst-class:: classref-enumeration-constant
  76. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_PLUS_Y** = ``2``
  77. Enumerated value for the +Y axis.
  78. .. _class_SkeletonModifier3D_constant_BONE_AXIS_MINUS_Y:
  79. .. rst-class:: classref-enumeration-constant
  80. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_MINUS_Y** = ``3``
  81. Enumerated value for the -Y axis.
  82. .. _class_SkeletonModifier3D_constant_BONE_AXIS_PLUS_Z:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_PLUS_Z** = ``4``
  85. Enumerated value for the +Z axis.
  86. .. _class_SkeletonModifier3D_constant_BONE_AXIS_MINUS_Z:
  87. .. rst-class:: classref-enumeration-constant
  88. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_MINUS_Z** = ``5``
  89. Enumerated value for the -Z axis.
  90. .. rst-class:: classref-section-separator
  91. ----
  92. .. rst-class:: classref-descriptions-group
  93. Property Descriptions
  94. ---------------------
  95. .. _class_SkeletonModifier3D_property_active:
  96. .. rst-class:: classref-property
  97. :ref:`bool<class_bool>` **active** = ``true`` :ref:`🔗<class_SkeletonModifier3D_property_active>`
  98. .. rst-class:: classref-property-setget
  99. - |void| **set_active**\ (\ value\: :ref:`bool<class_bool>`\ )
  100. - :ref:`bool<class_bool>` **is_active**\ (\ )
  101. If ``true``, the **SkeletonModifier3D** will be processing.
  102. .. rst-class:: classref-item-separator
  103. ----
  104. .. _class_SkeletonModifier3D_property_influence:
  105. .. rst-class:: classref-property
  106. :ref:`float<class_float>` **influence** = ``1.0`` :ref:`🔗<class_SkeletonModifier3D_property_influence>`
  107. .. rst-class:: classref-property-setget
  108. - |void| **set_influence**\ (\ value\: :ref:`float<class_float>`\ )
  109. - :ref:`float<class_float>` **get_influence**\ (\ )
  110. Sets the influence of the modification.
  111. \ **Note:** This value is used by :ref:`Skeleton3D<class_Skeleton3D>` to blend, so the **SkeletonModifier3D** should always apply only 100% of the result without interpolation.
  112. .. rst-class:: classref-section-separator
  113. ----
  114. .. rst-class:: classref-descriptions-group
  115. Method Descriptions
  116. -------------------
  117. .. _class_SkeletonModifier3D_private_method__process_modification:
  118. .. rst-class:: classref-method
  119. |void| **_process_modification**\ (\ ) |virtual| :ref:`🔗<class_SkeletonModifier3D_private_method__process_modification>`
  120. **Deprecated:** Use :ref:`_process_modification_with_delta()<class_SkeletonModifier3D_private_method__process_modification_with_delta>` instead.
  121. Override this virtual method to implement a custom skeleton modifier. You should do things like get the :ref:`Skeleton3D<class_Skeleton3D>`'s current pose and apply the pose here.
  122. \ :ref:`_process_modification()<class_SkeletonModifier3D_private_method__process_modification>` must not apply :ref:`influence<class_SkeletonModifier3D_property_influence>` to bone poses because the :ref:`Skeleton3D<class_Skeleton3D>` automatically applies influence to all bone poses set by the modifier.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _class_SkeletonModifier3D_private_method__process_modification_with_delta:
  126. .. rst-class:: classref-method
  127. |void| **_process_modification_with_delta**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_SkeletonModifier3D_private_method__process_modification_with_delta>`
  128. Override this virtual method to implement a custom skeleton modifier. You should do things like get the :ref:`Skeleton3D<class_Skeleton3D>`'s current pose and apply the pose here.
  129. \ :ref:`_process_modification_with_delta()<class_SkeletonModifier3D_private_method__process_modification_with_delta>` must not apply :ref:`influence<class_SkeletonModifier3D_property_influence>` to bone poses because the :ref:`Skeleton3D<class_Skeleton3D>` automatically applies influence to all bone poses set by the modifier.
  130. \ ``delta`` is passed from parent :ref:`Skeleton3D<class_Skeleton3D>`. See also :ref:`Skeleton3D.advance()<class_Skeleton3D_method_advance>`.
  131. .. rst-class:: classref-item-separator
  132. ----
  133. .. _class_SkeletonModifier3D_private_method__skeleton_changed:
  134. .. rst-class:: classref-method
  135. |void| **_skeleton_changed**\ (\ old_skeleton\: :ref:`Skeleton3D<class_Skeleton3D>`, new_skeleton\: :ref:`Skeleton3D<class_Skeleton3D>`\ ) |virtual| :ref:`🔗<class_SkeletonModifier3D_private_method__skeleton_changed>`
  136. Called when the skeleton is changed.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_SkeletonModifier3D_private_method__validate_bone_names:
  140. .. rst-class:: classref-method
  141. |void| **_validate_bone_names**\ (\ ) |virtual| :ref:`🔗<class_SkeletonModifier3D_private_method__validate_bone_names>`
  142. Called when bone name and index need to be validated such as the timing of the entering tree or changing skeleton.
  143. .. rst-class:: classref-item-separator
  144. ----
  145. .. _class_SkeletonModifier3D_method_get_skeleton:
  146. .. rst-class:: classref-method
  147. :ref:`Skeleton3D<class_Skeleton3D>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SkeletonModifier3D_method_get_skeleton>`
  148. Get parent :ref:`Skeleton3D<class_Skeleton3D>` node if found.
  149. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  150. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  151. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  152. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  153. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  154. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  155. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  156. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  157. .. |void| replace:: :abbr:`void (No return value.)`