unreal.ControlRigHierarchyModifier

class unreal.ControlRigHierarchyModifier(outer=None, name='None')

Bases: unreal.Object

Control Rig Hierarchy Modifier

C++ Source:

  • Plugin: ControlRig

  • Module: ControlRigDeveloper

  • File: ControlRigHierarchyModifier.h

add_bone(new_name, parent_name='None', type=RigBoneType.USER)RigElementKey

Adds a new single bone

Parameters
Returns

Return type

RigElementKey

add_control(new_name, control_type=RigControlType.TRANSFORM, parent_name='None', space_name='None', gizmo_name='Gizmo', gizmo_color=[0.0, 0.0, 0.0, 0.0])RigElementKey

Adds a new single control

Parameters
Returns

Return type

RigElementKey

add_curve(new_name, value=0.0)RigElementKey

Adds a new single curve

Parameters
Returns

Return type

RigElementKey

add_space(new_name, space_type=RigSpaceType.GLOBAL, parent_name='None')RigElementKey

Adds a new single space

Parameters
Returns

Return type

RigElementKey

clear_selection()bool

Clears the selection

Returns

Return type

bool

export_to_text(elements_to_export)str

Exports the elements provided to text (for copy & paste, import / export)

Parameters

elements_to_export (Array(RigElementKey)) –

Returns

Return type

str

get_bone(key)RigBone

Returns a single bone from provided key

Parameters

key (RigElementKey) –

Returns

Return type

RigBone

get_control(key)RigControl

Returns a single control from provided key

Parameters

key (RigElementKey) –

Returns

Return type

RigControl

get_control_value_bool(key, value_type=RigControlValueType.INITIAL)bool

Sets a control value

Parameters
Returns

Return type

bool

get_control_value_float(key, value_type=RigControlValueType.INITIAL)float

Sets a control value

Parameters
Returns

Return type

float

get_control_value_int(key, value_type=RigControlValueType.INITIAL)int32

Sets a control value

Parameters
Returns

Return type

int32

get_control_value_rotator(key, value_type=RigControlValueType.INITIAL)Rotator

Sets a control value

Parameters
Returns

Return type

Rotator

get_control_value_transform(key, value_type=RigControlValueType.INITIAL)Transform

Sets a control value

Parameters
Returns

Return type

Transform

get_control_value_vector(key, value_type=RigControlValueType.INITIAL)Vector

Sets a control value

Parameters
Returns

Return type

Vector

get_control_value_vector2d(key, value_type=RigControlValueType.INITIAL)Vector2D

Sets a control value

Parameters
Returns

Return type

Vector2D

get_curve(key)RigCurve

Returns a single curve from provided key

Parameters

key (RigElementKey) –

Returns

Return type

RigCurve

get_elements()

Returns the keys of all elements within the hierarchy

Returns

Return type

Array(RigElementKey)

get_global_transform(key)Transform

Returns the current global transform of a given element key

Parameters

key (RigElementKey) –

Returns

Return type

Transform

get_initial_global_transform(key)Transform

Returns the initial global transform for a given element key

Parameters

key (RigElementKey) –

Returns

Return type

Transform

get_initial_transform(key)Transform

Returns the initial transform for a given element key

Parameters

key (RigElementKey) –

Returns

Return type

Transform

get_local_transform(key)Transform

Returns the current local transform of a given element key

Parameters

key (RigElementKey) –

Returns

Return type

Transform

get_selection()

Returns the keys of all selected elements within the hierarchy

Returns

Return type

Array(RigElementKey)

get_space(key)RigSpace

Returns a single space from provided key

Parameters

key (RigElementKey) –

Returns

Return type

RigSpace

import_from_text(content, import_mode=RigHierarchyImportMode.APPEND, select_new_elements=True)

Imports the content of the provided text and returns the keys created

Parameters
Returns

Return type

Array(RigElementKey)

initialize(reset_transforms=True)None

Initializes the rig, but calling reset on all elements

Parameters

reset_transforms (bool) –

is_selected(key)bool

Returns true if a given element is currently selected

Parameters

key (RigElementKey) –

Returns

Return type

bool

remove_element(element)bool

Removes a single element, returns true if successful

Parameters

element (RigElementKey) –

Returns

Return type

bool

rename_element(element, new_name)RigElementKey

Renames an existing element and returns the new element key

Parameters
Returns

Return type

RigElementKey

reparent_element(element, new_parent)bool

Reparents an element to another element, returns true if successful

Parameters
Returns

Return type

bool

reset()None

Removes all elements of the hierarchy

reset_transforms()None

Resets the transforms on all elements of the hierarchy

select(key, select=True)bool

Selects or deselects a given element

Parameters
Returns

Return type

bool

set_bone(element)None

Updates a single bone

Parameters

element (RigBone) –

set_control(element)None

Updates a single control

Parameters

element (RigControl) –

set_control_value_bool(key, value, value_type=RigControlValueType.INITIAL)None

Sets a control value

Parameters
set_control_value_float(key, value, value_type=RigControlValueType.INITIAL)None

Sets a control value

Parameters
set_control_value_int(key, value, value_type=RigControlValueType.INITIAL)None

Sets a control value

Parameters
set_control_value_rotator(key, value, value_type=RigControlValueType.INITIAL)None

Sets a control value

Parameters
set_control_value_transform(key, value, value_type=RigControlValueType.INITIAL)None

Sets a control value

Parameters
set_control_value_vector(key, value, value_type=RigControlValueType.INITIAL)None

Sets a control value

Parameters
set_control_value_vector2d(key, value, value_type=RigControlValueType.INITIAL)None

Sets a control value

Parameters
set_curve(element)None

Updates a single curve

Parameters

element (RigCurve) –

set_global_transform(key, transform)None

Sets the current global transform of a given element key

Parameters
set_initial_global_transform(key, transform)None

Sets the initial global transform for a given element key

Parameters
set_initial_transform(key, transform)None

Sets the initial transform for a given element key

Parameters
set_local_transform(key, transform)None

Sets the current local transform of a given element key

Parameters
set_space(element)None

Updates a single space

Parameters

element (RigSpace) –