From 0f6794e2baba21351da78786c22be5fc478adf3d Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 19 May 2021 21:03:14 +0200 Subject: [PATCH] make extract formats configurable (within current possibilities) --- .../hosts/photoshop/plugins/publish/extract_image.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/openpype/hosts/photoshop/plugins/publish/extract_image.py b/openpype/hosts/photoshop/plugins/publish/extract_image.py index b56f128831..87574d1269 100644 --- a/openpype/hosts/photoshop/plugins/publish/extract_image.py +++ b/openpype/hosts/photoshop/plugins/publish/extract_image.py @@ -35,21 +35,16 @@ class ExtractImage(openpype.api.Extractor): if layer.visible and layer.id not in extract_ids: stub.set_visible(layer.id, False) - save_options = [] - if "png" in self.formats: - save_options.append('png') - if "jpg" in self.formats: - save_options.append('jpg') - file_basename = os.path.splitext( stub.get_active_document_name() )[0] - for extension in save_options: + for extension in self.formats: _filename = "{}.{}".format(file_basename, extension) files[extension] = _filename full_filename = os.path.join(staging_dir, _filename) stub.saveAs(full_filename, extension, True) + self.log.info(f"Extracted: {extension}") representations = [] for extension, filename in files.items():