pyblish / pyblish-qml

Pyblish QML frontend for Maya 2013+, Houdini 11+, Nuke 8+ and more
GNU Lesser General Public License v3.0
114 stars 44 forks source link

Some QoL features for integration #326

Closed nasefbasdf closed 5 years ago

nasefbasdf commented 5 years ago

These are some features to streamline the usage of pyblish-qml in our pipeline. They are implemented backwards compatible, no previous usage/behaviour is expected to break.

Basically we have our own UI that deals with all the instance/plugin config. This means when we call the pyblish-qml app, everything is already set up. Our changes are related to automation:

  1. One of the added features is a new argument to show(... , auto_publish_at_first_run=False). This saves the user the wait for the reset and the click on the publish button.

  2. Another added feature is also a new argument to show(... , comment=None). In our system the user needs to input the comment earlier than the pyblish process can be started, so we wish to be able to pass it along to pyblish-qml.

  3. Lastly, two API entry points were added: host.hide and host.quit. These were available on the Proxy object but they were not readily accessible like host.publish or host.validate. We use these to automatically exit the UI if all processes succeed.

mottosso commented 5 years ago

Thanks for this!

1 ... show(... , auto_publish_at_first_run=False)

This is a great feature, but what do you think about the verbose argument name? How about auto_publish and to complete it a auto_validate as well? It's pretty self-explanatory (I think?) that it'll only happen on the first run, as show() is only called once... Or is it?

2 ... In our system the user needs to input the comment earlier than the pyblish process can be started, so we wish to be able to pass it along to pyblish-qml.

It's not terribly obvious, but are you aware of the context.data["comment"] field? That's there the "initial state" of the comment text field is coming from. You can pre-populate this field using a Collector.

nasefbasdf commented 5 years ago

Alright, I'll have a look at and try to include auto_validate as well. However, it will only be really useful if the user can continue after validation. Right now, the only option after validation is to reset. I won't be able to look into changing that right now.

These "auto" flags will only initiate procedures once after show is called. I effectively reused the logic around self.firstRun.emit().

I've just realized how the comment must be passed in. A new plugin is needed to pull the comment from our systems and put it on the pyblish context. I'll revert that part of the commit.

mottosso commented 5 years ago

Our of personal curiosity, are you free to mention what studio are you integrating this for?

nasefbasdf commented 5 years ago

I work for a software developer company called Limes based in Budapest, Hungary. Our asset and project management solution also called Limes, and our primary client is Puppetworks Animation Studio.

mottosso commented 5 years ago

Happy with this. @nasefbasdf when you're happy, please increment the version and I'll make a new release.

nasefbasdf commented 5 years ago

I've included the proxy_call decorator discussed above and incremented the version. This is done from my point of view.

mottosso commented 5 years ago

Thanks @nasefbasdf!