From 145688d56f28aee11ab9eb4e97e40a94a3926841 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 16 Dec 2024 10:27:01 +0100 Subject: [PATCH 1/2] Editorial: Fix clip_media source for review track. --- .../plugins/publish/collect_otio_subset_resources.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py index 2d8e91fe09..199e952769 100644 --- a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py +++ b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py @@ -178,7 +178,8 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, collection=collection) - if "review" in instance.data["families"]: + if ("review" in instance.data["families"] and + not instance.data.get("otioReviewClips")): review_repre = self._create_representation( frame_start, frame_end, collection=collection, delete=True, review=True) @@ -197,7 +198,8 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, file=filename, trim=_trim) - if "review" in instance.data["families"]: + if ("review" in instance.data["families"] and + not instance.data.get("otioReviewClips")): review_repre = self._create_representation( frame_start, frame_end, file=filename, delete=True, review=True) From 8b663ef4400fe99736da40b59a707ecf492f5437 Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Mon, 16 Dec 2024 11:07:21 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- .../plugins/publish/collect_otio_subset_resources.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py index 199e952769..0fb30326c6 100644 --- a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py +++ b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py @@ -178,8 +178,10 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, collection=collection) - if ("review" in instance.data["families"] and - not instance.data.get("otioReviewClips")): + if ( + not instance.data.get("otioReviewClips") + and "review" in instance.data["families"] + ): review_repre = self._create_representation( frame_start, frame_end, collection=collection, delete=True, review=True) @@ -198,8 +200,10 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, file=filename, trim=_trim) - if ("review" in instance.data["families"] and - not instance.data.get("otioReviewClips")): + if ( + not instance.data.get("otioReviewClips") + and "review" in instance.data["families"] + ): review_repre = self._create_representation( frame_start, frame_end, file=filename, delete=True, review=True)