ConvertTransformModifier3D
Inherits: BoneConstraint3D < SkeletonModifier3D < Entity3D < Entity < Object
Description
Section titled “Description”A SkeletonModifier3D that apply transform to the bone which converted from reference.
Apply the copied transform of the bone set by BoneConstraint3D.set_reference_bone() to the bone set by BoneConstraint3D.set_apply_bone() about the specific axis with remapping it with some options.
There are 4 ways to apply the transform, depending on the combination of set_relative() and set_additive().
Relative + Additive:
- Extract reference pose relative to the rest and add it to the apply bone’s pose.
Relative + Not Additive:
- Extract reference pose relative to the rest and add it to the apply bone’s rest.
Not Relative + Additive:
- Extract reference pose absolutely and add it to the apply bone’s pose.
Not Relative + Not Additive:
- Extract reference pose absolutely and the apply bone’s pose is replaced with it.
Note: The relative and global options are only available when BoneConstraint3D.get_reference_type() is BoneConstraint3D.REFERENCE_TYPE_BONE. See also BoneConstraint3D.ReferenceType.
Note: If there is a rotation greater than 180 degrees with constrained axes, flipping may occur.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| int | setting_count |
0 |
Methods
Section titled “Methods”Enumerations
Section titled “Enumerations”TransformMode
enum TransformMode
TRANSFORM_MODE_POSITION = 0
Convert with position. Transfer the difference.
TRANSFORM_MODE_ROTATION = 1
Convert with rotation. The angle is the roll for the specified axis.
TRANSFORM_MODE_SCALE = 2
Convert with scale. Transfers the ratio, not the difference.
Property descriptions
Section titled “Property descriptions”setting_count
int setting_count = 0
The number of settings in the modifier.
Method descriptions
Section titled “Method descriptions”get_apply_axis
Vector3.Axis get_apply_axis(index: int) const
Returns the axis of the remapping destination transform.
get_apply_range_max
float get_apply_range_max(index: int) const
Returns the maximum value of the remapping destination range.
get_apply_range_min
float get_apply_range_min(index: int) const
Returns the minimum value of the remapping destination range.
get_apply_transform_mode
TransformMode get_apply_transform_mode(index: int) const
Returns the operation of the remapping destination transform.
get_reference_axis
Vector3.Axis get_reference_axis(index: int) const
Returns the axis of the remapping source transform.
get_reference_range_max
float get_reference_range_max(index: int) const
Returns the maximum value of the remapping source range.
get_reference_range_min
float get_reference_range_min(index: int) const
Returns the minimum value of the remapping source range.
get_reference_transform_mode
TransformMode get_reference_transform_mode(index: int) const
Returns the operation of the remapping source transform.
is_additive
bool is_additive(index: int) const
Returns true if the additive option is enabled in the setting at index.
is_global
bool is_global(index: int) const
Returns true if the global option is enabled in the setting at index.
is_relative
bool is_relative(index: int) const
Returns true if the relative option is enabled in the setting at index.
set_additive
void set_additive(index: int, enabled: bool)
Sets additive option in the setting at index to enabled. This mainly affects the process of applying transform to the BoneConstraint3D.set_apply_bone().
If enabled is true, the processed transform is added to the pose of the current apply bone.
If enabled is false, the pose of the current apply bone is replaced with the processed transform. However, if set set_relative() to true, the transform is relative to rest.
set_apply_axis
void set_apply_axis(index: int, axis: Vector3.Axis)
Sets the axis of the remapping destination transform.
set_apply_range_max
void set_apply_range_max(index: int, range_max: float)
Sets the maximum value of the remapping destination range.
set_apply_range_min
void set_apply_range_min(index: int, range_min: float)
Sets the minimum value of the remapping destination range.
set_apply_transform_mode
void set_apply_transform_mode(index: int, transform_mode: TransformMode)
Sets the operation of the remapping destination transform.
set_global
void set_global(index: int, enabled: bool)
Sets the global option in the setting at index to enabled.
If enabled is true, the global pose of the reference bone is used as the remapping source.
If enabled is false, the local pose of the reference bone is used as the remapping source.
Note: If the parent of the reference bone has a non-uniform scale, the reference bone is sheared as seen from global space. Since the local pose cannot bring in the shear, the scale may not be applied as intended.
set_reference_axis
void set_reference_axis(index: int, axis: Vector3.Axis)
Sets the axis of the remapping source transform.
set_reference_range_max
void set_reference_range_max(index: int, range_max: float)
Sets the maximum value of the remapping source range.
set_reference_range_min
void set_reference_range_min(index: int, range_min: float)
Sets the minimum value of the remapping source range.
set_reference_transform_mode
void set_reference_transform_mode(index: int, transform_mode: TransformMode)
Sets the operation of the remapping source transform.
set_relative
void set_relative(index: int, enabled: bool)
Sets relative option in the setting at index to enabled.
If enabled is true, the extracted and applying transform is relative to the rest.
If enabled is false, the extracted transform is absolute.
