hook.py contains generic hooks.
Called every time Flame is started and reaches the splash screen.
def appStarted( info ): pass
| Key | Description | Example | Data Type |
|---|---|---|---|
| homeDirectory | Home directory of the started flame application. | homeDirectory == "/opt/Autodesk/flame_2018.1.0" | String |
| version | Full version string of the started flame application. | version == "2018.1.0" | String |
| versionMajor | Major version of the started flame application. | versionMajor == "2018" | String |
| versionMinor | Minor version of the started flame application. | versionMinor == "1" | String |
| versionPatch | Patch version of the started flame application. | versionPatch == "0" | String |
| configPath | Path to the loaded flame application's config file. | by default, configPath = "/opt/Autodesk/flame_2018.1.0/cfg/init.cfg" | String |
Called every time a new user is loaded in the application. This includes the user selection on launch.
def userChanged( info ): pass
info: Dictionary. Information about the newly loaded flame user.
Called when a sequence finishes rendering, even if the render was unsuccessful due to factors such as a manual abort.
def renderEnded(moduleName, sequenceName, elapsedTimeInSeconds):
pass
Called when a sequence finishes playback, successfully or not.
def playbackEnded(sequenceName, fps, debugInfo):
pass
Called when the user changes the video preview device. The parameters for previewWindowConfigChanged are actually read from the init.cfg VideoPreviewDevice keyword.
def previewWindowConfigChanged(description,width,height,bitDepth,
rateString,syncString):
pass
Hook returning the custom UI actions to display to the user in the contextual menu. It returns a tuple of group dictionaries. You can define as many group dictionaries as required.
def getCustomUIActions( ):
return ()
In getCustomUIActions, a group dictionary defines a custom menu group,where keys define the group. A group dictionary has only two keys, name and actions.
A dictionary of two keys, name and caption. Each action dictionary must appear in a group dictionary, as a value for the actions key.
Custom Group 1
Custom Group 2
def getCustomUIActions( ):
action1 = {}
action1[ "name" ] = "action1"
action1[ "caption" ] = "Action Number 1"
group1 = {}
group1[ "name" ] = "Custom Group 1"
group1[ "actions" ] = ( action1, )
action2 = {}
action2[ "name" ] = "action2"
action2[ "caption" ] = "Action Number 2"
action3 = {}
action3[ "name" ] = "action3"
action3[ "caption" ] = "Action Number 3"
group2 = {}
group2[ "name" ] = "Custom Group 2"
group2[ "actions" ] = ( action2, action3)
return ( group1, group2 )
Hook returning the custom UI actions to display to the user in the Flame main menu. It returns a tuple of group dictionaries. You can define as many group dictionaries as required.
def getMainMenuCustomUIActions( ):
return ()
In getMainMenuCustomUIActions, a group dictionary defines a custom menu group, where keys define the group. A group dictionary has only two keys, name and actions.
A dictionary of two keys, name and caption. Each action dictionary must appear in a group dictionary, as a value for the actions key.
See example from getCustomUIActions above for menu structure reference.
Hook called when a custom action is triggered in the menu.
def customUIAction( info, userData ):
pass
Two parameters
Hook called when starting the application and when switching project. The returned string is used as default for the Rename Shot dialog, and can contain tokens in brackets that will resolve at runtime. .
def timelineDefaultShotName( project ): return ""
if project == "project_name":
return "<track>_<segment>_project"
return "<track>_<segment>_global"
Hook called when starting the application and when switching project. The returned string is used as default for the marker name, and can contain tokens in brackets that will resolve at runtime. .
def timelineDefaultMarkerName( project ): return ""
if project == "project_name":
return "<user>_<time>_project"
return "<user>_<time>_global"
Hook called when starting the application and when switching project. The returned string is used as default for the marker comment, and can contain tokens in brackets that will resolve at runtime. Overrides the preferences defined in .
def timelineDefaultMarkerComment( project ): return ""
if project == "project_name":
return "<user>_<time>_project"
return "<user>_<time>_global"