unreal.RigUnit_HierarchyImportCollisionFromPhysicsAsset

class unreal.RigUnit_HierarchyImportCollisionFromPhysicsAsset(execute_pin: RigVMExecutePin = [], physics_solver_component_key: RigComponentKey = Ellipsis, use_automatic_solver: bool = False, physics_asset: PhysicsAsset = Ellipsis, constraint_profile_name: Name = 'None', bones_to_use: None = [], name_space: Name = 'None', owner: RigElementKey = Ellipsis, bone_keys: None = [], physics_body_component_keys: None = [])

Bases: RigUnit_PhysicsBaseMutable

Imports/creates bones from the physics asset and creates collision for them. The bones will lose their hierarchy and be placed under the specified parent - ready to be moved around.

C++ Source:

  • Plugin: ControlRigPhysics

  • Module: ControlRigPhysics

  • File: RigPhysicsExecution.h

Editor Properties: (see get_editor_property/set_editor_property)

  • bone_keys (Array[RigElementKey]): [Read-Write]

  • bones_to_use (Array[Name]): [Read-Write] If this is empty, then all bones with bodies in the physics asset will be created. Otherwise only bodies that relate to the specified bones will be created.

  • constraint_profile_name (Name): [Read-Write] Name of the constraint profile to use. If empty (or invalid), the default profile will be used

  • execute_pin (RigVMExecutePin): [Read-Write] * This property is used to chain multiple mutable units together

  • name_space (Name): [Read-Write] Prefix to the bone names

  • owner (RigElementKey): [Read-Write] Parent/owner for all the new bones

  • physics_asset (PhysicsAsset): [Read-Write]

  • physics_body_component_keys (Array[RigComponentKey]): [Read-Write]

  • physics_solver_component_key (RigComponentKey): [Read-Write] Note that setting the solver component, if known, has the benefit of avoiding the need to search for an automatic solver.

  • use_automatic_solver (bool): [Read-Write] If true (and the physics solver is not explicitly set), then this component will be added to any physics solver that exists above it in the hierarchy, if that solver allows automatically adding physics components.

property bone_keys: None

[Read-Only]

Type:

(Array[RigElementKey])

property bones_to_use: None

[Read-Write] If this is empty, then all bones with bodies in the physics asset will be created. Otherwise only bodies that relate to the specified bones will be created.

Type:

(Array[Name])

property constraint_profile_name: Name

[Read-Write] Name of the constraint profile to use. If empty (or invalid), the default profile will be used

Type:

(Name)

property name_space: Name

[Read-Write] Prefix to the bone names

Type:

(Name)

property owner: RigElementKey

[Read-Write] Parent/owner for all the new bones

Type:

(RigElementKey)

property physics_asset: PhysicsAsset

[Read-Write]

Type:

(PhysicsAsset)

property physics_body_component_keys: None

[Read-Only]

Type:

(Array[RigComponentKey])

property physics_solver_component_key: RigComponentKey

[Read-Write] Note that setting the solver component, if known, has the benefit of avoiding the need to search for an automatic solver.

Type:

(RigComponentKey)

property use_automatic_solver: bool

[Read-Write] If true (and the physics solver is not explicitly set), then this component will be added to any physics solver that exists above it in the hierarchy, if that solver allows automatically adding physics components.

Type:

(bool)