Tokens and Templates

 
 
 

| Universal Tokens | Rendering Tokens | Viewport Slate Tokens | Render Slate Tokens | Caching Tokens

You can specify a string which acts as a template for building output paths and filenames, as well as for displaying on-screen information (viewport slate), and generating render slates when outputting image sequences.

A template can be made up of any number of preset tokens as well as non-parsed strings which are then assembled into the final format. The template string is a simple string, where any string values delimited by square brackets [ ] are interpreted as tokens and processed. String values that appear outside of the square brackets are copied as-is. For example, on a machine called mtl-p9999, the string "My Computer is [Host]" gets parsed to "My Computer is mtl-p9999".

Some tokens can take optional parameters which must be separated from the token by an empty space. For example, the [date] token and its optional parameters MM_DD_YY are specified as [Date MM_DD_YY] which gives the date as "11_29_06".

The template parser recognizes many preset tokens. If a token is not known, the parsing stops. There's a core set of universal tokens that work everywhere that tokens and templates are supported in Softimage. All other tokens are context-specific (although some tokens can be used in multiple contexts).

Universal Tokens

Token

Option

Description

Context

[date]

 

Returns the system date, with formatting. By default it uses the format YYMMDD. The formatting options are the same as with the windows time/date settings. Any spacings can be added between the formatting, such as "DD/MM/YY", "dd_mmm_yyyy", etc.

All

 

d

Day of the month.

All

 

w

The week of the year (1 - 52).

All

 

m

Month of the year.

All

 

y

Last two digits of the year with no leading zero.

All

 

dd

Two digit day of the month with a leading zero.

All

 

ww

Two digit week number with a leading zero.

All

 

mm

Two digit month of the year with a leading zero.

All

 

yy

Last two digits of the year with a leading zero.

All

 

ddd

Abbreviated day of the week (Mon, Tue, Wed, etc).

All

 

mmm

Abbreviated month name (Jun, Jul, Aug, etc).

All

 

dddd

Full day of the week (Thursday, Friday, etc).

All

 

mmmm

Full month name (January, February, etc).

All

 

yyyy

Full four-digit year.

All

[Time]

 

The system time with optional formatting. By default it returns the format of [HHmm], which is 24-hour time and minutes. The formatting is similar to the [Date] token.

All

 

s

Seconds part of the time.

All

 

m

Minutes part of the time.

All

 

h

Hours part of the time in 12-hour format.

All

 

H

Hours part of the time in 24-hour format.

All

 

t

Single lower case letter indicator of AM / PM ('a' and 'p')

All

 

T

Single upper case letter indicator of AM / PM ('A' and 'P')

All

 

ss

This and the next three options are the same as above but with a leading zero.

All

 

mm

--

All

 

hh

--

All

 

HH

--

All

 

tt

Two digit lower case indicator of AM / PM.

All

 

tt

Two digit upper case indicator of AM / PM.

All

[Frame]

 

The frame given. Optional arguments are '#<number>', '+<number>', and '-<number>'.

The '#<number>' argument sets the leading zero fill to use for the resulting frame number. The '+<number>' and '-<number>' arguments specify a positive or a negative offset to the current frame, respectively.

For example, if the current frame is frame 5, and the template "Bob.[Frame #4 +2].pic" is used then the parsed result will be "Bob.0007.pic". This allows you to render sequences at a different offset from the scene timeline. The maximum padding value is 8, any value above is clamped to that.

NoteIf you use the [Frame] token and do not specify any padding, then padding will be set based on the value given in the scene render options (as long as it is not set to None). Frame tokens using the '#<number>' argument are not affected. See Setting the Frame Padding [Rendering].

In the context of caching, if you use the [Frame] token and do not specify any padding, then no padding will be set.

Note that not all cache file formats support the [Frame] token — see Cache File Formats for more information.

All

[Field]

 

The field number currently being rendered. The token has two optional arguments, both of which would have to be provided, if needed. The arguments specify which character string to use for the first and second field, respectively.

For example, the template "[Field Odd Even]Bob.[Frame].pic" will resolve to the string "EvenBob.1.pic" when rendered at frame 1.5. The default is ".1 .2".

All

[User]

 

The current login name of the user.

All

[Host]

 

The name of the computer that Softimage is running on.

All

[Env]

 

Parses to the value of a given environment variable. The optional token parameter is the name of the environment variable to resolve and is required.

For your convenience, the following methods of accessing environment variables are also supported. These methods are identical to the [Env VARIABLE] mechanism:

$(VARIABLE)

Where VARIABLE is any set of characters to be matched, except brackets. For example, "$(bob(joe))" would look up the variable bob(joe), while "$(bob()" would be a syntax error.

