Exit / Escape / Quit a running script
I have a script that renders out a number of images, one by one as single images, not a frame range or stuff like that. It changes some texture maps and says
max quick render in the last of three nested for loops. So lets say when testing the script, I want it to start and maybe render 1 or 2 images and then I want to stop it. Right now I have to cancel each rendering manually by clicking on the "Cancel" button. The script is meant to render hundreds of images, so that will not be a nice way of quitting script execution...
Is there any way to end the script, e.g. by pressing the escape button for 5secs or so? Maybe there is a callback for this, butI have to get out of the for-loop, and I dont know how.