The main issue with not being able to connect to Macro box within a relation constraint is the name you are passing here, is not finding the name:
ConnectBox(inputOutput, 'Output', inputOutput1, 'Input')
You either need to use the function:
FBAnimationNode FindByLabel
(
str
pNodeLabel
)
Returns the animation node from its label.
Parameters:
pNodeLabel
Label of the searched animation node.
Returns:
AnimationNode found.
Or you need to look to see what the auto generated names are by MotionBuilder, like this:
lMacro = lRelation.CreateFunctionBox('My Macros', 'HelperBoneControl')
lRelation.SetBoxPosition(lMacro,300,200)
#Testing what the real Animation Node names are, they don't reflect what is in the UI for Macros
lMacroIN = lMacro.AnimationNodeInGet().Nodes
for lAnimationNode in lMacroIN:
print "IN: (%s) " % (lAnimationNode.UserName)
lMacroOUT = lMacro.AnimationNodeOutGet().Nodes
for lAnimationNode in lMacroOUT:
print "OUT: (%s) " % (lAnimationNode.UserName)
lMacroIn = FindAnimationNode( lMacro.AnimationNodeInGet(), 'MacroInput0' )
lMacroOut = FindAnimationNode( lMacro.AnimationNodeOutGet(), 'MacroOutput1' )
~Kristine
KRISTINE MIDDLEMISS | SENIOR MOTION CAPTURE ENGINEER