loonghao / photoshop-python-api

Python API for Photoshop.
https://loonghao.github.io/photoshop-python-api/
MIT License
604 stars 68 forks source link

A guide on how to duplicate layers from another PSD #246

Open okuma10 opened 1 year ago

okuma10 commented 1 year ago

I want to apply a PSD with an overlay template(that I plan to toggle it's visibility with Python based on some data) to an image. So far I created a new document and applied the "add image as layer" but how do I copy the layers from the template? I managed to open the template document via Session.app.open() (that changed the active document but I suppose it should be fine). But there are no examples of transferring layers from one document to another. Can anyone help?

djs45 commented 9 months ago

Hello. Can you simply duplicate template to new file and work on it ? app.activeDocument.duplicate()

Or is it for Add layers from PSD template to a non empty PSD ?