-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin active state by conditions #341
Comments
Theoretically you could use Pyblish "targets" for this: ...but what I'm not sure is if modifying them mid-execution at say the Validation stage, if it's even acknowledged properly by the UI. I've never tried modifying them during execution, only prior to it. |
I can think of 3 options.
class MyPlugin(...):
active = my_pipeline.some_condition() But editing a plug-in whilst it's running is a little too meta I think, and I can't think of any way that could work; though if you do then a PR is welcome. |
Thanks for the suggestions. I'll think a little what For a better understanding of the motivation behind this, I have a more concrete example this time:
|
This sounds like a bug; an unchecked plug-in shouldn't run at all, can you confirm? Preferably with a video/gif if possible. With option 3, one key thing to keep in mind, that differs from standard Python modules, is that your plug-in is being reloaded on every reset. So that expression is quite dynamic. |
I've sometimes created "option instances", that is, an instance that represents a boolean yes/no setting, and then I use that instance with one or more instance plugins related to its family to process the optional feature or not. In pyblish-qml, when you create instances, you can set You can use the category to add a few checkbox "options" below the instances to be published. |
That's genius ! |
Haha, that's great. :) |
There are plugins which we would like to completely skip in some cases. The
active
class property would appear to be just what we need but I cannot find a way to use it.There could be several cases where a plugin should be skipped, but consider the following simple example:
Alternatively we could implement the logic for skipping the work inside the plugin, but then it would still appear on the UI for example in pyblish-qml.
Generally speaking I cannot imagine any way to properly take advantage of the
active
property on the plugins. They are eitherTrue
orFalse
forever, since there is no API apparently to set/override them at runtime.Ideally (or so I think) I would like to have an early collector that deactivates some integrators for example.
The text was updated successfully, but these errors were encountered: