Blender has many constraints that you may apply to an object. Some of them are quite like drivers, in the sense that they do not restrict a motion of an object but copy some parameters such as rotation or location. From a developer's point of view, each Blender Object has a constraints
attribute that is a sequence of constraint objects. This sequence can be appended and items from this sequence can be deleted. It is also possible to alter the order of the items.
Method |
Action |
Example |
---|---|---|
|
Appends a new constraint to an object and returns the constraint |
|
|
Removes a constraint from an object |
|
|
Change the position of a constraint in the list of constraints |
|
|
Accesses an attribute of a constraint |
|
New Constraint
objects are not instanced by way of a constructor, but by calling the append()
method of the constraints
attribute with the type of the constraint to add. append()
will then return the new Constraint
whose settings may then be altered.
18.191.233.43