Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions pyblish_lite/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pyblish_lite/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down