It dynamically lists people as reviewers who are on the same project and are in a “Review” group.
For example “Jim the bad reviewer” is not appearing in the list as no one will let him work on any projects!
To use the plugin download this publish_file.py script, and place it in your config’s hooks/tk-multipublish2/ directory (you may need to create the `tk-multi-publish2 folder inside hooks.)
Then open env/includes/settings/tk-multi-publish2.yml and modify the standalone publish settings to add :{config}/tk-multi-publish2/publish_file.py" to the Publish to Shotgun hook:
You must make sure to select a Task for your publish item, otherwise it will not be able to set the status or reviewer.
Note this is NOT intended to be a production ready plugin, it is merely here as an example.
The three key methods used to generate a custom UI are:
Unfortunately at present you can’t add a custom UI to the item, only to the plugins. We have heard this request before though, I’ll an idea suggestion to our roadmap on your behalf.
It seems like re-implementing the get_ui_settings method is breaking functionality. Even though I return a dictionary of my updated settings, it seems to cause the UI to get stuck on that widget.
Dialog.py (where those settings are getting saved, I think) are not triggering the save for the settings.
Dialog.py seems like a module that I probably shouldn’t be modifying but for instance
def _pull_settings_from_ui(self, selected_tasks):
"""
Retrieves settings from the UI and updates the task's settings.
:param selected_tasks: A :class:`TaskSelection` of tasks to update based
on the values edited in the UI.
"""
if selected_tasks.has_custom_ui:
widget = self.ui.task_settings.widget
settings = self._current_tasks.get_settings(widget)
else:
# TODO: Implement getting the settings from the generic UI, if we ever implement one.
settings = {}
# Update the values in all the tasks.
for task in selected_tasks:
# The settings returned by the UI are actual value, not Settings objects, so apply each
# value returned on the appropriate settings object.
for k, v in settings.iteritems():
task.settings[k].value = v
in dialog.py, self._current_tasks (which is needed to trigger the save) does not seem to contain any pertinent information. At least none that I can see in the logger.
Surely I can’t be the only one whose played around with this and has run into this issue.
Hi @StarkRavenSimone, I’m sorry you’re encountering issues. I’ve not seen this behavior before or heard of it being reported.
Unfortunately, I don’t have the time right now to dig in and test this, but I will hopefully do on Friday if someone else doesn’t get to this before then.
Unfortunately at present you can’t add a custom UI to the item, only to the plugins.
Is it correct, that in your example every file you want to publish gets the same reviewer?
I am trying to let the user choose the published file type for each file by hand, but the selected file type is then the same for every published file and when i click away from the UI, the selected Publish File Type jumps to default again.
Am I doing something wrong or ist this just not doable at the moment?
Hi @jonase
I believe this is the case right now, but I’ll check with someone else and get back to you.
You don’t know the item unfortunately when creating the UI, so I don’t think there is a way to make the setting specific to the item.
Thanks Philip!
If thats the case I would really appreciate if someone knows a smart way to be more specific
with the Publish File Type, because right now it only looks at the extension of the file.
So every .exr becomes an Image File, but in our case actually could be a Rendered Image OR a Plate.
I’m not sure what logic you would apply to work out whether is a Plate or a Rendered Image but to programmatically set it, you could either set the item’s publish_type property at collection time:
item.properties["publish_type"] = "Plate" if ... else "Rendered Image"
@philip.scadding I’ve implemented this before on other pipelines. Giving it a go now on our current one and I seem to be experiencing a weird issue where the UI won’t clear when I click on other items.
If I comment out the get_ui_settings and set_ui_settings the UI updates correctly again.
We were on Multi Publish 2 v2.9.0, upgraded to latest (v2.10.1) and saw the same behavior.
Cant see any errors. Any idea what I might be doing wrong here?
Thanks @Patrick, sorry I should have replied. Having previously posted a lot on the forums, I tend to get a number of replies. I’ve rejoined Autodesk but my role is different now so I’m not able to give time to investigating. @Justin_Pedersen Creating a support ticket is the right way to go. I still think a community post is useful in case anyone else has the same issue.