<viztask>.waitActionEnd

Wait for a specified action to end

 

<viztask>.waitActionEnd(
    node    
    action    
    pool = None    

)

 

node

The node to wait for the action to end on


action

The action to wait for


pool = None

The pool number for the action to end on.

If pool is None, then the Condition will wait for the action to end on any pool.


Remarks

This command will create a Condition object that will wait for the specified action to end on the node.

Return Value

viztask.Condition object

Example

import viztask

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

def MyTask():
    
    move = vizact.move(0,0,4,0.5)
    
    while True:
        
        myball.addAction(move)
        
        yield viztask.waitActionEnd(myball,move)
        
        print 'My ball finished moving'
        
        yield viztask.waitTime(1)

viztask.schedule( MyTask() )