[Bf-python] Polling a device in Bpy?

Florian Lier blender at icram.de
Wed Jun 17 09:30:17 CEST 2009


Hey everyone,

I need to know if its possible to poll a device constantly in a 
py-script like this

pseudo code
----------------------------------------------
if button1 state = "down":
    
poll.mydevice(cube.setLocation(mydevice.valA,mydevice.valB,mydevice.valC))
    Blender.Redraw()
else
    print "No data avail"
----------------------------------------------

Is there another apporach? Like looping parts of the script?
The problem is, functions like while(true) or for x in range(10000000): 
sleep(0.5)
freezing the script, thus Blender too.

Thank you, cheers Florian




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20090617/78741730/attachment.html>


More information about the Bf-python mailing list