From afd1fbc40be2aaf1da31d8750334930183aee70d Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 14 Oct 2020 16:23:01 +0200 Subject: [PATCH] review and burnin don't delete representations, that they don't process --- pype/plugins/global/publish/extract_burnin.py | 4 +--- pype/plugins/global/publish/extract_review.py | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pype/plugins/global/publish/extract_burnin.py b/pype/plugins/global/publish/extract_burnin.py index 353f2f27f0..de82722515 100644 --- a/pype/plugins/global/publish/extract_burnin.py +++ b/pype/plugins/global/publish/extract_burnin.py @@ -74,12 +74,10 @@ class ExtractBurnin(pype.api.Extractor): # Remove any representations tagged for deletion. # QUESTION Is possible to have representation with "delete" tag? for repre in tuple(instance.data["representations"]): - if "delete" in repre.get("tags", []): + if all(x in repre.get("tags", []) for x in ['delete', 'burnin']): self.log.debug("Removing representation: {}".format(repre)) instance.data["representations"].remove(repre) - self.log.debug(instance.data["representations"]) - def use_legacy_code(self, instance): presets = instance.context.data.get("presets") if presets is None and self.profiles is None: diff --git a/pype/plugins/global/publish/extract_review.py b/pype/plugins/global/publish/extract_review.py index f4a39a7c31..c17793e682 100644 --- a/pype/plugins/global/publish/extract_review.py +++ b/pype/plugins/global/publish/extract_review.py @@ -51,6 +51,7 @@ class ExtractReview(pyblish.api.InstancePlugin): to_height = 1080 def process(self, instance): + self.log.debug(instance.data["representations"]) # Skip review when requested. if not instance.data.get("review", True): return @@ -77,7 +78,7 @@ class ExtractReview(pyblish.api.InstancePlugin): # Make sure cleanup happens and pop representations with "delete" tag. for repre in tuple(instance.data["representations"]): tags = repre.get("tags") or [] - if "delete" in tags: + if "delete" in tags and "thumbnail" not in tags: instance.data["representations"].remove(repre) def main_process(self, instance):