Pyblish-nuke register_gui


#1

Hey,

Testing out the new workflow with registering guis in pyblish-nuke. I thought for some reason that “pyblish-qml” and pyblish-lite" were registered guis by default?


#2

Nope. I had to register them in my own usersetup.py/menu.py/123.py (maya/nuke/houdini)

then it works.


#3

Should the official Pyblish guis not be registered by default?


#4

It’s a good question.

At the moment, the information text was written with them not being registered by default. What pros and cons can you see in having them in there by default?


#5

Pros

  • The user doesn’t have to deal with any startup scripts. More out-the-box feel.
  • The user doesn’t need to know about multiple guis at the start, where they might just wanna get up and running fast for testing.

Cons

  • If a user wants to register their own gui, while having the default guis as a fallback, the logic could be a little tricky.

I think if a user is advanced enough to want to develop their own gui, they most likely would be able to handle the extra information about registering guis.


#6

Probably the key point in that post. I agree completely


#7

So you are pro having pyblish-qml and pyblish-lite guis registered by default?


#8

Yes. At the very least one of them. In which case I’d pick pyblish-lite, considering it doesn’t need anything running in the background, which makes it much easier to adopt for new people


#9

+1 for this order: ["pyblish_lite", "pyblish_qml"]


#10

Just to ensure it’s ordered correctly since it can be somewhat confusing at first.
For them to run in that order pyblish_lite should be registered last.

If you’d want to use pyblish_lite as primary with a possible fallback to pyblish_qml one would register them as:

# primarily use pyblish_lite (so register last), fallback to pyblish_qml.
import pyblish.api
pyblish.api.register_gui("pyblish_qml")
pyblish.api.register_gui("pyblish_lite")

The above is actually what I’m using in my own scripts, only reversed in order. (We still primarily use QML)


#11

Ahh, didn’t know that. So yeah, +1 for ["pyblish_qml", "pyblish_lite"]


#12

Yes, that can be confusing.

The way to think about it is “Try this one first, if that doesn’t work then this, and then this, etc.”. It can be easier to look at the order in which they are registered like in Roy’s example, rather than the order in which they are stored in the list.


#13

Seems like there is a common consensus for registering the default guis.
Should this be adjusted in each host, or in pyblish-base?


#14

Another good question!

I’d rather not create any connection from base and GUIs, so even though it is more (repetitive) work doing it in each integration, I think let’s do it there.

I can do pyblish-maya, @tokejepsen would you like to handle pyblish-nuke and @mkolar handles pyblish-houdini?


#15

Sure, I’m doing testing with pyblish-maya and pyblish-nuke, so I don’t mind doing those.
Might be doing pyblish-houdini soon as well.