Output path templates let you specify a string which acts as a template for building paths and filenames. 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 output path.
You can specify default templates for common output paths and names in your Rendering Preferences.
Creating a Template
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 a space (' ').
For example:
- Given the [Date] token
- And its optional parameters MM_DD_YY
- “[Date MM_DD_YY]” gives the date as “11_29_06”
If a token is not known, the parsing stops.
Preset Tokens
The template parser has a number of preset tokens. Their names and options are listed below:
|
[Project] [Project Path] |
Project information. By default returns the project name but can use option Path to return the project path instead. |
|
[Scene] |
Returns the scene name. |
|
[Date] |
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. |
|
d |
Day of the month. |
|
w |
The week of the year (1 - 52). |
|
m |
Month of the year. |
|
y |
Last two digits of the year with no leading zero. |
|
dd |
Two digit day of the month with a leading zero. |
|
ww |
Two digit week number with a leading zero. |
|
mm |
Two digit month of the year with a leading zero. |
|
yy |
Last two digits of the year with a leading zero. |
|
ddd |
Abbreviated day of the week (Mon, Tue, Wed, etc). |
|
mmm |
Abbreviated month name (Jun, Jul, Aug, etc). |
|
dddd |
Full day of the week (Thursday, Friday, etc). |
|
mmmm |
Full month name (January, February, etc). |
|
yyyy |
Full four-digit year. |
|
[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. |
|
s |
Seconds part of the time. |
|
m |
Minutes part of the time. |
|
h |
Hours part of the time in 12-hour format. |
|
H |
Hours part of the time in 24-hour format. |
|
t |
Single lower case letter indicator of AM / PM ('a' and 'p') |
|
t |
Single upper case letter indicator of AM / PM ('A' and 'P') |
|
ss |
This and the next three options are the same as above but with a leading zero. |
|
mm |
-- |
|
hh |
-- |
|
HH |
-- |
|
tt |
Two digit lower case indicator of AM / PM. |
|
tt |
Two digit upper case indicator of AM / PM. |
|
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 five, 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. Note: If 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. |
|
|
[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". |
|
[User] |
The current login name of the user. |
|
[Host] |
The name of the machine XSI is running on. |
|
[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 %. |
|
[Value] |
The value of any xsi property. For example, "sphere.kine.local.posx". |
|
[Pass] |
The name of the pass associated with the framebuffer. |
|
[Framebuffer] |
The name of the framebuffer. |
|
[Channel] |
The name of the render channel associated with the framebuffer. |
|
[Format] |
The framebuffer’s file format setting. |
|
[DataType] |
The data type of the framebuffer's file format setting. |
|
[BitDepth] |
The bit depth of the framebuffer's file format setting. |
SOFTIMAGE|XSI v.7.0