mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
258 lines
12 KiB
ReStructuredText
258 lines
12 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_RetargetModifier3D:
|
||
|
||
RetargetModifier3D
|
||
==================
|
||
|
||
**Hérite de :** :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Un modificateur pour transférer des poses d'un squelette parent (ou poses globales) à des squelettes enfant dans l'espace modèle avec des repos différents.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Description
|
||
-----------
|
||
|
||
Retrieves the pose (or global pose) relative to the parent Skeleton's rest in model space and transfers it to the child Skeleton.
|
||
|
||
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.
|
||
|
||
\ **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>`.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Propriétés
|
||
--------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||
| |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] | :ref:`enable<class_RetargetModifier3D_property_enable>` | ``7`` |
|
||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`SkeletonProfile<class_SkeletonProfile>` | :ref:`profile<class_RetargetModifier3D_property_profile>` | |
|
||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` | ``false`` |
|
||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Méthodes
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_position_enabled<class_RetargetModifier3D_method_is_position_enabled>`\ (\ ) |const| |
|
||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_rotation_enabled<class_RetargetModifier3D_method_is_rotation_enabled>`\ (\ ) |const| |
|
||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_scale_enabled<class_RetargetModifier3D_method_is_scale_enabled>`\ (\ ) |const| |
|
||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_position_enabled<class_RetargetModifier3D_method_set_position_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_rotation_enabled<class_RetargetModifier3D_method_set_rotation_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_scale_enabled<class_RetargetModifier3D_method_set_scale_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Énumérations
|
||
------------------------
|
||
|
||
.. _enum_RetargetModifier3D_TransformFlag:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
flags **TransformFlag**: :ref:`🔗<enum_RetargetModifier3D_TransformFlag>`
|
||
|
||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_POSITION** = ``1``
|
||
|
||
Si défini, permet de re-cibler la position.
|
||
|
||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_ROTATION** = ``2``
|
||
|
||
Si défini, permet de re-cibler la rotation.
|
||
|
||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_SCALE** = ``4``
|
||
|
||
Si défini, permet de re-cibler l'échelle.
|
||
|
||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_ALL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_ALL** = ``7``
|
||
|
||
Si défini, permet de re-cibler la position/rotation/échelle.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descriptions des propriétés
|
||
------------------------------------------------------
|
||
|
||
.. _class_RetargetModifier3D_property_enable:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
|bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] **enable** = ``7`` :ref:`🔗<class_RetargetModifier3D_property_enable>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_enable_flags**\ (\ value\: |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\]\ )
|
||
- |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] **get_enable_flags**\ (\ )
|
||
|
||
Flags to control the process of the transform elements individually when :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` is disabled.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RetargetModifier3D_property_profile:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`SkeletonProfile<class_SkeletonProfile>` **profile** :ref:`🔗<class_RetargetModifier3D_property_profile>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_profile**\ (\ value\: :ref:`SkeletonProfile<class_SkeletonProfile>`\ )
|
||
- :ref:`SkeletonProfile<class_SkeletonProfile>` **get_profile**\ (\ )
|
||
|
||
:ref:`SkeletonProfile<class_SkeletonProfile>` for retargeting bones with names matching the bone list.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RetargetModifier3D_property_use_global_pose:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **use_global_pose** = ``false`` :ref:`🔗<class_RetargetModifier3D_property_use_global_pose>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_use_global_pose**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_using_global_pose**\ (\ )
|
||
|
||
If ``false``, in case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform will be ignored.
|
||
|
||
Instead, it is possible to retarget between models with different body shapes, and position, rotation, and scale can be retargeted separately.
|
||
|
||
If ``true``, retargeting is performed taking into account global pose.
|
||
|
||
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.
|
||
|
||
This is useful for using dummy bone with length ``0`` to match postures when retargeting between models with different number of bones.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descriptions des méthodes
|
||
--------------------------------------------------
|
||
|
||
.. _class_RetargetModifier3D_method_is_position_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_position_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_position_enabled>`
|
||
|
||
Renvoie ``true`` si :ref:`enable<class_RetargetModifier3D_property_enable>` a :ref:`TRANSFORM_FLAG_POSITION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RetargetModifier3D_method_is_rotation_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_rotation_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_rotation_enabled>`
|
||
|
||
Renvoie ``true`` si :ref:`enable<class_RetargetModifier3D_property_enable>` a :ref:`TRANSFORM_FLAG_ROTATION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RetargetModifier3D_method_is_scale_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_scale_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_scale_enabled>`
|
||
|
||
Renvoie ``true`` si :ref:`enable<class_RetargetModifier3D_property_enable>` a :ref:`TRANSFORM_FLAG_SCALE<class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RetargetModifier3D_method_set_position_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_position_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_position_enabled>`
|
||
|
||
Définit :ref:`TRANSFORM_FLAG_POSITION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION>` dans :ref:`enable<class_RetargetModifier3D_property_enable>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RetargetModifier3D_method_set_rotation_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_rotation_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_rotation_enabled>`
|
||
|
||
Définit :ref:`TRANSFORM_FLAG_ROTATION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION>` dans :ref:`enable<class_RetargetModifier3D_property_enable>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RetargetModifier3D_method_set_scale_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_scale_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_scale_enabled>`
|
||
|
||
Définit :ref:`TRANSFORM_FLAG_SCALE<class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE>` dans :ref:`enable<class_RetargetModifier3D_property_enable>`.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Cette méthode doit typiquement être redéfinie par l'utilisateur pour avoir un effet.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Cette méthode n'a pas d'effets de bord. Elle ne modifie aucune des variables membres de l'instance.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Cette méthode accepte n'importe quel nombre d'arguments après ceux décris ici.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Cette méthode est utilisée pour construire un type.)`
|
||
.. |static| replace:: :abbr:`static (Cette méthode n'a pas besoin d'instance pour être appelée, elle peut donc être directement appelée en utilisant le nom de la classe.)`
|
||
.. |operator| replace:: :abbr:`operator (Cette méthode décrit un opérateur valide à utiliser avec ce type en tant qu'opérande gauche.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Cette valeur est un nombre entier composé d'un masque de bits des options suivantes.)`
|
||
.. |void| replace:: :abbr:`void (Aucune valeur de retour.)`
|