Support for the Maya Project Directory

Some attributes in 3Delight for Maya are used to specify a file path name. These path names can be either absolute or relative. When they are relative, they will be considered relative to the current Maya project directory.

Support of Tokens

These file path names can contain various tokens; this allows the path to dynamically change to reflect the current value of a given token. The following tokens can be used in any file path:

TokenDescription
$VARThe value of the environment variable ‘VAR’ will replace ‘$VAR’ in the path.
%VAR%The value of the environment variable ‘VAR’ will replace ‘$VAR’ in the path.
~The value of the HOME environment variable will replace the tilde character.
@The current frame number will replace the @ character.
#The current frame number, padded to form a 4 digits number, will replace the # character.
{<frame><operator><operand>}

Simple expressions to produce a frame number can also be used as a part of the file name. The expression must be enclosed in curly braces. The expression components are:

 <frame> : Either ‘@’ or ‘#’ as described above.

<operator> : An arithmetic operator. Valid operators are: + - * / %

<operand> : An integer or floating point number.

For instance, the following are valid frame number expressions:

{#-10}

{@*2.5}

{#%5}


`MEL command`The string enclosed in back quotes is evaluated as a MEL command and gets replaced with the command’s result.
<layer>This string will be replaced with the currently rendered Maya render layer.
<project>This string will be replaced with the path to the current Maya project directory.
<pass>This string will be replaced with the name of the Render Rass Node used for rendering.
<shape_name>This string will be replaced with the long name of the attached shape. This tag can currently only be used in light attributes nodes.
<scene>This string will be replaced with the name of the scene.
<ext>This string will be replaced with the file extension. File extensions are expanded for RIB files, shadow map files and any image file outputs.
<camera>This string will be replaced with the name of the camera shape being used for rendering.
<fragment_set>This string will be replaced with the name of the object set used by the RIB fragment being output. It is valid only for the Filename rendering attribute (in the RIB Fragment group).
<aov>This string will be replaced with the name of the variable being output in the display. It is valid only for the Image Filename rendering attribute (in the Display group).
<light>When using the multi-light feature this token will contain the name of the light being rendering.
<output_variable>This string is deprecated in favor of <aov>

Expanding the List of Tokens

It is possible to programmatically define custom tokens that will be added to the ones described above. This is done using a provided API function named DL_userGetStringTokens(), it is further described in User Defined MEL Procedures.

 

  • No labels