From 14093da98f6c68b7a3e238d51c9c62cec7c16f2c Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Tue, 11 Aug 2020 21:55:11 +0100 Subject: [PATCH 1/2] Option to keep the review files. - Disabled by default to maintain backwards compatibility. - Open loading review image sequences into Nuke. --- pype/plugins/maya/create/create_review.py | 2 ++ pype/plugins/maya/publish/extract_playblast.py | 7 +++++-- pype/plugins/nuke/load/load_sequence.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pype/plugins/maya/create/create_review.py b/pype/plugins/maya/create/create_review.py index 3e513032e19..c488a7559c8 100644 --- a/pype/plugins/maya/create/create_review.py +++ b/pype/plugins/maya/create/create_review.py @@ -21,4 +21,6 @@ def __init__(self, *args, **kwargs): for key, value in animation_data.items(): data[key] = value + data["keepImages"] = False + self.data = data diff --git a/pype/plugins/maya/publish/extract_playblast.py b/pype/plugins/maya/publish/extract_playblast.py index 8d45f98b90b..80a4dadf288 100644 --- a/pype/plugins/maya/publish/extract_playblast.py +++ b/pype/plugins/maya/publish/extract_playblast.py @@ -53,7 +53,6 @@ def process(self, instance): preset['camera'] = camera preset['format'] = "image" - # preset['compression'] = "qt" preset['quality'] = 95 preset['compression'] = "png" preset['start_frame'] = start @@ -102,6 +101,10 @@ def process(self, instance): if "representations" not in instance.data: instance.data["representations"] = [] + tags = ["review"] + if not instance.data.get("keepImages"): + tags.append("delete") + representation = { 'name': 'png', 'ext': 'png', @@ -111,7 +114,7 @@ def process(self, instance): "frameEnd": end, 'fps': fps, 'preview': True, - 'tags': ['review', 'delete'] + 'tags': tags } instance.data["representations"].append(representation) diff --git a/pype/plugins/nuke/load/load_sequence.py b/pype/plugins/nuke/load/load_sequence.py index aa79d8736a9..601e28c7c13 100644 --- a/pype/plugins/nuke/load/load_sequence.py +++ b/pype/plugins/nuke/load/load_sequence.py @@ -70,7 +70,7 @@ def loader_shift(node, frame, relative=True): class LoadSequence(api.Loader): """Load image sequence into Nuke""" - families = ["render2d", "source", "plate", "render", "prerender"] + families = ["render2d", "source", "plate", "render", "prerender", "review"] representations = ["exr", "dpx", "jpg", "jpeg", "png"] label = "Load sequence" From 0b48d447295384c1abc7a5744561fe1cc79ce4f1 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Mon, 17 Aug 2020 08:54:35 +0100 Subject: [PATCH 2/2] Make keepImages a class attribute --- pype/plugins/maya/create/create_review.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pype/plugins/maya/create/create_review.py b/pype/plugins/maya/create/create_review.py index c488a7559c8..d76b78c5807 100644 --- a/pype/plugins/maya/create/create_review.py +++ b/pype/plugins/maya/create/create_review.py @@ -11,6 +11,7 @@ class CreateReview(avalon.maya.Creator): family = "review" icon = "video-camera" defaults = ['Main'] + keepImages = False def __init__(self, *args, **kwargs): super(CreateReview, self).__init__(*args, **kwargs) @@ -21,6 +22,6 @@ def __init__(self, *args, **kwargs): for key, value in animation_data.items(): data[key] = value - data["keepImages"] = False + data["keepImages"] = self.keepImages self.data = data