<br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 4:53 AM, Alan Gauld <span dir="ltr"><<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
"David Hutto" <<a href="mailto:dwightdhutto@yahoo.com" target="_blank">dwightdhutto@yahoo.com</a>> wrote<br>
<br>
Caveat: I know zero about Blender... but...<br></blockquote><div><br>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. <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
When I execute the script, it shows my main window, then if I<br>
press the CKEY it's *supposed* to call the cleanSlate() function,<br>
<br>
My problem is, it doesn't execute cleanSlate() until I hit the<br>
ESCKEY, or the QKEY.<br>
******************************************************************<br>
# defining the event handling list<br>
def ev(evt, val):<br>
scn = Scene.getCurrent()<br>
if evt == Draw.ESCKEY or evt == Draw.QKEY:<br>
Draw.Exit()<br>
elif not val:<br>
return<br>
elif evt == Draw.CKEY:<br>
cleanSlate(scn)<br>
else:<br>
return<br>
</blockquote>
<br>
<br>
Can you insert debvug statements to display values?<br>
If so I'd try printing the value of val. If it is "False" - ie empty - the<br>
event function will exit before reaching your code.<br>
<br>
Alternatively try moving your elif up above the test for not val.<br>
<br>
See if that helps.<br>
<br>
-- <br>
Alan Gauld<br>
Author of the Learn to Program web site<br>
<a href="http://www.alan-g.me.uk/" target="_blank">http://www.alan-g.me.uk/</a> <br>
<br>
_______________________________________________<br>
Tutor maillist - <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</blockquote></div><br>