From d4df16bb87aac5b667bed8b5ecdd9f6afd52f20b Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 17 Jun 2022 08:08:05 +0300 Subject: [PATCH] Test resolution values against settings --- .../maya/plugins/publish/extract_playblast.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index bb1ecf279d..ce1bb8ae83 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -51,7 +51,21 @@ class ExtractPlayblast(openpype.api.Extractor): ) preset = lib.load_capture_preset(data=self.capture_preset) + capture_presets = openpype.api.get_current_project_settings()["maya"]["publish"]["ExtractPlayblast"]["capture_preset"] # noqa + width_preset = capture_presets["Resolution"]["width"] + height_preset = capture_presets["Resolution"]["height"] preset['camera'] = camera + + if width_preset == 0: + preset['width'] = instance.data.get("resolutionWidth") + else: + preset["width"] = width_preset + + if height_preset == 0: + preset['width'] = instance.data.get("resolutionHeight") + else: + preset['height'] = height_preset + preset['start_frame'] = start preset['end_frame'] = end camera_option = preset.get("camera_option", {})