cgbeige
03-11-2011, 02: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:
http://dl.dropbox.com/u/7990437/problemcancelling.mov
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)`;
unifiedRenderGlobalsWindow;
//Set the abort variable
int $aborted = no;
//Create progress window
progressWindow
-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.";
break;
}
RedoPreviousRender;
//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";
}
}
http://dl.dropbox.com/u/7990437/problemcancelling.mov
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)`;
unifiedRenderGlobalsWindow;
//Set the abort variable
int $aborted = no;
//Create progress window
progressWindow
-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.";
break;
}
RedoPreviousRender;
//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";
}
}
