ObjectConstraints(bpy_struct)#

base class — bpy_struct

class bpy.types.ObjectConstraints(bpy_struct)#

Collection of object constraints

active#

Active Object constraint

Type:

Constraint

new(type)#

Add a new constraint to this object

Parameters:

type (enum in Constraint Type Items) – Constraint type to add

Returns:

New constraint

Return type:

Constraint

remove(constraint)#

Remove a constraint from this object

Parameters:

constraint (Constraint, (never None)) – Removed constraint

clear()#

Remove all constraint from this object

move(from_index, to_index)#

Move a constraint to a different position

Parameters:
  • from_index (int in [-inf, inf]) – From Index, Index to move

  • to_index (int in [-inf, inf]) – To Index, Target index

copy(constraint)#

Add a new constraint that is a copy of the given one

Parameters:

constraint (Constraint, (never None)) – Constraint to copy - may belong to a different object

Returns:

New constraint

Return type:

Constraint

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

id (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

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

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties#

Inherited Functions#

References#