mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
psd object loop don't export just collect layers to export
This commit is contained in:
parent
39d00d483d
commit
9ee4e0fc28
1 changed files with 5 additions and 3 deletions
|
|
@ -101,8 +101,9 @@ class ExtractBGMainGroups(pype.api.Extractor):
|
|||
"__schema_version__": 1,
|
||||
"children": []
|
||||
}
|
||||
transfers = []
|
||||
output_ext = ".png"
|
||||
|
||||
to_export = []
|
||||
for layer_idx, layer in enumerate(psd_object):
|
||||
layer_name = layer.name.replace(" ", "_")
|
||||
if (
|
||||
|
|
@ -125,7 +126,10 @@ class ExtractBGMainGroups(pype.api.Extractor):
|
|||
"name": layer.name,
|
||||
"filename": filename
|
||||
})
|
||||
to_export.append((layer, filename))
|
||||
|
||||
transfers = []
|
||||
for layer, filename in to_export:
|
||||
output_filepath = os.path.join(output_dir, filename)
|
||||
dst_filepath = os.path.join(publish_dir, filename)
|
||||
transfers.append((output_filepath, dst_filepath))
|
||||
|
|
@ -133,8 +137,6 @@ class ExtractBGMainGroups(pype.api.Extractor):
|
|||
pil_object = layer.composite(viewport=psd_object.viewbox)
|
||||
pil_object.save(output_filepath, "PNG")
|
||||
|
||||
json_data["children"].append(layer_data)
|
||||
|
||||
return json_data, transfers
|
||||
|
||||
def redo_global_plugins(self, instance):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue