Toolkit Adobe Framework
Toolkit framework designed to integrate Adobe Creative Cloud applications with Flow Production Tracking desktop. The framework provides a platform for integrating Flow Production Tracking into Adobe applications such as Photoshop and After Effects using Adobe's CEP (Common Extensibility Platform) infrastructure.
Content
Functionality
The framework wraps the JavaScript API of Adobe applications into Python, allowing for seamless interaction between Flow Production Tracking and Adobe tools. This enables functionalities such as setting variables, calling methods, and accessing project data within Adobe applications through Python scripts. Notably, for Photoshop integration on macOS, it is essential to run in Rosetta mode due to a CEP extension limitation.
Configuration Settings
Environment variables can be used to configure paths, API keys, and other settings required for the framework to function properly. There is a set of environment variables that change some of the engine's default values
PYTHONPATH
- Specifies the directories in which the Python interpreter should look for modulesSHOTGUN_ADOBE_PORT
- The port number on which the Adobe extension or the Flow Production Tracking integration service is running. It allows the Adobe applications to communicate with the integration service through the specified port.SHOTGUN_ADOBE_NETWORK_DEBUG
- Enables detailed logging and debugging information for network-related activities. It’s useful for troubleshooting network communication issues.SHOTGUN_ADOBE_TESTS_ROOT
- This variable defines the root directory where test scripts and resources for the tk-framework-adobe project are located. It helps in organizing and running tests systematicallySGTK_PHOTOSHOP_NETWORK_DEBUG
- Specifically enables network debugging for the Photoshop integration. It provides detailed logs for network communication issues in Photoshop.SHOTGUN_ADOBE_SERVER_PING_TIMEOUT
- Allows us to initialize (in milliseconds) the Node server with a higherpingTimeout
that defines how often the server sends aping
to the client to check that the connection is still active. If publishing a large file fails, this variable should be set to a value of 60000 (one minute).SHOTGUN_ADOBE_RESPONSE_TIMEOUT
- Sets the maximum amount of time (in seconds) that the system will wait for a response from the Flow Production Tracking server or the Adobe application during an operation. If the server or application does not respond within this time frame, then the operation is aborted and a timeout error is triggered. This helps manage cases where the server or application might be unresponsive or slow to respond.SHOTGUN_ADOBE_HEARTBEAT_INTERVAL
- Specifies the interval (in milliseconds) at which the Adobe integration sends heartbeat signals to ensure the connection between Flow Production Tracking and Adobe applications remains active and responsive.SHOTGUN_ADOBE_HEARTBEAT_TOLERANCE
- Defines the maximum duration (in milliseconds) that the system will wait for a heartbeat signal before considering the connection as lost. This helps to ensure that any connectivity issues are promptly detected and handled.SGTK_ENFORCE_PROXY_LOCALHOST
- This environment variable allows the requests.session instance to use system proxy settings by settingtrust_env
to True. This recovers the legacy behavior where the system proxy settings were respected, ensuring compatibility with network configurations that rely on these settings.
Customize enviroment variables
It's possible to customize Toolkit environment variables by copying and modifying core hooks, as described in the documentation. Here’s how you can do it:
- Locate the tank_init.py file: Find the
tk-core/hooks/tank_init.py
file in your Toolkit configuration. - Copy the tank_init.py file from the core hooks directory to your configuration's hooks directory. The destination path should be something like
<your_config>/core/hooks/tank_init.py
. - Open the copied
tank_init.py
file and make the necessary modifications to set environment variables or perform other initialization tasks. - Restart the Flow Production Toolkit desktop to ensure that the changes take effect.
For example, you can set an environment variable within tank_init.py
like this:
from tank import Hook
class TankInit(HookBaseClass):
def execute(self, **kwargs):
"""
Called when the Toolkit is being initialized.
"""
# Set the environment variable
os.environ['SHOTGUN_ADOBE_SERVER_PING_TIMEOUT'] = '60000'
# You can add more initialization code here if needed
self.logger.info("Environment variable SHOTGUN_ADOBE_SERVER_PING_TIMEOUT has been set to 60000")
Development Environment Setup
During the setup of the development environment, environment variables can specify locations of tools like the ZXPSignCmd tool or the CC Extensions Signing Toolkit.