<viztask>.runAction

Run an action on an object and wait for it to end

 

<viztask>.runAction(
    node    
    action    
    pool = 0    

)

 

node

The node to run the action on


action

The action to run on the node and wait for


pool = 0

The pool to add the action under


Remarks

This command will create a sub-task that runs an action on an object and waits for the action to end.

Return Value

A generator object which can be yielded

Example

import viztask

myball = viz.add('ball.wrl')

def MyTask():
    
    while True:
        
        yield viztask.runAction(myball,vizact.move(0,0,4,0.5))

        print 'My ball finished moving'

        yield viztask.waitTime(1)

viztask.schedule( MyTask() )