class_boneattachment3d.rst 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. :github_url: hide
  2. .. meta::
  3. :keywords: tag
  4. .. DO NOT EDIT THIS FILE!!!
  5. .. Generated automatically from Godot engine sources.
  6. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  7. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/BoneAttachment3D.xml.
  8. .. _class_BoneAttachment3D:
  9. BoneAttachment3D
  10. ================
  11. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  12. А node that dynamically copies or overrides the 3D transform of a bone in its parent :ref:`Skeleton3D<class_Skeleton3D>`.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. This node selects a bone in a :ref:`Skeleton3D<class_Skeleton3D>` and attaches to it. This means that the **BoneAttachment3D** node will either dynamically copy or override the 3D transform of the selected bone.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`bone_idx<class_BoneAttachment3D_property_bone_idx>` | ``-1`` |
  24. +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  25. | :ref:`String<class_String>` | :ref:`bone_name<class_BoneAttachment3D_property_bone_name>` | ``""`` |
  26. +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  27. | :ref:`NodePath<class_NodePath>` | :ref:`external_skeleton<class_BoneAttachment3D_property_external_skeleton>` | |
  28. +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`override_pose<class_BoneAttachment3D_property_override_pose>` | ``false`` |
  30. +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  31. | :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` | physics_interpolation_mode | ``2`` (overrides :ref:`Node<class_Node_property_physics_interpolation_mode>`) |
  32. +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`use_external_skeleton<class_BoneAttachment3D_property_use_external_skeleton>` | ``false`` |
  34. +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  35. .. rst-class:: classref-reftable-group
  36. Methods
  37. -------
  38. .. table::
  39. :widths: auto
  40. +-------------------------------------+-----------------------------------------------------------------------------------+
  41. | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_skeleton<class_BoneAttachment3D_method_get_skeleton>`\ (\ ) |
  42. +-------------------------------------+-----------------------------------------------------------------------------------+
  43. | |void| | :ref:`on_skeleton_update<class_BoneAttachment3D_method_on_skeleton_update>`\ (\ ) |
  44. +-------------------------------------+-----------------------------------------------------------------------------------+
  45. .. rst-class:: classref-section-separator
  46. ----
  47. .. rst-class:: classref-descriptions-group
  48. Property Descriptions
  49. ---------------------
  50. .. _class_BoneAttachment3D_property_bone_idx:
  51. .. rst-class:: classref-property
  52. :ref:`int<class_int>` **bone_idx** = ``-1`` :ref:`🔗<class_BoneAttachment3D_property_bone_idx>`
  53. .. rst-class:: classref-property-setget
  54. - |void| **set_bone_idx**\ (\ value\: :ref:`int<class_int>`\ )
  55. - :ref:`int<class_int>` **get_bone_idx**\ (\ )
  56. The index of the attached bone.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_BoneAttachment3D_property_bone_name:
  60. .. rst-class:: classref-property
  61. :ref:`String<class_String>` **bone_name** = ``""`` :ref:`🔗<class_BoneAttachment3D_property_bone_name>`
  62. .. rst-class:: classref-property-setget
  63. - |void| **set_bone_name**\ (\ value\: :ref:`String<class_String>`\ )
  64. - :ref:`String<class_String>` **get_bone_name**\ (\ )
  65. The name of the attached bone.
  66. .. rst-class:: classref-item-separator
  67. ----
  68. .. _class_BoneAttachment3D_property_external_skeleton:
  69. .. rst-class:: classref-property
  70. :ref:`NodePath<class_NodePath>` **external_skeleton** :ref:`🔗<class_BoneAttachment3D_property_external_skeleton>`
  71. .. rst-class:: classref-property-setget
  72. - |void| **set_external_skeleton**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
  73. - :ref:`NodePath<class_NodePath>` **get_external_skeleton**\ (\ )
  74. The :ref:`NodePath<class_NodePath>` to the external :ref:`Skeleton3D<class_Skeleton3D>` node.
  75. .. rst-class:: classref-item-separator
  76. ----
  77. .. _class_BoneAttachment3D_property_override_pose:
  78. .. rst-class:: classref-property
  79. :ref:`bool<class_bool>` **override_pose** = ``false`` :ref:`🔗<class_BoneAttachment3D_property_override_pose>`
  80. .. rst-class:: classref-property-setget
  81. - |void| **set_override_pose**\ (\ value\: :ref:`bool<class_bool>`\ )
  82. - :ref:`bool<class_bool>` **get_override_pose**\ (\ )
  83. Whether the **BoneAttachment3D** node will override the bone pose of the bone it is attached to. When set to ``true``, the **BoneAttachment3D** node can change the pose of the bone. When set to ``false``, the **BoneAttachment3D** will always be set to the bone's transform.
  84. \ **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with :ref:`SkeletonModifier3D<class_SkeletonModifier3D>`.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_BoneAttachment3D_property_use_external_skeleton:
  88. .. rst-class:: classref-property
  89. :ref:`bool<class_bool>` **use_external_skeleton** = ``false`` :ref:`🔗<class_BoneAttachment3D_property_use_external_skeleton>`
  90. .. rst-class:: classref-property-setget
  91. - |void| **set_use_external_skeleton**\ (\ value\: :ref:`bool<class_bool>`\ )
  92. - :ref:`bool<class_bool>` **get_use_external_skeleton**\ (\ )
  93. Whether the **BoneAttachment3D** node will use an external :ref:`Skeleton3D<class_Skeleton3D>` node rather than attempting to use its parent node as the :ref:`Skeleton3D<class_Skeleton3D>`. When set to ``true``, the **BoneAttachment3D** node will use the external :ref:`Skeleton3D<class_Skeleton3D>` node set in :ref:`external_skeleton<class_BoneAttachment3D_property_external_skeleton>`.
  94. .. rst-class:: classref-section-separator
  95. ----
  96. .. rst-class:: classref-descriptions-group
  97. Method Descriptions
  98. -------------------
  99. .. _class_BoneAttachment3D_method_get_skeleton:
  100. .. rst-class:: classref-method
  101. :ref:`Skeleton3D<class_Skeleton3D>` **get_skeleton**\ (\ ) :ref:`🔗<class_BoneAttachment3D_method_get_skeleton>`
  102. Returns the parent or external :ref:`Skeleton3D<class_Skeleton3D>` node if it exists, otherwise returns ``null``.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _class_BoneAttachment3D_method_on_skeleton_update:
  106. .. rst-class:: classref-method
  107. |void| **on_skeleton_update**\ (\ ) :ref:`🔗<class_BoneAttachment3D_method_on_skeleton_update>`
  108. A function that is called automatically when the :ref:`Skeleton3D<class_Skeleton3D>` is updated. This function is where the **BoneAttachment3D** node updates its position so it is correctly bound when it is *not* set to override the bone pose.
  109. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  110. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  111. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  112. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  113. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  114. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  115. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  116. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  117. .. |void| replace:: :abbr:`void (No return value.)`