MEL Commands
RenderMan for Maya includes a number of useful MEL scripts that
can be used in various ways. These scripts can affect Render
Settings, attributes on nodes, your workspace, and even specific
passes.
NOTE: parameters offset by asterisks are optional, e.g.
rman getversion *nm*.
|
rman Commands
- rman genrib
- Generates the RIB files for the scene, but does not render the
scene. rman genrib respects the same
options as
the render command, below.
- rman render
- The rman render command is equivalent to rendering
Maya-style from the command line, i.e.
Render -r rman.
- rman stringinterpolate|subst str
- Substitutes variables in the string str. rman subst
allows for Tcl command
substitution; rman stringinterpolate does not. Example:
rman stringinterpolate "The current frame number is $F4";
// Result: The current frame number is 0005 //
rman subst "1 + 1 = [expr 1+1]";
// Result: 1+1 = 2 //
- rman getPref nm
- Returns the value of the pref nm. Example:
rman getPref LicenseServer;
// Result: [file join [RATGetDir installdir] rmantree etc pixar.license] //
- rman getPrefNames pat
- Returns a list of all RenderMan for Maya prefs that match the
pattern pat. Example:
rman getPrefNames "Job*"
// Result: JobPhaseTree //
- rman setPref nm val
- Sets the value of the pref nm to val. Example:
rman setPref BatchCompileMode lazy;
- rman getvar nm
- Query for the value of the RfM scripting variable named
nm. Example:
rman getvar STAGE;
// Result: untitled //
rman getvar RIBPATH;
// Result: renderman/untitled/rib //
- rman setvar nm val
- Set an RfM variable named nm with value
val to be used in scripting. Example:
rman setvar MYSHADERPATH "/path/to/my/shaders"
- rman slim start
- rman slim stop
- rman slim message msg
- These are used to communicate with Slim (RenderMan Studio only).
rman slim start and rman slim stop are used to start
and stop Slim respectively. rman slim message msg is used to
tell Slim a message. Example:
rman slim message "plt1 CreateInstance -template pixar,Blinn#2";
- rman loadShader nodename slofile
- Causes the RenderMan shader slofile to be loaded on the
RenderMan Shader Node node. Example:
rman loadShader RenderManShader1 "/path/to/shaders/plastic.slo";
- rman getMayaAttrName nm
- rman getRmanAttrName nm
- Convert the Maya attribute name nm to the RenderMan
equivalent or vice-versa. Example:
rman getMayaAttrName シェーディングRate
// Result: rman__riattr___シェーディングRate //
rman getRmanAttrName rman__riattr___シェーディングRate
// Result: シェーディングRate //
- rman regsub *-all* pattern argument
subspec
- Match the regular expression pattern against the string
argument and replace with subspec. Then, return the
substituted string. The optional parameter -all will replace all
occurrences. Example:
rman regsub "5" "My 5a55y girl" "s";
// Result: My sa55y girl //
rman regsub -all "5" "My 5a55y girl" "s";
// Result: My sassy girl //
- rman regexp *-stringArray|-sa|-matchOnly|-mo*
pattern argument
- Matches the regular expression pattern against the string
argument and will return all matches. If -matchOnly or
-mo is passed as an argument, the command will return 1 if
there are any matches and 0 otherwise. If -stringArray or
-sa is passed as an argument, the command will return the
matches in a string array. Example:
rman regexp -matchOnly "-v" "file-v234.ma";
// Result: 1 //
rman regexp -mo "_v" "file-v234.ma";
// Result: 0 //
- rman debug msglevel
- Changes the current debug message level to msglevel.
msglevel can be either: DEBUG, INFO, NOTICE, WARNING, ERROR.
- rman date
- Returns the current date.
- rman getversion *nm*
- Query for the version number of RenderMan for Maya. You can
also query for the version number of other components by
passing in a name for the third argument nm,
where nm can be one of the following:
about, mayaAPI, prman, platform, os, osVersion.
The result will be printed to the Maya Script Editor window,
e.g. (note the semi-colon is printed in the result, but is not
used in the query):
rman getversion;
// 5.0 (@1145269 Feb 8 2013) //
rman getversion about;
// Result: RfM 5.0 (@1145269 Feb 8 2013)
RMS 4.0
Copyright (c) 1996-2012 Pixar Animation Studios. All rights reserved.
//
rman getversion prman;
// Result: prman 17.0 @1145269 //
|