From 26409d4fecee3d1dc2b3d94ee545751111aee169 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Tue, 23 Jan 2024 17:36:53 +0000 Subject: [PATCH 1/4] Fix simple instances for Tray Publisher. --- .../plugins/publish/collect_simple_instances.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openpype/hosts/traypublisher/plugins/publish/collect_simple_instances.py b/openpype/hosts/traypublisher/plugins/publish/collect_simple_instances.py index 3fa3c3b8c81..d6e35f4d754 100644 --- a/openpype/hosts/traypublisher/plugins/publish/collect_simple_instances.py +++ b/openpype/hosts/traypublisher/plugins/publish/collect_simple_instances.py @@ -216,6 +216,11 @@ def _create_review_representation( instance.data["thumbnailSource"] = first_filepath review_representation["tags"].append("review") + + # Adding "review" to representation name since it can clash with main + # representation if they share the same extension. + review_representation["outputName"] = "review" + self.log.debug("Representation {} was marked for review. {}".format( review_representation["name"], review_path )) From f59e403a3dbfac41eaa8b6debacc0c8f9a746484 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Tue, 23 Jan 2024 17:37:39 +0000 Subject: [PATCH 2/4] Fix edge case for ExtractOIIOTranscode --- openpype/plugins/publish/extract_color_transcode.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openpype/plugins/publish/extract_color_transcode.py b/openpype/plugins/publish/extract_color_transcode.py index faacb7af2ea..052759c10bc 100644 --- a/openpype/plugins/publish/extract_color_transcode.py +++ b/openpype/plugins/publish/extract_color_transcode.py @@ -189,6 +189,13 @@ def process(self, instance): if len(new_repre["files"]) == 1: new_repre["files"] = new_repre["files"][0] + # If the source representation has "review" tag, but its not + # part of the output defintion tags, then both the + # representations will be transcoded in ExtractReview and + # their outputs will clash in integration. + if not added_review and "review" in repre.get("tags", []): + added_review = True + new_representations.append(new_repre) added_representations = True From 741eab7140c627b19d71719e4b03424d5481209f Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Tue, 23 Jan 2024 17:37:53 +0000 Subject: [PATCH 3/4] Fix thumbnail extraction --- openpype/plugins/publish/extract_thumbnail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/plugins/publish/extract_thumbnail.py b/openpype/plugins/publish/extract_thumbnail.py index 2b4ea0529a5..10eb2614829 100644 --- a/openpype/plugins/publish/extract_thumbnail.py +++ b/openpype/plugins/publish/extract_thumbnail.py @@ -231,7 +231,10 @@ def _main_process(self, instance): "files": jpeg_file, "stagingDir": dst_staging, "thumbnail": True, - "tags": new_repre_tags + "tags": new_repre_tags, + # If source image is jpg then there can be clash when + # integrating to making the output name explicit. + "outputName": "thumbnail" } # adding representation From cb9802e3fe63fa7542b463b0c613bf8480260492 Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Thu, 25 Jan 2024 11:04:56 +0000 Subject: [PATCH 4/4] Update openpype/plugins/publish/extract_color_transcode.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- openpype/plugins/publish/extract_color_transcode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/plugins/publish/extract_color_transcode.py b/openpype/plugins/publish/extract_color_transcode.py index 052759c10bc..922df469feb 100644 --- a/openpype/plugins/publish/extract_color_transcode.py +++ b/openpype/plugins/publish/extract_color_transcode.py @@ -193,7 +193,7 @@ def process(self, instance): # part of the output defintion tags, then both the # representations will be transcoded in ExtractReview and # their outputs will clash in integration. - if not added_review and "review" in repre.get("tags", []): + if "review" in repre.get("tags", []): added_review = True new_representations.append(new_repre)