mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
optional plugins with active attribute set to False are skipped
This commit is contained in:
parent
40b470b1cf
commit
fa91da78ee
1 changed files with 12 additions and 1 deletions
|
|
@ -183,7 +183,18 @@ class Controller(QtCore.QObject):
|
|||
plugins = pyblish.api.discover()
|
||||
|
||||
targets = pyblish.logic.registered_targets() or ["default"]
|
||||
self.plugins = pyblish.logic.plugins_by_targets(plugins, targets)
|
||||
plugins_by_targets = pyblish.logic.plugins_by_targets(plugins, targets)
|
||||
|
||||
_plugins = []
|
||||
for plugin in plugins_by_targets:
|
||||
# Skip plugin if is not optional and not active
|
||||
if (
|
||||
not getattr(plugin, "optional", False)
|
||||
and not getattr(plugin, "active", True)
|
||||
):
|
||||
continue
|
||||
_plugins.append(plugin)
|
||||
self.plugins = _plugins
|
||||
|
||||
def on_published(self):
|
||||
if self.is_running:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue