rendererClass

 

   

Lighting And Rendering - Quick Navigation

The RendererClass is a MAXClass wrapper of the plug-in renderer superclass which was added in 3ds Max 4 so that a renderer instance can be worked with in MAXScript.

The property .classes provides an array of all installed RendererClass objects, which allows for example the procedural creation of renderer class instances, the checking for available renderers on the current system and so on.

EXAMPLES

RendererClass.classes
--> #(Default_Scanline_Renderer, VUE_File_Renderer, Quicksilver_Hardware_Renderer, mental_ray_renderer, Missing_Renderer)
--You can assign a new renderer class to the current renderer
renderers.current = RendererClass.classes[3]()
--> mental_ray_renderer:mental_ray_renderer
 
--Conditional assignment: collect all renderer classes that match
--the name pattern "Quicksilver*" and if exactly one was collected,
--assign an instance of it to the current renderer:
theRenderer = for i in RendererClass.classes where \
matchPattern (i as string) pattern:"Quicksilver*" collect i
--> #(Quicksilver_Hardware_Renderer)
if theRenderer.count == 1 do renderers.current = theRenderer[1]()
--> Quicksilver_Hardware_Renderer:Quicksilver_Hardware_Renderer--Using the class as string to pattern match the name is
--useful when the actual class name is changing (for example
--some 3rd party renderers include the version number in the
--class name, making it difficult to hard-code in scripts for
--more than one version).
--The above approach would work with these cases, too. 

The shipping RendererClass classes are:

Default_Scanline_Renderer : RendererClass

Quicksilver_Hardware_Renderer : RendererClass

VUE_File_Renderer : RendererClass

See Also