unreal.RigHierarchy

class unreal.RigHierarchy(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

Rig Hierarchy

C++ Source:

  • Plugin: ControlRig

  • Module: ControlRig

  • File: RigHierarchy.h

Editor Properties: (see get_editor_property/set_editor_property)

  • modified_event (RigHierarchyModifiedDynamicEvent): [Read-Write]

contains(key) bool

Returns true if the provided element key is valid

Parameters:

key (RigElementKey) – The key to validate

Returns:

Returns true if the provided element key is valid

Return type:

bool

copy_hierarchy(hierarchy) None

Copies the contents of a hierarchy onto this one

Parameters:

hierarchy (RigHierarchy) –

copy_pose(hierarchy, current, initial, weights, match_pose_in_global_if_needed=False) None

Copies the contents of a hierarchy onto this one

Parameters:
find_bone(key) RigBoneElement

Returns bone element for a given key, for scripting purpose only, for cpp usage, use Find<FRigBoneElement>()

Parameters:

key (RigElementKey) – The key of the bone element to retrieve.

Return type:

RigBoneElement

find_control(key) RigControlElement

Returns control element for a given key, for scripting purpose only, for cpp usage, use Find<FRigControlElement>()

Parameters:

key (RigElementKey) – The key of the control element to retrieve.

Return type:

RigControlElement

find_null(key) RigNullElement

Returns null element for a given key, for scripting purpose only, for cpp usage, use Find<FRigControlElement>()

Parameters:

key (RigElementKey) – The key of the null element to retrieve.

Return type:

RigNullElement

get_all_keys(traverse=True) Array[RigElementKey]

Returns all element keys of this hierarchy

Parameters:

traverse (bool) – If set to true the keys will be returned by depth first traversal

Returns:

The keys of all elements

Return type:

Array[RigElementKey]

get_bones(traverse=True) Array[RigElementKey]

Returns all Bone elements

Parameters:

traverse (bool) – Returns the elements in order of a depth first traversal

Return type:

Array[RigElementKey]

get_bool_array_metadata(item, metadata_name) Array[bool]

Queries and returns the value of bool array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[bool]

get_bool_metadata(item, metadata_name, default_value) bool

Queries and returns the value of bool metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (bool) – The default value to fall back on

Return type:

bool

get_children(key, recursive=False) Array[RigElementKey]

Returns the child elements of a given element key

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the children for

  • recursive (bool) – If set to true grand-children will also be returned etc

Returns:

Returns the child elements

Return type:

Array[RigElementKey]

get_control_preferred_euler_angles(key, rotation_order, initial=False) Vector

Returns a control’s preferred euler angles (local transform rotation)

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the current value for

  • rotation_order (EulerRotationOrder) – The rotation order to use when retrieving the euler angles

  • initial (bool) – If true we’ll return the preferred euler angles for the initial - otherwise current transform

Returns:

Returns the current preferred euler angles

Return type:

Vector

get_control_preferred_euler_angles_by_index(element_index, rotation_order, initial=False) Vector

Returns a control’s preferred euler angles (local transform rotation)

Parameters:
  • element_index (int32) – The element index to look up

  • rotation_order (EulerRotationOrder) – The rotation order to use when retrieving the euler angles

  • initial (bool) – If true we’ll return the preferred euler angles for the initial - otherwise current transform

Returns:

Returns the current preferred euler angles

Return type:

Vector

get_control_preferred_euler_rotation_order(key, from_settings=True) EulerRotationOrder

Returns a control’s preferred euler rotation order

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the current value for

  • from_settings (bool) – If true the rotation order will be looked up from the control’s settings, otherwise from the currently set animation value

Returns:

Returns the current preferred euler rotation order

Return type:

EulerRotationOrder

get_control_preferred_euler_rotation_order_by_index(element_index, from_settings=True) EulerRotationOrder

Returns a control’s preferred euler rotation order

Parameters:
  • element_index (int32) – The element index to look up

  • from_settings (bool) – If true the rotation order will be looked up from the control’s settings, otherwise from the currently set animation value

Returns:

Returns the current preferred euler rotation order

Return type:

EulerRotationOrder

get_control_preferred_rotator(key, initial=False) Rotator

Returns a control’s preferred rotator (local transform rotation)

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the current value for

  • initial (bool) – If true we’ll return the preferred rotator for the initial - otherwise current transform

Returns:

Returns the current preferred rotator

Return type:

Rotator

get_control_preferred_rotator_by_index(element_index, initial=False) Rotator

Returns a control’s preferred rotator (local transform rotation)

Parameters:
  • element_index (int32) – The element index to look up

  • initial (bool) – If true we’ll return the preferred rotator for the initial - otherwise current transform

Returns:

Returns the current preferred rotator

Return type:

Rotator

get_control_value(key, value_type=RigControlValueType.CURRENT) RigControlValue

Returns a control’s current value given its key

Parameters:
Returns:

Returns the current value of the control

Return type:

RigControlValue

get_control_value_by_index(element_index, value_type=RigControlValueType.CURRENT) RigControlValue

Returns a control’s current value given its index

Parameters:
  • element_index (int32) – The index of the element to retrieve the current value for

  • value_type (RigControlValueType) – The type of value to return

Returns:

Returns the current value of the control

Return type:

RigControlValue

get_controller(create_if_needed=True) RigHierarchyController

Returns a controller for this hierarchy. Note: If the controller is not available this will return nullptr even if the bCreateIfNeeded flag is set to true. You can check the controller’s availability with IsControllerAvailable().

Parameters:

create_if_needed (bool) – Creates a controller if needed

Returns:

The Controller for this hierarchy

Return type:

RigHierarchyController

get_controls(traverse=True) Array[RigElementKey]

Returns all Control elements

Parameters:

traverse (bool) – Returns the elements in order of a depth first traversal

Return type:

Array[RigElementKey]

get_curve_value(key) float

Returns a curve’s value given its key

Parameters:

key (RigElementKey) – The key of the element to retrieve the value for

Returns:

Returns the value of the curve

Return type:

float

get_curve_value_by_index(element_index) float

Returns a curve’s value given its index

Parameters:

element_index (int32) – The index of the element to retrieve the value for

Returns:

Returns the value of the curve

Return type:

float

get_curves() Array[RigElementKey]

Returns all Curve elements

Return type:

Array[RigElementKey]

get_default_parent(key) RigElementKey

Returns the default parent element’s key of a given child key

Parameters:

key (RigElementKey) – The key of the element to retrieve the parent for

Returns:

Returns the default parent element key

Return type:

RigElementKey

classmethod get_euler_transform_from_control_value(value) EulerTransform

Returns the contained FEulerTransform value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted FEulerTransform value

Return type:

EulerTransform

get_first_parent(key) RigElementKey

Returns the first parent element of a given element key

Parameters:

key (RigElementKey) – The key of the element to retrieve the parents for

Returns:

Returns the first parent element

Return type:

RigElementKey

get_float_array_metadata(item, metadata_name) Array[float]

Queries and returns the value of float array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[float]

classmethod get_float_from_control_value(value) float

Returns the contained float value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted float value

Return type:

float

get_float_metadata(item, metadata_name, default_value) float

Queries and returns the value of float metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (float) – The default value to fall back on

Return type:

float

get_global_control_offset_transform(key, initial=False) Transform

Returns the global offset transform for a given control element.

Parameters:
  • key (RigElementKey) – The key of the control to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The global offset transform

Return type:

Transform

get_global_control_offset_transform_by_index(element_index, initial=False) Transform

Returns the global offset transform for a given control element.

Parameters:
  • element_index (int32) – The index of the control to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The global offset transform

Return type:

Transform

get_global_control_shape_transform(key, initial=False) Transform

Returns the global shape transform for a given control element.

Parameters:
  • key (RigElementKey) – The key of the control to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The global shape transform

Return type:

Transform

get_global_control_shape_transform_by_index(element_index, initial=False) Transform

Returns the global shape transform for a given control element.

Parameters:
  • element_index (int32) – The index of the control to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The global shape transform

Return type:

Transform

get_global_transform(key, initial=False) Transform

Returns the global current or initial value for a given key. If the key is invalid FTransform::Identity will be returned.

Parameters:
  • key (RigElementKey) – The key to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The global current or initial transform’s value.

Return type:

Transform

get_global_transform_by_index(element_index, initial=False) Transform

Returns the global current or initial value for a element index. If the index is invalid FTransform::Identity will be returned.

Parameters:
  • element_index (int32) – The index to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The global current or initial transform’s value.

Return type:

Transform

get_index(key) int32

Returns the index of an element given its key

Parameters:

key (RigElementKey) – The key of the element to retrieve the index for

Returns:

The index of the element or INDEX_NONE

Return type:

int32

get_int32_array_metadata(item, metadata_name) Array[int32]

Queries and returns the value of int32 array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[int32]

get_int32_metadata(item, metadata_name, default_value) int32

Queries and returns the value of int32 metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (int32) – The default value to fall back on

Return type:

int32

classmethod get_int_from_control_value(value) int32

Returns the contained int32 value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted int32 value

Return type:

int32

get_key(element_index) RigElementKey

Returns the key of an element given its index

Parameters:

element_index (int32) – The index of the element to retrieve the key for

Returns:

The key of an element given its index

Return type:

RigElementKey

get_keys(element_indices) Array[RigElementKey]

Returns the keys of an array of indices

Parameters:

element_indices (Array[int32]) – The indices to retrieve the keys for

Returns:

The keys of the elements given the indices

Return type:

Array[RigElementKey]

get_linear_color_array_metadata(item, metadata_name) Array[LinearColor]

Queries and returns the value of FLinearColor array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[LinearColor]

get_linear_color_metadata(item, metadata_name, default_value) LinearColor

Queries and returns the value of FLinearColor metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (LinearColor) – The default value to fall back on

Return type:

LinearColor

get_local_control_shape_transform(key, initial=False) Transform

Returns the local shape transform for a given control element.

Parameters:
  • key (RigElementKey) – The key of the control to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The local shape transform

Return type:

Transform

get_local_control_shape_transform_by_index(element_index, initial=False) Transform

Returns the local shape transform for a given control element.

Parameters:
  • element_index (int32) – The index of the control to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The local shape transform

Return type:

Transform

get_local_index(key) int32

Returns the index of an element given its key within its default parent (or root)

Parameters:

key (RigElementKey) – The key of the element to retrieve the index for

Returns:

The index of the element or INDEX_NONE

Return type:

int32

get_local_transform(key, initial=False) Transform

Returns the local current or initial value for a given key. If the key is invalid FTransform::Identity will be returned.

Parameters:
  • key (RigElementKey) – The key to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The local current or initial transform’s value.

Return type:

Transform

get_local_transform_by_index(element_index, initial=False) Transform

Returns the local current or initial value for a element index. If the index is invalid FTransform::Identity will be returned.

Parameters:
  • element_index (int32) – The index to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The local current or initial transform’s value.

Return type:

Transform

get_metadata_names(item) Array[Name]

Returns the name of metadata for a given element

Parameters:

item (RigElementKey) – The element key to return the metadata keys for

Return type:

Array[Name]

get_metadata_type(item, metadata_name) RigMetadataType

Returns the type of metadata given its name the item it is stored under

Parameters:
  • item (RigElementKey) – The element key to return the metadata type for

  • metadata_name (Name) – The name of the metadata to return the type for

Return type:

RigMetadataType

get_name_array_metadata(item, metadata_name) Array[Name]

Queries and returns the value of FName array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[Name]

get_name_metadata(item, metadata_name, default_value) Name

Queries and returns the value of FName metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (Name) – The default value to fall back on

Return type:

Name

get_nulls(traverse=True) Array[RigElementKey]

Returns all Null elements

Parameters:

traverse (bool) – Returns the elements in order of a depth first traversal

Return type:

Array[RigElementKey]

get_number_of_parents(key) int32

Returns the number of parents of an element

Parameters:

key (RigElementKey) – The key of the element to retrieve the number of parents for

Returns:

Returns the number of parents of an element

Return type:

int32

get_parent_transform(key, initial=False) Transform

Returns the global current or initial value for a given key. If the element does not have a parent FTransform::Identity will be returned.

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The element’s parent’s global current or initial transform’s value.

Return type:

Transform

get_parent_transform_by_index(element_index, initial=False) Transform

Returns the global current or initial value for a given element index. If the element does not have a parent FTransform::Identity will be returned.

Parameters:
  • element_index (int32) – The index of the element to retrieve the transform for

  • initial (bool) – If true the initial transform will be used

Returns:

The element’s parent’s global current or initial transform’s value.

Return type:

Transform

get_parent_weight(child, parent, initial=False) RigElementWeight

Returns the weight of a parent below a multi parent element

Parameters:
  • child (RigElementKey) – The key of the multi parented element

  • parent (RigElementKey) – The key of the parent to look up the weight for

  • initial (bool) – If true the initial weights will be used

Returns:

Returns the weight of a parent below a multi parent element, or FLT_MAX if the parent is invalid

Return type:

RigElementWeight

get_parent_weight_array(child, initial=False) Array[RigElementWeight]

Returns the weights of all parents below a multi parent element

Parameters:
  • child (RigElementKey) – The key of the multi parented element

  • initial (bool) – If true the initial weights will be used

Returns:

Returns the weight of a parent below a multi parent element, or FLT_MAX if the parent is invalid

Return type:

Array[RigElementWeight]

get_parents(key, recursive=False) Array[RigElementKey]

Returns the parent elements of a given element key

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the parents for

  • recursive (bool) – If set to true parents of parents will also be returned

Returns:

Returns the parent elements

Return type:

Array[RigElementKey]

get_pose(initial=False) RigPose

Returns the current / initial pose of the hierarchy

Parameters:

initial (bool) – If set to true the initial pose will be returned

Returns:

The pose of the hierarchy

Return type:

RigPose

get_previous_name(key) Name

Returns the previous name of an element prior to a rename operation

Parameters:

key (RigElementKey) – The key of the element to request the old name for

Return type:

Name

get_previous_parent(key) RigElementKey

Returns the previous parent of an element prior to a reparent operation

Parameters:

key (RigElementKey) – The key of the element to request the old parent for

Return type:

RigElementKey

get_quat_array_metadata(item, metadata_name) Array[Quat]

Queries and returns the value of FQuat array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[Quat]

get_quat_metadata(item, metadata_name, default_value) Quat

Queries and returns the value of FQuat metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (Quat) – The default value to fall back on

Return type:

Quat

get_references(traverse=True) Array[RigElementKey]

Returns all references

Parameters:

traverse (bool) – Returns the elements in order of a depth first traversal

Return type:

Array[RigElementKey]

get_rig_element_key_array_metadata(item, metadata_name) Array[RigElementKey]

Queries and returns the value of FRigElementKey array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[RigElementKey]

get_rig_element_key_metadata(item, metadata_name, default_value) RigElementKey

Queries and returns the value of FRigElementKey metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (RigElementKey) – The default value to fall back on

Return type:

RigElementKey

get_rigid_bodies(traverse=True) Array[RigElementKey]

Returns all RigidBody elements

Parameters:

traverse (bool) – Returns the elements in order of a depth first traversal

Return type:

Array[RigElementKey]

get_root_elements() Array[RigElementKey]

Returns all root element keys

Return type:

Array[RigElementKey]

get_rotator_array_metadata(item, metadata_name) Array[Rotator]

Queries and returns the value of FRotator array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[Rotator]

classmethod get_rotator_from_control_value(value) Rotator

Returns the contained FRotator value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted FRotator value

Return type:

Rotator

get_rotator_metadata(item, metadata_name, default_value) Rotator

Queries and returns the value of FRotator metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (Rotator) – The default value to fall back on

Return type:

Rotator

get_selected_keys(type_filter=RigElementType.ALL) Array[RigElementKey]

Returns the keys of selected elements InTypeFilter: The types to retrieve the selection for

Parameters:

type_filter (RigElementType) –

Returns:

An array of the currently selected elements

Return type:

Array[RigElementKey]

get_tags(item) Array[Name]
  • Returns the tags for a given item

Parameters:

item (RigElementKey) – The item to return the tags for

Return type:

Array[Name]

get_transform_array_metadata(item, metadata_name) Array[Transform]

Queries and returns the value of FTransform array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[Transform]

classmethod get_transform_from_control_value(value) Transform

Returns the contained FTransform value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted FTransform value

Return type:

Transform

get_transform_metadata(item, metadata_name, default_value) Transform

Queries and returns the value of FTransform metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (Transform) – The default value to fall back on

Return type:

Transform

classmethod get_transform_no_scale_from_control_value(value) TransformNoScale

Returns the contained FTransformNoScale value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted FTransformNoScale value

Return type:

TransformNoScale

classmethod get_vector2d_from_control_value(value) Vector2D

Returns the contained FVector2D value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted FVector2D value

Return type:

Vector2D

get_vector_array_metadata(item, metadata_name) Array[Vector]

Queries and returns the value of FVector array metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

Return type:

Array[Vector]

classmethod get_vector_from_control_value(value) Vector

Returns the contained FVector value from a a Rig Control Value

Parameters:

value (RigControlValue) – The Rig Control value to convert from

Returns:

The converted FVector value

Return type:

Vector

get_vector_metadata(item, metadata_name, default_value) Vector

Queries and returns the value of FVector metadata

Parameters:
  • item (RigElementKey) – The element key to return the metadata for

  • metadata_name (Name) – The name of the metadata to query

  • default_value (Vector) – The default value to fall back on

Return type:

Vector

has_tag(item, tag) bool
  • Returns true if a given item has a certain tag

Parameters:
  • item (RigElementKey) – The item to return the tags for *

  • tag (Name) – The tag to check

Return type:

bool

is_controller_available() bool

Returns true if the hierarchy controller is currently available The controller may not be available during certain events. If the controller is not available then GetController() will return nullptr.

Return type:

bool

is_curve_value_set(key) bool

Returns whether a curve’s value is set, given its key

Parameters:

key (RigElementKey) – The key of the element to retrieve the value for

Returns:

Returns true if the value is set, false otherwise.

Return type:

bool

is_curve_value_set_by_index(element_index) bool

Returns a curve’s value given its index

Parameters:

element_index (int32) – The index of the element to retrieve the value for

Returns:

Returns true if the value is set, false otherwise.

Return type:

bool

is_parented_to(child, parent) bool

Returns true if an element is parented to another element

Parameters:
  • child (RigElementKey) – The key of the child element to check for a parent

  • parent (RigElementKey) – The key of the parent element to check for

Returns:

True if the given parent and given child have a parent-child relationship

Return type:

bool

is_procedural(key) bool

Returns true if the provided element is procedural.

Parameters:

key (RigElementKey) – The key to validate

Returns:

Returns true if the element is procedural

Return type:

bool

is_selected(key) bool

Returns true if a given element is selected

Parameters:

key (RigElementKey) – The key to check

Returns:

true if a given element is selected

Return type:

bool

is_selected_by_index(index) bool

Returns true if a given element is selected

Parameters:

index (int32) – The index to check

Returns:

true if a given element is selected

Return type:

bool

is_valid_index(element_index) bool

Returns true if the provided element index is valid

Parameters:

element_index (int32) – The index to validate

Returns:

Returns true if the provided element index is valid

Return type:

bool

classmethod make_control_value_from_bool(value) RigControlValue

Creates a rig control value from a bool value

Parameters:

value (bool) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_euler_transform(value) RigControlValue

Creates a rig control value from a FEulerTransform value

Parameters:

value (EulerTransform) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_float(value) RigControlValue

Creates a rig control value from a float value

Parameters:

value (float) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_int(value) RigControlValue

Creates a rig control value from a int32 value

Parameters:

value (int32) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_rotator(value) RigControlValue

Creates a rig control value from a FRotator value

Parameters:

value (Rotator) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_transform(value) RigControlValue

Creates a rig control value from a FTransform value

Parameters:

value (Transform) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_transform_no_scale(value) RigControlValue

Creates a rig control value from a FTransformNoScale value

Parameters:

value (TransformNoScale) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_vector(value) RigControlValue

Creates a rig control value from a FVector value

Parameters:

value (Vector) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

classmethod make_control_value_from_vector2d(value) RigControlValue

Creates a rig control value from a FVector2D value

Parameters:

value (Vector2D) – The value to create the rig control value from

Returns:

The converted control rig val ue

Return type:

RigControlValue

property modified_event: RigHierarchyModifiedDynamicEvent

[Read-Only]

Type:

(RigHierarchyModifiedDynamicEvent)

num() int32

Returns the number of elements in the Hierarchy.

Returns:

The number of elements in the Hierarchy

Return type:

int32

remove_all_metadata(item) bool

Removes all of the metadata under a given item

Parameters:

item (RigElementKey) – The element key to search under

Return type:

bool

remove_metadata(item, metadata_name) bool

Removes the metadata under a given element

Parameters:
  • item (RigElementKey) – The element key to search under

  • metadata_name (Name) – The name of the metadata to remove

Return type:

bool

reset() None

Clears the whole hierarchy and removes all elements.

reset_curve_values() None

Resets all curves to 0.0

reset_pose_to_initial(type_filter) None

Resets the current pose of a filtered list of elements to the initial / ref pose.

Parameters:

type_filter (RigElementType) –

reset_to_default() None

Resets the hierarchy to the state of its default. This refers to the hierarchy on the default object.

send_auto_key_event(element, offset_in_seconds=0.000000, asynchronous=True) None

Sends an autokey event from the hierarchy to the world

Parameters:
  • element (RigElementKey) – The element to send the autokey for

  • offset_in_seconds (float) – The time offset in seconds

  • asynchronous (bool) – If set to true the event will go on a thread safe queue

set_bool_array_metadata(item, metadata_name, value) bool

Sets the metadata to a bool array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[bool]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_bool_metadata(item, metadata_name, value) bool

Sets the metadata to a bool value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (bool) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_control_offset_transform(key, transform, initial=False, affect_children=True, setup_undo=False, print_python_commands=False) None

Sets the offset transform for a given control element by key

Parameters:
  • key (RigElementKey) – The key of the control element to set the offset transform for

  • transform (Transform) – The new offset transform value to set

  • initial (bool) – If true the initial value will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_commands (bool) –

set_control_offset_transform_by_index(element_index, transform, initial=False, affect_children=True, setup_undo=False, print_python_commands=False) None

Sets the local offset transform for a given control element by index

Parameters:
  • element_index (int32) – The index of the control element to set the offset transform for

  • transform (Transform) – The new local offset transform value to set

  • initial (bool) – If true the initial value will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_commands (bool) –

set_control_preferred_euler_angles(key, euler_angles, rotation_order, initial=False, fix_euler_flips=False) None

Sets a control’s preferred euler angles (local transform rotation)

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the current value for

  • euler_angles (Vector) – The new preferred euler angles to set

  • rotation_order (EulerRotationOrder) – The rotation order to use when setting the euler angles

  • initial (bool) – If true we’ll return the preferred euler angles for the initial - otherwise current transform

  • fix_euler_flips (bool) – If true the new euler angles value will use the shortest path

set_control_preferred_euler_angles_by_index(element_index, euler_angles, rotation_order, initial=False, fix_euler_flips=False) None

Sets a control’s preferred euler angles (local transform rotation)

Parameters:
  • element_index (int32) – The element index to look up

  • euler_angles (Vector) – The new preferred euler angles to set

  • rotation_order (EulerRotationOrder) – The rotation order to use when setting the euler angles

  • initial (bool) – If true we’ll return the preferred euler angles for the initial - otherwise current transform

  • fix_euler_flips (bool) – If true the new euler angles value will use the shortest path

set_control_preferred_rotation_order(key, rotation_order) None

Sets a control’s preferred euler rotation order

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the current value for

  • rotation_order (EulerRotationOrder) – The rotation order to use when setting the euler angles

set_control_preferred_rotation_order_by_index(element_index, rotation_order) None

Sets a control’s preferred euler rotation order

Parameters:
  • element_index (int32) – The element index to look up

  • rotation_order (EulerRotationOrder) – The rotation order to use when setting the euler angles

set_control_preferred_rotator(key, rotator, initial=False, fix_euler_flips=False) None

Sets a control’s preferred rotator (local transform rotation)

Parameters:
  • key (RigElementKey) – The key of the element to retrieve the current value for

  • rotator (Rotator) – The new preferred rotator to set

  • initial (bool) – If true we’ll return the preferred rotator for the initial - otherwise current transform

  • fix_euler_flips (bool) – If true the new rotator value will use the shortest path

set_control_preferred_rotator_by_index(element_index, rotator, initial=False, fix_euler_flips=False) None

Sets a control’s preferred rotator (local transform rotation)

Parameters:
  • element_index (int32) – The element index to look up

  • rotator (Rotator) – The new preferred rotator to set

  • initial (bool) – If true we’ll return the preferred rotator for the initial - otherwise current transform

  • fix_euler_flips (bool) – If true the new rotator value will use the shortest path

set_control_settings(key, settings, setup_undo=False, force=False, print_python_commands=False) None

Sets the control settings for a given control element by key

Parameters:
  • key (RigElementKey) – The key of the control element to set the settings for

  • settings (RigControlSettings) – The new control settings value to set

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • force (bool) –

  • print_python_commands (bool) –

set_control_settings_by_index(element_index, settings, setup_undo=False, force=False, print_python_commands=False) None

Sets the control settings for a given control element by index

Parameters:
  • element_index (int32) – The index of the control element to set the settings for

  • settings (RigControlSettings) – The new control settings value to set

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • force (bool) –

  • print_python_commands (bool) –

set_control_shape_transform(key, transform, initial=False, setup_undo=False) None

Sets the shape transform for a given control element by key

Parameters:
  • key (RigElementKey) – The key of the control element to set the shape transform for

  • transform (Transform) – The new shape transform value to set

  • initial (bool) – If true the initial value will be used

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

set_control_shape_transform_by_index(element_index, transform, initial=False, setup_undo=False) None

Sets the local shape transform for a given control element by index

Parameters:
  • element_index (int32) – The index of the control element to set the shape transform for

  • transform (Transform) – The new local shape transform value to set

  • initial (bool) – If true the initial value will be used

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

set_control_value(key, value, value_type=RigControlValueType.CURRENT, setup_undo=False, print_python_commands=False) None

Sets a control’s current value given its key

Parameters:
  • key (RigElementKey) – The key of the element to set the current value for

  • value (RigControlValue) – The value to set on the control

  • value_type (RigControlValueType) – The type of value to set

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_commands (bool) –

set_control_value_by_index(element_index, value, value_type=RigControlValueType.CURRENT, setup_undo=False, print_python_commands=False) None

Sets a control’s current value given its index

Parameters:
  • element_index (int32) – The index of the element to set the current value for

  • value (RigControlValue) – The value to set on the control

  • value_type (RigControlValueType) – The type of value to set

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_commands (bool) –

set_control_visibility(key, visibility) None

Sets a control’s current visibility based on a key

Parameters:
  • key (RigElementKey) – The key of the element to set the visibility for

  • visibility (bool) – The visibility to set on the control

set_control_visibility_by_index(element_index, visibility) None

Sets a control’s current visibility based on a key

Parameters:
  • element_index (int32) – The index of the element to set the visibility for

  • visibility (bool) – The visibility to set on the control

set_curve_value(key, value, setup_undo=False) None

Sets a curve’s value given its key

Parameters:
  • key (RigElementKey) – The key of the element to set the value for

  • value (float) – The value to set on the curve

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

set_curve_value_by_index(element_index, value, setup_undo=False) None

Sets a curve’s value given its index

Parameters:
  • element_index (int32) – The index of the element to set the value for

  • value (float) – The value to set on the curve

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

set_float_array_metadata(item, metadata_name, value) bool

Sets the metadata to a float array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[float]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_float_metadata(item, metadata_name, value) bool

Sets the metadata to a float value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (float) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_global_transform(key, transform, initial=False, affect_children=True, setup_undo=False, print_python_command=False) None

Sets the global current or initial transform for a given key.

Parameters:
  • key (RigElementKey) – The key to set the transform for

  • transform (Transform) – The new transform value to set

  • initial (bool) – If true the initial transform will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_command (bool) –

set_global_transform_by_index(element_index, transform, initial=False, affect_children=True, setup_undo=False, print_python_command=False) None

Sets the global current or initial transform for a given element index.

Parameters:
  • element_index (int32) – The index of the element to set the transform for

  • transform (Transform) – The new transform value to set

  • initial (bool) – If true the initial transform will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_command (bool) –

set_int32_array_metadata(item, metadata_name, value) bool

Sets the metadata to a int32 array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[int32]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_int32_metadata(item, metadata_name, value) bool

Sets the metadata to a int32 value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (int32) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_linear_color_array_metadata(item, metadata_name, value) bool

Sets the metadata to a FLinearColor array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[LinearColor]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_linear_color_metadata(item, metadata_name, value) bool

Sets the metadata to a FLinearColor value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (LinearColor) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_local_transform(key, transform, initial=False, affect_children=True, setup_undo=False, print_python_commands=False) None

Sets the local current or initial transform for a given key.

Parameters:
  • key (RigElementKey) – The key to set the transform for

  • transform (Transform) – The new transform value to set

  • initial (bool) – If true the initial transform will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_commands (bool) –

set_local_transform_by_index(element_index, transform, initial=False, affect_children=True, setup_undo=False, print_python_commands=False) None

Sets the local current or initial transform for a given element index.

Parameters:
  • element_index (int32) – The index of the element to set the transform for

  • transform (Transform) – The new transform value to set

  • initial (bool) – If true the initial transform will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

  • print_python_commands (bool) –

set_name_array_metadata(item, metadata_name, value) bool

Sets the metadata to a FName array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[Name]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_name_metadata(item, metadata_name, value) bool

Sets the metadata to a FName value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Name) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_parent_weight(child, parent, weight, initial=False, affect_children=True) bool

