Class RetargetModifier3D
A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests.
- Inheritance
-
RetargetModifier3D
Remarks
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 SkeletonModifier3D child to the target skeleton and thereby modify the pose.
Note: When the 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 use_global_pose.
Properties
enable
Flags to control the process of the transform elements individually when use_global_pose is disabled.
var enable : int = 7
Property Value
Remarks
profile
SkeletonProfile for retargeting bones with names matching the bone list.
var profile : SkeletonProfile
Property Value
Remarks
- void set_profile(SkeletonProfile value)
- SkeletonProfile get_profile
use_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.
var use_global_pose : bool = false
Property Value
Remarks
Methods
is_position_enabled
Qualifiers: const
Returns true
if enable has RetargetModifier3D.TRANSFORM_FLAG_POSITION.
bool is_position_enabled
is_rotation_enabled
Qualifiers: const
Returns true
if enable has RetargetModifier3D.TRANSFORM_FLAG_ROTATION.
bool is_rotation_enabled
is_scale_enabled
Qualifiers: const
Returns true
if enable has RetargetModifier3D.TRANSFORM_FLAG_SCALE.
bool is_scale_enabled
set_position_enabled(bool)
Sets RetargetModifier3D.TRANSFORM_FLAG_POSITION into enable.
void set_position_enabled(bool enabled)
Parameters
enabled
bool
set_rotation_enabled(bool)
Sets RetargetModifier3D.TRANSFORM_FLAG_ROTATION into enable.
void set_rotation_enabled(bool enabled)
Parameters
enabled
bool
set_scale_enabled(bool)
Sets RetargetModifier3D.TRANSFORM_FLAG_SCALE into enable.
void set_scale_enabled(bool enabled)
Parameters
enabled
bool