unreal.ConstraintsScriptingLibrary

class unreal.ConstraintsScriptingLibrary(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: BlueprintFunctionLibrary

This is a set of helper functions to access various parts of the Sequencer and Control Rig API via Python and Blueprints.

C++ Source:

  • Module: Constraints

  • File: ConstraintsScripting.h

classmethod add_constraint(world, parent_handle, child_handle, constraint, maintain_offset) bool

Add Constraint to the system using the incoming parent and child handles with the specified type.

Parameters:
Returns:

return If constraint added correctly

Return type:

bool

classmethod create_from_type(world, type) TickableTransformConstraint

Create Constraint based on the specified type.

Parameters:
Returns:

return The constraint object

Return type:

TickableTransformConstraint

classmethod create_transformable_component_handle(world, scene_component, socket_name) TransformableComponentHandle

Create the transformable handle that deals with getting and setting transforms on this scene component

Parameters:
  • world (World) –

  • scene_component (SceneComponent) – World to create the constraint

  • socket_name (Name) – Optional name of the socket to get the transform

Returns:

returns the handle for this scene component

Return type:

TransformableComponentHandle

classmethod get_manager(world) ConstraintsManager

Get the manager of the constraints. This object contains delegates to listen to for when constraints are added,deleted, and is also the outer used when creating custom transformable handles, for example this is used to create control rig transformable handles Note this function will create the mananager and it’s actor if one doesn’t exist.

Parameters:

world (World) –

Returns:

Returns the mananger

Return type:

ConstraintsManager

classmethod remove_constraint(world, index) bool

Remove constraint at specified index

Parameters:
  • world (World) – World to create the constraint

  • index (int32) – Index to remove from

Returns:

return If constraint removed correctly

Return type:

bool