Add tool to Photoshop Integration / Customize Photoshop Publish

Hi,
I want to customize how our artists export from photoshop.
I wrote a Python module using engine.adobe which export the active document as a flattened image in the same directory as the psd so that artists nevcer have to use Photoshop files explorer.

For now, everything works well when I launch every lines of code inside of the Photoshop Integration Shotgun Python Console.
I have re written everything as a Class:

class ExportPsdDoc:

    adobe = engine.adobe
    tk = sgtk.platform.current_engine().tank
    sg = tools_key.tool_scriptKey(self.projectTankName)

    def .....() etc...

but I can’t test it for now as I have several problems:


:diamonds: Using the Module as a Publish Plugin

  • I want to use my Python class as a Publish Plugin, so that users can chose wether or not to export their psd as a flattened image during publish.
  • Users should be able to chose the extension in a drop down list and a max resolution in another drop down list:
  • I want the settings to be saved so that artists don’t have to change them every time they do a publish


(this is a photoshoped image of what I want to achieve)

I’m trying to understand how to do that with this topic , but is there any doc?


:diamonds: Using the Module as a Tool in Photoshop SGTK
I want to use my Python class as a Tool in Photoshop Shotgun Integration, with basically the exact same features.
Is there a doc showing us how to customize Integration UI?

image
(this is a photoshoped image of what I want to achieve)

Thanks!
Ben

2 Likes

Good point, I should have referenced the documentation in that post. I’ve updated it, but here are the three key methods:

In terms of remembering the settings, I would perhaps suggest using PySide’s/QT’s QSettings to persistently store the chosen values so they can be retrieved the next time.

I don’t believe it would be possible to achieve exactly what you are after here without editing the engine. However, what it is displaying currently is a list of apps. So you could create a custom Toolkit app and add it to the Photoshop engine, and it will appear as a button there. It won’t be exactly as you illustrated, but you can have the apps appear there like the snapshot and load, hopefully that is good enough?
We have this doc on app development.

1 Like

Thanks for your answer Philip, that’s gonna help a lot!

2 Likes