ObjectConstraints(bpy_prop_collection)
base classes — bpy_prop, bpy_prop_collection
- class bpy.types.ObjectConstraints(bpy_prop_collection)
Collection of object constraints
- active
Active Object constraint
- Type:
- new(type)
Add a new constraint to this object
- Parameters:
type (Literal[Constraint Type Items]) – Constraint type to add
- Returns:
New constraint
- Return type:
- remove(constraint)
Remove a constraint from this object
- Parameters:
constraint (
Constraint) – Removed constraint (never None)
- clear()
Remove all constraint from this object
- move(from_index, to_index)
Move a constraint to a different position
- Parameters:
from_index (int) – From Index, Index to move (in [-inf, inf])
to_index (int) – To Index, Target index (in [-inf, inf])
- copy(constraint)
Add a new constraint that is a copy of the given one
- Parameters:
constraint (
Constraint) – Constraint to copy - may belong to a different object (never None)- Returns:
New constraint
- Return type:
- 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:
- 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