The OpenEXR class exposes an interface to access the settings of the OpenEXR Output plug-in introduced in 3ds Max 2011.
This BitmapIO is a complete replacement of the previously availbale MaxOpenEXR BitmapIO plug-in. The older plugin introduced in 3ds Max 8 has been completely removed.
The fopenexr interface exposes no properties and the following methods:
Ininitalizes OpenEXR handling and its default values.
Loads the EXR parameters from the specified EXR file name.
Saves the EXR parameters from the specified EXR file name.
The following methods give access to the Format and Type settings in the Main Render Output group of controls of the OpenEXR Output Settings dialog.
The following methods give access to the Compression, Storage Type and Image Region settings of the OpenEXR Output Settings dialog.
Returns an integer corresponding to the selection index of the Compression drop-down list.
Please see the table below for possible values.
Note that the selection index is 0-based.
Sets the Compression drop-down list to the item specified by the integer argument.
Returns true if the Storage Type is set to "Store Image as Scanlines", false if it is set to "Store Image as Tiles".
Sets the Storage Type to "Store Image as Scanlines" if the argument is true.
Sets the Storage Type to "Store Image as Tiles" if the argument is false.
Returns the tile size used when Storage Type is set to Scanline.
The tile size is not exposed to the User Interface.
Sets the tile size used when Storage Type is set to Scanline.
Returns true if the Image Region drop-down list is set to Save Region.
Returns false if the Image Region drop-down list is set to Save Full Image.
Sets the Image Region option to Save Region if the Boolean argument is true.
Sets the Image Region option to Save Full Image if the Boolean argument is false.
Returns the current number of layers in the EXR file.
Returns the type of the 0-indexed layer as an integer.
0 - Main Render Layer - always returned for argument 0
Returns the name used in 3ds Max of the layer specified by the 0-based argument.
For the Main Render Layer (integer 0), the value is always an empty string ("").
For Render Elements , this is the name that appears in the Render Elements panel of the Render Setup dialog.
For G-buffer Channels, it is the standard name that appears in the user interface.
Sets the 3ds Max name for the specified layer.
Returns the name used in the EXR file of the layer specified by the argument.
This is the name that appears in the Layer column of the Render Elements and G-Buffer Channels lists.
Sets the name used in the EXR file for the layer specified by the 0-based first argument, where 0 is the Main Render Layer.
This is the name that appears in the Layer column of the Render Elements and G-Buffer Channels lists.
Returns the output type of the specified layer.
Possible layer output types are:
3 - XYZ (G-Buffer Channels only)
4 - XY (G-Buffer Channels only)
5 - UV (G-Buffer Channels only)
Sets the output type of the layer specified by the first argument to the value of the second argument.
When the first argument is specified as 0, the Main Render Layer's type will be set.
Possible values of the second argument are:
3 - XYZ (G-Buffer Channels only)
4 - XY (G-Buffer Channels only)
5 - UV (G-Buffer Channels only)
Returns the output format for the specified layer.
Sets the output format of the layer specified by the first argument to the type specified by the second argument.
When the first argument is specified as 0, the Main Render Layer's format will be set.
Possible values for the second argument are
<maxObject>fopenxr.getRenderElementByLayer <integer>layer
Returns the render element as a MAXObject at the specified layer. Available in in 3ds Max 2017 and higher.
<bool>fopenxr.getLayerEnabled <integer>layer
Returns true if the layer specified is enabled. Available in in 3ds Max 2017 and higher.
Returns the current state of the "Automatically Add/Remove Render Elements" option.
Sets the state of the "Automatically Add/Remove Render Elements" option.
<bool>fopenexr.addRenderElementLayer <&String>name <&String>outname <integer>type <integer>format name is In and Out parameter outname is In and Out parameter
Adds a render element layer. You must specify the (3ds Max) name, output (EXR) name, type, and format.
Deletes a render element layer, specified by its (3ds Max) name.
<bool>fopenexr.addRenderElementLayerRef <maxObject>element <&String>outname <integer>type <integer>format outname is In and Out parameter
Adds a render element specified as a MAXObject obtained from the standard Render Element manager.
Deletes the specified render element layer, passed as a MAXObject.
Deletes all render element layers.
<bool>fopenexr.addGBufferChannelLayer <integer>channel <&String>name <integer>type <integer>format name is In and Out parameter
Adds a G-buffer channel layer. You must specify the channel, (3ds Max) name, type, and format.
Deletes a G-buffer channel layer, specified by (3ds Max) name.
Using MAXScript, you can save custom attributes, also known as "metadata" to an OpenEXR file. These attributes cancontain arbitrarydataandare ignored by 3ds Max.
The attributes might be data (such as thecamera attributesdescribedhere) that can be read and used by other OpenEXR applications.
Each custom attribute has a name and an index.
The name is auser-definedstring.
The index is the0-based indexof the attribute in the order it was added to the file.
Returns the number of custom attributes in the EXR file.
Returnsthe name ofthe 0-based indexedattribute.
Returnsthe attribute typeof the 0-based indexed attribute as an integer value.
The attribute type codes are as follows:
Returns the value of the specified 0-based indexedstring attribute.
Returnsthe value of the specified0-based indexedfloating-point attribute.
Returnsthe value of the specified0-based indexedinteger attribute.
Returnsthe value of the specified0-based indexedtransform matrix attribute.
<bool>fopenexr.addStringAttribute <&String>attribute <&String>value attribute is In and Out parameter value is In and Out parameter
Adds an attribute with a string value, and specifies the name and value.
Adds an attribute with a floating-point value, and specifies the name and value.
Adds an attribute with an integer value, and specifies the name and value.
<bool>fopenexr.addMatrixAttribute <&String>attribute <matrix3 by value>value attribute is In and Out parameter
Adds an attribute with a transform matrix value, and specifies the name and value.
Deletes the specified attribute.
Deletes all custom attributes from the EXR file.
Camera attributescan be savedwith an EXR file.
The rendering must be made from a Camera viewport.
These are the camera attribute values saved in the EXR file:
Camera attributes are a special case of custom attributes.
Returns the current state of the Save Camera Attributes option.
True means the Camera Attributes will be saved with the OpenEXR file.
False means the Camera Attributes will not be saved with the OpenEXR file.
Sets the state of Save Camera Attributes option to the Boolean argument.