简体   繁体   中英

Find layergroup of a specific layer in photoshop with javascript

Is any way to retrieve the name of a layer group only for the name on a inner layer? I ask this because I'm trying to trim all the content of a folder with a specific layer inside. Can I get any help please?

If the layer name and the group name are both unique then you can retrieve it simply with:

app.activeDocument.activeLayer = app.activeDocument.layerSets.getByName("my group name").artLayers.getByName("my layer name");

Where "my group name" is the name of the group and "my layer name" is the name of the layer within "my group name".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM