Constraint Operators

bpy.ops.constraint.add_target()

Add a target to the constraint

File:startup/bl_operators/constraint.py:35
bpy.ops.constraint.childof_clear_inverse(constraint="", owner='OBJECT')

Clear inverse correction for ChildOf constraint

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
bpy.ops.constraint.childof_set_inverse(constraint="", owner='OBJECT')

Set inverse correction for ChildOf constraint

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
bpy.ops.constraint.delete()

Remove constraint from constraint stack

bpy.ops.constraint.disable_keep_transform()

Set the influence of this constraint to zero while trying to maintain the object’s transformation. Other active constraints can still influence the final transformation

File:startup/bl_operators/constraint.py:85
bpy.ops.constraint.followpath_path_animate(constraint="", owner='OBJECT', frame_start=1, length=100)

Add default animation for path used by constraint if it isn’t animated already

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
  • frame_start (int in [-1048574, 1048574], (optional)) – Start Frame, First frame of path animation
  • length (int in [0, 1048574], (optional)) – Length, Number of frames that path animation should take
bpy.ops.constraint.limitdistance_reset(constraint="", owner='OBJECT')

Reset limiting distance for Limit Distance Constraint

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
bpy.ops.constraint.move_down(constraint="", owner='OBJECT')

Move constraint down in constraint stack

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
bpy.ops.constraint.move_up(constraint="", owner='OBJECT')

Move constraint up in constraint stack

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
bpy.ops.constraint.normalize_target_weights()

Normalize weights of all target bones

File:startup/bl_operators/constraint.py:60
bpy.ops.constraint.objectsolver_clear_inverse(constraint="", owner='OBJECT')

Clear inverse correction for ObjectSolver constraint

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
bpy.ops.constraint.objectsolver_set_inverse(constraint="", owner='OBJECT')

Set inverse correction for ObjectSolver constraint

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.
bpy.ops.constraint.remove_target(index=0)

Remove the target from the constraint

Parameters:index (int in [-inf, inf], (optional)) – index
File:startup/bl_operators/constraint.py:48
bpy.ops.constraint.stretchto_reset(constraint="", owner='OBJECT')

Reset original length of bone for Stretch To Constraint

Parameters:
  • constraint (string, (optional, never None)) – Constraint, Name of the constraint to edit
  • owner (enum in ['OBJECT', 'BONE'], (optional)) –

    Owner, The owner of this constraint

    • OBJECT Object, Edit a constraint on the active object.
    • BONE Bone, Edit a constraint on the active bone.