From 46e3c540cde689e1ade23113cc16af3ba3bc0e13 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 18 May 2020 14:48:12 +0200 Subject: [PATCH] fixed multipartExr check --- pype/plugins/global/publish/extract_burnin.py | 19 ++++++++++++------- pype/plugins/global/publish/extract_review.py | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/pype/plugins/global/publish/extract_burnin.py b/pype/plugins/global/publish/extract_burnin.py index 2397912e56..42b67891e9 100644 --- a/pype/plugins/global/publish/extract_burnin.py +++ b/pype/plugins/global/publish/extract_burnin.py @@ -60,6 +60,18 @@ class ExtractBurnin(pype.api.Extractor): self.log.debug(instance.data["representations"]) def main_process(self, instance): + # ffmpeg doesn't support multipart exrs + if instance.data.get("multipartExr") is True: + instance_label = ( + getattr(instance, "label", None) + or instance.data.get("label") + or instance.data.get("name") + ) + self.log.info(( + "Instance \"{}\" contain \"multipartExr\". Skipped." + ).format(instance_label)) + return + # TODO get these data from context host_name = pyblish.api.registered_hosts()[-1] task_name = os.environ["AVALON_TASK"] @@ -320,13 +332,6 @@ class ExtractBurnin(pype.api.Extractor): "Representation \"{}\" don't have \"burnin\" tag. Skipped." ).format(repre["name"])) return False - - # ffmpeg doesn't support multipart exrs - if "multipartExr" in repre["tags"]: - self.log.info(( - "Representation \"{}\" contain \"multipartExr\" tag. Skipped." - ).format(repre["name"])) - return False return True def filter_burnins_by_tags(self, burnin_defs, tags): diff --git a/pype/plugins/global/publish/extract_review.py b/pype/plugins/global/publish/extract_review.py index fc1e6377ef..d18cb9aef6 100644 --- a/pype/plugins/global/publish/extract_review.py +++ b/pype/plugins/global/publish/extract_review.py @@ -56,6 +56,17 @@ class ExtractReview(pyblish.api.InstancePlugin): instance.data["representations"].remove(repre) def main_process(self, instance): + if instance.data.get("multipartExr") is True: + instance_label = ( + getattr(instance, "label", None) + or instance.data.get("label") + or instance.data.get("name") + ) + self.log.info(( + "Instance \"{}\" contain \"multipartExr\". Skipped." + ).format(instance_label)) + return + host_name = pyblish.api.registered_hosts()[-1] task_name = os.environ["AVALON_TASK"] family = self.main_family_from_instance(instance) @@ -96,11 +107,7 @@ class ExtractReview(pyblish.api.InstancePlugin): # Loop through representations for repre in tuple(instance.data["representations"]): tags = repre.get("tags") or [] - if ( - "review" not in tags - or "multipartExr" in tags - or "thumbnail" in tags - ): + if "review" not in tags or "thumbnail" in tags: continue input_ext = repre["ext"] @@ -1122,7 +1129,7 @@ class ExtractReview(pyblish.api.InstancePlugin): tags = repre.get("tags", []) - if "multipartExr" in tags: + if instance.data.get("multipartExr") is True: # ffmpeg doesn't support multipart exrs continue