%VARIABLE%

Where VARIABLE is any set of characters, except %.

All

[Project]

[Project Path]

 

Returns the project name. Include the Path option to return the project name and its full path.

All

[Scene]

 

Returns the scene name.

All

[Value]

 

The value of any Softimage property.

For example, [Value sphere.kine.local.posx].

All

Rendering Tokens

You can use the rendering tokens to build output paths and filenames for render passes and their render channels (framebuffers), movies, and mi render archives.

You can also define default templates for common output paths and file names in your Rendering Preferences.

Token

Description

Context

[BitDepth]

The bit depth of the framebuffer's file format setting.

Rendering

[Camera]

The name of the camera.

In a multi-camera output pass, this token indicates the name of the camera being used to render.

Rendering

[Channel]

The name of the render channel associated with the framebuffer.

Rendering

[DataType]

The data type of the framebuffer's file format setting.

Rendering

[Format]

The framebuffer's file format setting.

When using the [Format] token, you must make sure to specify a fully formed output path. In some cases, such as when you have a framebuffer for which you are rendering more than one frame, you must also include the [Frame] token as in ".[Frame].[Format]".

NoteSoftimage will automatically append the ".[Frame].[Format]" string to all frame-dependent output paths that do not explicitly include these tokens. Likewise, for non frame-dependent output paths, such as a multi-frame archive (which writes all frames into a single mi archive), only the ".[Format]" part of the string is added if missing.

This is done to simplify the process of building templates, so that you don't have to specify these tokens every time you build an output path.

Rendering

[Framebuffer]/[FB]

The name of the framebuffer.

For more information about framebuffers, see Defining a Framebuffer for the Render Channel.

Rendering

[Object]

The name of the object being exported as an object render archive.

Object Render Archives Only

[Pass]

The name of the pass associated with the framebuffer.

Rendering

[PartialFrame]

The frame number and frame fraction, for example, 7.2. If you are rendering partial frames, you should use this token in the file name template because the [Frame] token gets rounded to the nearest integer.

You can also specify the total number of digits for the fractional part, for example, [PartialFrame 5].

Rendering

Viewport Slate Tokens

The viewport slate recognizes all universal tokens and their optional parameters, as well as a set of context-specific tokens (see the table below). Text entered outside of the token parentheses is considered a non-parsable string and is displayed as is.

A viewport slate can support tokens and text strings entered on a single line or on multiple lines (each line is considered a separate template). For information on how to create a viewport slate, see the Viewport Slate options on the Stats tab of the Objects.

Token

Description

Context

[Camera]

Returns the name of the camera.

Camera Visibility

[CameraAspect]

Returns the aspect ratio of the camera.

Camera Visibility

[CameraFormat]

Returns the output format and resolution of the camera.

Camera Visibility

[CameraProjection]

Returns the camera projection as either "Perspective" or "Orthographic".

Camera Visibility

[CameraType]

Returns the camera interest constraint as either "Constrained" or "Free".

Camera Visibility

Render Slate Tokens

The render slate recognizes all universal tokens and their optional parameters, as well as a set of context-specific tokens (see the table below). Text entered outside of the token parentheses is considered a non-parsable string and is displayed as is.

A render slate can support tokens and text strings entered on a single line or on multiple lines (each line is considered a separate template). For information on how to create a render slate, see the Slate tab of the Render Pass Property Editor.

Token

Description

Context

[Camera]

Returns the name of the camera.

Render Pass

[CameraAspect]

Returns the aspect ratio of the camera.

Render Pass

[CameraDisplayInfo]

Pulls all tokens and templates defined in the viewport slate and uses it as-is in the render slate output.

Render Pass

[CameraFormat]

Returns the output format and resolution of the camera.

Render Pass

[CameraProjection]

Returns the camera projection as either "Perspective" or "Orthographic".

Render Pass

[CameraType]

Returns the camera interest constraint as either "Constrained" or "Free".

Render Pass

Caching Tokens

For more information, see Caching Animated Deformations and Simulations [Managing Scenes, Files, and Projects].

Token

Description

Context

[Model]

Returns the name of the model in which the object selected for caching exists.

Caching

[Object]

Returns the name of the object that is selected for caching.

Caching

[Version]

Any text string used to identify this version of the cache file, such as A, B, C, Take1, Take2, etc.

Caching

Camera Sequencer Tokens

Token

Description

Context

[ActiveSequenceCamera]

Contains the currently active camera in the camera sequencer.

Rendering the Sequencer Camera

[SequenceFrame]

Contains the current sequence time.

Rendering the Sequencer Camera

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License