batchHook.py

batchSetupLoaded

Called whenever a batch setup is successfully loaded.

def batchSetupLoaded( setupPath ):
   pass 
setupPath
String. File path to the location of the loaded setup.

batchSetupSaved

Called whenever a batch setup is successfully saved.

def batchSetupSaved( setupPath ):
    pass
setupPath
String. File path to the location of the saved setup.

batchExportBegin

This hook is called before the Write File node starts rendering and writing files to disk.

Note: In case of stereoscopic renders, batchExportBegin is called twice, first for the left eye, then for the right eye.
def batchExportBegin( info, userData ):
   pass
info
Dictionary. Information about the export. Some of this information can be modified by the script as it executes.
Key Description Data Type
nodeName Name of the export node String
exportPath Editable. Export path as entered in the export node from within application. Can be modified by the hook to change the written file's destination. String
namePattern List of optional naming tokens as entered in the application UI. String
resolvedPath Full path to the first frame that will be exported, with all the tokens resolved. String
firstFrame Frame number of the first frame that will be exported. Integer
lastFrame Frame number of the last frame that will be exported. Integer
versionNumber Current version number of this export.

Zero there is no version.

Integer
openClipNamePattern List of the tokens used in the UI to name the Open Clip XML that will be created by the export node.

Only available if Clip Version (versioning) is enabled in the UI.

String
openClipResolvedPath Full path to the open clip that will be created, with all the tokens resolved.

Only available if Clip Version (versioning) is enabled in the UI.

String
setupNamePattern List of the tokens used in the UI to name the batch setup that will be created by the export node.

Only available if Clip Version (versioning) is enabled in the UI.

String
setupResolvedPath Full path to the batch setup that will be created, with all the tokens resolved.

Only available if Clip Version (versioning) is enabled in the UI.

String
userData
Dictionary. User-defined. Empty Dictionary that will be carried over into the batchExportEnd hook. This can be used by the hook to pass black box data around.

batchExportEnd

This hook is called whenever a Write File node in Batch finished its render. Use it, amongst other things, to publish renders to shot tracking systems, or to perform post-processing on successful renders.

Note: In case of stereoscopic renders, batchExportEnd is called twice, first for the left eye, then for the right eye.
def batchExportEnd( info, userData ):
   pass
info
Dictionary. Information about the export. Some of this information can be modified by the script as it executes.
Key Description Data Type
nodeName Name of the export node. String
exportPath Export path either entered in the export node from within application, or edited by batchExportBegin. String
namePattern List of the naming tokens as entered in the application UI. String
resolvedPath Full path to the first frame that was exported, with all the tokens resolved. String
firstFrame Frame number of the first frame that was exported. Integer
lastFrame Frame number of the last frame that was exported. Integer
versionNumber Current version number of this export.

Zero if there is no version.

Integer
versionName Current version name of this export. Empty if unversionned. String
fps Frame width of the exported frames. Double
scanFormat Scan format of the exported asset. Possible values:
  • FIELD_1
  • FIELD_2
  • PROGRESSIVE
String
depth Bit depth of the exported asset. Possible values:
  • 8-bits
  • 10-bits
  • 12-bits
  • 16 fp
String
height Frame height of the exported asset. Long
width Frame width of the exported asset. Long
aspectRatio Frame aspect ratio of the exported asset. Double
openClipNamePattern List of the tokens used in the UI to name the Open Clip XML that was created by the export node.

Only available if Clip Version (versioning) is enabled in the UI.

String
openClipResolvedPath Full path to the open clip that was created, with all the tokens resolved.

Only available if Clip Version (versioning) is enabled in the UI.

String
setupNamePattern List of the tokens used in the UI to name the batch setup that was created by the export node.

Only available if Clip Version (versioning) is enabled in the UI.

String
setupResolvedPath Full path to the batch setup that was created, with all the tokens resolved.

Only available if Clip Version (versioning) is enabled in the UI.

