Module Constraint :: Class Constraints
[frames | no frames]

Class Constraints


The Constraints object

This object provides access to sequence of constraints for a particular object. They can be accessed from Object.constraints. or PoseBone.constraints.
Method Summary
Constraint __getitem__(index)
This operator returns one of the constraints in the stack.
int __len__()
Returns the number of constraints in the constraint stack.
Constraint append(type)
Appends a new constraint to the end of the constraint stack.
None moveDown(con)
Moves the constraint down in the object's constraint stack.
None moveUp(con)
Moves the constraint up in the object's constraint stack.
  remove(con)
Remove a constraint from this objects constraint sequence.

Method Details

__getitem__(index)
(Indexing operator)

This operator returns one of the constraints in the stack.
Parameters:
index
           (type=int)
Returns:
an Constraint object
           (type=Constraint)
Raises:
KeyError - index was out of range

__len__()
(Length operator)

Returns the number of constraints in the constraint stack.
Returns:
number of Constraints
           (type=int)

append(type)

Appends a new constraint to the end of the constraint stack.
Parameters:
type - a constant specifying the type of constraint to create. as from Type
           (type=int constant)
Returns:
the new Constraint
           (type=Constraint)

moveDown(con)

Moves the constraint down in the object's constraint stack.
Parameters:
con - a constraint from this sequence to remove.
           (type=Constraint)
Returns:
None

moveUp(con)

Moves the constraint up in the object's constraint stack.
Parameters:
con - a constraint from this sequence to remove.
           (type=Constraint)
Returns:
None

remove(con)

Remove a constraint from this objects constraint sequence.
Parameters:
con - a constraint from this sequence to remove.
           (type=Constraint)

Note: Accessing attributes of the constraint after it is removed will throw an exception.


Generated by Epydoc 2.1 on Thu May 10 20:31:59 2007 http://epydoc.sf.net