Class reference

ConvertTransformModifier3D

Inherits BoneConstraint3D

A SkeletonModifier3D that apply transform to the bone which converted from reference.

Description

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: Relative option is available only in the case 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

int setting_count = 0

The number of settings in the modifier.

Methods

int get_apply_axis(int index) const

Returns the axis of the remapping destination transform.

float get_apply_range_max(int index) const

Returns the maximum value of the remapping destination range.

float get_apply_range_min(int index) const

Returns the minimum value of the remapping destination range.

int get_apply_transform_mode(int index) const

Returns the operation of the remapping destination transform.

int get_reference_axis(int index) const

Returns the axis of the remapping source transform.

float get_reference_range_max(int index) const

Returns the maximum value of the remapping source range.

float get_reference_range_min(int index) const

Returns the minimum value of the remapping source range.

int get_reference_transform_mode(int index) const

Returns the operation of the remapping source transform.

bool is_additive(int index) const

Returns true if the additive option is enabled in the setting at index.

bool is_relative(int index) const

Returns true if the relative option is enabled in the setting at index.

void set_additive(int index, bool enabled)

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 sets enabled to true, the processed transform is added to the pose of the current apply bone. If sets enabled to 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.

void set_apply_axis(int index, int axis)

Sets the axis of the remapping destination transform.

void set_apply_range_max(int index, float range_max)

Sets the maximum value of the remapping destination range.

void set_apply_range_min(int index, float range_min)

Sets the minimum value of the remapping destination range.

void set_apply_transform_mode(int index, int transform_mode)

Sets the operation of the remapping destination transform.

void set_reference_axis(int index, int axis)

Sets the axis of the remapping source transform.

void set_reference_range_max(int index, float range_max)

Sets the maximum value of the remapping source range.

void set_reference_range_min(int index, float range_min)

Sets the minimum value of the remapping source range.

void set_reference_transform_mode(int index, int transform_mode)

Sets the operation of the remapping source transform.

void set_relative(int index, bool enabled)

Sets relative option in the setting at index to enabled. If sets enabled to true, the extracted and applying transform is relative to the rest. If sets enabled to false, the extracted transform is absolute.

Constants

TRANSFORM_MODE_POSITION = 0

Enum: TransformMode

Convert with position. Transfer the difference.

TRANSFORM_MODE_ROTATION = 1

Enum: TransformMode

Convert with rotation. The angle is the roll for the specified axis.

TRANSFORM_MODE_SCALE = 2

Enum: TransformMode

Convert with scale. Transfers the ratio, not the difference.

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.