Overview
The MEL Scripts group of attributes provides
3Delight For Maya gives youthe ability to execute MEL scripts at certain
locationsstages during the rendering process. This opens up the possibility of doing whatever tweaks required
before each renderingat these stages. Since
3delight3Delight comes with a set of MEL bindings for the RenderMan standard, it also becomes possible to insert RenderMan commands anywhere during rendering (see
Chapter 6 [], page 130).
ThisThis is the equivalent of
“RIB“RIB Boxes” in other
packagessoftwares but with the added flexibility of a scripting language. In addition to
the MEL scriptsinsert points listed here, there are others available in
geometry attribute nodesGeometry Attribute Nodes (see
Section 3.5 [The Geometry Attribute Node], page 14) and in the light attribute nodes (see Section 3.8.8 [Light Attribute Node MEL Scripts], page 43Geometry MEL Scripts) and in the Light Attribute Nodes (see Light MEL Scripts).
The
following variable 'string $render_pass' is automatically defined in the context of these scripts
This variable is
and is assigned the current
render passRender Pass node name.
Figure 3.60:
The MEL Scripts group
panel
‘Pre Render MEL’ ‘
Post Render MEL’
Specify scripts to run before the rendering starts and after the rendering is finished, respectively. Those scripts are guaranteed to run first and last. They are also executed outside of any RiBegin/RiEnd block, so these scripts are not appropriate for invoking RenderMan commands.
‘Pre Frame MEL’ ‘
Post Frame MEL’
Specify scripts to run before and after each frame, respectively. These two scripts are the very first and last things executed for each frame; they are called even before and after the RiBegin/RiEnd block, so these scripts are not appropriate for invoking RenderMan commands.
‘Post Option MEL’
Specifies a script to execute after all RenderMan options have been issued, but before the camera transforms. This can be used to override any
optionoptions.
‘Pre World MEL’
Specifies a script to execute just before RiWorldBegin which is also right after where the camera transforms are issued.
‘Post World MEL’
Specifies a script to execute right after RiWorldEnd (but before RiFrameEnd).

