unreal.RigUnit_HierarchyInstantiateFromPhysicsAsset

class unreal.RigUnit_HierarchyInstantiateFromPhysicsAsset(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 = [], enable_joints: bool = False, enable_drives: bool = False, add_sim_space_control: bool = False, add_parent_space_control: bool = False, sim_space_control_data: PhysicsControlData = Ellipsis, parent_space_control_data: PhysicsControlData = Ellipsis, physics_body_component_keys: None = [], physics_joint_component_keys: None = [], sim_space_control_component_keys: None = [], parent_space_control_component_keys: None = [])

Bases: RigUnit_PhysicsBaseMutable

Creates multiple physics components based on the supplied physics asset. Note that the resulting simulation bodies may not precisely match the physics asset.

C++ Source:

  • Plugin: ControlRigPhysics

  • Module: ControlRigPhysics

  • File: RigPhysicsExecution.h

Editor Properties: (see get_editor_property/set_editor_property)

  • add_parent_space_control (bool): [Read-Write]

  • add_sim_space_control (bool): [Read-Write]

  • bones_to_use (Array[RigElementKey]): [Read-Write] If this is empty, then all bodies in the physics asset that match a bone in the hierarchy 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

  • enable_drives (bool): [Read-Write] Whether to enable the drives authored in the physics asset. Note that if you are creating parent space controls, you may not want the drives

  • enable_joints (bool): [Read-Write] Whether to enable the joints authored in the physics asset. Note that you can’t have drives without joints.

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

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

  • parent_space_control_data (PhysicsControlData): [Read-Write] Data for the parent space control

  • physics_asset (PhysicsAsset): [Read-Write]

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

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

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

  • sim_space_control_data (PhysicsControlData): [Read-Write] Data for the simulation space control

  • 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 add_parent_space_control: bool

[Read-Write]

Type:

(bool)

property add_sim_space_control: bool

[Read-Write]

Type:

(bool)

property bones_to_use: None

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

Type:

(Array[RigElementKey])

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 enable_drives: bool

[Read-Write] Whether to enable the drives authored in the physics asset. Note that if you are creating parent space controls, you may not want the drives

Type:

(bool)

property enable_joints: bool

[Read-Write] Whether to enable the joints authored in the physics asset. Note that you can’t have drives without joints.

Type:

(bool)

property parent_space_control_component_keys: None

[Read-Only]

Type:

(Array[RigComponentKey])

property parent_space_control_data: PhysicsControlData

[Read-Write] Data for the parent space control

Type:

(PhysicsControlData)

property physics_asset: PhysicsAsset

[Read-Write]

Type:

(PhysicsAsset)

property physics_body_component_keys: None

[Read-Only]

Type:

(Array[RigComponentKey])

property physics_joint_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 sim_space_control_component_keys: None

[Read-Only]

Type:

(Array[RigComponentKey])

property sim_space_control_data: PhysicsControlData

[Read-Write] Data for the simulation space control

Type:

(PhysicsControlData)

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)