On Mon, Mar 15, 2010 at 4:53 AM, Alan Gauld <[email protected]>wrote:
> > "David Hutto" <[email protected]> wrote > > Caveat: I know zero about Blender... but... > I *thought* that since the code was in Python it might be the way I was executing it. I think now it might be how the other windows are updated in blender when the command is executed. > > 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 >
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
