mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +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"
|
label = "Extract Image"
|
||||||
hosts = ["photoshop"]
|
hosts = ["photoshop"]
|
||||||
families = ["image"]
|
families = ["image"]
|
||||||
|
formats = ["png", "jpg"]
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
|
|
||||||
|
|
@ -32,10 +33,12 @@ class ExtractImage(pype.api.Extractor):
|
||||||
if layer.id not in extract_ids:
|
if layer.id not in extract_ids:
|
||||||
layer.Visible = False
|
layer.Visible = False
|
||||||
|
|
||||||
save_options = {
|
save_options = {}
|
||||||
"png": photoshop.com_objects.PNGSaveOptions(),
|
if "png" in self.formats:
|
||||||
"jpg": photoshop.com_objects.JPEGSaveOptions()
|
save_options["png"] = photoshop.com_objects.PNGSaveOptions()
|
||||||
}
|
if "jpg" in self.formats:
|
||||||
|
save_options["jpg"] = photoshop.com_objects.JPEGSaveOptions()
|
||||||
|
|
||||||
file_basename = os.path.splitext(
|
file_basename = os.path.splitext(
|
||||||
photoshop.app().ActiveDocument.Name
|
photoshop.app().ActiveDocument.Name
|
||||||
)[0]
|
)[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue