Constraint(bpy_struct)¶
base class — bpy_struct
subclasses —
ActionConstraint
, ArmatureConstraint
, CameraSolverConstraint
, ChildOfConstraint
, ClampToConstraint
, CopyLocationConstraint
, CopyRotationConstraint
, CopyScaleConstraint
, CopyTransformsConstraint
, DampedTrackConstraint
, FloorConstraint
, FollowPathConstraint
, FollowTrackConstraint
, KinematicConstraint
, LimitDistanceConstraint
, LimitLocationConstraint
, LimitRotationConstraint
, LimitScaleConstraint
, LockedTrackConstraint
, MaintainVolumeConstraint
, ObjectSolverConstraint
, PivotConstraint
, PythonConstraint
, 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
- Type:
boolean, default False
- enabled¶
Use the results of this constraint
- Type:
boolean, default False
- error_location¶
Amount of residual error in Blender space unit for constraints that work on position
- Type:
float in [-inf, inf], default 0.0, (readonly)
- error_rotation¶
Amount of residual error in radians for constraints that work on orientation
- Type:
float in [-inf, inf], default 0.0, (readonly)
- influence¶
Amount of influence constraint will have on the final solution
- Type:
float in [0, 1], default 0.0
- is_override_data¶
In a local override object, whether this constraint comes from the linked reference object, or is local to the override
- Type:
boolean, default False, (readonly)
- is_valid¶
Constraint has valid settings and can be evaluated
- Type:
boolean, default False, (readonly)
- mute¶
Enable/Disable Constraint
- Type:
boolean, default False
- name¶
Constraint name
- Type:
string, default “”, (never None)
- owner_space¶
Space that owner is evaluated in
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:
enum in [‘WORLD’, ‘CUSTOM’, ‘POSE’, ‘LOCAL_WITH_PARENT’, ‘LOCAL’], default ‘WORLD’
- show_expanded¶
Constraint’s panel is expanded in UI
- Type:
boolean, default False
- space_subtarget¶
Armature bone, mesh or lattice vertex group, …
- Type:
string, default “”, (never None)
- target_space¶
Space that target is evaluated in
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:
enum in [‘WORLD’, ‘CUSTOM’, ‘POSE’, ‘LOCAL_WITH_PARENT’, ‘LOCAL’, ‘LOCAL_OWNER_ORIENT’], default ‘WORLD’
- type¶
- Type:
enum in Constraint Type Items, default ‘CAMERA_SOLVER’, (readonly)
- 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
subclass