tk-photoshop Documentation
Requirements
Installation
Logging
If the engine does not start
Launching Photoshop from Shotgun
Information for App Developers
   The Photoshop API
   Adding buttons to the panel
Setup and Configuration

tk-photoshop Documentation

The Photoshop engine contains a standard platform for integrating Tank Apps into Photoshop.

It consists of a standard Tank engine and Adobe Extension which must be installed locally for every user of the engine.

It creates a Tank Panel in Photoshop in which various items are displayed:

Tank Panel

Requirements

The Photoshop engine currently relies on external installations of Python and PySide.

On Mac OS X, the built-in Python can be used. On Windows, Python can be downloaded and installed from here.

Precompiled PySide binaries and installers for both operating systems can be found here:

Installation

The Photoshop engine installs just like any other engine, but it does have a dependency on an external python install. In the settings for the Photoshop launcher, you need to update the settings to point to a python install that has PySide available. Details on this setup are available on this forum post.

The Photoshop launcher takes care of installing/updating an extension for Photoshop. If you do not have the extension installed or if an update is available, then Extension Manager will pop up and prompt you to install the plugin.

Extension Manager

With the extension enabled, you should see the Tank panel on the next launch of Photoshop. If the panel does not show up, make sure that Tank is enabled in the Window/Extensions menu:

Extensions Menu

Logging

To show the log console, click on the panel menu and "Toggle Log".

Toggle Log

Output from the various engine.log_* methods will show up here.

Log Window

If the engine does not start

When then engine does not start, you'll see the following message

Not Initialized

Usually this is because the proper environment variables have not been defined or PySide could not be initialized.

Errors in launching the engine are logged to the console in OSX and to %TEMP%TankPhotoshop.log on Windows. Errors initializing the engine are in both the log console and ~/Library/Logs/Shotgun/tk-photoshop.log. If PySide fails to initialize, then the errors would only show up in the tk-photoshop.log file.

To see an example of proper engine initialization look at the Photoshop launching logic from the tk-multi-launchapp app.

Launching Photoshop from Shotgun

If you are using the tk-multi-launchapp application to launch Photoshop from Shotgun you will need to supply four config values in the extra section of the config. Here are the four configs and sane default values which you would need to adjust for your system and installation locations:

mac_python_path: "/usr/bin/python"
windows_python_path: "C:\\Python27\\python.exe"
mac_extension_manager_path: "/Applications/Adobe Extension Manager CS6/Adobe Extension Manager CS6.app"
windows_extension_manager_path: "C:\\Program Files (x86)\\Adobe\\Adobe Extension Manager CS6\\XManCommand.exe"

Information for App Developers

The Photoshop API

The engine exposes the ActionScript API for Photoshop to Python. The full docs for this API can be found here. The Photoshop application object is exposed as tk_photoshop.photoshop.app. A simple example of using the api is:

f = photoshop.RemoteObject('flash.filesystem::File', '/Path/To/File.jpeg')
photoshop.app.load(f)

Adding buttons to the panel

To add a button to the panel, an app should call the standard engine register_command method.

self.engine.register_command("Hello World", self._hello_world)

Setup and Configuration

To see all the various configuration parameters that you can set in order to customize the behaviour of this item, please head over to the settings page.

tk-photoshop Documentation. This was auto generated on 2013-04-24. Click here for Release Notes.