2
$\begingroup$

I would like with python blender, a Gui with two buttons one to enter a forever loop, and an other to break the loop. I'm afraid that when the loop runs the pause button will be unresponsive.

I already searched the forum ; I found that I can kill blender or Ctrl-c the console windows ; but this not what I want. In the first case i lost the data, in the second the python program is just broke (so i can't safely unpause the process.)

To optimize the process the user should be able interact with the scene and release the process again, If it wants to.

What do you think i can do to solve this ?

Thanks

$\endgroup$
2
  • $\begingroup$ Maybe I can run the GUI and the process on two separated threads ? $\endgroup$
    – cyrilc
    Commented Apr 30, 2018 at 8:42
  • 1
    $\begingroup$ Look at the modal operator examples in scripts > templates > python For instance in this related example when the button toggle is pressed the modal timer runs till it is toggled. As to threading, hard to know without knowing what the other process is doing. Also possibly related $\endgroup$
    – batFINGER
    Commented Apr 30, 2018 at 10:16

0

You must log in to answer this question.

Browse other questions tagged .