![]() |
Shotgun Engine for After Effects CCShotgun Integration for After Effects CC |

Documentation
Interface Overview
Installation
Enabling the extension
Interface components
Context header
Favorites shelf
Command list
Context menu
Logging console
Configuration and technical details
PySide
CEP extension
Configuring favorites
Environment variables
Context fields display hook
Import Footage Hook
After Effects API
Installation, Updates and Development
Configuration Options
Release Notes History
The Shotgun engine for After Effects contains a standard platform for integrating the Shotgun Pipeline Toolkit apps into After Effects. Once installed, it allows you to run the same apps that you have in Maya, Nuke, Photoshop and other applications. The full API is exposed to app developers, which means that you can rapidly build After Effects functionality using Python and Qt without having to compile anything or understand the details of how to build and deploy a After Effects plugin.
Supported Application Versions
This item has been tested and is known to be working on the following application versions: 2017-2020. 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.
Documentation
The Shotgun engine for After Effects provides a platform for integrating Shotgun into your After Effects workflow. It consists of a standard Shotgun Pipeline Toolkit engine and relies on the tk-framework-adobe (CEP).
Once enabled, a Shotgun Adobe Panel panel becomes available in After Effects. It displays information about the current Shotgun context as well as the commands that are registered for the apps installed in that context.

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

- Context Header - Thumbnail and fields for the current context.
- Favorites Shelf - Designed to show the most commonly-used apps for the current context.
- Command List - All non-favorited commands for the current context.
- Context Menu - Additional context-related commands and debugging tools.
- Logging Console - A console overlay that displays logging output for debugging.
Installation
Installation of the Shotgun Engine for After Effects follows the same protocol as the other Shotgun 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.

This will only need to be done once and the Shotgun 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 Shotgun 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 Shotgun After Effects integration.
Context header
The context header is a customizable area which can display information about the current Shotgun context.

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 shotgun open was used.
Favorites shelf
The favorites shelf is similar to the menu favorites available in other Shotgun 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.

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.

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 Shotgun extension panel's context menu.

Like the other command areas, these commands will change along with the context. Commands such as Jump to Shotgun 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.

If there are any issues with the extension that require support, the logging console output is extremely useful for helping the Shotgun 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 Shotgun 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 Shotgun 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 Shotgun 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 Shotgun, 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.
Installation and Updates
Adding this Engine to the Shotgun Pipeline Toolkit
If you want to add this engine to Project XYZ, and an environment named asset, execute the following command:
> tank Project XYZ install_engine asset tk-aftereffects
Updating to the latest version
If you already have this item installed in a project and you want to get the latest
version, you can run the update
command. You can either navigate to the
tank command that comes with that specific project, and run it there:
> cd /my_tank_configs/project_xyz > ./tank updates
Alternatively, you can run your studio tank
command and specify the project
name to tell it which project to run the update check for:
> tank Project XYZ updates
Collaboration and Evolution
![]() |
If you have access to the Shotgun Pipeline Toolkit, you also have access to the source code for all apps, engines and frameworks in Github where we store and manage them. Feel free to evolve these items; use them as a base for further independent development, make changes (and submit pull requests back to us!) or simply tinker with them to see how they have been built and how the toolkit works. You can access this code repository at https://github.com/shotgunsoftware/tk-aftereffects. |
Special Requirements
- You need Shotgun Pipeline Toolkit Core API version v0.19.18 or higher to use this.
Configuration
Below is a summary of all the configuration settings used. These settings need to be defined in the environment file where you want to enable this App or Engine.
automatic_context_switch
Type: bool
Default Value: True
Description: Controls whether an active document change causes a context change.
import_footage_hook
Type: hook
Default Value: {self}/import_footage.py
Description: Hook which controls how footage is imported into the current project.
shelf_favorites
Type: list
Description: Controls the registered commands that show up in the favorites shelf in the Shotgun panel. This is a list where each item is a dictionary with keys 'app_instance' and 'name'. The 'app_instance' key connects this entry to a particular app instance defined in the environment configuration file. The 'name' is a command name to make a favorite.
debug_logging
Type: bool
Description: Controls whether debug messages should be emitted to the logger
context_fields_display_hook
Type: hook
Default Value: {self}/context_fields_display.py
Description: Hook which controls how context fields are queried and displayed in the context header.
Release Notes
Welcome to the release notes for this Engine. Below you will find an overview of all the changes we did for each release. We try to be as detailed as possible and include all bugs we have fixed, features we have added and things that may have changed. If you have questions about a particular release, don't hesitate to contact our support team!
v0.2.1
2020-Dec-8
Switches from using the support email alias to pointing to the support site
v0.2.0
2020-Mar-12
A bugfix and adds Python 3 support.
Details:
Fixes a bug with the Shotgun panel actions. Previously actions like "Set to in progress" and "Assign to yourself" would error.
v0.1.4
2019-Nov-26
Supports Adobe's new installation path convention for 2020+ releases.
v0.1.3
2019-Nov-26
Added support for opening a file on startup.
Details:
When using this update, and the v0.3.1 release of tk-shotgun-launchpublish
you can now use the Toolkit action "Open In Associated Application" on a After Effects PublishedFile
entity via the Shotgun site, to launch After Effects with the Shotgun integration and open the chosen PublishedFile
.
v0.1.2
2019-Mar-17
Minor Tweaks
Details:
- Debug logging now defaults to false
- Added standard LICENSE.
v0.1.1
2019-Mar-16
Bug fixes and documentation
Details:
- Notifying the publish item, that the renderpath has changed
- Adding layers to temporary rendering.
- Sphinx docs
- User facing docs
- Added core requirement
- Better handling of popup widgets.
v0.1.0
2019-Mar-14
Initial release