Custom tokens can be defined in the Custom Tokens tab of the System Preferences. They are useful to quickly add a string, a combination of existing tokens, or tokens with pre-defined padding or slicing to text fields where an Add Token drop-down is available.
They appear in the Custom submenu of an Add Token drop-down, unless:
The custom token contains at least one existing token that cannot be resolved in the current context.
For example, a custom token containing <batch iteration> does not appear in an Add Token drop-down accessed outside of the Batch environment.
The custom token causes an error in a specific context.
For example, a custom token containing only <audio codec profile[0:2]> would cause an error if it were the only content in the Pattern field of the Media Export window.
The output of a token returning a string can be sliced by adding the [ : ] characters within the token itself.
One of the following syntaxes, where x and y are used to define the characters to be included in the output, must be used:
| Use: | To: |
|---|---|
[ x : ] |
Define the start of the string and keep all characters up until the end. |
[ : y ] |
Keep all characters from the start up to the defined character. |
[ x : y ] |
Define a range within the string. |
Consider these behaviours when setting a slice:
For a clip named A002C005_151106_ROT2.mov, using the slicing options in the <source name> token of a timeline segment's Rename Shot window will produce these different results:
| Use: | To Get: |
|---|---|
<source name[:20]> or <source name[:-4]> |
A002C005_151106_ROT2 |
<source name[:8]> or <source name[:-16]> |
A002C005 |
<source name[9:15]> or <source name[-15:-9]> |
151106 |
<source name[16:]> or <source name[-8:]> |
ROT2.mov |
The following token has been added.
| Use: | To: | Scope: |
|---|---|---|
| <workspace> | Return the name of the current Workspace. | Available everywhere the <project> token is available. |
The <hostname>, <host>, and <host name> tokens:
In previous versions of the application, these tokens resolved to the DisplayName value defined in the following files:
/opt/autodesk/cfg/network.cfg/opt/autodesk/cfg/services.cfgThe <workstation> token:
Alternatively, it is possible to define the DisplayName setting in the network.cfg file which will then populate the <workstation> token.
This behaviour is now consistent across all areas of the application, including in Project Management.
In previous versions of the application, in Project Management, this token resolved to the display name of the computer on which the project was created.
In other areas of the application, it resolved to the computer running the application.
If you edited the sysconfig.cfg file and/or created Project Templates in previous versions using the <hostname>, <host>, <host name>, or <workstation> tokens, review and update them to reflect the new behaviours.
The Frame or Timecode token (<frame>) has been added to the list of tokens available in the Add Reference window when a Grab Reference is performed.
As in the Export Snapshot window, the token either returns the current frame or timecode value depending on the option selected in the Frame Token drop-down.