Script stops after renderWindowSaveImageCallback


#1

I have several display layers that I would like to render 1 by one on MEL and save to harddisk.

So far, I have arrived at this script that works fine for 1 render:

$filename="\FabricName";

//1st Collar Type
setAttr collar1.visibility 1;
$extension="_collar1";
$fullname=$filename + $extension;
RenderIntoNewWindow;
renderWindowSaveImageCallback “renderView” $fullname “image”;
setAttr collar1.visibility 0;

However, the script halts after renderWindowSaveImageCallback.

As such, I am unable to continue rendering collar2 and subsequently saving it.

The faulty script looks like this:

$filename="\FabricName";

//1st Collar Type
setAttr collar1.visibility 1;
$extension="_collar1";
$fullname=$filename + $extension;
RenderIntoNewWindow;
renderWindowSaveImageCallback “renderView” $fullname “image”;
setAttr collar1.visibility 0;

//2nd Collar Type
setAttr collar2.visibility 1;
$extension="_collar2";
$fullname=$filename + $extension;
RenderIntoNewWindow;
renderWindowSaveImageCallback “renderView” $fullname “image”;
setAttr collar2.visibility 0;

Can anybody help to explain how to continue the script after the first renderWindowSaveImageCallback?
Thank you.