4

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?

Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125
ozonostudio
  • 119
  • 2
  • 6
  • 13

1 Answers1

3

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".

Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125