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. .. container:: contribute
  152. There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  153. .. rst-class:: classref-item-separator
  154. ----
  155. .. _class_Skeleton3D_signal_pose_updated:
  156. .. rst-class:: classref-signal
  157. **pose_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_pose_updated>`
  158. Emitted when the pose is updated.
  159. \ **Note:** During the update process, this signal is not fired, so modification by :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` is not detected.
  160. .. rst-class:: classref-item-separator
  161. ----
  162. .. _class_Skeleton3D_signal_rest_updated:
  163. .. rst-class:: classref-signal
  164. **rest_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_rest_updated>`
  165. Emitted when the rest is updated.
  166. .. rst-class:: classref-item-separator
  167. ----
  168. .. _class_Skeleton3D_signal_show_rest_only_changed:
  169. .. rst-class:: classref-signal
  170. **show_rest_only_changed**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_show_rest_only_changed>`
  171. Emitted when the value of :ref:`show_rest_only<class_Skeleton3D_property_show_rest_only>` changes.
  172. .. rst-class:: classref-item-separator
  173. ----
  174. .. _class_Skeleton3D_signal_skeleton_updated:
  175. .. rst-class:: classref-signal
  176. **skeleton_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_skeleton_updated>`
  177. Emitted when the final pose has been calculated will be applied to the skin in the update process.
  178. 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>`.
  179. .. rst-class:: classref-section-separator
  180. ----
  181. .. rst-class:: classref-descriptions-group
  182. Enumerations
  183. ------------
  184. .. _enum_Skeleton3D_ModifierCallbackModeProcess:
  185. .. rst-class:: classref-enumeration
  186. enum **ModifierCallbackModeProcess**: :ref:`🔗<enum_Skeleton3D_ModifierCallbackModeProcess>`
  187. .. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS:
  188. .. rst-class:: classref-enumeration-constant
  189. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS** = ``0``
  190. Set a flag to process modification during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`).
  191. .. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_IDLE:
  192. .. rst-class:: classref-enumeration-constant
  193. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_IDLE** = ``1``
  194. Set a flag to process modification during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`).
  195. .. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_MANUAL:
  196. .. rst-class:: classref-enumeration-constant
  197. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_MANUAL** = ``2``
  198. Do not process modification. Use :ref:`advance()<class_Skeleton3D_method_advance>` to process the modification manually.
  199. .. rst-class:: classref-section-separator
  200. ----
  201. .. rst-class:: classref-descriptions-group
  202. Constants
  203. ---------
  204. .. _class_Skeleton3D_constant_NOTIFICATION_UPDATE_SKELETON:
  205. .. rst-class:: classref-constant
  206. **NOTIFICATION_UPDATE_SKELETON** = ``50`` :ref:`🔗<class_Skeleton3D_constant_NOTIFICATION_UPDATE_SKELETON>`
  207. 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.
  208. .. rst-class:: classref-section-separator
  209. ----
  210. .. rst-class:: classref-descriptions-group
  211. Property Descriptions
  212. ---------------------
  213. .. _class_Skeleton3D_property_animate_physical_bones:
  214. .. rst-class:: classref-property
  215. :ref:`bool<class_bool>` **animate_physical_bones** = ``true`` :ref:`🔗<class_Skeleton3D_property_animate_physical_bones>`
  216. .. rst-class:: classref-property-setget
  217. - |void| **set_animate_physical_bones**\ (\ value\: :ref:`bool<class_bool>`\ )
  218. - :ref:`bool<class_bool>` **get_animate_physical_bones**\ (\ )
  219. **Deprecated:** This property may be changed or removed in future versions.
  220. 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>`.
  221. 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>`.
  222. .. rst-class:: classref-item-separator
  223. ----
  224. .. _class_Skeleton3D_property_modifier_callback_mode_process:
  225. .. rst-class:: classref-property
  226. :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **modifier_callback_mode_process** = ``1`` :ref:`🔗<class_Skeleton3D_property_modifier_callback_mode_process>`
  227. .. rst-class:: classref-property-setget
  228. - |void| **set_modifier_callback_mode_process**\ (\ value\: :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>`\ )
  229. - :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **get_modifier_callback_mode_process**\ (\ )
  230. Sets the processing timing for the Modifier.
  231. .. rst-class:: classref-item-separator
  232. ----
  233. .. _class_Skeleton3D_property_motion_scale:
  234. .. rst-class:: classref-property
  235. :ref:`float<class_float>` **motion_scale** = ``1.0`` :ref:`🔗<class_Skeleton3D_property_motion_scale>`
  236. .. rst-class:: classref-property-setget
  237. - |void| **set_motion_scale**\ (\ value\: :ref:`float<class_float>`\ )
  238. - :ref:`float<class_float>` **get_motion_scale**\ (\ )
  239. Multiplies the 3D position track animation.
  240. \ **Note:** Unless this value is ``1.0``, the key value in animation will not match the actual position value.
  241. .. rst-class:: classref-item-separator
  242. ----
  243. .. _class_Skeleton3D_property_show_rest_only:
  244. .. rst-class:: classref-property
  245. :ref:`bool<class_bool>` **show_rest_only** = ``false`` :ref:`🔗<class_Skeleton3D_property_show_rest_only>`
  246. .. rst-class:: classref-property-setget
  247. - |void| **set_show_rest_only**\ (\ value\: :ref:`bool<class_bool>`\ )
  248. - :ref:`bool<class_bool>` **is_show_rest_only**\ (\ )
  249. 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.
  250. .. rst-class:: classref-section-separator
  251. ----
  252. .. rst-class:: classref-descriptions-group
  253. Method Descriptions
  254. -------------------
  255. .. _class_Skeleton3D_method_add_bone:
  256. .. rst-class:: classref-method
  257. :ref:`int<class_int>` **add_bone**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Skeleton3D_method_add_bone>`
  258. Adds a new bone with the given name. Returns the new bone's index, or ``-1`` if this method fails.
  259. \ **Note:** Bone names should be unique, non empty, and cannot include the ``:`` and ``/`` characters.
  260. .. rst-class:: classref-item-separator
  261. ----
  262. .. _class_Skeleton3D_method_advance:
  263. .. rst-class:: classref-method
  264. |void| **advance**\ (\ delta\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Skeleton3D_method_advance>`
  265. Manually advance the child :ref:`SkeletonModifier3D<class_SkeletonModifier3D>`\ s by the specified time (in seconds).
  266. \ **Note:** The ``delta`` is temporarily accumulated in the **Skeleton3D**, and the deferred process uses the accumulated value to process the modification.
  267. .. rst-class:: classref-item-separator
  268. ----
  269. .. _class_Skeleton3D_method_clear_bones:
  270. .. rst-class:: classref-method
  271. |void| **clear_bones**\ (\ ) :ref:`🔗<class_Skeleton3D_method_clear_bones>`
  272. Clear all the bones in this skeleton.
  273. .. rst-class:: classref-item-separator
  274. ----
  275. .. _class_Skeleton3D_method_clear_bones_global_pose_override:
  276. .. rst-class:: classref-method
  277. |void| **clear_bones_global_pose_override**\ (\ ) :ref:`🔗<class_Skeleton3D_method_clear_bones_global_pose_override>`
  278. **Deprecated:** This method may be changed or removed in future versions.
  279. Removes the global pose override on all bones in the skeleton.
  280. .. rst-class:: classref-item-separator
  281. ----
  282. .. _class_Skeleton3D_method_create_skin_from_rest_transforms:
  283. .. rst-class:: classref-method
  284. :ref:`Skin<class_Skin>` **create_skin_from_rest_transforms**\ (\ ) :ref:`🔗<class_Skeleton3D_method_create_skin_from_rest_transforms>`
  285. .. container:: contribute
  286. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  287. .. rst-class:: classref-item-separator
  288. ----
  289. .. _class_Skeleton3D_method_find_bone:
  290. .. rst-class:: classref-method
  291. :ref:`int<class_int>` **find_bone**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_find_bone>`
  292. Returns the bone index that matches ``name`` as its name. Returns ``-1`` if no bone with this name exists.
  293. .. rst-class:: classref-item-separator
  294. ----
  295. .. _class_Skeleton3D_method_force_update_all_bone_transforms:
  296. .. rst-class:: classref-method
  297. |void| **force_update_all_bone_transforms**\ (\ ) :ref:`🔗<class_Skeleton3D_method_force_update_all_bone_transforms>`
  298. **Deprecated:** This method should only be called internally.
  299. Force updates the bone transforms/poses for all bones in the skeleton.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_Skeleton3D_method_force_update_bone_child_transform:
  303. .. rst-class:: classref-method
  304. |void| **force_update_bone_child_transform**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_force_update_bone_child_transform>`
  305. Force updates the bone transform for the bone at ``bone_idx`` and all of its children.
  306. .. rst-class:: classref-item-separator
  307. ----
  308. .. _class_Skeleton3D_method_get_bone_children:
  309. .. rst-class:: classref-method
  310. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_bone_children**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_children>`
  311. Returns an array containing the bone indexes of all the child node of the passed in bone, ``bone_idx``.
  312. .. rst-class:: classref-item-separator
  313. ----
  314. .. _class_Skeleton3D_method_get_bone_count:
  315. .. rst-class:: classref-method
  316. :ref:`int<class_int>` **get_bone_count**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_count>`
  317. Returns the number of bones in the skeleton.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_Skeleton3D_method_get_bone_global_pose:
  321. .. rst-class:: classref-method
  322. :ref:`Transform3D<class_Transform3D>` **get_bone_global_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_pose>`
  323. 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.
  324. \ **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>`.
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_Skeleton3D_method_get_bone_global_pose_no_override:
  328. .. rst-class:: classref-method
  329. :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>`
  330. **Deprecated:** This method may be changed or removed in future versions.
  331. 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.
  332. .. rst-class:: classref-item-separator
  333. ----
  334. .. _class_Skeleton3D_method_get_bone_global_pose_override:
  335. .. rst-class:: classref-method
  336. :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>`
  337. **Deprecated:** This method may be changed or removed in future versions.
  338. Returns the global pose override transform for ``bone_idx``.
  339. .. rst-class:: classref-item-separator
  340. ----
  341. .. _class_Skeleton3D_method_get_bone_global_rest:
  342. .. rst-class:: classref-method
  343. :ref:`Transform3D<class_Transform3D>` **get_bone_global_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_rest>`
  344. Returns the global rest transform for ``bone_idx``.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_Skeleton3D_method_get_bone_meta:
  348. .. rst-class:: classref-method
  349. :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>`
  350. Returns the metadata for the bone at index ``bone_idx`` with ``key``.
  351. .. rst-class:: classref-item-separator
  352. ----
  353. .. _class_Skeleton3D_method_get_bone_meta_list:
  354. .. rst-class:: classref-method
  355. :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>`
  356. Returns the list of all metadata keys for the bone at index ``bone_idx``.
  357. .. rst-class:: classref-item-separator
  358. ----
  359. .. _class_Skeleton3D_method_get_bone_name:
  360. .. rst-class:: classref-method
  361. :ref:`String<class_String>` **get_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_name>`
  362. Returns the name of the bone at index ``bone_idx``.
  363. .. rst-class:: classref-item-separator
  364. ----
  365. .. _class_Skeleton3D_method_get_bone_parent:
  366. .. rst-class:: classref-method
  367. :ref:`int<class_int>` **get_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_parent>`
  368. Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, then bone has no parent.
  369. \ **Note:** The parent bone returned will always be less than ``bone_idx``.
  370. .. rst-class:: classref-item-separator
  371. ----
  372. .. _class_Skeleton3D_method_get_bone_pose:
  373. .. rst-class:: classref-method
  374. :ref:`Transform3D<class_Transform3D>` **get_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose>`
  375. Returns the pose transform of the specified bone.
  376. \ **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>`.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_Skeleton3D_method_get_bone_pose_position:
  380. .. rst-class:: classref-method
  381. :ref:`Vector3<class_Vector3>` **get_bone_pose_position**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_position>`
  382. 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.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_Skeleton3D_method_get_bone_pose_rotation:
  386. .. rst-class:: classref-method
  387. :ref:`Quaternion<class_Quaternion>` **get_bone_pose_rotation**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_rotation>`
  388. 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.
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_Skeleton3D_method_get_bone_pose_scale:
  392. .. rst-class:: classref-method
  393. :ref:`Vector3<class_Vector3>` **get_bone_pose_scale**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_scale>`
  394. Returns the pose scale of the bone at ``bone_idx``.
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _class_Skeleton3D_method_get_bone_rest:
  398. .. rst-class:: classref-method
  399. :ref:`Transform3D<class_Transform3D>` **get_bone_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_rest>`
  400. Returns the rest transform for a bone ``bone_idx``.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_Skeleton3D_method_get_concatenated_bone_names:
  404. .. rst-class:: classref-method
  405. :ref:`StringName<class_StringName>` **get_concatenated_bone_names**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_concatenated_bone_names>`
  406. Returns all bone names concatenated with commas (``,``) as a single :ref:`StringName<class_StringName>`.
  407. It is useful to set it as a hint for the enum property.
  408. .. rst-class:: classref-item-separator
  409. ----
  410. .. _class_Skeleton3D_method_get_parentless_bones:
  411. .. rst-class:: classref-method
  412. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_parentless_bones**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_parentless_bones>`
  413. 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.
  414. .. rst-class:: classref-item-separator
  415. ----
  416. .. _class_Skeleton3D_method_get_version:
  417. .. rst-class:: classref-method
  418. :ref:`int<class_int>` **get_version**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_version>`
  419. Returns the number of times the bone hierarchy has changed within this skeleton, including renames.
  420. The Skeleton version is not serialized: only use within a single instance of Skeleton3D.
  421. Use for invalidating caches in IK solvers and other nodes which process bones.
  422. .. rst-class:: classref-item-separator
  423. ----
  424. .. _class_Skeleton3D_method_has_bone_meta:
  425. .. rst-class:: classref-method
  426. :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>`
  427. Returns ``true`` if the bone at index ``bone_idx`` has metadata with the key ``key``.
  428. .. rst-class:: classref-item-separator
  429. ----
  430. .. _class_Skeleton3D_method_is_bone_enabled:
  431. .. rst-class:: classref-method
  432. :ref:`bool<class_bool>` **is_bone_enabled**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_is_bone_enabled>`
  433. Returns whether the bone pose for the bone at ``bone_idx`` is enabled.
  434. .. rst-class:: classref-item-separator
  435. ----
  436. .. _class_Skeleton3D_method_localize_rests:
  437. .. rst-class:: classref-method
  438. |void| **localize_rests**\ (\ ) :ref:`🔗<class_Skeleton3D_method_localize_rests>`
  439. Returns all bones in the skeleton to their rest poses.
  440. .. rst-class:: classref-item-separator
  441. ----
  442. .. _class_Skeleton3D_method_physical_bones_add_collision_exception:
  443. .. rst-class:: classref-method
  444. |void| **physical_bones_add_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_add_collision_exception>`
  445. **Deprecated:** This method may be changed or removed in future versions.
  446. Adds a collision exception to the physical bone.
  447. Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node.
  448. .. rst-class:: classref-item-separator
  449. ----
  450. .. _class_Skeleton3D_method_physical_bones_remove_collision_exception:
  451. .. rst-class:: classref-method
  452. |void| **physical_bones_remove_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_remove_collision_exception>`
  453. **Deprecated:** This method may be changed or removed in future versions.
  454. Removes a collision exception to the physical bone.
  455. Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node.
  456. .. rst-class:: classref-item-separator
  457. ----
  458. .. _class_Skeleton3D_method_physical_bones_start_simulation:
  459. .. rst-class:: classref-method
  460. |void| **physical_bones_start_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_start_simulation>`
  461. **Deprecated:** This method may be changed or removed in future versions.
  462. Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to start simulating and reacting to the physics world.
  463. Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated.
  464. .. rst-class:: classref-item-separator
  465. ----
  466. .. _class_Skeleton3D_method_physical_bones_stop_simulation:
  467. .. rst-class:: classref-method
  468. |void| **physical_bones_stop_simulation**\ (\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_stop_simulation>`
  469. **Deprecated:** This method may be changed or removed in future versions.
  470. Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to stop simulating.
  471. .. rst-class:: classref-item-separator
  472. ----
  473. .. _class_Skeleton3D_method_register_skin:
  474. .. rst-class:: classref-method
  475. :ref:`SkinReference<class_SkinReference>` **register_skin**\ (\ skin\: :ref:`Skin<class_Skin>`\ ) :ref:`🔗<class_Skeleton3D_method_register_skin>`
  476. Binds the given Skin to the Skeleton.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_Skeleton3D_method_reset_bone_pose:
  480. .. rst-class:: classref-method
  481. |void| **reset_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_reset_bone_pose>`
  482. Sets the bone pose to rest for ``bone_idx``.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_Skeleton3D_method_reset_bone_poses:
  486. .. rst-class:: classref-method
  487. |void| **reset_bone_poses**\ (\ ) :ref:`🔗<class_Skeleton3D_method_reset_bone_poses>`
  488. Sets all bone poses to rests.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_Skeleton3D_method_set_bone_enabled:
  492. .. rst-class:: classref-method
  493. |void| **set_bone_enabled**\ (\ bone_idx\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_enabled>`
  494. Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone pose if ``true``.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_Skeleton3D_method_set_bone_global_pose:
  498. .. rst-class:: classref-method
  499. |void| **set_bone_global_pose**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_global_pose>`
  500. Sets the global pose transform, ``pose``, for the bone at ``bone_idx``.
  501. \ **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.
  502. .. rst-class:: classref-item-separator
  503. ----
  504. .. _class_Skeleton3D_method_set_bone_global_pose_override:
  505. .. rst-class:: classref-method
  506. |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>`
  507. **Deprecated:** This method may be changed or removed in future versions.
  508. Sets the global pose transform, ``pose``, for the bone at ``bone_idx``.
  509. \ ``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain.
  510. \ **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.
  511. .. rst-class:: classref-item-separator
  512. ----
  513. .. _class_Skeleton3D_method_set_bone_meta:
  514. .. rst-class:: classref-method
  515. |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>`
  516. Sets the metadata for the bone at index ``bone_idx``, setting the ``key`` meta to ``value``.
  517. .. rst-class:: classref-item-separator
  518. ----
  519. .. _class_Skeleton3D_method_set_bone_name:
  520. .. rst-class:: classref-method
  521. |void| **set_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_name>`
  522. Sets the bone name, ``name``, for the bone at ``bone_idx``.
  523. .. rst-class:: classref-item-separator
  524. ----
  525. .. _class_Skeleton3D_method_set_bone_parent:
  526. .. rst-class:: classref-method
  527. |void| **set_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`, parent_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_parent>`
  528. Sets the bone index ``parent_idx`` as the parent of the bone at ``bone_idx``. If -1, then bone has no parent.
  529. \ **Note:** ``parent_idx`` must be less than ``bone_idx``.
  530. .. rst-class:: classref-item-separator
  531. ----
  532. .. _class_Skeleton3D_method_set_bone_pose:
  533. .. rst-class:: classref-method
  534. |void| **set_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose>`
  535. Sets the pose transform, ``pose``, for the bone at ``bone_idx``.
  536. .. rst-class:: classref-item-separator
  537. ----
  538. .. _class_Skeleton3D_method_set_bone_pose_position:
  539. .. rst-class:: classref-method
  540. |void| **set_bone_pose_position**\ (\ bone_idx\: :ref:`int<class_int>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_position>`
  541. 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.
  542. .. rst-class:: classref-item-separator
  543. ----
  544. .. _class_Skeleton3D_method_set_bone_pose_rotation:
  545. .. rst-class:: classref-method
  546. |void| **set_bone_pose_rotation**\ (\ bone_idx\: :ref:`int<class_int>`, rotation\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_rotation>`
  547. 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.
  548. .. rst-class:: classref-item-separator
  549. ----
  550. .. _class_Skeleton3D_method_set_bone_pose_scale:
  551. .. rst-class:: classref-method
  552. |void| **set_bone_pose_scale**\ (\ bone_idx\: :ref:`int<class_int>`, scale\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_scale>`
  553. Sets the pose scale of the bone at ``bone_idx`` to ``scale``.
  554. .. rst-class:: classref-item-separator
  555. ----
  556. .. _class_Skeleton3D_method_set_bone_rest:
  557. .. rst-class:: classref-method
  558. |void| **set_bone_rest**\ (\ bone_idx\: :ref:`int<class_int>`, rest\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_rest>`
  559. Sets the rest transform for bone ``bone_idx``.
  560. .. rst-class:: classref-item-separator
  561. ----
  562. .. _class_Skeleton3D_method_unparent_bone_and_rest:
  563. .. rst-class:: classref-method
  564. |void| **unparent_bone_and_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_unparent_bone_and_rest>`
  565. Unparents the bone at ``bone_idx`` and sets its rest position to that of its parent prior to being reset.
  566. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  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.)`