#1
|
|||
|
|||
Calling vizard functions in a loop
Hi,
I noticed that if I call Vizard functions that have a visual effect in a loop, the commands wouldn't be run before the encapsulating function returns (even with delays in between) : Code:
def callVizFunctionsInALoop(): for i in range(0, 10): moveAvatar(i) takeSnapshot() #viz.waittime(someDelay) #Won't help #time.sleep(someDelay) #Won't help Is there any Vizard command that will get around this problem? Thanks Omid |
#2
|
|||
|
|||
You should be using the viztask module. There are many examples of it in the docs and on the forum.
Code:
import viztask def callVizFunctionsInALoop(): for i in range(0, 10): moveAvatar(i) takeSnapshot() yield viztask.waitTime(someDelay) #Pause function for some time viztask.schedule( callVizFunctionsInALoop() ) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Realistic Light and Shadows Using Vizard and 3DS Max | jde | Vizard | 4 | 07-13-2012 11:58 AM |
.3DS importing in Vizard and 3D Studio | jde | Vizard | 1 | 08-28-2009 04:14 PM |
Vizard tech tip: Using the Python Imaging Library (PIL) | Jeff | Vizard | 0 | 03-23-2009 12:13 PM |
Vizard tech tip: Text to Speech | Jeff | Vizard | 1 | 01-15-2009 10:39 PM |
Vizard won't run | wouters | Vizard | 5 | 02-05-2008 12:12 PM |