From d4c1f2e4b6a00bf8c2f7169bca1d37f7cdb0158f Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 3 Mar 2021 11:17:11 +0100 Subject: [PATCH] PS - added .psb support --- pype/hosts/photoshop/plugins/publish/collect_workfile.py | 5 +++-- pype/hosts/photoshop/plugins/publish/increment_workfile.py | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pype/hosts/photoshop/plugins/publish/collect_workfile.py b/pype/hosts/photoshop/plugins/publish/collect_workfile.py index 766be02354..88817c3969 100644 --- a/pype/hosts/photoshop/plugins/publish/collect_workfile.py +++ b/pype/hosts/photoshop/plugins/publish/collect_workfile.py @@ -31,9 +31,10 @@ class CollectWorkfile(pyblish.api.ContextPlugin): }) # creating representation + _, ext = os.path.splitext(file_path) instance.data["representations"].append({ - "name": "psd", - "ext": "psd", + "name": ext[1:], + "ext": ext[1:], "files": base_name, "stagingDir": staging_dir, }) diff --git a/pype/hosts/photoshop/plugins/publish/increment_workfile.py b/pype/hosts/photoshop/plugins/publish/increment_workfile.py index eca2583595..2005973ea0 100644 --- a/pype/hosts/photoshop/plugins/publish/increment_workfile.py +++ b/pype/hosts/photoshop/plugins/publish/increment_workfile.py @@ -1,3 +1,4 @@ +import os import pyblish.api from pype.action import get_errored_plugins_from_data from pype.lib import version_up @@ -25,6 +26,7 @@ class IncrementWorkfile(pyblish.api.InstancePlugin): ) scene_path = version_up(instance.context.data["currentFile"]) - photoshop.stub().saveAs(scene_path, 'psd', True) + _, ext = os.path.splitext(scene_path) + photoshop.stub().saveAs(scene_path, ext[1:], True) self.log.info("Incremented workfile to: {}".format(scene_path))