Open topic with navigation
<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