loonghao / photoshop-python-api

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

Can't access an art layer nested in a layer set #350

Closed Pordrack closed 1 month ago

Pordrack commented 1 month ago

I don't know if it's just not supposed to be possible or if it's a bug, but I have this layer: image And I can't find a way to get the layer "Nom", if I remove it from the group I can just access it through ps.active_document.artLayers.getByName("Nom"), but it doesn't work once in a group. I can access the group "Infos" by using layerSet= photoshop.LayerSets(layerGroup).getByName("Infos"), but once I have it, I don't know what do. I've seen the "linkedLayers" property for LayerSet in the documentation, but it doesn't say what exactly does the list contains, and I couldn't figure it out. I'm using Photoshop 2020 and Python 3.12.

Pordrack commented 1 month ago

It's not laid out in the documentation but layerSet has a artLayers property that you can use getByName on.

Pordrack commented 1 month ago

It's not laid out in the documentation but layerSet has a artLayers property that you can use getByName on.