From dbb85a40d7eac2ffacf8d49a19bb53a81aef711e Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 5 Aug 2021 12:23:33 +0200 Subject: [PATCH 1/2] don't skip instances if is in collecting stage --- openpype/tools/pyblish_pype/control.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openpype/tools/pyblish_pype/control.py b/openpype/tools/pyblish_pype/control.py index ae9ca40be55..234135fd9a9 100644 --- a/openpype/tools/pyblish_pype/control.py +++ b/openpype/tools/pyblish_pype/control.py @@ -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 @@ -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 ) @@ -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 From 1b76d8bf8852b5828114ace04ce187b10ae2602a Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 5 Aug 2021 12:23:43 +0200 Subject: [PATCH 2/2] make plugins compatible if were processed --- openpype/tools/pyblish_pype/model.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpype/tools/pyblish_pype/model.py b/openpype/tools/pyblish_pype/model.py index 50ba27166b4..bb1aff2a9ab 100644 --- a/openpype/tools/pyblish_pype/model.py +++ b/openpype/tools/pyblish_pype/model.py @@ -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 []