class_retargetmodifier3d.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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/RetargetModifier3D.xml.
  6. .. _class_RetargetModifier3D:
  7. RetargetModifier3D
  8. ==================
  9. **Inherits:** :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Retrieves the pose (or global pose) relative to the parent Skeleton's rest in model space and transfers it to the child Skeleton.
  15. This modifier rewrites the pose of the child skeleton directly in the parent skeleton's update process. This means that it overwrites the mapped bone pose set in the normal process on the target skeleton. If you want to set the target skeleton bone pose after retargeting, you will need to add a :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` child to the target skeleton and thereby modify the pose.
  16. \ **Note:** When the :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` is enabled, even if it is an unmapped bone, it can cause visual problems because the global pose is applied ignoring the parent bone's pose **if it has mapped bone children**. See also :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>`.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  23. | |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] | :ref:`enable<class_RetargetModifier3D_property_enable>` | ``7`` |
  24. +---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  25. | :ref:`SkeletonProfile<class_SkeletonProfile>` | :ref:`profile<class_RetargetModifier3D_property_profile>` | |
  26. +---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  27. | :ref:`bool<class_bool>` | :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` | ``false`` |
  28. +---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  29. .. rst-class:: classref-reftable-group
  30. Methods
  31. -------
  32. .. table::
  33. :widths: auto
  34. +-------------------------+----------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`is_position_enabled<class_RetargetModifier3D_method_is_position_enabled>`\ (\ ) |const| |
  36. +-------------------------+----------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`is_rotation_enabled<class_RetargetModifier3D_method_is_rotation_enabled>`\ (\ ) |const| |
  38. +-------------------------+----------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`is_scale_enabled<class_RetargetModifier3D_method_is_scale_enabled>`\ (\ ) |const| |
  40. +-------------------------+----------------------------------------------------------------------------------------------------------------------------+
  41. | |void| | :ref:`set_position_enabled<class_RetargetModifier3D_method_set_position_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
  42. +-------------------------+----------------------------------------------------------------------------------------------------------------------------+
  43. | |void| | :ref:`set_rotation_enabled<class_RetargetModifier3D_method_set_rotation_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
  44. +-------------------------+----------------------------------------------------------------------------------------------------------------------------+
  45. | |void| | :ref:`set_scale_enabled<class_RetargetModifier3D_method_set_scale_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
  46. +-------------------------+----------------------------------------------------------------------------------------------------------------------------+
  47. .. rst-class:: classref-section-separator
  48. ----
  49. .. rst-class:: classref-descriptions-group
  50. Enumerations
  51. ------------
  52. .. _enum_RetargetModifier3D_TransformFlag:
  53. .. rst-class:: classref-enumeration
  54. flags **TransformFlag**: :ref:`🔗<enum_RetargetModifier3D_TransformFlag>`
  55. .. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_POSITION** = ``1``
  58. If set, allows to retarget the position.
  59. .. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION:
  60. .. rst-class:: classref-enumeration-constant
  61. :ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_ROTATION** = ``2``
  62. If set, allows to retarget the rotation.
  63. .. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE:
  64. .. rst-class:: classref-enumeration-constant
  65. :ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_SCALE** = ``4``
  66. If set, allows to retarget the scale.
  67. .. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_ALL:
  68. .. rst-class:: classref-enumeration-constant
  69. :ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_ALL** = ``7``
  70. If set, allows to retarget the position/rotation/scale.
  71. .. rst-class:: classref-section-separator
  72. ----
  73. .. rst-class:: classref-descriptions-group
  74. Property Descriptions
  75. ---------------------
  76. .. _class_RetargetModifier3D_property_enable:
  77. .. rst-class:: classref-property
  78. |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] **enable** = ``7`` :ref:`🔗<class_RetargetModifier3D_property_enable>`
  79. .. rst-class:: classref-property-setget
  80. - |void| **set_enable_flags**\ (\ value\: |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\]\ )
  81. - |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] **get_enable_flags**\ (\ )
  82. Flags to control the process of the transform elements individually when :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` is disabled.
  83. .. rst-class:: classref-item-separator
  84. ----
  85. .. _class_RetargetModifier3D_property_profile:
  86. .. rst-class:: classref-property
  87. :ref:`SkeletonProfile<class_SkeletonProfile>` **profile** :ref:`🔗<class_RetargetModifier3D_property_profile>`
  88. .. rst-class:: classref-property-setget
  89. - |void| **set_profile**\ (\ value\: :ref:`SkeletonProfile<class_SkeletonProfile>`\ )
  90. - :ref:`SkeletonProfile<class_SkeletonProfile>` **get_profile**\ (\ )
  91. :ref:`SkeletonProfile<class_SkeletonProfile>` for retargeting bones with names matching the bone list.
  92. .. rst-class:: classref-item-separator
  93. ----
  94. .. _class_RetargetModifier3D_property_use_global_pose:
  95. .. rst-class:: classref-property
  96. :ref:`bool<class_bool>` **use_global_pose** = ``false`` :ref:`🔗<class_RetargetModifier3D_property_use_global_pose>`
  97. .. rst-class:: classref-property-setget
  98. - |void| **set_use_global_pose**\ (\ value\: :ref:`bool<class_bool>`\ )
  99. - :ref:`bool<class_bool>` **is_using_global_pose**\ (\ )
  100. If ``false``, in case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform will be ignored.
  101. Instead, it is possible to retarget between models with different body shapes, and position, rotation, and scale can be retargeted separately.
  102. If ``true``, retargeting is performed taking into account global pose.
  103. In case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform is taken into account. However, bone length between skeletons must match exactly, if not, the bones will be forced to expand or shrink.
  104. This is useful for using dummy bone with length ``0`` to match postures when retargeting between models with different number of bones.
  105. .. rst-class:: classref-section-separator
  106. ----
  107. .. rst-class:: classref-descriptions-group
  108. Method Descriptions
  109. -------------------
  110. .. _class_RetargetModifier3D_method_is_position_enabled:
  111. .. rst-class:: classref-method
  112. :ref:`bool<class_bool>` **is_position_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_position_enabled>`
  113. Returns ``true`` if :ref:`enable<class_RetargetModifier3D_property_enable>` has :ref:`TRANSFORM_FLAG_POSITION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION>`.
  114. .. rst-class:: classref-item-separator
  115. ----
  116. .. _class_RetargetModifier3D_method_is_rotation_enabled:
  117. .. rst-class:: classref-method
  118. :ref:`bool<class_bool>` **is_rotation_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_rotation_enabled>`
  119. Returns ``true`` if :ref:`enable<class_RetargetModifier3D_property_enable>` has :ref:`TRANSFORM_FLAG_ROTATION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION>`.
  120. .. rst-class:: classref-item-separator
  121. ----
  122. .. _class_RetargetModifier3D_method_is_scale_enabled:
  123. .. rst-class:: classref-method
  124. :ref:`bool<class_bool>` **is_scale_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_scale_enabled>`
  125. Returns ``true`` if :ref:`enable<class_RetargetModifier3D_property_enable>` has :ref:`TRANSFORM_FLAG_SCALE<class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE>`.
  126. .. rst-class:: classref-item-separator
  127. ----
  128. .. _class_RetargetModifier3D_method_set_position_enabled:
  129. .. rst-class:: classref-method
  130. |void| **set_position_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_position_enabled>`
  131. Sets :ref:`TRANSFORM_FLAG_POSITION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION>` into :ref:`enable<class_RetargetModifier3D_property_enable>`.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_RetargetModifier3D_method_set_rotation_enabled:
  135. .. rst-class:: classref-method
  136. |void| **set_rotation_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_rotation_enabled>`
  137. Sets :ref:`TRANSFORM_FLAG_ROTATION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION>` into :ref:`enable<class_RetargetModifier3D_property_enable>`.
  138. .. rst-class:: classref-item-separator
  139. ----
  140. .. _class_RetargetModifier3D_method_set_scale_enabled:
  141. .. rst-class:: classref-method
  142. |void| **set_scale_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_scale_enabled>`
  143. Sets :ref:`TRANSFORM_FLAG_SCALE<class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE>` into :ref:`enable<class_RetargetModifier3D_property_enable>`.
  144. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  145. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  146. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  147. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  148. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  149. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  150. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  151. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  152. .. |void| replace:: :abbr:`void (No return value.)`