From 2a0d0717ca8c9a0c326e9741c017ce872fbe0f36 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Fri, 14 Aug 2020 15:35:21 +0100 Subject: [PATCH] Optional skip review on renders. --- pype/plugins/global/publish/extract_jpeg.py | 4 ++++ pype/plugins/global/publish/extract_review.py | 4 ++++ pype/plugins/maya/create/create_render.py | 1 + pype/plugins/maya/publish/collect_render.py | 1 + 4 files changed, 10 insertions(+) diff --git a/pype/plugins/global/publish/extract_jpeg.py b/pype/plugins/global/publish/extract_jpeg.py index 9b775f8b6f..ae74370b06 100644 --- a/pype/plugins/global/publish/extract_jpeg.py +++ b/pype/plugins/global/publish/extract_jpeg.py @@ -26,6 +26,10 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin): if instance.data.get("multipartExr") is True: return + # Skip review when requested. + if not instance.data.get("review"): + return + # get representation and loop them representations = instance.data["representations"] diff --git a/pype/plugins/global/publish/extract_review.py b/pype/plugins/global/publish/extract_review.py index e1a0d7043a..1b003064a1 100644 --- a/pype/plugins/global/publish/extract_review.py +++ b/pype/plugins/global/publish/extract_review.py @@ -50,6 +50,10 @@ class ExtractReview(pyblish.api.InstancePlugin): to_height = 1080 def process(self, instance): + # Skip review when requested. + if not instance.data.get("review"): + return + # ffmpeg doesn't support multipart exrs if instance.data.get("multipartExr") is True: instance_label = ( diff --git a/pype/plugins/maya/create/create_render.py b/pype/plugins/maya/create/create_render.py index 9e5f9310ae..9f05226f69 100644 --- a/pype/plugins/maya/create/create_render.py +++ b/pype/plugins/maya/create/create_render.py @@ -175,6 +175,7 @@ class CreateRender(avalon.maya.Creator): self.data["primaryPool"] = pool_names self.data["suspendPublishJob"] = False + self.data["review"] = True self.data["extendFrames"] = False self.data["overrideExistingFrame"] = True # self.data["useLegacyRenderLayers"] = True diff --git a/pype/plugins/maya/publish/collect_render.py b/pype/plugins/maya/publish/collect_render.py index 5ca9392080..dfae6ed0af 100644 --- a/pype/plugins/maya/publish/collect_render.py +++ b/pype/plugins/maya/publish/collect_render.py @@ -216,6 +216,7 @@ class CollectMayaRender(pyblish.api.ContextPlugin): "attachTo": attach_to, "setMembers": layer_name, "multipartExr": ef.multipart, + "review": render_instance.data.get("review") or False, "publish": True, "handleStart": handle_start,