|
| Re: Macro in relation |
 |
Thu, 23 Aug 2007 14:22:24 +000 |
You could add your macro into your relation with CreateFunctionBox method. It
should be in the 'My Macros' list.
lMacro = FBConstraintRelation( "MyMacro" )
lRelation = FBConstraintRelation( "MyRelation" )
lMacroBox = lRelation.CreateFunctionBox( 'My Macros', 'MyMacro' )
lNull = FBModelNull("output")
lOutBox = lRelation.SetAsSource( lNull )
# connect the macro box
# the inputs and outputs are name MacroInput# and MacroOutput# ('#' is a number
depending on how
# many inputs or outputs you have in your macro
lIn = FindAnimationNode( 'MacroInput0', lMacroBox.AnimationNodeInGet() )
lOut = FindAnimationNode( 'Rotation', lOutBox.AnimationNodeOutGet() )
if lIn and lOut:
|
| Post Reply
|
|
|
|
|
|
|
|
|
|