Loop and events

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Posts: 0
Joined: Wed May 28, 2003 2:44 pm

Loop and events

Post by Greg63 » Wed May 28, 2003 3:07 pm

I'm new to python and I have a problem. I have created a program with a GUI which have a simple button 'start' and a button 'stop'. In the function start(), I have a loop which I want to stop by pressing on the button 'stop', but during the loop, I can't clik on this button...In the function stop(), I set a flag to true which is the condition to stop the loop. Is someone can help me ??

Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal

Post by theeth » Wed May 28, 2003 5:13 pm

when you code in a loop, Python doesn't do anything else, so it cannot check whether or not you're pressing a button.

Life is what happens to you when you're busy making other plans.
- John Lennon

Post Reply