diff --git a/pyblish_lite/control.py b/pyblish_lite/control.py index 158655b..9b7a543 100644 --- a/pyblish_lite/control.py +++ b/pyblish_lite/control.py @@ -163,6 +163,12 @@ def on_next(): if order > (until + 0.5): return util.defer(100, on_finished_) + plug, instance = self.current_pair + if not plug.active or \ + (instance is not None and instance.data.get("publish") is False): + util.defer(10, try_next) + return + self.about_to_process.emit(*self.current_pair) util.defer(10, on_process) @@ -187,6 +193,9 @@ def on_process(): # IMPORTANT: This *must* be done *after* processing of # the current pair, otherwise data generated at that point # will *not* be included. + try_next() + + def try_next(): try: self.current_pair = next(self.pair_generator) @@ -227,11 +236,10 @@ def _iterator(self, plugins, context): test = pyblish.logic.registered_test() for plug, instance in pyblish.logic.Iterator(plugins, context): - if not plug.active: - continue - if instance is not None and instance.data.get("publish") is False: - continue + # We do not care about checking the plugin or instance "active" states + # because it can change outside of this "for" loop, so any checks here + # could potentially be outdated or inaccurate. self.processing["nextOrder"] = plug.order diff --git a/pyblish_lite/window.py b/pyblish_lite/window.py index af503ea..1e2497d 100644 --- a/pyblish_lite/window.py +++ b/pyblish_lite/window.py @@ -493,7 +493,7 @@ def __init__(self, controller, parent=None): controller.was_validated.connect(self.on_was_validated) controller.was_published.connect(self.on_was_published) controller.was_acted.connect(self.on_was_acted) - controller.was_finished.connect(self.on_finished) + # controller.was_finished.connect(self.on_finished) # Discovery happens synchronously during reset, that's # why it's important that this connection is triggered