From 41dd7e06f951d42ccc1d305647840ba07d545416 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 21 Jun 2023 19:33:40 +0800 Subject: [PATCH] update the args for review animation --- openpype/hosts/max/plugins/create/create_review.py | 2 +- .../max/plugins/publish/extract_review_animation.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/max/plugins/create/create_review.py b/openpype/hosts/max/plugins/create/create_review.py index 9939b2e30e..aec70dbe15 100644 --- a/openpype/hosts/max/plugins/create/create_review.py +++ b/openpype/hosts/max/plugins/create/create_review.py @@ -53,6 +53,6 @@ class CreateReview(plugin.MaxCreator): decimals=0), EnumDef("rndLevel", rndLevel_enum, - default="png", + default="smoothhighlights", label="Preference") ] diff --git a/openpype/hosts/max/plugins/publish/extract_review_animation.py b/openpype/hosts/max/plugins/publish/extract_review_animation.py index 940068cc51..fc70701eba 100644 --- a/openpype/hosts/max/plugins/publish/extract_review_animation.py +++ b/openpype/hosts/max/plugins/publish/extract_review_animation.py @@ -9,7 +9,7 @@ class ExtractReviewAnimation(publish.Extractor): Extract Review by Review Animation """ - order = pyblish.api.ExtractorOrder + order = pyblish.api.ExtractorOrder + 0.001 label = "Extract Review Animation" hosts = ["max"] families = ["review"] @@ -72,8 +72,14 @@ class ExtractReviewAnimation(publish.Extractor): job_args = list() default_option = f'CreatePreview filename:"{filepath}"' job_args.append(default_option) + frame_option = f"outputAVI:false start:{start} end:{end} fps:{fps}" # noqa + job_args.append(frame_option) + rndLevel = instance.data.get("rndLevel") + if rndLevel: + option = f"rndLevel:#{rndLevel}" + job_args.append(option) options = [ - "rndLevel", "percentSize", "dspGeometry", "dspShapes", + "percentSize", "dspGeometry", "dspShapes", "dspLights", "dspCameras", "dspHelpers", "dspParticles", "dspBones", "dspBkg", "dspGrid", "dspSafeFrame", "dspFrameNums" ] @@ -82,8 +88,6 @@ class ExtractReviewAnimation(publish.Extractor): enabled = instance.data.get(key) if enabled: job_args.append(f"{key}:{enabled}") - frame_option = f"outputAVI:false start:{start} end:{end} fps:{fps}" # noqa - job_args.append(frame_option) job_str = " ".join(job_args) self.log.info(f"{job_str}")