![]() |
#2
|
|||
|
|||
If you want to control individual timers, then I recommend using the vizact library, specifically, the vizact.ontimer function. Here is some sample code that creates a simple timer and uses the keyboard to toggle it on/off:
Code:
import viz viz.go() def DoSomething(): print viz.getFrameNumber() #Create timer that calls 'DoSomething' every 1 second mytimer = vizact.ontimer(1,DoSomething) def ToggleTimer(): mytimer.setEnabled(viz.TOGGLE) #Toggle timer on/off when spacebar pressed vizact.onkeydown(' ',ToggleTimer) |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viewpoint control | Vinicius Lima | Vizard | 6 | 08-20-2007 05:51 PM |
intersense: Failed to set control word on \\.\COM1 | OueOue | Precision Position Tracker (PPT) | 2 | 01-18-2007 12:51 PM |
timers and director function | Jerry | Vizard | 1 | 06-22-2006 09:47 AM |
multiple timers | paulpars | Vizard | 4 | 06-02-2006 10:12 AM |
Overriding Mouse Control | Vygreif | Vizard | 3 | 09-28-2005 08:51 PM |