2017

Table Of Contents
<title>
<start>01:00:05;00</start>
<end>01:00:06;02</end>
<text>This is a third subtitle string</text>
<font>Garamond</font>
<size>20</size>
<fontcolor>
<alpha>255</alpha>
<red>255</red>
<green>255</green>
<blue>255</blue>
</fontcolor>
<vertical>-100</vertical>
<horizontal>-200</horizontal>
<setup>/usr/discreet/project/test/text/paz.ttg</setup>
</title>
</video>
</subtitle>
Python Hooks Reference
Use available Python hooks are there to help you integrate Smoke into a shot management system, monitor
archives, or just specify how batch setups are named.
All Python hook files are located in /usr/discreet/<application>/python/. Note that every hook presented
in this document is blocking, and relinquishes control only once it completes. To run a hook in its own
thread, see
Threading Hooks (page 214).
To provide more flexibility in how hook implementations are deployed, Smoke loads modules, searching
for supported methods until all supported hooks are found. This allows you to separate hook implementations
into multiple files, making allowance for better organization. Module specific hooks are part of specific files:
archiveHook.py: archiveRestored, archiveComplete, archiveSegmentComplete, archiveSelectionUpdated
batchHook.py: batchSetupLoaded, batchSetupSaved, batchExportBegin, batchExportEnd,
batchDefaultIterationName, batchDefaultRenderNodeName, batchDefaultWriteFileNodeName
projectHook.py: projectChanged, appInitialized, projectSaved
hook.py: renderEnded, playbackEnded, previewWindowConfigChanged
exportHook.py: preCustomExport, postCustomExport, preExport, postExport, preExportSequence,
postExportSequence, preExportAsset, postExportAsset, useBackBurnerPostExportAsset, getCustomProfiles
NOTE DL_PYTHONHOOKDIR is deprecated and replaced by DL_PYTHON_HOOK_PATH.
Environment Variables
DL_PYTHON_HOOK_PATH Allows you to set the path to the Python hooks files. It behaves similar to other
PATH variables.
export
DL_PYTHON_HOOK_PATH=/share1/dev/python_hooks/test:/share1/dev/python_hooks/production
In the above example, Smoke loads the hooks from test first, and then for any undefined hooks, continue
to scan production.
196 | Chapter 6 Importing and Exporting Media