Index · Object → Node → Node3D → SkeletonModifier3D → BoneConstraint3D → CopyTransformModifier3D

CopyTransformModifier3D

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

Class Description

Apply the copied transform of the bone set by BoneConstraint3D.set_reference_bone() to the bone set by BoneConstraint3D.set_apply_bone() with processing it with some masks and 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.

Properties

var setting_count: int = 0

The number of settings in the modifier.

Inherited from SkeletonModifier3D (2)
var active: bool = true
var influence: float = 1.0
Inherited from Node3D (17)
var position: Vector3 = Vector3(0, 0, 0)
var rotation: Vector3 = Vector3(0, 0, 0)
var rotation_order: EulerOrder = 2
var scale: Vector3 = Vector3(1, 1, 1)
var top_level: bool = false
var transform: Transform3D = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
var visibility_parent: NodePath = NodePath("")
var visible: bool = true
Inherited from Node (14)
var owner: Node

Methods

func get_axis_flags(index: int) -> CopyTransformModifier3D.AxisFlag

Returns the axis flags of the setting at index.

func get_copy_flags(index: int) -> CopyTransformModifier3D.TransformFlag

Returns the copy flags of the setting at index.

func get_invert_flags(index: int) -> CopyTransformModifier3D.AxisFlag

Returns the invert flags of the setting at index.

func is_additive(index: int) -> bool

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

func is_axis_x_enabled(index: int) -> bool

Returns true if the enable flags has the flag for the X-axis in the setting at index. See also set_axis_flags().

func is_axis_x_inverted(index: int) -> bool

Returns true if the invert flags has the flag for the X-axis in the setting at index. See also set_invert_flags().

func is_axis_y_enabled(index: int) -> bool

Returns true if the enable flags has the flag for the Y-axis in the setting at index. See also set_axis_flags().

func is_axis_y_inverted(index: int) -> bool

Returns true if the invert flags has the flag for the Y-axis in the setting at index. See also set_invert_flags().

func is_axis_z_enabled(index: int) -> bool

Returns true if the enable flags has the flag for the Z-axis in the setting at index. See also set_axis_flags().

func is_axis_z_inverted(index: int) -> bool

Returns true if the invert flags has the flag for the Z-axis in the setting at index. See also set_invert_flags().

func is_position_copying(index: int) -> bool

Returns true if the copy flags has the flag for the position in the setting at index. See also set_copy_flags().

func is_relative(index: int) -> bool

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

func is_rotation_copying(index: int) -> bool

Returns true if the copy flags has the flag for the rotation in the setting at index. See also set_copy_flags().

func is_scale_copying(index: int) -> bool

Returns true if the copy flags has the flag for the scale in the setting at index. See also set_copy_flags().

func set_additive(index: int, enabled: bool) -> void

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.

func set_axis_flags(index: int, axis_flags: CopyTransformModifier3D.AxisFlag) -> void

Sets the flags to copy axes. If the flag is valid, the axis is copied.

func set_axis_x_enabled(index: int, enabled: bool) -> void

If sets enabled to true, the X-axis will be copied.

func set_axis_x_inverted(index: int, enabled: bool) -> void

If sets enabled to true, the X-axis will be inverted.

func set_axis_y_enabled(index: int, enabled: bool) -> void

If sets enabled to true, the Y-axis will be copied.

func set_axis_y_inverted(index: int, enabled: bool) -> void

If sets enabled to true, the Y-axis will be inverted.

func set_axis_z_enabled(index: int, enabled: bool) -> void

If sets enabled to true, the Z-axis will be copied.

func set_axis_z_inverted(index: int, enabled: bool) -> void

If sets enabled to true, the Z-axis will be inverted.

func set_copy_flags(index: int, copy_flags: CopyTransformModifier3D.TransformFlag) -> void

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.

func set_copy_position(index: int, enabled: bool) -> void

If sets enabled to true, the position will be copied.

func set_copy_rotation(index: int, enabled: bool) -> void

If sets enabled to true, the rotation will be copied.

func set_copy_scale(index: int, enabled: bool) -> void

If sets enabled to true, the scale will be copied.

func set_invert_flags(index: int, axis_flags: CopyTransformModifier3D.AxisFlag) -> void

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.

func set_relative(index: int, enabled: bool) -> void

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.

