After Effects

The ShotGrid engine for After Effects provides a platform for integrating ShotGrid into your After Effects workflow. It consists of a standard ShotGrid Pipeline Toolkit engine and relies on the tk-framework-adobe (CEP).

Once enabled, a ShotGrid Adobe Panel becomes available in After Effects. It displays information about the current ShotGrid context as well as the commands that are registered for the apps installed in that context.

Engine

Supported Application Versions

This item has been tested and is known to be working on the following application versions:

2020 (v17.0) - 2023 (v23.6)

Please note that it is perfectly possible, even likely, that it will work with more recent releases, however it has not yet been formally tested with these versions.

Interface Overview

The ShotGrid extension panel uses the same color palette and basic layout as native After Effects panels. It is comprised of five components:

components

  1. Context Header - Thumbnail and fields for the current context.
  2. Favorites Shelf - Designed to show the most commonly-used apps for the current context.
  3. Command List - All non-favorited commands for the current context.
  4. Context Menu - Additional context-related commands and debugging tools.
  5. Logging Console - A console overlay that displays logging output for debugging.

Installation

Installation of the ShotGrid Engine for After Effects follows the same protocol as the other ShotGrid integrations. For information on installing engines and apps, see the Administering Toolkit article. In addition, you can reference the default toolkit config as an example of how to configure the integration.

Enabling the extension

Once the extension is installed, it will need to be launched via the extensions menu in After Effects.

Menu

This will only need to be done once and the ShotGrid extension panel can remain in the After Effects layout without having to be enabled on subsequent launches.

Once enabled, and on future launches, the extension panel will display a loading screen while the ShotGrid integration is bootstrapping.

This screen typically displays for a few seconds before the current context is determined and the commands are displayed.

Interface components

The following sections outline the components of the ShotGrid After Effects integration.

Context header

The context header is a customizable area which can display information about the current ShotGrid context.

Header

The context is determined by the currently-active document. Once the context is determined by the engine, the header will update to display the context’s thumbnail field detail. The field information is controlled by a hook. For information on how to customize the field display, see the Context Fields Display Hook section below.

It should also be noted that the context switching will only be recognized in if ShotGrid open was used.

Favorites shelf

The favorites shelf is similar to the menu favorites available in other ShotGrid DCC integrations such as Maya and Houdini. This section of the interface makes the most commonly used Toolkit apps readily available and easy to find just under the context header.

Shelf

The shelf displays the favorited commands as buttons that, when moused over, transition from grayscale to color and display their name in the label at the top. Tooltips for the buttons will show by hovering the mouse above them.

Clicking one of the buttons will trigger the callback for the registered command to execute.

For details on how to specify command favorites, see the Shelf Favorites section below.

Command list

The command list shows the other “regular” commands that are registered for the current context.

Commands

Typically, apps installed within a pipeline configuration will register one or more commands that are displayed here. If the commands are not identified as favorites, and are not identified as context-menu commands, they will display here.

The command list buttons behave in a manner similar to those in the favorites shelf. The only real difference is that they display as a list with the full name to the right of their icon.

Context menu

Any commands registered as context menu commands will show in the ShotGrid extension panel’s context menu.

Context Menu

Like the other command areas, these commands will change along with the context. Commands such as Jump to ShotGrid and Jump to Filesystem will always be available here.

Logging console

The logging console shows all of the logging output from both the CEP Javascript interpreter and Toolkit’s Python process.

Console

If there are any issues with the extension that require support, the logging console output is extremely useful for helping the ShotGrid support team debug the problem.

Configuration and technical details

The following sections outline some of the more technical aspects of the integration to help configure the integration to the specific needs of your studio pipeline.

PySide

The ShotGrid engine for After Effects relies on PySide. Please see the official instructions for Installing PySide.

CEP extension

The extension itself is bundled with the engine and the engine handles installation automatically on the first launch of After Effects. The extension is installed on the artist’s local machine in the standard, OS-specific CEP extension directories:

# Windows
> C:\Users\[user name]\AppData\Roaming\Adobe\CEP\extensions\

# OS X
> ~/Library/Application Support/Adobe/CEP/extensions/

Each time After Effects is launched, the engine bootstrap code will check the version of the extension that is bundled with the engine against the version that is installed on the machine. This means that after an engine update, assuming a new version of the extension came with it, the installed extension will be automatically updated to the newly-bundled version.

Configuring favorites

The Favorites Shelf can be configured to display any of the registered commands for your installed apps. To do this, simply add the shelf_favorites setting to the tk-aftereffects section of your environment configuration. Here’s an example:

shelf_favorites:
    - {app_instance: tk-multi-workfiles2, name: File Save...}
    - {app_instance: tk-multi-workfiles2, name: File Open...}
    - {app_instance: tk-multi-publish, name: Publish...}
    - {app_instance: tk-multi-snapshot, name: Snapshot...}

The value of the setting is a list of dictionaries identifying a registered command provided by one of the installed apps in the configuration. The app_instance key identifies a particular installed app and the name key matches the command’s display name registered by that app. In the example above, you can see four favorited commands: the file open and save dialogs from the tk-multi-workfiles2 app as well as the standard Toolkit publish and snapshot dialogs. These four commands will now show in the favorites shelf.

Environment variables

To aid in debugging, there are a set of environment variables that change some of the engine’s default values:

  • SHOTGUN_ADOBE_HEARTBEAT_INTERVAL - The Python heartbeat interval in seconds (default is 1 second).
  • SHOTGUN_ADOBE_HEARTBEAT_TOLERANCE - The number of heartbeat errors before quitting (default is 2). The legacy environment variable
  • SGTK_PHOTOSHOP_HEARTBEAT_TOLERANCE is also respected if set.
  • SHOTGUN_ADOBE_NETWORK_DEBUG - Include additional networking debug messages when logging output. The legacy environment variable
  • SGTK_PHOTOSHOP_NETWORK_DEBUG is also respected if set.
  • SHOTGUN_ADOBE_PYTHON - The path to the Python executable to use when launching the engine. If not set, the system Python is used. If Photoshop is launched from a Python process, like ShotGrid Desktop or via the tk-shell engine, the Python used by that process will be used by the Photoshop integration.

Note: Additional environment variables exist in the Adobe Framework. For details, please see the developer documentation.

Context fields display hook

The engine comes with a hook to control the fields displayed in the Context Header section of the panel. There are two methods in the hook that can be overridden to customize what is displayed.

The first method is the get_entity_fields() method. This method accepts an entity type representing the current ShotGrid context. The expected return value is a list of fields for that entity that should be queried for display. The engine itself handles querying the data asynchronously.

Once the data has been queried from ShotGrid, the second method in the hook is called. This method, get_context_html(), receives the context entity dictionary populated with the queried fields specified by the get_entity_fields() method. The expected return value is a string containing formatted HTML to display the queried entity fields.

The default hook implementation is a good reference as to what is required by these methods.

It should be noted that the engine will always display the entity thumbnail if one is available.

Import Footage Hook

The engine comes with a hook to control the import behaviour of certain file types. One may want that a psd file will be imported as single layer instead of a composition. In this case the this hook may be used to overwrite this behaviour.

The default hook implementation

After Effects API

Please see the developer documentation for details on the After Effects API.


Edit this document