mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
make png and jpeg configurable in config
This commit is contained in:
parent
edf61b7c28
commit
8934fba388
1 changed files with 7 additions and 4 deletions
|
|
@ -13,6 +13,7 @@ class ExtractImage(pype.api.Extractor):
|
|||
label = "Extract Image"
|
||||
hosts = ["photoshop"]
|
||||
families = ["image"]
|
||||
formats = ["png", "jpg"]
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
|
@ -32,10 +33,12 @@ class ExtractImage(pype.api.Extractor):
|
|||
if layer.id not in extract_ids:
|
||||
layer.Visible = False
|
||||
|
||||
save_options = {
|
||||
"png": photoshop.com_objects.PNGSaveOptions(),
|
||||
"jpg": photoshop.com_objects.JPEGSaveOptions()
|
||||
}
|
||||
save_options = {}
|
||||
if "png" in self.formats:
|
||||
save_options["png"] = photoshop.com_objects.PNGSaveOptions()
|
||||
if "jpg" in self.formats:
|
||||
save_options["jpg"] = photoshop.com_objects.JPEGSaveOptions()
|
||||
|
||||
file_basename = os.path.splitext(
|
||||
photoshop.app().ActiveDocument.Name
|
||||
)[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue