lConstraintRelation = FBConstraintRelation('Test')
lConstraintRelation.Active = True
A = FBModelNull('NullA')
A.Show= True
B = FBModelNull('NullB')
B.Show= True
sourceBox = lConstraintRelation.SetAsSource (A)
convertBoxV2N = lConstraintRelation.CreateFunctionBox('Converters', 'Vector to Number')
targetBox = lConstraintRelation.ConstrainObject (B)
convertBoxN2V = lConstraintRelation.CreateFunctionBox('Converters', 'Number to Vector')
#Link up the constraints, connecting Source Translation to converterBox Vector to Number first
#Then connecting convertBoxV2N to converterbox Number to Vector, then finally
#connecting just the Translate Y of converterBoxN2V to our Target Translate
OUT = FindAnimationNode (sourceBox.AnimationNodeOutGet(), 'Translation')
IN = FindAnimationNode (convertBoxV2N.AnimationNodeInGet(), 'V')
if OUT and IN:
print "Success1"
FBConnect(OUT, IN)
OUT = FindAnimationNode (convertBoxV2N.AnimationNodeOutGet(), 'Y')
IN = FindAnimationNode (convertBoxN2V.AnimationNodeInGet(), 'Y')
if OUT and IN:
print "Success2"
FBConnect(OUT, IN)
OUT = FindAnimationNode (convertBoxN2V.AnimationNodeOutGet(), 'Result')
IN = FindAnimationNode (targetBox.AnimationNodeInGet(), 'Translation')
if OUT and IN:
print "Success3"
FBConnect(OUT, IN)