From 84eb91acb7d4fe41a122543493372b7dea6012a0 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 26 Jul 2022 08:34:41 +0800 Subject: [PATCH 1/3] bugfix/OP-3356_Maya-Review-Image-plane-attribute --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 4f28aa167cb..7885c1ebc9b 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -116,7 +116,11 @@ def process(self, instance): path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) - _, thumbnail = os.path.split(playblast) + image_plane = instance.data.get("imagePlane") + if image_plane: + _, thumbnail = os.path.split(playblast) + else: + return self.log.info("file list {}".format(thumbnail)) From 34601a6243dc39e09ab208a9e7e859a8e84e5d67 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 26 Jul 2022 17:05:39 +0800 Subject: [PATCH 2/3] fix the bug of loading image plane --- .../maya/plugins/publish/extract_thumbnail.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 7885c1ebc9b..47e9a907a0c 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -100,6 +100,13 @@ def process(self, instance): # camera. if preset.pop("isolate_view", False) and instance.data.get("isolate"): preset["isolate"] = instance.data["setMembers"] + + #Show or Hide Image Plane + image_plane = instance.data.get("imagePlane", True) + if "viewport_options" in preset: + preset["viewport_options"]["imagePlane"] = image_plane + else: + preset["viewport_options"] = {"imagePlane": image_plane} with lib.maintained_time(): # Force viewer to False in call to capture because we have our own @@ -116,11 +123,8 @@ def process(self, instance): path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) - image_plane = instance.data.get("imagePlane") - if image_plane: - _, thumbnail = os.path.split(playblast) - else: - return + _, thumbnail = os.path.split(playblast) + self.log.info("file list {}".format(thumbnail)) From cd87b8ba2a5ae9a008123f999e958fe7c1562b54 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 26 Jul 2022 17:11:07 +0800 Subject: [PATCH 3/3] bugfix-maya-review-image-plane_attribute --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 47e9a907a0c..0d537810c0b 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -101,7 +101,7 @@ def process(self, instance): if preset.pop("isolate_view", False) and instance.data.get("isolate"): preset["isolate"] = instance.data["setMembers"] - #Show or Hide Image Plane + # Show or Hide Image Plane image_plane = instance.data.get("imagePlane", True) if "viewport_options" in preset: preset["viewport_options"]["imagePlane"] = image_plane