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 #1903 from pypeclub/bugfix/pyblish_ui_collecting_s…
Browse files Browse the repository at this point in the history
…tage

Pyblish UI: Fix collecting stage processing
  • Loading branch information
iLLiCiTiT authored Aug 5, 2021
2 parents 39aa169 + 1b76d8b commit 3e9ac77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions openpype/tools/pyblish_pype/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def _pair_yielder(self, plugins):
self.was_skipped.emit(plugin)
continue

in_collect_stage = self.collect_state == 0
if plugin.__instanceEnabled__:
instances = pyblish.logic.instances_by_plugin(
self.context, plugin
Expand All @@ -325,7 +326,10 @@ def _pair_yielder(self, plugins):
continue

for instance in instances:
if instance.data.get("publish") is False:
if (
not in_collect_stage
and instance.data.get("publish") is False
):
pyblish.logic.log.debug(
"%s was inactive, skipping.." % instance
)
Expand All @@ -338,7 +342,7 @@ def _pair_yielder(self, plugins):
yield (plugin, instance)
else:
families = util.collect_families_from_instances(
self.context, only_active=True
self.context, only_active=not in_collect_stage
)
plugins = pyblish.logic.plugins_by_families(
[plugin], families
Expand Down
3 changes: 3 additions & 0 deletions openpype/tools/pyblish_pype/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ def update_with_result(self, result):
):
new_flag_states[PluginStates.HasError] = True

if not publish_states & PluginStates.IsCompatible:
new_flag_states[PluginStates.IsCompatible] = True

item.setData(new_flag_states, Roles.PublishFlagsRole)

records = item.data(Roles.LogRecordsRole) or []
Expand Down

0 comments on commit 3e9ac77

Please sign in to comment.