This interface exposes methods to access and manipulate the Render Elements list in the Render Scene Dialog.
It is returned by the MaxOps.GetCurRenderElementMgr () method and cannot be created by MAXScript. See the example at the bottom of this page for details.
RenderElementMgr interfaces:
Interface: RenderElementMgr
Methods:
<boolean><RenderElementMgr>.AddRenderElement <maxObject>element
Adds a specific Render Element.
Returns True
if successful, False
otherwise
<boolean><RenderElementMgr>.RemoveRenderElement <maxObject>element
Removes a specific Render Element.
Returns True
is successful, False
otherwise.
<void><RenderElementMgr>.RemoveAllRenderElements()
Removes all elements in the list.
<integer><RenderElementMgr>.NumRenderElements()
Returns the number of elements in the list.
<maxObject><RenderElementMgr>.GetRenderElement <integer>index
Returns a specific Render Element, the index is 0-based.
<void><RenderElementMgr>.SetElementsActive <boolean>active
Sets a enabled state of the Render Elements.
When set to True
, all active elements on the list will be created during rendering.
When set to False
, the generation of Render Elements is disabled.
<boolean><RenderElementMgr>.GetElementsActive()
Returns a boolean value indicating whether elements are active, ie. will be created during a render.
<void><RenderElementMgr>.SetDisplayElements <boolean>display
Sets a boolean flag controlling whether elements will be displayed after they are created.
<boolean><RenderElementMgr>.GetDisplayElements()
Gets a boolean flag indicating whether elements will be displayed after they are created.
<void><RenderElementMgr>.SetCombustionOutputEnabled <boolean>enabled
Enables or disables the output to Combustion .cws file.
<boolean><RenderElementMgr>.GetCombustionOutputEnabled()
Gets a boolean flag indicating whether output to a Combustion .cws file will be performed.
<void><RenderElementMgr>.SetCombustionOutputPath <filename>pathname
Sets the filename of the Combustion .cws file to be written to when SetCombustionOutoutEnabled()
is set to True
.
<filename><RenderElementMgr>.GetCombustionOutputPath()
Returns the filename of the Combustion .cws file.
<void><RenderElementMgr>.SetRenderElementFilename <integer>index <filename>filename
Set the output file name for the indexed render element to the specified filename string.
The index is 0-based.
<filename><RenderElementMgr>.GetRenderElementFilename <integer>index
Returns the output file name of the indexed render element.
The index is 0-based.
EXAMPLE
-- set a list of render elements. elementlist = #(specular, diffuse, self_illumination, reflection,refraction, shadowrenderelement, atmosphere, blend, z_depth, alpha, backgroundrenderelement) re = maxOps.GetCurRenderElementMgr() -- get the current render element manager re.removeallrenderelements() -- remove all renderelements re.numrenderelements() -- get number of render elements theManager = maxOps.GetRenderElementMgr #Production theManager.numrenderelements() rendoutputfilename = "c:\\test.tga" -- adds all renderelements to be rendered. for n in elementlist do ( re.addrenderelement (n elementname:("foo_"+ (n as string))) format "\nAdded % renderelement" n ) rendsavefile = true setsilentmode true -- used to avoid error message when checking the filename of element renderSceneDialog.open() -- open Render Dialog -- get all render elements set and return name of render element and output filename for n = 0 to (theManager.numrenderelements () - 1) do ( el = re.getrenderelement n format "\nGetting % render element" el.elementname format "\nRender element outputfilename: %" (re.GetRenderElementFileName n) )