Merge pull request #1079 from pypeclub/3.0/PS_psb_in_workfiles

PS - added .psb support
This commit is contained in:
Milan Kolar 2021-03-03 18:01:17 +01:00 committed by GitHub
commit 3eaebbc4d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -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,
})

View file

@ -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))