This action supports
<vizact>.mix parameters. When mix parameters are used, the specified function will be called until the mix parameter completes. This is useful for animating arbitrary commands.
After you have created the action you can add it to any object as many times as you want.
Example 1:
#When the object is finished moving 'myfunc' will be called with arguments 5 and 6
def myfunc(p1,p2):
print(p1,p2)
node.add(vizact.moveTo([0,0,10],speed=1))
node.add(vizact.call(myfunc,5,6))
Example 2:
import viz
import vizact
viz.go()
model = viz.add('logo.ive',pos=(0,1,4))
# Spin 90 degrees
spin = vizact.spinTo(euler=(90,0,0),time=1.0)
# Fade clear color to white
black_to_white = vizact.mix(viz.BLACK,viz.WHITE,time=2.0,interpolate=vizact.easeOutStrong)
color = vizact.call(viz.clearcolor,black_to_white)
# Add spin/fade actions as a sequence
action = vizact.sequence(spin,color)
model.runAction(action)