Using ExtendScripts
You can develop your own ExtendScripts, register them to specific Templater Events, and have them execute when those events are broadcast by Templater. Within the ExtendScript file you register with Templater, we support methods that allow your code to access and manipulate Templater’s internal memory. This grants you access to things like the batch of jobs, specific job data, or layer data from within your code. See the Templater ExtendScript API for more information.
Sample ExtendScripts are available at Dataclay's code repository on GitHub.
View image
NOTE The following image shows the dialog from Templater 3.4. If you have an earlier version, your dialog will look different.
- In the Templater preferences dialog, in the Bot Settings group, click Setup ExtendScripts.
-
Select a Templater event group to show available events associated with that group.
NOTE The Footage Processing and Footage Download event groups are only available in Templater 3.4 or later. Earlier versions show the Footage Retrieval event group instead.
- Enable a checkbox to specify whether your ExtendScript should run Before or After the chosen event. If the checkbox is cleared, the ExtendScript is disabled.
- In the text field below the checkbox, enter the absolute path to the ExtendScript. To have Templater enter the path for you, click Choose script… and navigate to the ExtendScript location, then click OK.
- To add ExtendScripts for other Templater events, repeat steps 2 through 4.
- When you are finished adding script information, click OK to register the ExtendScripts.
In the templater-options.json file, in the bot object, set the specific event property to the absolute path of the ExtendScript file you want to run for that particular event. Refer to the following table for events that you can register an ExtendScript to in the bot object. For detailed descriptions of each event, see Templater Events.
"pre_jsx_data" |
Before data |
...before Templater retrieves data |
"post_jsx_data" |
After data |
...after Templater retrieves data |
"pre_jsx_batch" |
Before batch |
...before Templater's main iteration loop |
"post_jsx_batch" |
After batch |
...after Templater's main iteration loop |
"pre_jsx_job" |
Before job |
...before processing a single job |
"post_jsx_job" |
After job |
...after processing a single job |
"pre_jsx_udpate" |
Before update |
...before updating any layers |
"post_jsx_update" |
After update |
...after updating any layers |
"pre_jsx_output" |
Before output |
...before rendering any output |
"post_jsx_output" |
After output |
...after rendering any output |
"enable_jsx" |
Bot enabled |
...when Bot is enabled |
"shutdown_jsx" |
Bot disabled |
...when Bot is disabled |