PDA

View Full Version : Saving rendered image with MEL always saves .iff?


polypixel
12-01-2011, 05:18 PM
Hey

I'm working on a script to automate the process of rendering out a skybox from a 3d scene. It's all going well so far except i'm having problems saving out the images I render to the correct format.

render sb_top;
renderWindowSaveImageCallback "renderView" "C:/Users/Khornelius/Desktop/Art/SSZ_Envs/Renders/test.tga" "Targa";

I got the script by just cut and pasting what I see in the Script Editor when I save a rendered image. It seems to specify the image format but when I run the script I find it's saved the render as an .IFF file.

Any ideas?

Thanks.

polypixel
12-01-2011, 05:54 PM
Oh dear, I've been silly.

Changing the file format in the Common Render Settings fixed it.

Sorry!

kevinsallee
12-01-2011, 06:06 PM
you can do this programatically also. I have it in python but it the same in mel:

#i save the format of the user (so i don't mess up his preferences)
renderGlobals = cmds.getAttr("defaultRenderGlobals.imageFormat")
#i set it to something different like png
cmds.setAttr("defaultRenderGlobals.imageFormat", 32)
#i do my playblast or render or whatever
#
doTheRender()
#i set the options back for the user
cmds.setAttr("defaultRenderGlobals.imageFormat", renderGlobals)

CGTalk Moderation
12-01-2011, 06:06 PM
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.