How Do I Set Render Globals > Image Compression?

How Do I Set Render Globals > Image Compression?

Anonymous
Not applicable
429 Views
1 Reply
Message 1 of 2

How Do I Set Render Globals > Image Compression?

Anonymous
Not applicable
Hello

I'm developing a script to set up new scenes. As part of my script I want the Render Globals set. Some scenes require Image Format: exr, Image Compression: ZIP. Other scenes require Image Format: iff, Image Compression: None.

I can set the image formats

// Set image format.
if (getSceneType() == "NPR") {

// NPR.

// Set the image format to .iff.
setAttr defaultRenderGlobals.imageFormat 7;

}
else
{

// Photo.
setAttr defaultRenderGlobals.imageFormat 51;
setAttr defaultRenderGlobals.imfkey -type "string" "exr";
setAttr mentalrayGlobals.imageCompression 4;

}


As you can see I've tried using 'setAttr mentalrayGlobals.imageCompression 4;' But this does not set the imageCompression back to none.

Can someone advise me how to do this properly please.

Thank you.

Chris
430 Views
1 Reply
Reply (1)
Message 2 of 2

n8skow
Collaborator
Collaborator
I don't see a line for setting the iff compression to 'none'...
You need:


// Set image format.
if (getSceneType() == "NPR") {

// NPR.

// Set the image format to .iff.
setAttr defaultRenderGlobals.imageFormat 7;
setAttr mentalrayGlobals.imageCompression 1;

}
else
{

// Photo.
setAttr defaultRenderGlobals.imageFormat 51;
setAttr defaultRenderGlobals.imfkey -type "string" "exr";
setAttr mentalrayGlobals.imageCompression 4;

}
0 Likes