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.
PyNone moveDown(con)
Moves the constraint down in the object's constraint stack.
PyNone 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=Constriant)
Returns:
PyNone

moveUp(con)

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

remove(con)

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

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


Generated by Epydoc 2.1 on Thu Jul 13 16:50:04 2006 http://epydoc.sf.net