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, 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. Note: This node only runs during the construction event (before physics instantiation, after which this data is frozen).

C++ Source:

  • Plugin: ControlRigPhysics

  • Module: ControlRigPhysics

  • File: RigPhysicsExecution.h

Editor Properties: (see get_editor_property/set_editor_property)

  • bone_keys (Array[RigElementKey]): [Read-Write] The element keys of the bones that were created to own the physics bodies

  • 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.

  • 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] The physics asset to import collision from

  • physics_body_component_keys (Array[RigComponentKey]): [Read-Write] The Physics Body component keys that were created

  • 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] The element keys of the bones that were created to own the physics bodies

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 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] The physics asset to import collision from

Type:

(PhysicsAsset)

property physics_body_component_keys: None

[Read-Only] The Physics Body component keys that were created

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)