From 8abfa57b1be9506fbb3a2599c1317d0f96fca275 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 21 Jun 2023 18:26:43 +0800 Subject: [PATCH] roy's comment --- .../publish/extract_review_animation.py | 63 +++---------------- 1 file changed, 9 insertions(+), 54 deletions(-) diff --git a/openpype/hosts/max/plugins/publish/extract_review_animation.py b/openpype/hosts/max/plugins/publish/extract_review_animation.py index 1732a1d69f..8d7dfdeea9 100644 --- a/openpype/hosts/max/plugins/publish/extract_review_animation.py +++ b/openpype/hosts/max/plugins/publish/extract_review_animation.py @@ -72,63 +72,18 @@ class ExtractReviewAnimation(publish.Extractor): job_args = list() default_option = f'CreatePreview filename:"{filepath}"' job_args.append(default_option) + options = [ + "rndLevel", "percentSize", "dspGeometry", "dspShapes", + "dspLights", "dspCameras", "dspHelpers", "dspParticles", + "dspBones", "dspBkg", "dspGrid", "dspSafeFrame", "dspFrameNums" + ] + for key in options: + 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) - rndLevel = instance.data.get("rndLevel") - if rndLevel: - option = f"rndLevel:#{rndLevel}" - job_args.append(option) - percentSize = instance.data.get("percentSize") - if percentSize: - size = int(percentSize) - option = f"percentSize:{size}" - job_args.append(option) - dspGeometry = instance.data.get("dspGeometry") - if dspGeometry: - option = f"dspGeometry:{dspGeometry}" - job_args.append(option) - dspShapes = instance.data.get("dspShapes") - if dspShapes: - option = f"dspShapes:{dspShapes}" - job_args.append(option) - dspLights = instance.data.get("dspLights") - if dspLights: - option = f"dspShapes:{dspLights}" - job_args.append(option) - dspCameras = instance.data.get("dspCameras") - if dspCameras: - option = f"dspCameras:{dspCameras}" - job_args.append(option) - dspHelpers = instance.data.get("dspHelpers") - if dspHelpers: - option = f"dspHelpers:{dspHelpers}" - job_args.append(option) - dspParticles = instance.data.get("dspParticles") - if dspParticles: - option = f"dspParticles:{dspParticles}" - job_args.append(option) - dspBones = instance.data.get("dspBones") - if dspBones: - option = f"dspBones:{dspBones}" - job_args.append(option) - dspBkg = instance.data.get("dspBkg") - if dspBkg: - option = f"dspBkg:{dspBkg}" - job_args.append(option) - dspGrid = instance.data.get("dspGrid") - if dspGrid: - option = f"dspBkg:{dspBkg}" - job_args.append(option) - dspSafeFrame = instance.data.get("dspSafeFrame") - if dspSafeFrame: - option = f"dspSafeFrame:{dspSafeFrame}" - job_args.append(option) - dspFrameNums = instance.data.get("dspFrameNums") - if dspFrameNums: - option = f"dspFrameNums:{dspFrameNums}" - job_args.append(option) - job_str = " ".join(job_args) self.log.info(f"{job_str}")