Sets the weight of a parent below a multi parent element

Parameters:
  • child (RigElementKey) – The key of the multi parented element

  • parent (RigElementKey) – The key of the parent to look up the weight for

  • weight (RigElementWeight) – The new weight to set for the parent

  • initial (bool) – If true the initial weights will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

Returns:

Returns true if changing the weight was successful

Return type:

bool

set_parent_weight_array(child, weights, initial=False, affect_children=True) bool

Sets the all of the weights of the parents of a multi parent element

Parameters:
  • child (RigElementKey) – The key of the multi parented element

  • weights (Array[RigElementWeight]) – The new weights to set for the parents

  • initial (bool) – If true the initial weights will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

Returns:

Returns true if changing the weight was successful

Return type:

bool

set_pose(pose) None

Sets the current / initial pose of the hierarchy

Parameters:

pose (RigPose) – The pose to set on the hierarchy

set_quat_array_metadata(item, metadata_name, value) bool

Sets the metadata to a FQuat array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[Quat]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_quat_metadata(item, metadata_name, value) bool

Sets the metadata to a FQuat value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Quat) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_rig_element_key_array_metadata(item, metadata_name, value) bool

Sets the metadata to a FRigElementKey array value

Parameters:
Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_rig_element_key_metadata(item, metadata_name, value) bool

