review and burnin don't delete representations, that they don't process

This commit is contained in:
Milan Kolar 2020-10-14 16:23:01 +02:00
parent 67c03d4aa0
commit afd1fbc40b
2 changed files with 3 additions and 4 deletions

View file

@ -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:

View file

@ -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):