Vizard 8 » Command Index » Vizard modules » viztask » <viztask>.waitAsyncLoad
8.0

<viztask>.waitAsyncLoad

Wait for a pending async load operation to complete

<viztask>.waitAsyncLoad(  
object  
)  
object
The object that is being asynchronously loaded

Remarks

This command will create a Condition object that will wait until an asynchronous operation on the object is complete.

Return Value

viztask.Condition object

Example

import  viztask

def LoadTask():

    yield viztask.waitKeyDown(' ')

    model = viz.addChild('piazza.osgb', flags=viz.LOAD_ASYNC)
    yield viztask.waitAsyncLoad(model)

    print('Finished loading')

viztask.schedule( LoadTask() )

See also

<viz>.addChild
<viz>.addAvatar
<viz>.addChildFromBuffer
<viz>.addTexture
<viz>.addTextureFromBuffer
<texture>.load
<texture>.loadBuffer
<texture>.getAsyncStatus
<node3d>.getAsyncStatus
<vizact>.onAsyncLoad