From b8d7dc0d6245256234ff4136181287b66adbb084 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 5 Apr 2022 18:36:17 +0200 Subject: [PATCH] changed hasReviewableRepresentations to useSequenceForReview --- .../publish/extract_review_data_mov.py | 2 +- .../plugins/publish/submit_publish_job.py | 46 ++++++++++--------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py b/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py index 22b371d8e9..2e8843d2e0 100644 --- a/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py +++ b/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py @@ -123,7 +123,7 @@ class ExtractReviewDataMov(openpype.api.Extractor): if generated_repres: # assign to representations instance.data["representations"] += generated_repres - instance.data["hasReviewableRepresentations"] = True + instance.data["useSequenceForReview"] = False else: instance.data["families"].remove("review") self.log.info(( diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py index a8f4fec563..586d0f975a 100644 --- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py @@ -524,26 +524,31 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): for collection in collections: ext = collection.tail.lstrip(".") preview = False - # if filtered aov name is found in filename, toggle it for - # preview video rendering - for app in self.aov_filter.keys(): - if os.environ.get("AVALON_APP", "") == app: - # no need to add review if `hasReviewableRepresentations` - if instance.get("hasReviewableRepresentations"): - break + # TODO 'useSequenceForReview' is temporary solution which does + # not work for 100% of cases. We must be able to tell what + # expected files contains more explicitly and from what + # should be review made. + # - "review" tag is never added when is set to 'False' + use_sequence_for_review = instance.get( + "useSequenceForReview", True + ) + if use_sequence_for_review: + # if filtered aov name is found in filename, toggle it for + # preview video rendering + for app in self.aov_filter.keys(): + if os.environ.get("AVALON_APP", "") == app: + # iteratre all aov filters + for aov in self.aov_filter[app]: + if re.match( + aov, + list(collection)[0] + ): + preview = True + break - # iteratre all aov filters - for aov in self.aov_filter[app]: - if re.match( - aov, - list(collection)[0] - ): - preview = True - break - - # toggle preview on if multipart is on - if instance.get("multipartExr", False): - preview = True + # toggle preview on if multipart is on + if instance.get("multipartExr", False): + preview = True staging = os.path.dirname(list(collection)[0]) success, rootless_staging_dir = ( @@ -730,8 +735,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): "resolutionHeight": data.get("resolutionHeight", 1080), "multipartExr": data.get("multipartExr", False), "jobBatchName": data.get("jobBatchName", ""), - "hasReviewableRepresentations": data.get( - "hasReviewableRepresentations") + "useSequenceForReview": data.get("useSequenceForReview") } if "prerender" in instance.data["families"]: