MayaMan Help Contents

# MayaMan Variables

MayaMan supports a couple of "convenience" variables that can be used in eg. the Output Directories dialog and in the pre/post render scripts.

### How to use the variables

These variables can be used in any path field in MayaMan, or in the pre/post render scripts. Each variable must be formatted as follows: `$(MYVARIABLE)`. Also note that the variables are case-sensitive.

#### PROJECTDIR

This is an internal variable that always points to the current Maya project directory. The following MEL command would return the same value: `workspace -fullName`.

#### SCENENAME

This internal variable returns the current scene name.

#### TXSUBDIR

This internal variable returns a string that represents the subdirectory in which textures should be stored for a specific renderer. This is useful for things like explicit shadow map names so that the resulting maps get stored in an 'air' or 'prman' subdirectory.

#### RIBBASE

This internal variable points to the base name as set in the MayaMan Basic Options. Through MEL you could retreive this value using the following command: `getAttr MayaManNugget.RibBase`

#### FRAME

This internal variable will return the current frame beeing rendered. Note that this variable is only defined for use during render time, eg in the User Defined RIB Statemets section or in the Pre/Post Render/Frame MEL scripts.

#### RIBDIR

This internal variable will return the rib directory value with any other variables expanded. Note that it is an error to mention $(RIBDIR) in the rib directory setting!.

#### PASS

This internal variable will return the name of the current pass being processed, see extra passes.

#### Environment Variables

MayaMan also supports the use of arbitrary enviromnent variables i paths (and pre/post render scripts). For instance, you could set your rib directory to be $(TEMP)/myTempRibs, or even declare and use your own environment variables. Environment variables will also be expanded if they are specified with curly braces ${TEMP}/myTempRibs or even just a $ and ending in a slash, ie: $TEMP/myTempRibs. This applies to the texture file names too so you can use Maya6.5's new environment variable functionality in the file nodes.

### Special Functionality

We realize that not all MayaMan users are MEL experts (yet). The following functionality has been added to support non-MEL gurus in completing some common tasks.

#### #[0-9]f

This option, when used in a filename, will be replaced with the current frame number. This is option is used automatically by MayaMan when using object archiving with the "Substitute RIB Automatically" option. If you output a range of archives and automatically replace the geometry in the scene with these archives, then MayaMan will refer to the archive as follows: `objectName.#f.rib`. If you render frame 43, then MayaMan will use `objectName.43.rib.`
The [0-9] part tells MayaMan that you want the number to be zero-padded, eg if you specify: `objectName.#4f.rib` then the renderer will look for `objectName.0043.rib`.

#### IFL files

This option was provided as an extension to #f. Using #f is easy, but it will always refer to the current frame. Wouldn't it be nice to have more control over which archive gets used in each frame? IFL files are essentially a list of filenames. MayaMan will look in the IFL file at the line that is corresponding to the current frame number, and use whatever is on that line. You have complete control over the order in which you write the filenames in the IFL file, which means you have complete control over which archive gets used in each frame.
An IFL file could look something like this: myIflFile.ifl `

      myArchive.0.rib
      myArchive.1.rib
      myArchive.3.rib
      myArchive.4.rib
      someOneElsesArchive.37.rib
      myArchive.2.rib
      myArchive.1.rib

` So, by specifying this IFL file for archive substitution, MayaMan will use `myArchive.0.rib` on frame 0, `myArchive.1.rib` on frames 1&6, `someOneElsesArchive.37.rib` on frame 4 etc...

MayaMan Help Contents