Vizard 7 » Command Index » Vizard modules » viztask » <viztask>.waitPathEvent
7.6

<viztask>.waitPathEvent

Wait for an animation path event to trigger

<viztask>.waitPathEvent(  
path  
name  
)  
path
Animation path, list of animation paths, or None to allow any animation path
name
Event name, list of names, or None to allow any event name

Remarks

This command will create a Condition object that will wait for the animation path to trigger the specified event name.

The yielded command returns the event object provided by the viz.PATH_EVENT.

Return Value

viztask.Condition object

Example

import  viztask

path = viz.addAnimationPath()
# ... Add control points
path.addEventAtEnd('end')

def PathPlayTask():

    path.play()

    yield viztask.waitPathEvent(path, 'end')

    print('Path finished playing')

viztask.schedule( PathPlayTask() )

See also

<animationpath>.addEventAtControlPoint
<animationpath>.addEventAtDistance
<animationpath>.addEventAtEnd
<animationpath>.addEventAtTime
<animationpath>.clearEvents
<animationpath>.removeEvent
<vizact>.onPathEvent
viz.PATH_EVENT