unreal.RigUnit_SpawnDynamicsConstraint

class unreal.RigUnit_SpawnDynamicsConstraint(execute_pin: RigVMExecutePin = [], owner: RigElementKey = Ellipsis, dynamics_solver_component_key: RigComponentKey = Ellipsis, constraint_component_name: Name = 'None', parent_component_key: RigComponentKey = Ellipsis, child_component_key: RigComponentKey = Ellipsis, constraint_type: RigParticleSimulationConstraintType = Ellipsis, strength: float = 0.0, damping_ratio: float = 0.0, extra_damping: float = 0.0, acceleration_mode: bool = False, length_multiplier: float = 0.0, extra_length: float = 0.0, dynamics_constraint_component_key: RigComponentKey = Ellipsis)

Bases: RigUnit_DynamicsBaseMutable

Spawns a new dynamics constraint component. Note: This node only runs as part of the construction event.

C++ Source:

  • Plugin: ControlRigDynamics

  • Module: ControlRigDynamics

  • File: RigDynamicsConstraintExecution.h

Editor Properties: (see get_editor_property/set_editor_property)

  • acceleration_mode (bool): [Read-Write] For soft constraints: When true, Strength is a mass-independent natural frequency. When false, the spring/damper acts as a true force, so heavier particles oscillate more slowly. For hard constraints, this has no effect.

  • child_component_key (RigComponentKey): [Read-Write] The child particle for the constraint

  • constraint_component_name (Name): [Read-Write] The name to give the new constraint component. Only used as a starting point - if another component with this name already exists on the owner element, the hierarchy will append a unique suffix. Read DynamicsConstraintComponentKey to find the name that was actually assigned.

  • constraint_type (RigParticleSimulationConstraintType): [Read-Write] If the constraint is marked as “hard”, then the system will try as hard as possible to enforce it. This will also be a little cheaper than making a soft constraint.

  • damping_ratio (float): [Read-Write] DampingRatio for the constraint

  • dynamics_constraint_component_key (RigComponentKey): [Read-Write] The Dynamics Constraint component key that was created

  • dynamics_solver_component_key (RigComponentKey): [Read-Write] Optional solver - if set, it will be added to this solver component

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

  • extra_damping (float): [Read-Write] Additional damping for the constraint

  • extra_length (float): [Read-Write] This will be added on to the target length after the automatic/multiplication

  • length_multiplier (float): [Read-Write] The target length will be calculated automatically, multiplied by this

  • owner (RigElementKey): [Read-Write] The owner of the newly created component (must be set/valid)

  • parent_component_key (RigComponentKey): [Read-Write] The parent particle for the constraint

  • strength (float): [Read-Write] The strength which we drive towards the target length. This is the oscillation frequency, so low values will be soft and springy, but values significantly above 1/timestep will track the target very accurately.

property acceleration_mode: bool

When true, Strength is a mass-independent natural frequency. When false, the spring/damper acts as a true force, so heavier particles oscillate more slowly. For hard constraints, this has no effect.

Type:

(bool)

Type:

[Read-Write] For soft constraints

property child_component_key: RigComponentKey

[Read-Write] The child particle for the constraint

Type:

(RigComponentKey)

property constraint_component_name: Name

[Read-Write] The name to give the new constraint component. Only used as a starting point - if another component with this name already exists on the owner element, the hierarchy will append a unique suffix. Read DynamicsConstraintComponentKey to find the name that was actually assigned.

Type:

(Name)

property constraint_type: RigParticleSimulationConstraintType

[Read-Write] If the constraint is marked as “hard”, then the system will try as hard as possible to enforce it. This will also be a little cheaper than making a soft constraint.

Type:

(RigParticleSimulationConstraintType)

property damping_ratio: float

[Read-Write] DampingRatio for the constraint

Type:

(float)

property dynamics_constraint_component_key: RigComponentKey

[Read-Only] The Dynamics Constraint component key that was created

Type:

(RigComponentKey)

property dynamics_solver_component_key: RigComponentKey

[Read-Write] Optional solver - if set, it will be added to this solver component

Type:

(RigComponentKey)

property extra_damping: float

[Read-Write] Additional damping for the constraint

Type:

(float)

property extra_length: float

[Read-Write] This will be added on to the target length after the automatic/multiplication

Type:

(float)

property length_multiplier: float

[Read-Write] The target length will be calculated automatically, multiplied by this

Type:

(float)

property owner: RigElementKey

[Read-Write] The owner of the newly created component (must be set/valid)

Type:

(RigElementKey)

property parent_component_key: RigComponentKey

[Read-Write] The parent particle for the constraint

Type:

(RigComponentKey)

property strength: float

[Read-Write] The strength which we drive towards the target length. This is the oscillation frequency, so low values will be soft and springy, but values significantly above 1/timestep will track the target very accurately.

Type:

(float)