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 that are surrounded by ? are optional (Example: ?nm?).
rman Commands
- rman genrib
- Generates the RIB files for the scene, but does not render the scene.
- 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. For more information, refer to the Slim scripting page. 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 ShadingRate
// Result: rman__riattr___ShadingRate //
rman getRmanAttrName rman__riattr___ShadingRate
// Result: ShadingRate //
- 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 occurences. 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
rman getversion
// Result: 2.0 (Jun 21 2007 11:18:54) Pro //
rman getversion about; // returns the string viewed via About RenderMan
// RenderMan_for_Maya 2.0 (Jun 21 2007 13:28:34) Pro
RenderMan Studio 1.0
Copyright (c) 1996-2007 Pixar Animation Studios. All rights reserved.
//
rman getversion prman; // returns prman version RfM was built against
// Result: 13.0.5 //
|