Yes all EXR options are settable through maxscript, even more than through the UI.
The reason why this sometimes works and sometimes not is probably because you need to actually write a file to disk first for the settings to be locked in. This is how max bitmap IO works unfortunately.
Try this, it’s a basic script I wrote a while back. This will allow you to set the EXR settings for 3ds max file output and render elements. Doesn’t work for VRay outputs yet. Also there’s no way that I know to read out the settings from an existing render element, so there’s no feedback on what the elements are currently set to.
It assumes you already have your output set to the correct location, this doesn’t change the file’s location, only the EXR settings!
try destroyDialog dlgSetEXRSettings
catch()
aElems = #()
append aElems "Max FileOut"
objRmgr = maxOps.GetCurRenderElementMgr()
iElemC = objRmgr.NumRenderElements()
for n = 0 to (iElemC-1) do
(
sElem = (objRmgr.getrenderelement n).elementName
append aElems sElem
)
rollout dlgSetEXRSettings "SetExrSettings_v001_rh" width:368 height:600
(
MultiListBox mlbOut "EXR Outputs" items:aElems pos:[16,16] width:216 height:37
dropDownList ddlForm "Format" items:#("Float32", "Float16", "Int32") selection:2 pos:[240,32] width:112 height:40
button btnSet "Set Selected" pos:[56,536] width:128 height:32
dropDownList ddlType "Type" items:#("RGBA", "RGB", "Mono") selection:2 pos:[240,80] width:112 height:40
dropDownList ddlComp "Compression" items:#("None", "RLE", "ZIPS","ZIP","PIZ","PXR24","B44","B44A") selection:3 pos:[240,128] width:112 height:40
dropDownList ddlStor "Storage Type" items:#("Scanlines","Tiles") selection:1 pos:[240,176] width:112 height:40
dropDownList ddlReg "Image Region" items:#("Full","Region") selection:2 pos:[240,224] width:112 height:40
on btnSet pressed do
(
bDlg = renderSceneDialog.isOpen()
renderSceneDialog.close()
iForm = ddlForm.selection - 1
iType = ddlType.selection - 1
iComp = ddlComp.selection - 1
if (ddlStor.selection - 1) == 0 then bStor = true else bStor = false
if (ddlReg.selection - 1) == 0 then bReg = false else bReg = true
aSel = (mlbOut.selection as array)
if aSel.count != 0 do
(
for n in aSel do
(
fopenexr.setLayerOutputFormat 0 iForm
fopenexr.setLayerOutputType 0 iType
fopenexr.setCompression iComp
fopenexr.setSaveScanline bStor
fopenexr.setSaveRegion bReg
fopenexr.setAutoAddRenderElements false -- !!!!
if n == 1 then
(
rendOutputFilename = rendOutputFilename -- not sure if it actually updates like this
)
else
(
i = n-2
elemI = objRmgr.getRenderElement i
sElem = objRmgr.getRenderElementFilename i
sElemPath = getFilenamePath sElem
sElemNew = sElemPath + (i as string) + "_DELETEME" + ".exr"
makeDir sElemPath
bmTemp = bitmap 1 1 filename:sElemNew gamma:1.0
save bmTemp
elemI.bitmap = bmTemp
objRmgr.SetRenderElementFilename i sElem
close bmTemp
deleteFile sElemNew
)
)
)
if bDlg do renderSceneDialog.open()
)
)
createDialog dlgSetEXRSettings