String
userData
Dictionary. User-defined. Empty Dictionary that is carried over from the batchExportBegin hook. This can be used by the hook to pass black box data around.

batchDefaultIterationName

Called at application startup, and whenever the user switches project. Use it to define the default name given to new Batches created by the user in the Media Panel. Overrides the preferences defined in Timeline FX/Batch/Batch FX > Default Batch Iteration Name. The returned value can use any of the tokens available in the UI such as <user nickname> (note the lack of underscore).

Important: The returned string must contain the two mandatory tokens <batch name> and <iteration>.
def batchDefaultIterationName( project ):
   return ""
project
String. Usually called with the current project. If a project name is specified, the default batch iteration name for this project will be returned. For example:
if project == "project_name":
		return "<batch name>_<iteration###>_project"
return "<batch name>_<iteration###>_global"

batchDefaultRenderNodeName

Called at application startup, and whenever the user switches project. Use it to define the default node name given to new render nodes. Overrides the preferences defined in Timeline FX/Batch/Batch FX > Default Render Node Name. The returned value can use any of the tokens available in the UI such as <user nickname> (note the lack of underscore).

def batchDefaultRenderNodeName( project ):
   return ""
project
String. Usually called with the current project. If a project name is specified, the default render node name for this project will be returned. For example:
if project == "project_name":
		return "<batch name>_render_project"
return "<batch name>_render_global"

batchDefaultWriteFileNodeName

Called at application startup, and whenever the user switches project. Use it to define the default node name given to new Write File nodes. Overrides the preferences defined in Timeline FX/Batch/Batch FX > Default Write File Node Name. The returned value can use any of the tokens available in the UI such as <user nickname> (note the lack of underscore).

def batchDefaultWriteFileNodeName( project ):
   return ""
project
String. Usually called with the current project. If a project name is specified, the default write file node name for this project will be returned. For example:
if project == "project_name":
		return "<batch name>_write_file_project"
return "<batch name>_write_file_global"

batchDefaultGroupPath

Called at application startup, and whenever the user switches project. Use it to define the default group path where Batch setups will be saved. Overrides the preferences defined in Timeline FX/Batch/Batch FX > Default Batch Group / BFX Setup Path. The returned value can use any of the tokens available in the UI such as <user nickname> (note the lack of underscore).

def batchDefaultGroupPath( project ):
   return ""
project
String. Usually called with the current project. If a project name is specified, the default batch group path for this project will be returned. For example:
if project == "project_name":
		return "~/specialPathForThatProject/batch/<batch name>"
return "~/batch/<batch name>"
Note: Use "~" at the start of the path to ensure the Batch setups are included in an Archive Setup or a Project Archive.

batchDefaultIterationPath

Called at application startup, and whenever the user switches project. Use it to define the default iteration path where batch setups will be saved. Overrides the preferences defined in Timeline FX/Batch/Batch FX > Default Batch Iteration Setup Path. The returned value can use any of the tokens available in the UI such as <user nickname> (note the lack of underscore).

def batchDefaultIterationPath( project ):
   return ""
project
String. Usually called with the current project. If a project name is specified, the default batch iteration path for this project will be returned. For example:
if project == "project_name":
		return "~/specialPathForThatProject/batch/<batch name>/iterations"
return "~/batch/<batch name>/iterations"
Note: Use "~" at the start of the path to ensure the Batch setups are included in an Archive Setup or a Project Archive.

actionDefaultGeometryPath

Called at application startup, and whenever the user switches project. Use it to define the default action geometry import path where geometry will be imported from. Overrides the preferences defined in Timeline FX/Batch/Batch FX > Default Action Geometry Import Path. The returned value can use any of the tokens available in the UI such as <user nickname> (note the lack of underscore).

def actionDefaultGeometryPath( project ):
   return ""
project
String. Usually called with the current project. If a project name is specified, the default action geometry import path for this project will be returned. For example:
if project == "project_name":
		return "~/specialPathForThatProject/batch/<batch name>/fileformats"
return "~/batch/<batch name>/fileformats"