View Full Version : RedoPreviousRender without window?

03 March 2011, 03:33 AM
I am trying to make a batch render progress dialog so that it can cancel the batch but the progress bar loses focus to the Render window so I can't cancel it if I wanted to:

Is there a way to do a quiet render or force the progress bar to keep focus? I don't want to do a background batch because the scene cannot be manipulated during the renderings because it changes some things on the fly (it's for my per-light rendering script for V-Ray). Here's my progress bar code with dummy endless render code:

global proc tester()
string $mySelection[] = `ls -sl`;
int $num = `size($mySelection)`;

//Set the abort variable
int $aborted = no;

//Create progress window
-title "Light Batch Progress"
-isInterruptable yes
-maxValue $num;

for ($n=0 ; $num ; $n++)

//Check if the progress window has been cancelled
if (`progressWindow -q -isCancelled`) {
$aborted = yes;
warning "Cancelled batch.";


//Update progress window
progressWindow -e
-status ("Rendering " + $n + " of " + $num)
-step 1;

//Delete the progress window
progressWindow -endProgress;

//Finish up
if ($aborted == no) {

print "done\n";


CGTalk Moderation
03 March 2011, 03:33 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.