How can I access a layer by name if that layer is within a group? I am able to access the layer when it is at the top level.
Thanks,
Raphael
Acessing Layer within a group
Acessing Layer within a group
If you know the name of the group you can do something like this
Code: Select allapp.activeDocument.layerSets.getByName('groupName').artLayers.getByName('layerName')
or you can work by index. For example to get a layer by name in the top most group
Code: Select allapp.activeDocument.layerSets[0].artLayers.getByName('layerName')
Code: Select allapp.activeDocument.layerSets.getByName('groupName').artLayers.getByName('layerName')
or you can work by index. For example to get a layer by name in the top most group
Code: Select allapp.activeDocument.layerSets[0].artLayers.getByName('layerName')