Loop and events

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Posts: 2
Joined: Wed May 28, 2003 2:44 pm

Loop and events

Postby 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: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal

Postby 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

Return to “Python”

Who is online

Users browsing this forum: No registered users and 0 guests