2

Editable Settings in tk-multi-publish

Hi all,

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:
  1. 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.
  2. 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.

Cheers,

Benoit Leveau & Nivedita Goswami




tk_multi_publish_settings01.png
tk_multi_publish_settings02.png
shot_step_track.yml
patch0.patch

1 comment

  • 0
    Avatar
    Ryan Mayeda

    Hi Benoit.

    It's awesome to see this, thanks so much for sharing it here!  Sorry for the late reply, it took us a few days to digest this and then discuss it internally amongst the team.  We've actually debated this feature in the past and weighed whether we should add it vs. if it's too much extra complexity, so seeing you go for it is a strong vote in favor of it being a useful thing to add officially.  We also like the approach you took and think it's very elegant!  :)  In particular, we like the idea of the Settings being per item group (i.e. Settings for "Camera" even though there are two items) and that the Settings don't have to be there (i.e. no Settings for "OBJ Geometry").

    That said, we're in the midst of a design pass on the Publish app, similar to what we did (and showed in the last webinar) for the Loader.  So our thinking is to include this Settings concept as part of the new setup.  We'd also love to walk you through our early design to get your take on it, and make sure the new stuff won't adversely affect you.  Let me know if you have time for a quick chat on this as we'd love to get your feedback!

    Ryan.

Please sign in to leave a comment.