How can you un-toggle a plugin by default?
You can give it the attribute
active=False, but it isn’t fully implemented in QML yet.
It will appear un-toggled, and it won’t run, as expected. But the user can toggle it back on, and it still won’t run.
class MyPlugin(...): active = False
Sorry I can’t given an estimate on when it will be fully supported in QML yet.
This is now easily possible on instances. Any chance it’s working on plugins?
Is the above not working for you?
For completeness, here’s how it works on Instances.
instance.data["publish"] = False
import pyblish.api class ValidateFail(pyblish.api.Validator): """ This plugin will fail""" optional = True label = 'FAIL' active = False def process(self, instance): assert False, 'This plugin is designed to fail'
This works as if the
active attribute wasn’t there.
This would also be a problem if it’s still like that. What I need to use it for is optional extractors. Publishing model, most of the time we’d want
.obj formats. But sometimes
.abc is needed, so I want the extractors to be there but turned off by default. If modeler want’s to export it, he toggles it on and publishes.
Yes agreed; the intended behaviour is as you expect. This must be a bug. Feel free to make an issue of it.
Without an issue, this may never be solved.
Damn. Care to elaborate?
When you encounter or get confirmation of a problem, make sure to make an issue of it so it can be resolved.
didn’t click you’re talking about github issue. I though you ran into some problem solving it :).
Morning brain not quite started yet.
Haha, it also didn’t click for me that an issue could be anything other than a GitHub issue.
Are there any news about this topic? It would be super-handy to be able to untoggle by default
publish attributes should work, is it not working for you?
No, active=False doesn’t do anything
Could you let me know which version of Pyblish QML you are running?
import pyblish_qml print(pyblish_qml.version)
Oh ok, that could be it. 1.3.2
Yeah, it works! Thanks!
What worked? I didn’t suggest any solutions? How did you fix it?
I’ve updated pyblish/pyblish to the latest projects, including a newer version of Pyblish QML.
You can update with this.
cd pyblish git pull
yup, that’s what I did