Selecting instances

Hi guys, my first post here so please excuse any misunderstandings from my side!

We’ve started looking at pyblish and how we could standardise our publishing around it. We’ve not yet decided to what extent we want to do it. E.g. we’re debating using pyblish with it’s GUI vs writing something on our own on top of the pyblish-base api.

We’re trying to flesh out some workflow details and we’re considering ways to allow the artists to select which instances they want to publish. I’ve found two threads that are related to this: Instance Selection and Simplifying the GUI

If we would choose to implement this on our own, would we solve this by:

  1. Run the collection step to gather instances.
  2. Present the instances in a UI to let the user select what to publish.
  3. When user clicks “Publish” we run Validation, Extraction and Integrations for the selected instances. If so, how do you prune the instances that the user did not select?

Or is there a better way? Would you recommend us using the pyblish GUI to solve this?

Thanks!

Hi and welcome Mattias!

What you describe makes perfect sense and is in fact just how the Pyblish GUIs work; both Pyblish QML and Pyblish Lite.

I’d suggest giving Pyblish Lite a go, as it is most straightforward to install, and see how it holds up against your goals.

$ pip install pyblish-base pyblish-lite
$ python -m pyblish_lite --debug

This will present you with a GUI that does as you describe - (1) run collection when running the GUI and (2) present instances, allowing users to toggle instances on/off and (3) provides a button to publish, running the remainder of the publishing plug-ins.

To develop your own GUI, I’d suggesting having a look at the toy example in the Developer Guide…

…followed by a closer inspection of Pyblish Lite, which covers the basics whilst still being quite small and easily digestible.

In particular, what it does upon launch and when the user hits “Play”.

Let me know how it goes and if you have any other questions!

Hi Marcus, thank you I will dig into this now!

Hey @mattiaslagergren, how did it go? Did you manage to make sense out of it?

Yes, absolutely - I got pyblish lite up and running quickly and the source was easy to understand. We will continue developing our workflows and will probably have a lot more questions soon!

Awesome!

Pyblish Lite currently lacks some of the features available in Pyblish QML, so I’d also recommend you take a look at that.

Installation instructions have gotten a bit refined this week, here’s the gist of it.

On Windows

git clone https://github.com/pyblish/pyblish-qml
set PYTHONPATH=%CD%/pyblish-qml;%PYTHONPATH%
python -m pyblish_qml --debug

You can use this install with Maya and other hosts like you can with Pyblish Lite, the Python 3 process acts as a server/client architecture, running indepdently in the background serving multiple sessions of Maya, Nuke etc.

The --debug will, as with Pyblish Lite, present you with a few mock items to play around with and get a feel for the GUI.

Some things to notice, the > icon to the side of items are upcoming in Pyblish Lite as well and is used to closer inspect an item, such as messages relative a particular plug-in or instance. And the sorting is more clear, with section labels above critical sections of the main overview.

Hey @mattiaslagergren,

Just checking in on how things are going? Anything to share or show yet? :slight_smile:

Just came back from a week of vacation in Barcelona, so nothing to share yet!

1 Like

I’ve tried to get the pyblish-qml running but end up with an error:

python -m pyblish_qml --debug
Starting Pyblish…
file:///Users/mattiaslagergren/Development/pyblish-qml/repo/pyblish_qml/qml/main.qml:15:1: module “QtQuick” is not installed
import QtQuick 2.3
^

I’ve seen the issue https://github.com/pyblish/pyblish-qml/issues/34 response from you but I cannot get it to work. Running OS X Yosemite

You’ll need PyQt5 available on your system.

Make sure this works first.

>>> import sys
>>> from PyQt5 import QtWidgets
>>> app = QtWidgets.QApplication(sys.argv)
>>> button = QtWidgets.QPushButton("Hello")
>>> button.setFixedSize(400, 400)
>>> button.show()
>>> app.exec_()

Have a look here for details.

Hi Marcus,

Yepp, PyQt5 is installed and the example code works fine. Not sure why QtQuick is not available though. The UI shows up but is blank.

I will keep digging

Ah, odd. Might be something platform specific.

Here’s some standalone QML examples you could try.