Sets the metadata to a FRigElementKey value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (RigElementKey) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_rotator_array_metadata(item, metadata_name, value) bool

Sets the metadata to a FRotator array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[Rotator]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_rotator_metadata(item, metadata_name, value) bool

Sets the metadata to a FRotator value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Rotator) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_tag(item, tag) bool
  • Sets a tag on an element in the hierarchy

Parameters:
  • item (RigElementKey) – The item to set the tag for *

  • tag (Name) – The tag to set

Return type:

bool

set_transform_array_metadata(item, metadata_name, value) bool

Sets the metadata to a FTransform array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[Transform]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_transform_metadata(item, metadata_name, value) bool

Sets the metadata to a FTransform value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Transform) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_vector_array_metadata(item, metadata_name, value) bool

Sets the metadata to a FVector array value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Array[Vector]) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

set_vector_metadata(item, metadata_name, value) bool

Sets the metadata to a FVector value

Parameters:
  • item (RigElementKey) – The element key to set the metadata for

  • metadata_name (Name) – The name of the metadata to set

  • value (Vector) – The value to set

Returns:

Returns true if setting the metadata was successful

Return type:

bool

sort_keys(keys) Array[RigElementKey]

Sorts the input key list by traversing the hierarchy

Parameters:

keys (Array[RigElementKey]) – The keys to sort

