We've been working on an in-house change to the tk-multi-publish app and thought it'd be good to have your feedback on it, and see if others are interested in getting it merged in the official version.
The idea came round when we had to introduce a way for the artists to specify a sub-step for alembic animation caching. This setting needs to be left as default for 95% of the shots, but once in a while it needs to be edited. Artists would naturally publish outside the pipeline in such cases, which we want to avoid. Our first solution was to show a dialog in the secondary publish hook. This is annoying as it pops up every time, and you have to implement it cleverly if you want to avoid the dialog popping up for each character (meaning the artist has to sit in front of his desk for the whole publish). Also, if you have multiple dialogs for different output types, you can end up with having to show 4-5 dialogs when publishing a simple scene. A generic "Edit publish settings" dialog was given some thought, but it didn't really make sense to add all this logic to the secondary_publish_hook.
So we thought about doing a change to the app itself, that would allow to:
- specify settings in the yaml configuration files instead of in the hooks. This way, different steps can use different settings (uvWrite or worldspace flags for instance for alembic files), and all publishes go through the same exact code in the hook. The hook just retrieves the settings and doesn't hardcode any.
- edit the settings at publish time, to avoid having to decide on a single value that may not work for all the shots. Editing settings should be done only if needed, to avoid any annoying dialog.
- store these settings in Shotgun so they can be displayed in the loader app or in the shotgun web page(*)
(*) This part is done in the secondary publish hook, and relies on a new "sg_settings" field on the PublishedFile entity, so it's not part of the changes to tk-multi-publish.
What we came up with is a relatively minor change to tk-multi-publish:
- the addition of a new hook: hook_secondary_edit_settings. The default hook is not doing anything. If overriden, the idea is that it would display a dialog to edit the settings of a specific output item.
- for each secondary output, we added:
- an 'editable' boolean flag. If set to true, a Settings button will be shown in the publish UI. Clicking on this button will call the hook above.
- a 'settings' dictionary. It contains the default values for the settings, these will be given to the secondary_publish as part of the 'output' parameter. The settings can be edited from the default values through the hook above.
Please find attached:
- a screenshot of the Publish UI with multiple secondary outputs, some having settings and some not (I maximized the dialog to show all outputs)
- a screenshot of an example UI to edit settings on alembic files. This is displayed from the secondary_edit_settings hook, so it's not part of the change, it's just an example of what you can do with the hook.
- our configuration file for the Tracking step in Maya, where you can see the new fields: 'hook_secondary_edit_settings', 'editable' and 'settings'
- the patch file to apply on v0.3.16 of tk-multi-publish
Let me know what you think.
Benoit Leveau & Nivedita Goswami