This Page


Defines declaration classes for individual relation constraints within a program.

class RelationDeclaration(name, boxDeclarations, connectionDeclarations)[source]

Represents a parsed and statically-checked relation constraint declaration. Consists of a name, a series of box declarations, and a series of connection declarations.

__init__(name, boxDeclarations, connectionDeclarations)[source]

Initializes a new relation declaration with the given name, using the provided box and connection declarations.


Executes the relation declaration, attempting to construct and configure an FBConstraintRelation object in the MotionBuilder scene.

Parameters:relationComponents – Maps the names of the relation declarations compiled so far to their corresponding FBConstraintRelation objects.
Returns:the newly created (and activated) FBConstraintRelation.
Raises :an ExecutionError if any box or connection declarations can not be executed.

Returns whether the relation contains a macro input or output box with the specified name.

getMacroNodeIndex(nodeName, isInput)[source]

Returns the index associated with the macro input or output box with the given name. For example, if this relation includes three input nodes, a, b, and c, then getMacroNodeIndex(‘c’, True) will return 2. Returns -1 if no matching macro tool can be found.