6
$\begingroup$

When running my script, it can take up to a few hours depending on how detailed my object is.

While blender is running my script, blender changes its status "no response" (not sure if it's the correct translated word, since I only know the german term for it which is "Keine Rückmeldung") meaning I cannot do or click anything on blender while it's running.

So my question is, is there a way to have a remaining-process-time-ish-pop-up or just a script-is-running-do-not-turn-off-blender-pop-up?

$\endgroup$
0

3 Answers 3

2
$\begingroup$

Short answer: No
See: Strange errors using ‘threading’ module

Python scripts run 'blocking', Blender will wait until finsihed. It isn't thread-safe to run python in parallel. You may be able to get around the issues with Blender crashing with python running own threads using a modal operator with timer: Blender UI Multithreading Progressbar. Also consider if a modal operator running the background is suitable for your use case (let it return {'PASS_THROUGH'}).

If your scripts run for hours, you should also investigate why they are so slow. See here what hurts performance: Python performance with Blender operators

$\endgroup$
0
$\begingroup$

There is a good reason the blender becomes unresponsive when a script is running. When python is computing your script and it takes a long time windows will time out the GUI update for blender. Blender is did not freeze, its just means that you cannot interact with blender at the time it is computing, the same goes for baking smoke simulation, you cannot change anything in your scene. You will just have to wait until your script is done.

Timeout Detection and Recovery of GPUs (TDR)

One of the most common stability problems in graphics occurs when a computer appears completely "frozen" while, in reality, it is processing an end-user command or operation. The end-user typically waits a few seconds and then reboots the computer. The frozen appearance of the computer typically occurs because the graphics processing unit (GPU) is busy processing intensive graphical operations, typically during game play. The GPU does not update the display screen, and the computer appears frozen.

Although blender does not run on the GPU, but rather the CPU it is still waiting for the python script to be done executing. Blender will not let you continue until your python script is done.

As far as script-is-running-do-not-turn-off-blender-pop-up, windows will not quit blender unless you click on the end process button. This is normal behaviour.

$\endgroup$
2
  • $\begingroup$ There is an end process button? And even if there is one, how can I click on it, when blender doesn't allow me to touch anything while the script is running? $\endgroup$
    – fRank87
    Commented Mar 2, 2014 at 16:37
  • $\begingroup$ In my case there is. In your case it might just say: "Blender is not responding" $\endgroup$
    – Vader
    Commented Mar 2, 2014 at 16:45
0
$\begingroup$

As the others said, it's perfectly normal
A good way to still get feedback is to turn on the system console for Blender and make print statements along your python code, that way you can always track its progress, since the console will still be updated.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .