class_skeleton3d.rst 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015
  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/Skeleton3D.xml.
  6. .. _class_Skeleton3D:
  7. Skeleton3D
  8. ==========
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A node containing a bone hierarchy, used to create a 3D skeletal animation.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **Skeleton3D** provides an interface for managing a hierarchy of bones, including pose, rest and animation (see :ref:`Animation<class_Animation>`). It can also use ragdoll physics.
  15. The overall transform of a bone with respect to the skeleton is determined by bone pose. Bone rest defines the initial transform of the bone pose.
  16. Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it is not the actual global/world transform of the bone.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+
  27. | :ref:`bool<class_bool>` | :ref:`animate_physical_bones<class_Skeleton3D_property_animate_physical_bones>` | ``true`` |
  28. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+
  29. | :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` | :ref:`modifier_callback_mode_process<class_Skeleton3D_property_modifier_callback_mode_process>` | ``1`` |
  30. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+
  31. | :ref:`float<class_float>` | :ref:`motion_scale<class_Skeleton3D_property_motion_scale>` | ``1.0`` |
  32. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+
  33. | :ref:`bool<class_bool>` | :ref:`show_rest_only<class_Skeleton3D_property_show_rest_only>` | ``false`` |
  34. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+
  35. .. rst-class:: classref-reftable-group
  36. Methods
  37. -------
  38. .. table::
  39. :widths: auto
  40. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`int<class_int>` | :ref:`add_bone<class_Skeleton3D_method_add_bone>`\ (\ name\: :ref:`String<class_String>`\ ) |
  42. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | |void| | :ref:`advance<class_Skeleton3D_method_advance>`\ (\ delta\: :ref:`float<class_float>`\ ) |
  44. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | |void| | :ref:`clear_bones<class_Skeleton3D_method_clear_bones>`\ (\ ) |
  46. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | |void| | :ref:`clear_bones_global_pose_override<class_Skeleton3D_method_clear_bones_global_pose_override>`\ (\ ) |
  48. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`Skin<class_Skin>` | :ref:`create_skin_from_rest_transforms<class_Skeleton3D_method_create_skin_from_rest_transforms>`\ (\ ) |
  50. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`find_bone<class_Skeleton3D_method_find_bone>`\ (\ name\: :ref:`String<class_String>`\ ) |const| |
  52. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | |void| | :ref:`force_update_all_bone_transforms<class_Skeleton3D_method_force_update_all_bone_transforms>`\ (\ ) |
  54. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | |void| | :ref:`force_update_bone_child_transform<class_Skeleton3D_method_force_update_bone_child_transform>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |
  56. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_bone_children<class_Skeleton3D_method_get_bone_children>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  58. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton3D_method_get_bone_count>`\ (\ ) |const| |
  60. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose<class_Skeleton3D_method_get_bone_global_pose>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  62. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose_no_override<class_Skeleton3D_method_get_bone_global_pose_no_override>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  64. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose_override<class_Skeleton3D_method_get_bone_global_pose_override>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  66. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_rest<class_Skeleton3D_method_get_bone_global_rest>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  68. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`Variant<class_Variant>` | :ref:`get_bone_meta<class_Skeleton3D_method_get_bone_meta>`\ (\ bone_idx\: :ref:`int<class_int>`, key\: :ref:`StringName<class_StringName>`\ ) |const| |
  70. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_bone_meta_list<class_Skeleton3D_method_get_bone_meta_list>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  72. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`String<class_String>` | :ref:`get_bone_name<class_Skeleton3D_method_get_bone_name>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  74. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`int<class_int>` | :ref:`get_bone_parent<class_Skeleton3D_method_get_bone_parent>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  76. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_pose<class_Skeleton3D_method_get_bone_pose>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  78. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`Vector3<class_Vector3>` | :ref:`get_bone_pose_position<class_Skeleton3D_method_get_bone_pose_position>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  80. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`Quaternion<class_Quaternion>` | :ref:`get_bone_pose_rotation<class_Skeleton3D_method_get_bone_pose_rotation>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  82. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`Vector3<class_Vector3>` | :ref:`get_bone_pose_scale<class_Skeleton3D_method_get_bone_pose_scale>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  84. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_rest<class_Skeleton3D_method_get_bone_rest>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  86. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`StringName<class_StringName>` | :ref:`get_concatenated_bone_names<class_Skeleton3D_method_get_concatenated_bone_names>`\ (\ ) |const| |
  88. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_parentless_bones<class_Skeleton3D_method_get_parentless_bones>`\ (\ ) |const| |
  90. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`int<class_int>` | :ref:`get_version<class_Skeleton3D_method_get_version>`\ (\ ) |const| |
  92. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`bool<class_bool>` | :ref:`has_bone_meta<class_Skeleton3D_method_has_bone_meta>`\ (\ bone_idx\: :ref:`int<class_int>`, key\: :ref:`StringName<class_StringName>`\ ) |const| |
  94. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`bool<class_bool>` | :ref:`is_bone_enabled<class_Skeleton3D_method_is_bone_enabled>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| |
  96. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | |void| | :ref:`localize_rests<class_Skeleton3D_method_localize_rests>`\ (\ ) |
  98. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | |void| | :ref:`physical_bones_add_collision_exception<class_Skeleton3D_method_physical_bones_add_collision_exception>`\ (\ exception\: :ref:`RID<class_RID>`\ ) |
  100. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | |void| | :ref:`physical_bones_remove_collision_exception<class_Skeleton3D_method_physical_bones_remove_collision_exception>`\ (\ exception\: :ref:`RID<class_RID>`\ ) |
  102. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | |void| | :ref:`physical_bones_start_simulation<class_Skeleton3D_method_physical_bones_start_simulation>`\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
  104. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | |void| | :ref:`physical_bones_stop_simulation<class_Skeleton3D_method_physical_bones_stop_simulation>`\ (\ ) |
  106. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`SkinReference<class_SkinReference>` | :ref:`register_skin<class_Skeleton3D_method_register_skin>`\ (\ skin\: :ref:`Skin<class_Skin>`\ ) |
  108. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | |void| | :ref:`reset_bone_pose<class_Skeleton3D_method_reset_bone_pose>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |
  110. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | |void| | :ref:`reset_bone_poses<class_Skeleton3D_method_reset_bone_poses>`\ (\ ) |
  112. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | |void| | :ref:`set_bone_enabled<class_Skeleton3D_method_set_bone_enabled>`\ (\ bone_idx\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>` = true\ ) |
  114. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | |void| | :ref:`set_bone_global_pose<class_Skeleton3D_method_set_bone_global_pose>`\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) |
  116. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | |void| | :ref:`set_bone_global_pose_override<class_Skeleton3D_method_set_bone_global_pose_override>`\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`, amount\: :ref:`float<class_float>`, persistent\: :ref:`bool<class_bool>` = false\ ) |
  118. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | |void| | :ref:`set_bone_meta<class_Skeleton3D_method_set_bone_meta>`\ (\ bone_idx\: :ref:`int<class_int>`, key\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |
  120. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | |void| | :ref:`set_bone_name<class_Skeleton3D_method_set_bone_name>`\ (\ bone_idx\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) |
  122. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | |void| | :ref:`set_bone_parent<class_Skeleton3D_method_set_bone_parent>`\ (\ bone_idx\: :ref:`int<class_int>`, parent_idx\: :ref:`int<class_int>`\ ) |
  124. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | |void| | :ref:`set_bone_pose<class_Skeleton3D_method_set_bone_pose>`\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) |
  126. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | |void| | :ref:`set_bone_pose_position<class_Skeleton3D_method_set_bone_pose_position>`\ (\ bone_idx\: :ref:`int<class_int>`, position\: :ref:`Vector3<class_Vector3>`\ ) |
  128. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | |void| | :ref:`set_bone_pose_rotation<class_Skeleton3D_method_set_bone_pose_rotation>`\ (\ bone_idx\: :ref:`int<class_int>`, rotation\: :ref:`Quaternion<class_Quaternion>`\ ) |
  130. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | |void| | :ref:`set_bone_pose_scale<class_Skeleton3D_method_set_bone_pose_scale>`\ (\ bone_idx\: :ref:`int<class_int>`, scale\: :ref:`Vector3<class_Vector3>`\ ) |
  132. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | |void| | :ref:`set_bone_rest<class_Skeleton3D_method_set_bone_rest>`\ (\ bone_idx\: :ref:`int<class_int>`, rest\: :ref:`Transform3D<class_Transform3D>`\ ) |
  134. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | |void| | :ref:`unparent_bone_and_rest<class_Skeleton3D_method_unparent_bone_and_rest>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |
  136. +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. .. rst-class:: classref-section-separator
  138. ----
  139. .. rst-class:: classref-descriptions-group
  140. Signals
  141. -------
  142. .. _class_Skeleton3D_signal_bone_enabled_changed:
  143. .. rst-class:: classref-signal
  144. **bone_enabled_changed**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_signal_bone_enabled_changed>`
  145. Emitted when the bone at ``bone_idx`` is toggled with :ref:`set_bone_enabled()<class_Skeleton3D_method_set_bone_enabled>`. Use :ref:`is_bone_enabled()<class_Skeleton3D_method_is_bone_enabled>` to check the new value.
  146. .. rst-class:: classref-item-separator
  147. ----
  148. .. _class_Skeleton3D_signal_bone_list_changed:
  149. .. rst-class:: classref-signal
  150. **bone_list_changed**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_bone_list_changed>`
  151. Emitted when the list of bones changes, such as when calling :ref:`add_bone()<class_Skeleton3D_method_add_bone>`, :ref:`set_bone_parent()<class_Skeleton3D_method_set_bone_parent>`, :ref:`unparent_bone_and_rest()<class_Skeleton3D_method_unparent_bone_and_rest>`, or :ref:`clear_bones()<class_Skeleton3D_method_clear_bones>`.
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_Skeleton3D_signal_pose_updated:
  155. .. rst-class:: classref-signal
  156. **pose_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_pose_updated>`
  157. Emitted when the pose is updated.
  158. \ **Note:** During the update process, this signal is not fired, so modification by :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` is not detected.
  159. .. rst-class:: classref-item-separator
  160. ----
  161. .. _class_Skeleton3D_signal_rest_updated:
  162. .. rst-class:: classref-signal
  163. **rest_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_rest_updated>`
  164. Emitted when the rest is updated.
  165. .. rst-class:: classref-item-separator
  166. ----
  167. .. _class_Skeleton3D_signal_show_rest_only_changed:
  168. .. rst-class:: classref-signal
  169. **show_rest_only_changed**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_show_rest_only_changed>`
  170. Emitted when the value of :ref:`show_rest_only<class_Skeleton3D_property_show_rest_only>` changes.
  171. .. rst-class:: classref-item-separator
  172. ----
  173. .. _class_Skeleton3D_signal_skeleton_updated:
  174. .. rst-class:: classref-signal
  175. **skeleton_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_skeleton_updated>`
  176. Emitted when the final pose has been calculated will be applied to the skin in the update process.
  177. This means that all :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` processing is complete. In order to detect the completion of the processing of each :ref:`SkeletonModifier3D<class_SkeletonModifier3D>`, use :ref:`SkeletonModifier3D.modification_processed<class_SkeletonModifier3D_signal_modification_processed>`.
  178. .. rst-class:: classref-section-separator
  179. ----
  180. .. rst-class:: classref-descriptions-group
  181. Enumerations
  182. ------------
  183. .. _enum_Skeleton3D_ModifierCallbackModeProcess:
  184. .. rst-class:: classref-enumeration
  185. enum **ModifierCallbackModeProcess**: :ref:`🔗<enum_Skeleton3D_ModifierCallbackModeProcess>`
  186. .. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS:
  187. .. rst-class:: classref-enumeration-constant
  188. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS** = ``0``
  189. Set a flag to process modification during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`).
  190. .. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_IDLE:
  191. .. rst-class:: classref-enumeration-constant
  192. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_IDLE** = ``1``
  193. Set a flag to process modification during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`).
  194. .. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_MANUAL:
  195. .. rst-class:: classref-enumeration-constant
  196. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_MANUAL** = ``2``
  197. Do not process modification. Use :ref:`advance()<class_Skeleton3D_method_advance>` to process the modification manually.
  198. .. rst-class:: classref-section-separator
  199. ----
  200. .. rst-class:: classref-descriptions-group
  201. Constants
  202. ---------
  203. .. _class_Skeleton3D_constant_NOTIFICATION_UPDATE_SKELETON:
  204. .. rst-class:: classref-constant
  205. **NOTIFICATION_UPDATE_SKELETON** = ``50`` :ref:`🔗<class_Skeleton3D_constant_NOTIFICATION_UPDATE_SKELETON>`
  206. Notification received when this skeleton's pose needs to be updated. In that case, this is called only once per frame in a deferred process.
  207. .. rst-class:: classref-section-separator
  208. ----
  209. .. rst-class:: classref-descriptions-group
  210. Property Descriptions
  211. ---------------------
  212. .. _class_Skeleton3D_property_animate_physical_bones:
  213. .. rst-class:: classref-property
  214. :ref:`bool<class_bool>` **animate_physical_bones** = ``true`` :ref:`🔗<class_Skeleton3D_property_animate_physical_bones>`
  215. .. rst-class:: classref-property-setget
  216. - |void| **set_animate_physical_bones**\ (\ value\: :ref:`bool<class_bool>`\ )
  217. - :ref:`bool<class_bool>` **get_animate_physical_bones**\ (\ )
  218. **Deprecated:** This property may be changed or removed in future versions.
  219. If you follow the recommended workflow and explicitly have :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>` as a child of **Skeleton3D**, you can control whether it is affected by raycasting without running :ref:`physical_bones_start_simulation()<class_Skeleton3D_method_physical_bones_start_simulation>`, by its :ref:`SkeletonModifier3D.active<class_SkeletonModifier3D_property_active>`.
  220. However, for old (deprecated) configurations, **Skeleton3D** has an internal virtual :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>` for compatibility. This property controls the internal virtual :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>`'s :ref:`SkeletonModifier3D.active<class_SkeletonModifier3D_property_active>`.
  221. .. rst-class:: classref-item-separator
  222. ----
  223. .. _class_Skeleton3D_property_modifier_callback_mode_process:
  224. .. rst-class:: classref-property
  225. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **modifier_callback_mode_process** = ``1`` :ref:`🔗<class_Skeleton3D_property_modifier_callback_mode_process>`
  226. .. rst-class:: classref-property-setget
  227. - |void| **set_modifier_callback_mode_process**\ (\ value\: :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>`\ )
  228. - :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **get_modifier_callback_mode_process**\ (\ )
  229. Sets the processing timing for the Modifier.
  230. .. rst-class:: classref-item-separator
  231. ----
  232. .. _class_Skeleton3D_property_motion_scale:
  233. .. rst-class:: classref-property
  234. :ref:`float<class_float>` **motion_scale** = ``1.0`` :ref:`🔗<class_Skeleton3D_property_motion_scale>`
  235. .. rst-class:: classref-property-setget
  236. - |void| **set_motion_scale**\ (\ value\: :ref:`float<class_float>`\ )
  237. - :ref:`float<class_float>` **get_motion_scale**\ (\ )
  238. Multiplies the 3D position track animation.
  239. \ **Note:** Unless this value is ``1.0``, the key value in animation will not match the actual position value.
  240. .. rst-class:: classref-item-separator
  241. ----
  242. .. _class_Skeleton3D_property_show_rest_only:
  243. .. rst-class:: classref-property
  244. :ref:`bool<class_bool>` **show_rest_only** = ``false`` :ref:`🔗<class_Skeleton3D_property_show_rest_only>`
  245. .. rst-class:: classref-property-setget
  246. - |void| **set_show_rest_only**\ (\ value\: :ref:`bool<class_bool>`\ )
  247. - :ref:`bool<class_bool>` **is_show_rest_only**\ (\ )
  248. If ``true``, forces the bones in their default rest pose, regardless of their values. In the editor, this also prevents the bones from being edited.
  249. .. rst-class:: classref-section-separator
  250. ----
  251. .. rst-class:: classref-descriptions-group
  252. Method Descriptions
  253. -------------------
  254. .. _class_Skeleton3D_method_add_bone:
  255. .. rst-class:: classref-method
  256. :ref:`int<class_int>` **add_bone**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Skeleton3D_method_add_bone>`
  257. Adds a new bone with the given name. Returns the new bone's index, or ``-1`` if this method fails.
  258. \ **Note:** Bone names should be unique, non empty, and cannot include the ``:`` and ``/`` characters.
  259. .. rst-class:: classref-item-separator
  260. ----
  261. .. _class_Skeleton3D_method_advance:
  262. .. rst-class:: classref-method
  263. |void| **advance**\ (\ delta\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Skeleton3D_method_advance>`
  264. Manually advance the child :ref:`SkeletonModifier3D<class_SkeletonModifier3D>`\ s by the specified time (in seconds).
  265. \ **Note:** The ``delta`` is temporarily accumulated in the **Skeleton3D**, and the deferred process uses the accumulated value to process the modification.
  266. .. rst-class:: classref-item-separator
  267. ----
  268. .. _class_Skeleton3D_method_clear_bones:
  269. .. rst-class:: classref-method
  270. |void| **clear_bones**\ (\ ) :ref:`🔗<class_Skeleton3D_method_clear_bones>`
  271. Clear all the bones in this skeleton.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_Skeleton3D_method_clear_bones_global_pose_override:
  275. .. rst-class:: classref-method
  276. |void| **clear_bones_global_pose_override**\ (\ ) :ref:`🔗<class_Skeleton3D_method_clear_bones_global_pose_override>`
  277. **Deprecated:** This method may be changed or removed in future versions.
  278. Removes the global pose override on all bones in the skeleton.
  279. .. rst-class:: classref-item-separator
  280. ----
  281. .. _class_Skeleton3D_method_create_skin_from_rest_transforms:
  282. .. rst-class:: classref-method
  283. :ref:`Skin<class_Skin>` **create_skin_from_rest_transforms**\ (\ ) :ref:`🔗<class_Skeleton3D_method_create_skin_from_rest_transforms>`
  284. .. container:: contribute
  285. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  286. .. rst-class:: classref-item-separator
  287. ----
  288. .. _class_Skeleton3D_method_find_bone:
  289. .. rst-class:: classref-method
  290. :ref:`int<class_int>` **find_bone**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_find_bone>`
  291. Returns the bone index that matches ``name`` as its name. Returns ``-1`` if no bone with this name exists.
  292. .. rst-class:: classref-item-separator
  293. ----
  294. .. _class_Skeleton3D_method_force_update_all_bone_transforms:
  295. .. rst-class:: classref-method
  296. |void| **force_update_all_bone_transforms**\ (\ ) :ref:`🔗<class_Skeleton3D_method_force_update_all_bone_transforms>`
  297. **Deprecated:** This method should only be called internally.
  298. Force updates the bone transforms/poses for all bones in the skeleton.
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_Skeleton3D_method_force_update_bone_child_transform:
  302. .. rst-class:: classref-method
  303. |void| **force_update_bone_child_transform**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_force_update_bone_child_transform>`
  304. Force updates the bone transform for the bone at ``bone_idx`` and all of its children.
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _class_Skeleton3D_method_get_bone_children:
  308. .. rst-class:: classref-method
  309. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_bone_children**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_children>`
  310. Returns an array containing the bone indexes of all the child node of the passed in bone, ``bone_idx``.
  311. .. rst-class:: classref-item-separator
  312. ----
  313. .. _class_Skeleton3D_method_get_bone_count:
  314. .. rst-class:: classref-method
  315. :ref:`int<class_int>` **get_bone_count**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_count>`
  316. Returns the number of bones in the skeleton.
  317. .. rst-class:: classref-item-separator
  318. ----
  319. .. _class_Skeleton3D_method_get_bone_global_pose:
  320. .. rst-class:: classref-method
  321. :ref:`Transform3D<class_Transform3D>` **get_bone_global_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_pose>`
  322. Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.
  323. \ **Note:** This is the global pose you set to the skeleton in the process, the final global pose can get overridden by modifiers in the deferred process, if you want to access the final global pose, use :ref:`SkeletonModifier3D.modification_processed<class_SkeletonModifier3D_signal_modification_processed>`.
  324. .. rst-class:: classref-item-separator
  325. ----
  326. .. _class_Skeleton3D_method_get_bone_global_pose_no_override:
  327. .. rst-class:: classref-method
  328. :ref:`Transform3D<class_Transform3D>` **get_bone_global_pose_no_override**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_pose_no_override>`
  329. **Deprecated:** This method may be changed or removed in future versions.
  330. Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.
  331. .. rst-class:: classref-item-separator
  332. ----
  333. .. _class_Skeleton3D_method_get_bone_global_pose_override:
  334. .. rst-class:: classref-method
  335. :ref:`Transform3D<class_Transform3D>` **get_bone_global_pose_override**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_pose_override>`
  336. **Deprecated:** This method may be changed or removed in future versions.
  337. Returns the global pose override transform for ``bone_idx``.
  338. .. rst-class:: classref-item-separator
  339. ----
  340. .. _class_Skeleton3D_method_get_bone_global_rest:
  341. .. rst-class:: classref-method
  342. :ref:`Transform3D<class_Transform3D>` **get_bone_global_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_rest>`
  343. Returns the global rest transform for ``bone_idx``.
  344. .. rst-class:: classref-item-separator
  345. ----
  346. .. _class_Skeleton3D_method_get_bone_meta:
  347. .. rst-class:: classref-method
  348. :ref:`Variant<class_Variant>` **get_bone_meta**\ (\ bone_idx\: :ref:`int<class_int>`, key\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_meta>`
  349. Returns the metadata for the bone at index ``bone_idx`` with ``key``.
  350. .. rst-class:: classref-item-separator
  351. ----
  352. .. _class_Skeleton3D_method_get_bone_meta_list:
  353. .. rst-class:: classref-method
  354. :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_bone_meta_list**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_meta_list>`
  355. Returns the list of all metadata keys for the bone at index ``bone_idx``.
  356. .. rst-class:: classref-item-separator
  357. ----
  358. .. _class_Skeleton3D_method_get_bone_name:
  359. .. rst-class:: classref-method
  360. :ref:`String<class_String>` **get_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_name>`
  361. Returns the name of the bone at index ``bone_idx``.
  362. .. rst-class:: classref-item-separator
  363. ----
  364. .. _class_Skeleton3D_method_get_bone_parent:
  365. .. rst-class:: classref-method
  366. :ref:`int<class_int>` **get_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_parent>`
  367. Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, then bone has no parent.
  368. \ **Note:** The parent bone returned will always be less than ``bone_idx``.
  369. .. rst-class:: classref-item-separator
  370. ----
  371. .. _class_Skeleton3D_method_get_bone_pose:
  372. .. rst-class:: classref-method
  373. :ref:`Transform3D<class_Transform3D>` **get_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose>`
  374. Returns the pose transform of the specified bone.
  375. \ **Note:** This is the pose you set to the skeleton in the process, the final pose can get overridden by modifiers in the deferred process, if you want to access the final pose, use :ref:`SkeletonModifier3D.modification_processed<class_SkeletonModifier3D_signal_modification_processed>`.
  376. .. rst-class:: classref-item-separator
  377. ----
  378. .. _class_Skeleton3D_method_get_bone_pose_position:
  379. .. rst-class:: classref-method
  380. :ref:`Vector3<class_Vector3>` **get_bone_pose_position**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_position>`
  381. Returns the pose position of the bone at ``bone_idx``. The returned :ref:`Vector3<class_Vector3>` is in the local coordinate space of the **Skeleton3D** node.
  382. .. rst-class:: classref-item-separator
  383. ----
  384. .. _class_Skeleton3D_method_get_bone_pose_rotation:
  385. .. rst-class:: classref-method
  386. :ref:`Quaternion<class_Quaternion>` **get_bone_pose_rotation**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_rotation>`
  387. Returns the pose rotation of the bone at ``bone_idx``. The returned :ref:`Quaternion<class_Quaternion>` is local to the bone with respect to the rotation of any parent bones.
  388. .. rst-class:: classref-item-separator
  389. ----
  390. .. _class_Skeleton3D_method_get_bone_pose_scale:
  391. .. rst-class:: classref-method
  392. :ref:`Vector3<class_Vector3>` **get_bone_pose_scale**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_scale>`
  393. Returns the pose scale of the bone at ``bone_idx``.
  394. .. rst-class:: classref-item-separator
  395. ----
  396. .. _class_Skeleton3D_method_get_bone_rest:
  397. .. rst-class:: classref-method
  398. :ref:`Transform3D<class_Transform3D>` **get_bone_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_rest>`
  399. Returns the rest transform for a bone ``bone_idx``.
  400. .. rst-class:: classref-item-separator
  401. ----
  402. .. _class_Skeleton3D_method_get_concatenated_bone_names:
  403. .. rst-class:: classref-method
  404. :ref:`StringName<class_StringName>` **get_concatenated_bone_names**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_concatenated_bone_names>`
  405. Returns all bone names concatenated with commas (``,``) as a single :ref:`StringName<class_StringName>`.
  406. It is useful to set it as a hint for the enum property.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_Skeleton3D_method_get_parentless_bones:
  410. .. rst-class:: classref-method
  411. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_parentless_bones**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_parentless_bones>`
  412. Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _class_Skeleton3D_method_get_version:
  416. .. rst-class:: classref-method
  417. :ref:`int<class_int>` **get_version**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_version>`
  418. Returns the number of times the bone hierarchy has changed within this skeleton, including renames.
  419. The Skeleton version is not serialized: only use within a single instance of Skeleton3D.
  420. Use for invalidating caches in IK solvers and other nodes which process bones.
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_Skeleton3D_method_has_bone_meta:
  424. .. rst-class:: classref-method
  425. :ref:`bool<class_bool>` **has_bone_meta**\ (\ bone_idx\: :ref:`int<class_int>`, key\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_has_bone_meta>`
  426. Returns ``true`` if the bone at index ``bone_idx`` has metadata with the key ``key``.
  427. .. rst-class:: classref-item-separator
  428. ----
  429. .. _class_Skeleton3D_method_is_bone_enabled:
  430. .. rst-class:: classref-method
  431. :ref:`bool<class_bool>` **is_bone_enabled**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_is_bone_enabled>`
  432. Returns whether the bone pose for the bone at ``bone_idx`` is enabled.
  433. .. rst-class:: classref-item-separator
  434. ----
  435. .. _class_Skeleton3D_method_localize_rests:
  436. .. rst-class:: classref-method
  437. |void| **localize_rests**\ (\ ) :ref:`🔗<class_Skeleton3D_method_localize_rests>`
  438. Returns all bones in the skeleton to their rest poses.
  439. .. rst-class:: classref-item-separator
  440. ----
  441. .. _class_Skeleton3D_method_physical_bones_add_collision_exception:
  442. .. rst-class:: classref-method
  443. |void| **physical_bones_add_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_add_collision_exception>`
  444. **Deprecated:** This method may be changed or removed in future versions.
  445. Adds a collision exception to the physical bone.
  446. Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _class_Skeleton3D_method_physical_bones_remove_collision_exception:
  450. .. rst-class:: classref-method
  451. |void| **physical_bones_remove_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_remove_collision_exception>`
  452. **Deprecated:** This method may be changed or removed in future versions.
  453. Removes a collision exception to the physical bone.
  454. Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node.
  455. .. rst-class:: classref-item-separator
  456. ----
  457. .. _class_Skeleton3D_method_physical_bones_start_simulation:
  458. .. rst-class:: classref-method
  459. |void| **physical_bones_start_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_start_simulation>`
  460. **Deprecated:** This method may be changed or removed in future versions.
  461. Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to start simulating and reacting to the physics world.
  462. Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated.
  463. .. rst-class:: classref-item-separator
  464. ----
  465. .. _class_Skeleton3D_method_physical_bones_stop_simulation:
  466. .. rst-class:: classref-method
  467. |void| **physical_bones_stop_simulation**\ (\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_stop_simulation>`
  468. **Deprecated:** This method may be changed or removed in future versions.
  469. Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to stop simulating.
  470. .. rst-class:: classref-item-separator
  471. ----
  472. .. _class_Skeleton3D_method_register_skin:
  473. .. rst-class:: classref-method
  474. :ref:`SkinReference<class_SkinReference>` **register_skin**\ (\ skin\: :ref:`Skin<class_Skin>`\ ) :ref:`🔗<class_Skeleton3D_method_register_skin>`
  475. Binds the given Skin to the Skeleton.
  476. .. rst-class:: classref-item-separator
  477. ----
  478. .. _class_Skeleton3D_method_reset_bone_pose:
  479. .. rst-class:: classref-method
  480. |void| **reset_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_reset_bone_pose>`
  481. Sets the bone pose to rest for ``bone_idx``.
  482. .. rst-class:: classref-item-separator
  483. ----
  484. .. _class_Skeleton3D_method_reset_bone_poses:
  485. .. rst-class:: classref-method
  486. |void| **reset_bone_poses**\ (\ ) :ref:`🔗<class_Skeleton3D_method_reset_bone_poses>`
  487. Sets all bone poses to rests.
  488. .. rst-class:: classref-item-separator
  489. ----
  490. .. _class_Skeleton3D_method_set_bone_enabled:
  491. .. rst-class:: classref-method
  492. |void| **set_bone_enabled**\ (\ bone_idx\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_enabled>`
  493. Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone pose if ``true``.
  494. .. rst-class:: classref-item-separator
  495. ----
  496. .. _class_Skeleton3D_method_set_bone_global_pose:
  497. .. rst-class:: classref-method
  498. |void| **set_bone_global_pose**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_global_pose>`
  499. Sets the global pose transform, ``pose``, for the bone at ``bone_idx``.
  500. \ **Note:** If other bone poses have been changed, this method executes a dirty poses recalculation and will cause performance to deteriorate. If you know that multiple global poses will be applied, consider using :ref:`set_bone_pose()<class_Skeleton3D_method_set_bone_pose>` with precalculation.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_Skeleton3D_method_set_bone_global_pose_override:
  504. .. rst-class:: classref-method
  505. |void| **set_bone_global_pose_override**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`, amount\: :ref:`float<class_float>`, persistent\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_global_pose_override>`
  506. **Deprecated:** This method may be changed or removed in future versions.
  507. Sets the global pose transform, ``pose``, for the bone at ``bone_idx``.
  508. \ ``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain.
  509. \ **Note:** The pose transform needs to be a global pose! To convert a world transform from a :ref:`Node3D<class_Node3D>` to a global bone pose, multiply the :ref:`Transform3D.affine_inverse()<class_Transform3D_method_affine_inverse>` of the node's :ref:`Node3D.global_transform<class_Node3D_property_global_transform>` by the desired world transform.
  510. .. rst-class:: classref-item-separator
  511. ----
  512. .. _class_Skeleton3D_method_set_bone_meta:
  513. .. rst-class:: classref-method
  514. |void| **set_bone_meta**\ (\ bone_idx\: :ref:`int<class_int>`, key\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_meta>`
  515. Sets the metadata for the bone at index ``bone_idx``, setting the ``key`` meta to ``value``.
  516. .. rst-class:: classref-item-separator
  517. ----
  518. .. _class_Skeleton3D_method_set_bone_name:
  519. .. rst-class:: classref-method
  520. |void| **set_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_name>`
  521. Sets the bone name, ``name``, for the bone at ``bone_idx``.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _class_Skeleton3D_method_set_bone_parent:
  525. .. rst-class:: classref-method
  526. |void| **set_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`, parent_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_parent>`
  527. Sets the bone index ``parent_idx`` as the parent of the bone at ``bone_idx``. If -1, then bone has no parent.
  528. \ **Note:** ``parent_idx`` must be less than ``bone_idx``.
  529. .. rst-class:: classref-item-separator
  530. ----
  531. .. _class_Skeleton3D_method_set_bone_pose:
  532. .. rst-class:: classref-method
  533. |void| **set_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose>`
  534. Sets the pose transform, ``pose``, for the bone at ``bone_idx``.
  535. .. rst-class:: classref-item-separator
  536. ----
  537. .. _class_Skeleton3D_method_set_bone_pose_position:
  538. .. rst-class:: classref-method
  539. |void| **set_bone_pose_position**\ (\ bone_idx\: :ref:`int<class_int>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_position>`
  540. Sets the pose position of the bone at ``bone_idx`` to ``position``. ``position`` is a :ref:`Vector3<class_Vector3>` describing a position local to the **Skeleton3D** node.
  541. .. rst-class:: classref-item-separator
  542. ----
  543. .. _class_Skeleton3D_method_set_bone_pose_rotation:
  544. .. rst-class:: classref-method
  545. |void| **set_bone_pose_rotation**\ (\ bone_idx\: :ref:`int<class_int>`, rotation\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_rotation>`
  546. Sets the pose rotation of the bone at ``bone_idx`` to ``rotation``. ``rotation`` is a :ref:`Quaternion<class_Quaternion>` describing a rotation in the bone's local coordinate space with respect to the rotation of any parent bones.
  547. .. rst-class:: classref-item-separator
  548. ----
  549. .. _class_Skeleton3D_method_set_bone_pose_scale:
  550. .. rst-class:: classref-method
  551. |void| **set_bone_pose_scale**\ (\ bone_idx\: :ref:`int<class_int>`, scale\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_scale>`
  552. Sets the pose scale of the bone at ``bone_idx`` to ``scale``.
  553. .. rst-class:: classref-item-separator
  554. ----
  555. .. _class_Skeleton3D_method_set_bone_rest:
  556. .. rst-class:: classref-method
  557. |void| **set_bone_rest**\ (\ bone_idx\: :ref:`int<class_int>`, rest\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_rest>`
  558. Sets the rest transform for bone ``bone_idx``.
  559. .. rst-class:: classref-item-separator
  560. ----
  561. .. _class_Skeleton3D_method_unparent_bone_and_rest:
  562. .. rst-class:: classref-method
  563. |void| **unparent_bone_and_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_unparent_bone_and_rest>`
  564. Unparents the bone at ``bone_idx`` and sets its rest position to that of its parent prior to being reset.
  565. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  566. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  567. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  568. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  569. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  570. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  571. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  572. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  573. .. |void| replace:: :abbr:`void (No return value.)`