String tokens in RfM
RenderMan for Maya can substitute a number of predefined tokens in string parameters. They can be used for animated texture sequences, referencing specific storage locations, etc.
Token | Meaning |
---|---|
<scene> | Scene name |
<layer> | Maya Render Layer name |
<camera> | Render camera name |
<aov> | AOV or LPE name |
<aovdir> | This will write AOVs to named sub-directories |
<f4> | Frame padding, 4 in this case, can be omitted for no padding or use lower numbers |
<ext> | File type extension |
<ws> | Maya's current workspace, the file path in your project |
<version> | Inserts the version number specified above |
<take> | Inserts the take number specified above |
<date> | Current date |
<assetlib> | Path to the standard RenderMan Asset Library |
<file> | Scene file name |
<frame> | Decimal frame number |
<jobid> | Unique job identifier |
<shape> | Short shape name (all instances have the same shape name) |
<shapepath> | Long shape name (all instances have unique shapepath names) |
<time> | Current time |
<udim> | UDIM identifier (only substituted at render time) |
<imagedir> | This contains the full image output directory |
_MAPID_ | Generic texture atlas identifier (only substituted at render time) |
Environment Variables
Environment variables must start with the $ sign and only use capitals, numbers and "_" characters:
$RMANTREE/bin/txmake
: returns the path to the txmake utility.Curly braces can also be used for composition:
${SHOW}_assets/<shape.assetName>/<shape.assetVersion>/tex/<shape>_diff.<udim>.tex
Retrieving attribute values
RfM does not support TCL expression anymore but allows for attribute evaluation:
<shape.time>
returns the value of the 'time' attribute on the shape node ('shape' as opposed to the 'transform' node).It is also possible to format numerical attribute values by specifying a formatting string:
<shape.time:%04d>
: if time's value is12.2
, this will return 0012.This is using python's standard format specifiers.