Inherited from BoneConstraint3D (17)
func clear_setting() -> void
func get_amount(index: int) -> float
func get_apply_bone(index: int) -> int
func get_reference_bone(index: int) -> int
func set_amount(index: int, amount: float) -> void
func set_apply_bone(index: int, bone: int) -> void
func set_apply_bone_name(index: int, bone_name: String) -> void
func set_reference_bone(index: int, bone: int) -> void
func set_reference_bone_name(index: int, bone_name: String) -> void
func set_reference_node(index: int, node: NodePath) -> void
func set_setting_count(count: int) -> void
Inherited from SkeletonModifier3D (5)
func _process_modification() -> void
func _skeleton_changed(old_skeleton: Skeleton3D, new_skeleton: Skeleton3D) -> void
func _validate_bone_names() -> void
Inherited from Node3D (37)
func add_gizmo(gizmo: Node3DGizmo) -> void
func clear_gizmos() -> void
func force_update_transform() -> void
func get_gizmos() -> Node3DGizmo[]
func global_rotate(axis: Vector3, angle: float) -> void
func global_scale(scale: Vector3) -> void
func global_translate(offset: Vector3) -> void
func hide() -> void
func look_at(target: Vector3, up: Vector3 = Vector3(0, 1, 0), use_model_front: bool = false) -> void
func look_at_from_position(position: Vector3, target: Vector3, up: Vector3 = Vector3(0, 1, 0), use_model_front: bool = false) -> void
func orthonormalize() -> void
func rotate(axis: Vector3, angle: float) -> void
func rotate_object_local(axis: Vector3, angle: float) -> void
func rotate_x(angle: float) -> void
func rotate_y(angle: float) -> void
func rotate_z(angle: float) -> void
func scale_object_local(scale: Vector3) -> void
func set_disable_scale(disable: bool) -> void
func set_identity() -> void
func set_notify_local_transform(enable: bool) -> void
func set_notify_transform(enable: bool) -> void
func set_subgizmo_selection(gizmo: Node3DGizmo, id: int, transform: Transform3D) -> void
func show() -> void
func to_global(local_point: Vector3) -> Vector3
func to_local(global_point: Vector3) -> Vector3
func translate(offset: Vector3) -> void
func translate_object_local(offset: Vector3) -> void
func update_gizmos() -> void
Inherited from Node (106)
func _enter_tree() -> void
func _exit_tree() -> void
func _input(event: InputEvent) -> void
func _physics_process(delta: float) -> void
func _process(delta: float) -> void
func _ready() -> void
func _shortcut_input(event: InputEvent) -> void
func _unhandled_input(event: InputEvent) -> void
func _unhandled_key_input(event: InputEvent) -> void
func add_child(node: Node, force_readable_name: bool = false, internal: Node.InternalMode = 0) -> void
func add_sibling(sibling: Node, force_readable_name: bool = false) -> void
func add_to_group(group: StringName, persistent: bool = false) -> void
func atr(message: String, context: StringName = "") -> String
func atr_n(message: String, plural_message: StringName, n: int, context: StringName = "") -> String
func can_process() -> bool
func duplicate(flags: int = 15) -> Node
func find_child(pattern: String, recursive: bool = true, owned: bool = true) -> Node
func find_children(pattern: String, type: String = "", recursive: bool = true, owned: bool = true) -> Node[]
func find_parent(pattern: String) -> Node
func get_child(idx: int, include_internal: bool = false) -> Node
func get_child_count(include_internal: bool = false) -> int
func get_children(include_internal: bool = false) -> Node[]
func get_groups() -> StringName[]
func get_index(include_internal: bool = false) -> int
func get_node(path: NodePath) -> Node
func get_orphan_node_ids() -> int[]
func get_parent() -> Node
func get_path() -> NodePath
func get_path_to(node: Node, use_unique_path: bool = false) -> NodePath
func get_window() -> Window
func has_node(path: NodePath) -> bool
func is_ancestor_of(node: Node) -> bool
func is_greater_than(node: Node) -> bool
func is_in_group(group: StringName) -> bool
func move_child(child_node: Node, to_index: int) -> void
func notify_deferred_thread_group(what: int) -> void
func notify_thread_safe(what: int) -> void
func print_orphan_nodes() -> void
func print_tree() -> void
func print_tree_pretty() -> void
func propagate_call(method: StringName, args: Array = [], parent_first: bool = false) -> void
func propagate_notification(what: int) -> void
func queue_free() -> void
func remove_child(node: Node) -> void
func remove_from_group(group: StringName) -> void
func reparent(new_parent: Node, keep_global_transform: bool = true) -> void
func replace_by(node: Node, keep_groups: bool = false) -> void
func request_ready() -> void
func rpc(method: StringName) -> Error
func rpc_config(method: StringName, config: Variant) -> void
func rpc_id(peer_id: int, method: StringName) -> Error
func set_deferred_thread_group(property: StringName, value: Variant) -> void
func set_display_folded(fold: bool) -> void
func set_editable_instance(node: Node, is_editable: bool) -> void
func set_multiplayer_authority(id: int, recursive: bool = true) -> void
func set_physics_process(enable: bool) -> void
func set_physics_process_internal(enable: bool) -> void
func set_process(enable: bool) -> void
func set_process_input(enable: bool) -> void
func set_process_internal(enable: bool) -> void
func set_process_shortcut_input(enable: bool) -> void
func set_process_unhandled_input(enable: bool) -> void
func set_scene_instance_load_placeholder(load_placeholder: bool) -> void
func set_thread_safe(property: StringName, value: Variant) -> void
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from SkeletonModifier3D (1)
Inherited from Node3D (1)
Inherited from Node (11)
signal child_entered_tree(node: Node)
signal child_exiting_tree(node: Node)
signal ready()
signal renamed()
signal replacing_by(node: Node)
signal tree_entered()
signal tree_exited()
signal tree_exiting()
Inherited from Object (2)

Enums & Constants

enum TransformFlag
TRANSFORM_FLAG_POSITION = 1

If set, allows to copy the position.

TRANSFORM_FLAG_ROTATION = 2

If set, allows to copy the rotation.

TRANSFORM_FLAG_SCALE = 4

If set, allows to copy the scale.

TRANSFORM_FLAG_ALL = 7

If set, allows to copy the position/rotation/scale.

enum AxisFlag
AXIS_FLAG_X = 1

If set, allows to process the X-axis.

AXIS_FLAG_Y = 2

If set, allows to process the Y-axis.

AXIS_FLAG_Z = 4

If set, allows to process the Z-axis.

AXIS_FLAG_ALL = 7

If set, allows to process the all axes.