Constraint(bpy_struct)

base class — bpy_struct

subclasses — ActionConstraint, ArmatureConstraint, CameraSolverConstraint, ChildOfConstraint, ClampToConstraint, CopyLocationConstraint, CopyRotationConstraint, CopyScaleConstraint, CopyTransformsConstraint, DampedTrackConstraint, FloorConstraint, FollowPathConstraint, FollowTrackConstraint, GeometryAttributeConstraint, KinematicConstraint, LimitDistanceConstraint, LimitLocationConstraint, LimitRotationConstraint, LimitScaleConstraint, LockedTrackConstraint, MaintainVolumeConstraint, ObjectSolverConstraint, PivotConstraint, RigidBodyJointConstraint, ShrinkwrapConstraint, SplineIKConstraint, StretchToConstraint, TrackToConstraint, TransformCacheConstraint, TransformConstraint

class bpy.types.Constraint(bpy_struct)

Constraint modifying the transformation of objects and bones

active

Constraint is the one being edited (default False)

Type:

bool

enabled

Use the results of this constraint (default True)

Type:

bool

error_location

Amount of residual error in Blender space unit for constraints that work on position (in [-inf, inf], default 0.0, readonly)

Type:

float

error_rotation

Amount of residual error in radians for constraints that work on orientation (in [-inf, inf], default 0.0, readonly)

Type:

float

influence

Amount of influence constraint will have on the final solution (in [0, 1], default 0.0)

Type:

float

is_override_data

In a local override object, whether this constraint comes from the linked reference object, or is local to the override (default True, readonly)

Type:

bool

is_valid

Constraint has valid settings and can be evaluated (default True, readonly)

Type:

bool

mute

Enable/Disable Constraint (default False)

Type:

bool

name

Constraint name (default “”, never None)

Type:

str

owner_space

Space that owner is evaluated in (default 'WORLD')

  • WORLD World Space – The constraint is applied relative to the world coordinate system.

  • CUSTOM Custom Space – The constraint is applied in local space of a custom object/bone/vertex group.

  • POSE Pose Space – The constraint is applied in Pose Space, the object transformation is ignored.

  • LOCAL_WITH_PARENT Local With Parent – The constraint is applied relative to the rest pose local coordinate system of the bone, thus including the parent-induced transformation.

  • LOCAL Local Space – The constraint is applied relative to the local coordinate system of the object.

Type:

Literal[‘WORLD’, ‘CUSTOM’, ‘POSE’, ‘LOCAL_WITH_PARENT’, ‘LOCAL’]

show_expanded

Constraint’s panel is expanded in UI (default False)

Type:

bool

space_object

Object for Custom Space

Type:

Object

space_subtarget

Armature bone, mesh or lattice vertex group, … (default “”, never None)

Type:

str

target_space

Space that target is evaluated in (default 'WORLD')

  • WORLD World Space – The transformation of the target is evaluated relative to the world coordinate system.

  • CUSTOM Custom Space – The transformation of the target is evaluated relative to a custom object/bone/vertex group.

  • POSE Pose Space – The transformation of the target is only evaluated in the Pose Space, the target armature object transformation is ignored.

  • LOCAL_WITH_PARENT Local With Parent – The transformation of the target bone is evaluated relative to its rest pose local coordinate system, thus including the parent-induced transformation.

  • LOCAL Local Space – The transformation of the target is evaluated relative to its local coordinate system.

  • LOCAL_OWNER_ORIENT Local Space (Owner Orientation) – The transformation of the target bone is evaluated relative to its local coordinate system, followed by a correction for the difference in target and owner rest pose orientations. When applied as local transform to the owner produces the same global motion as the target if the parents are still in rest pose..

Type:

Literal[‘WORLD’, ‘CUSTOM’, ‘POSE’, ‘LOCAL_WITH_PARENT’, ‘LOCAL’, ‘LOCAL_OWNER_ORIENT’]

type

(default 'CAMERA_SOLVER', readonly)

Type:

Literal[Constraint Type Items]

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:

id (str) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:

id (str) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References