CopyTransformModifier3D
A SkeletonModifier3D that apply transform to the bone which copied from reference.
A SkeletonModifier3D that apply transform to the bone which copied from reference.
Apply the copied transform of the bone set by BoneConstraint3D.SetReferenceBone to the bone set by BoneConstraint3D.SetApplyBone with processing it with some masks and options.
There are 4 ways to apply the transform, depending on the combination of CopyTransformModifier3D.SetRelative and CopyTransformModifier3D.SetAdditive.
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.GetReferenceTypeisBoneConstraint3D.ReferenceType.Bone. See alsoBoneConstraint3D.ReferenceType.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CopyTransformModifier3DConstructor
public CopyTransformModifier3D();Properties1
SettingCountProperty
public int SettingCount { get; set; }The number of settings in the modifier.
Methods30
GetAxisFlagsCopyTransformModifier3D.AxisFlag
public CopyTransformModifier3D.AxisFlag GetAxisFlags(int index);Returns the axis flags of the setting at index.
| Name | Type | Default |
|---|---|---|
index | int | — |
CopyTransformModifier3D.AxisFlagGetCopyFlagsCopyTransformModifier3D.TransformFlag
public CopyTransformModifier3D.TransformFlag GetCopyFlags(int index);Returns the copy flags of the setting at index.
| Name | Type | Default |
|---|---|---|
index | int | — |
CopyTransformModifier3D.TransformFlagGetInvertFlagsCopyTransformModifier3D.AxisFlag
public CopyTransformModifier3D.AxisFlag GetInvertFlags(int index);Returns the invert flags of the setting at index.
| Name | Type | Default |
|---|---|---|
index | int | — |
CopyTransformModifier3D.AxisFlagIsAdditivebool
public bool IsAdditive(int index);Returns true if the additive option is enabled in the setting at index.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsAxisXEnabledbool
public bool IsAxisXEnabled(int index);Returns true if the enable flags has the flag for the X-axis in the setting at index. See also CopyTransformModifier3D.SetAxisFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsAxisXInvertedbool
public bool IsAxisXInverted(int index);Returns true if the invert flags has the flag for the X-axis in the setting at index. See also CopyTransformModifier3D.SetInvertFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsAxisYEnabledbool
public bool IsAxisYEnabled(int index);Returns true if the enable flags has the flag for the Y-axis in the setting at index. See also CopyTransformModifier3D.SetAxisFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsAxisYInvertedbool
public bool IsAxisYInverted(int index);Returns true if the invert flags has the flag for the Y-axis in the setting at index. See also CopyTransformModifier3D.SetInvertFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsAxisZEnabledbool
public bool IsAxisZEnabled(int index);Returns true if the enable flags has the flag for the Z-axis in the setting at index. See also CopyTransformModifier3D.SetAxisFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsAxisZInvertedbool
public bool IsAxisZInverted(int index);Returns true if the invert flags has the flag for the Z-axis in the setting at index. See also CopyTransformModifier3D.SetInvertFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsGlobalbool
public bool IsGlobal(int index);Returns true if the global option is enabled in the setting at index.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsPositionCopyingbool
public bool IsPositionCopying(int index);Returns true if the copy flags has the flag for the position in the setting at index. See also CopyTransformModifier3D.SetCopyFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsRelativebool
public bool IsRelative(int index);Returns true if the relative option is enabled in the setting at index.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsRotationCopyingbool
public bool IsRotationCopying(int index);Returns true if the copy flags has the flag for the rotation in the setting at index. See also CopyTransformModifier3D.SetCopyFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsScaleCopyingbool
public bool IsScaleCopying(int index);Returns true if the copy flags has the flag for the scale in the setting at index. See also CopyTransformModifier3D.SetCopyFlags.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolSetAdditivevoid
public void SetAdditive(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.SetApplyBone.
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 CopyTransformModifier3D.SetRelative to true, the transform is relative to rest.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetAxisFlagsvoid
public void SetAxisFlags(int index, CopyTransformModifier3D.AxisFlag axisFlags);Sets the flags to copy axes. If the flag is valid, the axis is copied.
| Name | Type | Default |
|---|---|---|
index | int | — |
axisFlags | CopyTransformModifier3D.AxisFlag | — |
SetAxisXEnabledvoid
public void SetAxisXEnabled(int index, bool enabled);If enabled is true, the X-axis will be copied.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetAxisXInvertedvoid
public void SetAxisXInverted(int index, bool enabled);If enabled is true, the X-axis will be inverted.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetAxisYEnabledvoid
public void SetAxisYEnabled(int index, bool enabled);If enabled is true, the Y-axis will be copied.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetAxisYInvertedvoid
public void SetAxisYInverted(int index, bool enabled);If enabled is true, the Y-axis will be inverted.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetAxisZEnabledvoid
public void SetAxisZEnabled(int index, bool enabled);If enabled is true, the Z-axis will be copied.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetAxisZInvertedvoid
public void SetAxisZInverted(int index, bool enabled);If enabled is true, the Z-axis will be inverted.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetCopyFlagsvoid
public void SetCopyFlags(int index, CopyTransformModifier3D.TransformFlag copyFlags);Sets the flags to process the transform operations. If the flag is valid, the transform operation is processed. Note: If the rotation is valid for only one axis, it respects the roll of the valid axis. If the rotation is valid for two axes, it discards the roll of the invalid axis.
| Name | Type | Default |
|---|---|---|
index | int | — |
copyFlags | CopyTransformModifier3D.TransformFlag | — |
SetCopyPositionvoid
public void SetCopyPosition(int index, bool enabled);If enabled is true, the position will be copied.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetCopyRotationvoid
public void SetCopyRotation(int index, bool enabled);If enabled is true, the rotation will be copied.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetCopyScalevoid
public void SetCopyScale(int index, bool enabled);If enabled is true, the scale will be copied.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetGlobalvoid
public void SetGlobal(int index, bool enabled);Sets the global option in the setting at index to enabled.
If enabled is true, the global pose of the reference bone is extracted and applied so that the global pose of the apply bone coincides with it.
If enabled is false, the local pose of the reference bone is extracted and applied to the local pose of the apply bone.
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetInvertFlagsvoid
public void SetInvertFlags(int index, CopyTransformModifier3D.AxisFlag axisFlags);Sets the flags to inverte axes. If the flag is valid, the axis is copied.
Note: An inverted scale means an inverse number, not a negative scale. For example, inverting 2.0 means 0.5.
Note: An inverted rotation flips the elements of the quaternion. For example, a two-axis inversion will flip the roll of each axis, and a three-axis inversion will flip the final orientation. However, be aware that flipping only one axis may cause unintended rotation by the unflipped axes, due to the characteristics of the quaternion.
| Name | Type | Default |
|---|---|---|
index | int | — |
axisFlags | CopyTransformModifier3D.AxisFlag | — |
SetRelativevoid
public void SetRelative(int index, bool enabled);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.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
CopyTransformModifier3D.AxisFlag
CopyTransformModifier3D.TransformFlag
| Value | Description |
|---|---|
All = 7 | If set, allows to copy the position/rotation/scale. |
Position = 1 | If set, allows to copy the position. |
Rotation = 2 | If set, allows to copy the rotation. |
Scale = 4 | If set, allows to copy the scale. |