Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #435 from pypeclub/bugfix/other_order_collapsing
Browse files Browse the repository at this point in the history
Bugfix/other order collapsing
  • Loading branch information
mkolar authored Aug 17, 2020
2 parents c939242 + 35731d9 commit ad0b48a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
11 changes: 7 additions & 4 deletions pype/tools/pyblish_pype/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ def _pair_yielder(self, plugins):
self.processing["current_group_order"] is not None
and plugin.order > self.processing["current_group_order"]
):
current_group_order = self.processing["current_group_order"]

new_next_group_order = None
new_current_group_order = self.processing["next_group_order"]
if new_current_group_order is not None:
Expand All @@ -270,12 +272,13 @@ def _pair_yielder(self, plugins):
if self.collect_state == 0:
self.collect_state = 1
self.switch_toggleability.emit(True)
self.passed_group.emit(new_current_group_order)
self.passed_group.emit(current_group_order)
yield IterationBreak("Collected")

self.passed_group.emit(new_current_group_order)
if self.errored:
yield IterationBreak("Last group errored")
else:
self.passed_group.emit(current_group_order)
if self.errored:
yield IterationBreak("Last group errored")

if self.collect_state == 1:
self.collect_state = 2
Expand Down
3 changes: 0 additions & 3 deletions pype/tools/pyblish_pype/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,6 @@ def append(self, plugin):
if label is None:
label = "Other"

if order is None:
order = 99999999999999

group_item = self.group_items.get(label)
if not group_item:
group_item = GroupItem(label, order=order)
Expand Down
8 changes: 4 additions & 4 deletions pype/tools/pyblish_pype/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,10 @@ def on_passed_group(self, order):

for group_item in self.plugin_model.group_items.values():
# TODO check only plugins from the group
if (
group_item.publish_states & GroupStates.HasFinished
or (order is not None and group_item.order >= order)
):
if group_item.publish_states & GroupStates.HasFinished:
continue

if order != group_item.order:
continue

if group_item.publish_states & GroupStates.HasError:
Expand Down

0 comments on commit ad0b48a

Please sign in to comment.