Hooks
Event hooks in ftrack connect can be used to extend or modify the default behaviour of the application. They build upon
the event system used in ftrack. As such, each hook receives a single argument which is an instance of ftrack_api.event.base.Event
.
Hooks are registered by creating a Python module with a function named register
that takes a session object and any additional
keyword arguments. The built-in hooks can be overridden by creating new hooks and placing them in a directory. Then configure
the environment by setting the FTRACK_EVENT_PLUGIN_PATH
environment variable.
Each Connect plugin should provide one or more hooks, to activate them, located in the hook
directory of the plugin.
Connect adds these directories to the FTRACK_EVENT_PLUGIN_PATH
environment variable upon plugin bootstrap.
It is also possible to prevent a default hook from being triggered by calling event.stop <ftrack_api.event.base.Event.stop>
in a callback with higher priority or by removing the default hook using ftrack.Session.event_hub.unsubscribe <ftrack_api.Session.event_hub.unsubscribe>
Unlike regular events, hooks will typically be run synchronously on the system running the ftrack connect application.
📄️ Application launch
The ftrack.connect.application.launch synchronous event is triggered when an application is launched using the built-in
📄️ Make web playable
The ftrack.connect.publish.make-web-playable hook is triggered when publishing a new version. The default hook will
📄️ Actions
Actions are tools, with or without a UI, that are designed to be launched from the ftrack Studio interface.
📄️ Plugin information
The ftrack.connect.plugin.debug-information hook is triggered when the About window in ftrack connect is opened.
📄️ Verify startup
The ftrack.connect.verify-startup hook is triggered when ftrack connect is started and any plugins have been loaded.
📄️ Connect widget
The ftrack.connect.plugin.connect-widget hook is triggered when ftrack connect starts up and is used to register