Publish dialog popup

Hi Joesph

Shotgun doesn’t have a UI API as such, it uses PySide (QT) to produce it’s GUIs.
I would recommend checking out PySide examples/tutorials for info on that aspect.

You can create a popup QT widget from within your hook, that should be no problem. However, with the Publish app, there is also the ability to embed a custom QT widget into the right-hand side panel when you select the plugin.

There are three methods on a plugin that need to be overridden in order to implement the custom UI.

create_settings_widget() - Where you define and pass back your widget.

get_ui_settings() - Where you need to implement the behaviour to extract settings from your UI so that they can be used in the publish method.

set_ui_settings() - Where you set your UI’s state based upon the passed settings.

The get and set methods work together, in that when the item/plugin tree selection changes, the get will be called on your plugin to extract the values. When you select your plugin again it will call the set method pass the settings you set previously so you can populate the UI again with the same settings.

7 Likes