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
new_name (Name) –
parent_name (Name) –
type (RigBoneType) –
- Returns
- Return type
- 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
new_name (Name) –
control_type (RigControlType) –
parent_name (Name) –
space_name (Name) –
gizmo_name (Name) –
gizmo_color (LinearColor) –
- Returns
- Return type
- add_curve(new_name, value=0.0) → RigElementKey¶
Adds a new single curve
- Parameters
- Returns
- Return type
- add_space(new_name, space_type=RigSpaceType.GLOBAL, parent_name='None') → RigElementKey¶
Adds a new single space
- Parameters
new_name (Name) –
space_type (RigSpaceType) –
parent_name (Name) –
- Returns
- Return type
- 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
- get_bone(key) → RigBone¶
Returns a single bone from provided key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- get_control(key) → RigControl¶
Returns a single control from provided key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- get_control_value_bool(key, value_type=RigControlValueType.INITIAL) → bool¶
Sets a control value
- Parameters
key (RigElementKey) –
value_type (RigControlValueType) –
- Returns
- Return type
- get_control_value_float(key, value_type=RigControlValueType.INITIAL) → float¶
Sets a control value
- Parameters
key (RigElementKey) –
value_type (RigControlValueType) –
- Returns
- Return type
- get_control_value_int(key, value_type=RigControlValueType.INITIAL) → int32¶
Sets a control value
- Parameters
key (RigElementKey) –
value_type (RigControlValueType) –
- Returns
- Return type
int32
- get_control_value_rotator(key, value_type=RigControlValueType.INITIAL) → Rotator¶
Sets a control value
- Parameters
key (RigElementKey) –
value_type (RigControlValueType) –
- Returns
- Return type
- get_control_value_transform(key, value_type=RigControlValueType.INITIAL) → Transform¶
Sets a control value
- Parameters
key (RigElementKey) –
value_type (RigControlValueType) –
- Returns
- Return type
- get_control_value_vector(key, value_type=RigControlValueType.INITIAL) → Vector¶
Sets a control value
- Parameters
key (RigElementKey) –
value_type (RigControlValueType) –
- Returns
- Return type
- get_control_value_vector2d(key, value_type=RigControlValueType.INITIAL) → Vector2D¶
Sets a control value
- Parameters
key (RigElementKey) –
value_type (RigControlValueType) –
- Returns
- Return type
- get_curve(key) → RigCurve¶
Returns a single curve from provided key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- get_elements()¶
Returns the keys of all elements within the hierarchy
- Returns
- Return type
- get_global_transform(key) → Transform¶
Returns the current global transform of a given element key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- get_initial_global_transform(key) → Transform¶
Returns the initial global transform for a given element key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- get_initial_transform(key) → Transform¶
Returns the initial transform for a given element key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- get_local_transform(key) → Transform¶
Returns the current local transform of a given element key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- get_selection()¶
Returns the keys of all selected elements within the hierarchy
- Returns
- Return type
- get_space(key) → RigSpace¶
Returns a single space from provided key
- Parameters
key (RigElementKey) –
- Returns
- Return type
- 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
content (str) –
import_mode (RigHierarchyImportMode) –
select_new_elements (bool) –
- Returns
- Return type
- 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
- remove_element(element) → bool¶
Removes a single element, returns true if successful
- Parameters
element (RigElementKey) –
- Returns
- Return type
- rename_element(element, new_name) → RigElementKey¶
Renames an existing element and returns the new element key
- Parameters
element (RigElementKey) –
new_name (Name) –
- Returns
- Return type
- reparent_element(element, new_parent) → bool¶
Reparents an element to another element, returns true if successful
- Parameters
element (RigElementKey) –
new_parent (RigElementKey) –
- Returns
- Return type
- select(key, select=True) → bool¶
Selects or deselects a given element
- Parameters
key (RigElementKey) –
select (bool) –
- Returns
- Return type
- 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
key (RigElementKey) –
value (bool) –
value_type (RigControlValueType) –
- set_control_value_float(key, value, value_type=RigControlValueType.INITIAL) → None¶
Sets a control value
- Parameters
key (RigElementKey) –
value (float) –
value_type (RigControlValueType) –
- set_control_value_int(key, value, value_type=RigControlValueType.INITIAL) → None¶
Sets a control value
- Parameters
key (RigElementKey) –
value (int32) –
value_type (RigControlValueType) –
- set_control_value_rotator(key, value, value_type=RigControlValueType.INITIAL) → None¶
Sets a control value
- Parameters
key (RigElementKey) –
value (Rotator) –
value_type (RigControlValueType) –
- set_control_value_transform(key, value, value_type=RigControlValueType.INITIAL) → None¶
Sets a control value
- Parameters
key (RigElementKey) –
value (Transform) –
value_type (RigControlValueType) –
- set_control_value_vector(key, value, value_type=RigControlValueType.INITIAL) → None¶
Sets a control value
- Parameters
key (RigElementKey) –
value (Vector) –
value_type (RigControlValueType) –
- set_control_value_vector2d(key, value, value_type=RigControlValueType.INITIAL) → None¶
Sets a control value
- Parameters
key (RigElementKey) –
value (Vector2D) –
value_type (RigControlValueType) –
- set_global_transform(key, transform) → None¶
Sets the current global transform of a given element key
- Parameters
key (RigElementKey) –
transform (Transform) –
- set_initial_global_transform(key, transform) → None¶
Sets the initial global transform for a given element key
- Parameters
key (RigElementKey) –
transform (Transform) –
- set_initial_transform(key, transform) → None¶
Sets the initial transform for a given element key
- Parameters
key (RigElementKey) –
transform (Transform) –
- set_local_transform(key, transform) → None¶
Sets the current local transform of a given element key
- Parameters
key (RigElementKey) –
transform (Transform) –