2017

Table Of Contents
'userData' dictionary
profiles['Package'] = {'exportType':'packageInternal'} #Adds an
entry to the 'userData' dictionary
Once the user selects a custom export option, the next hook that is fired is preCustomExport(), where the
information about the export is set, based on the entry the user has selected.
def preCustomExport( info, userData ):
#Test what 'exportType' was select in the UI, by the user
if userData['exportType'] == 'forReview':
#Set the proper 'presetPath' in the info dictionary
#This defines which preset is used for the custom encode job
info['presetPath'] = '/path/to/export/presets/uncompressed_qt.xml'
#Set the 'destinationPath' in the info dictionary
info['destinationPath'] = '/path/to/Smoke/exports/' + CURRENT_PROJECT + '/'
if userData['exportType'] == 'Package':
#do something else...
In the above example, the option the user selects from the contextual menu defines the what is performed
in the preCustomExport().
preCustomExport
Called before a custom export begins. This can be used to fill information that would have normally been
extracted from the export window.
def preCustomExport( info, userData ):
pass
info Dictionary. Information about the export. Some of this information can be modified by the script as
it executes and is marked as Editable.
Data TypeDescriptionKey
StringEditable. Name of the host where the
exported files will be written. Defaults
to localhost.
destinationHost
StringEditable. Export path root. This path will
probably be added to by the actual
Preset path. Defaults to /tmp.
destinationPath
StringEditable. Path to the preset used for the
Export.
presetPath
BooleanEditable. Use only the top video track
and ignore the other ones. False if not
defined.
useTopVideoTrack
BooleanEditable. Export between the In and
Out marks, excluding the marked
exportBetweenMarks
frames. Without In, export from start of
sequence to Out; without Out, export
Python Hooks Reference | 205