Skip to content

Commit

Permalink
Fix Pyblish Post Collector bug where plug-ins would still run for dea…
Browse files Browse the repository at this point in the history
…ctivated instances

- Hacky workaround, see: pyblish/pyblish-qml#356 (comment)
  • Loading branch information
BigRoy committed Mar 13, 2020
1 parent d1c2d1a commit 5745d21
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CollectUsdModelBootstrap(pyblish.api.InstancePlugin):
"""

order = pyblish.api.CollectorOrder + 0.3
order = pyblish.api.CollectorOrder + 0.35
label = "Collect USD Model bootstrap"
hosts = ["houdini", "maya"]
families = ["usdModel"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CollectUsdBootstrap(pyblish.api.InstancePlugin):
"""

order = pyblish.api.CollectorOrder + 0.3
order = pyblish.api.CollectorOrder + 0.35
label = "Collect USD Bootstrap"
hosts = ["houdini"]
families = ["colorbleed.usd",
Expand Down
2 changes: 1 addition & 1 deletion colorbleed/plugins/houdini/publish/collect_usd_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class CollectUsdLayers(pyblish.api.InstancePlugin):
"""Collect the USD Layers that have configured save paths."""

order = pyblish.api.CollectorOrder + 0.3
order = pyblish.api.CollectorOrder + 0.35
label = "Collect USD Layers"
hosts = ["houdini"]
families = ["colorbleed.usd"]
Expand Down
24 changes: 24 additions & 0 deletions colorbleed/plugins/houdini/publish/fix_post_collector_bug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import pyblish.api

# Only do this whenever PYBLISH_QML_POST_COLLECT is used..
post_collector_order = os.environ.get("PYBLISH_QML_POST_COLLECT", None)
if post_collector_order is not None:

class FixPostCollectorBug(pyblish.api.ContextPlugin):
"""Fix Post Collector bug
Without this fix the first plug-in that should not trigger in the
Post Collector range due to deactivated instances will still
trigger until it processes one that should run.
Also see:
https://github.com/pyblish/pyblish-qml/pull/356
"""

order = float(post_collector_order)
label = "Post Collector bug workaround"

def process(self, context):
pass

0 comments on commit 5745d21

Please sign in to comment.