forked from Colorbleed/colorbleed-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Pyblish Post Collector bug where plug-ins would still run for dea…
…ctivated instances - Hacky workaround, see: pyblish/pyblish-qml#356 (comment)
- Loading branch information
Showing
4 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
colorbleed/plugins/houdini/publish/fix_post_collector_bug.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |