"David Hutto" <[email protected]> wrote
Caveat: I know zero about Blender... but...
When I execute the script, it shows my main window, then if I
press the CKEY it's *supposed* to call the cleanSlate() function,
My problem is, it doesn't execute cleanSlate() until I hit the
ESCKEY, or the QKEY.
******************************************************************
# defining the event handling list
def ev(evt, val):
scn = Scene.getCurrent()
if evt == Draw.ESCKEY or evt == Draw.QKEY:
Draw.Exit()
elif not val:
return
elif evt == Draw.CKEY:
cleanSlate(scn)
else:
return
Can you insert debvug statements to display values?
If so I'd try printing the value of val. If it is "False" - ie empty - the
event function will exit before reaching your code.
Alternatively try moving your elif up above the test for not val.
See if that helps.
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor