[Closed] Save File with EXR Configuration via Dialog
Hey guys,
we are currently developing some automatic renderpath tools. Therefore we want our users to have the possibility to choose manual paths and also click the “Setup” button, to choose some G-Buffer or other Exr Configs.
Currently we use a MaxScript “selectSaveBitmap” Dailog. There we can choose all the settings, but how the hell do we get those settings to work with in code? and furthermore, how do we write those informations into our rendersettings?
Thanks a lot!
Flo
Have you tried looking at the OpenEXR Interface in the Maxscript help? Check the online reference here for more information on the OpenEXR format.
-Eric
Yes I cheked that, but it has no GUI right? Furthermore you are not able to get the EXR Configs of all Elements, just the beauty. Or am I missing something?
I also tried to set the values of the main render (beauty)
for instance I tried to add some elements with:
MaxPlus.Core.EvalMAXScript("fopenexr.addGBufferChannelLayer 6 \"Coverage\" 2 2")
Didn’t work, the added G-Buffer Element is not appearing in the EXR Config. The Dialog is closed while adding.
Thanks!
If the render dialog is open you will probably need to update the Render Scene Dialog. A search for “EXR” in this section of the forum returns this thread/post. Give that a shot.
-Eric
As I wrote, the Dialog is closed while doing all the stuff. So Ishould not have to update the dialog I think.
Thanks
So I managed to set all the data via maxscript and the following code:
a="""
objRmgr = maxOps.GetCurRenderElementMgr()
i = %d-1
elemI = objRmgr.getRenderElement i
sElem = objRmgr.getRenderElementFilename i
sElemPath = getFilenamePath sElem
sElemNew = sElemPath + (i as string) + "_DELETEME" + ".exr"
bmTemp = bitmap 1 1 filename:sElemNew gamma:1.0
save bmTemp
elemI.bitmap = bmTemp
objRmgr.SetRenderElementFilename i sElem
close bmTemp
deleteFile sElemNew
""" % self._index
eval_maxscript(a)
now I wonder how to read the data for every Layer. Exactly I try to show a checkbox that shows if the specific alement has GBuffer and/or velocity.
The following code is not element specific. It gives the same return value for each layer.
count=eval_maxscript("fopenexr.NumLayers()")
for i in range(count):
print eval_maxscript("fopenexr.getLayerType %d" % i)
print eval_maxscript("fopenexr.getLayerName %d" % i)