Hi Miles,
Ok, thanks for the additional details. So, those outputs types can be globally configured by using the BitmapIO interface classes. See here in the docs:
http://help.autodesk.com/view/3DSMAX/2015/ENU/?guid=__files_GUID_3D06E4B8_8409_4542_B0C0_738F8978E51...
There is one problem that I see, though. It looks like when setting PNG output via maxscript for the render element, it is somehow getting corrupted. So I will need to check into that. It seems like a defect for me, as the other file output types I tested did work.
Your code looks like it is using a VRay render element, so I cannot test that one directly. I used instead the Mental Ray Matte render element with the code as below. Here you can see that for JPG output I can globally set the output type, and then the resulting render element output is in that format. The PNG output parameters are also correct, but the image is corrupted.
rendsavefile = true
rendoutputfilename = "C:\\temp\\testrender_.exr"
myelem = MatteRenderElement elementname:"MME_001"
myelem.gbufIDOn = true
myelem.gbufID = 1
theManager = maxOps.GetRenderElementMgr #Production
theManager.SetElementsActive
theManager.addrenderelement myelem
-- Set the PNG global output parameters...
-- pngio.setType(#true24)
-- pngio.setAlpha(true)
-- pngio.setInterlaced(true)
-- PNG output seems corrupt regardless of these settings. Manually it works. :-(
-- theManager.SetRenderElementFilename 0 "C:\\temp\\testrender_MME001_.png"
-- Set the JPG global output parameters...
JPEG.setQuality(5)
JPEG.setSmoothing(1)
theManager.SetRenderElementFilename 0 "C:\\temp\\testrender_MME001_.jpg"
renderscenedialog.update()
Hope it helps. I will check into the PNG issue.
thanks,
kevin
Kevin Vandecar
Developer Technical Services
Autodesk Developer Network