Returns:

The sorted keys

Return type:

Array[RigElementKey]

switch_to_default_parent(child, initial=False, affect_children=True) bool

Switches a multi parent element to its first parent

Parameters:
  • child (RigElementKey) – The key of the multi parented element

  • initial (bool) – If true the initial weights will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

Returns:

Returns true if changing the weight was successful

Return type:

bool

switch_to_parent(child, parent, initial=False, affect_children=True) bool

Switches a multi parent element to a single parent. This sets the new parent’s weight to 1.0 and disables weights for all other potential parents.

Parameters:
  • child (RigElementKey) – The key of the multi parented element

  • parent (RigElementKey) – The key of the parent to look up the weight for

  • initial (bool) – If true the initial weights will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

Returns:

Returns true if changing the weight was successful

Return type:

bool

switch_to_world_space(child, initial=False, affect_children=True) bool

Switches a multi parent element to world space. This injects a world space reference.

Parameters:
  • child (RigElementKey) – The key of the multi parented element

  • initial (bool) – If true the initial weights will be used

  • affect_children (bool) – If set to false children will not move (maintain global).

Returns:

Returns true if changing the weight was successful

Return type:

bool

unset_curve_value(key, setup_undo=False) None

Sets a curve’s value given its key

Parameters:
  • key (RigElementKey) – The key of the element to set the value for

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo

unset_curve_value_by_index(element_index, setup_undo=False) None

Sets a curve’s value given its index

Parameters:
  • element_index (int32) – The index of the element to set the value for

  • setup_undo (bool) – If true the transform stack will be setup for undo / redo