class_boneattachment3d.rst 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/BoneAttachment3D.xml.
  6. .. _class_BoneAttachment3D:
  7. BoneAttachment3D
  8. ================
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. А node that dynamically copies or overrides the 3D transform of a bone in its parent :ref:`Skeleton3D<class_Skeleton3D>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +-----------------------------+---------------------------------------------------------------------+-----------+
  21. | :ref:`int<class_int>` | :ref:`bone_idx<class_BoneAttachment3D_property_bone_idx>` | ``-1`` |
  22. +-----------------------------+---------------------------------------------------------------------+-----------+
  23. | :ref:`String<class_String>` | :ref:`bone_name<class_BoneAttachment3D_property_bone_name>` | ``""`` |
  24. +-----------------------------+---------------------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`override_pose<class_BoneAttachment3D_property_override_pose>` | ``false`` |
  26. +-----------------------------+---------------------------------------------------------------------+-----------+
  27. .. rst-class:: classref-reftable-group
  28. Methods
  29. -------
  30. .. table::
  31. :widths: auto
  32. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`NodePath<class_NodePath>` | :ref:`get_external_skeleton<class_BoneAttachment3D_method_get_external_skeleton>` **(** **)** |const| |
  34. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`get_use_external_skeleton<class_BoneAttachment3D_method_get_use_external_skeleton>` **(** **)** |const| |
  36. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`on_bone_pose_update<class_BoneAttachment3D_method_on_bone_pose_update>` **(** :ref:`int<class_int>` bone_index **)** |
  38. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_external_skeleton<class_BoneAttachment3D_method_set_external_skeleton>` **(** :ref:`NodePath<class_NodePath>` external_skeleton **)** |
  40. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_use_external_skeleton<class_BoneAttachment3D_method_set_use_external_skeleton>` **(** :ref:`bool<class_bool>` use_external_skeleton **)** |
  42. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Property Descriptions
  47. ---------------------
  48. .. _class_BoneAttachment3D_property_bone_idx:
  49. .. rst-class:: classref-property
  50. :ref:`int<class_int>` **bone_idx** = ``-1``
  51. .. rst-class:: classref-property-setget
  52. - void **set_bone_idx** **(** :ref:`int<class_int>` value **)**
  53. - :ref:`int<class_int>` **get_bone_idx** **(** **)**
  54. The index of the attached bone.
  55. .. rst-class:: classref-item-separator
  56. ----
  57. .. _class_BoneAttachment3D_property_bone_name:
  58. .. rst-class:: classref-property
  59. :ref:`String<class_String>` **bone_name** = ``""``
  60. .. rst-class:: classref-property-setget
  61. - void **set_bone_name** **(** :ref:`String<class_String>` value **)**
  62. - :ref:`String<class_String>` **get_bone_name** **(** **)**
  63. The name of the attached bone.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_BoneAttachment3D_property_override_pose:
  67. .. rst-class:: classref-property
  68. :ref:`bool<class_bool>` **override_pose** = ``false``
  69. .. rst-class:: classref-property-setget
  70. - void **set_override_pose** **(** :ref:`bool<class_bool>` value **)**
  71. - :ref:`bool<class_bool>` **get_override_pose** **(** **)**
  72. 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.
  73. .. rst-class:: classref-section-separator
  74. ----
  75. .. rst-class:: classref-descriptions-group
  76. Method Descriptions
  77. -------------------
  78. .. _class_BoneAttachment3D_method_get_external_skeleton:
  79. .. rst-class:: classref-method
  80. :ref:`NodePath<class_NodePath>` **get_external_skeleton** **(** **)** |const|
  81. Returns the :ref:`NodePath<class_NodePath>` to the external :ref:`Skeleton3D<class_Skeleton3D>` node, if one has been set.
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_BoneAttachment3D_method_get_use_external_skeleton:
  85. .. rst-class:: classref-method
  86. :ref:`bool<class_bool>` **get_use_external_skeleton** **(** **)** |const|
  87. Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D<class_Skeleton3D>` rather than attempting to use its parent node as the :ref:`Skeleton3D<class_Skeleton3D>`.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_BoneAttachment3D_method_on_bone_pose_update:
  91. .. rst-class:: classref-method
  92. void **on_bone_pose_update** **(** :ref:`int<class_int>` bone_index **)**
  93. A function that is called automatically when the :ref:`Skeleton3D<class_Skeleton3D>` the BoneAttachment3D node is using has a bone that has changed its pose. 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.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_BoneAttachment3D_method_set_external_skeleton:
  97. .. rst-class:: classref-method
  98. void **set_external_skeleton** **(** :ref:`NodePath<class_NodePath>` external_skeleton **)**
  99. Sets the :ref:`NodePath<class_NodePath>` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton<class_BoneAttachment3D_method_set_use_external_skeleton>` to enable the external :ref:`Skeleton3D<class_Skeleton3D>` node.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_BoneAttachment3D_method_set_use_external_skeleton:
  103. .. rst-class:: classref-method
  104. void **set_use_external_skeleton** **(** :ref:`bool<class_bool>` use_external_skeleton **)**
  105. Sets whether the BoneAttachment3D node will use an extenral :ref:`Skeleton3D<class_Skeleton3D>` node rather than attenpting 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:`set_external_skeleton<class_BoneAttachment3D_method_set_external_skeleton>`.
  106. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  107. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  108. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  109. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  110. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  111. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`