Closed darkvertex closed 6 years ago
Are you talking about a plugin or instance?
Plugins use optional
and active
data members to determine if the plugin is optional (togglable) and active (toggled by default or not)
Instances are always optional. The data member publish
determines whether an instance is toggled by default or not.
I'm talking about an Instance.
Instances are always optional.
In the pyblish-lite
UI they can be non-toggleable/non-optional/mandatory if instance.data['optional'] = False
. (Usually this is combined with instance.data['publish'] = True
to make sure they appear toggled ON.)
It can be pretty useful for mandatory publishes.
I'm also quite surprised that functionality existed in Lite, but it sounds useful. Happy to see this implemented in QML.
I'm also quite surprised that functionality existed in Lite, but it sounds useful. Happy to see this implemented in QML.
Lite will not draw a checkbox for non-optional Instances. Sounds like maybe it was a happy accident in the way the models were abstracted, hehe.
I'm also quite surprised that functionality existed in Lite
I found it by pure curiosity when making my first few Pyblish publishers (for which I initially used "lite") and when it worked as well as it did, I just assumed it was a feature! haha. :laughing:
Implemented by PR https://github.com/pyblish/pyblish-qml/pull/292 which has been merged and is part of the 1.7.4 release. (woohoo!)
In pyblish-lite it's easy enough to set
.data['optional'] = False
to make an instance mandatory, but it seems to not be handled any differently inpyblish-qml
.Is this a known issue? I couldn't find an open ticket about it.
Any hint where in the code the problem might be? (Unless it's an easy/obvious fix to do on your end.)
I looked a bit and maybe it's not here, but I thought it was weird that in: https://github.com/pyblish/pyblish-qml/blob/master/pyblish_qml/qml/List.qml#L24
It's strange to me that the listitem being "active" is driven by the object's "optional" attribute, no? (Forgive me if I'm misinterpreting as my QML chops are low.)