Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Accessing a specific layer in a nested group

$
0
0

OK honestly I feel a little silly asking this question, because it SHOULD be really easy, but I simply can not figure out the right syntax to do this. I have a layer I'm trying to access directly in a nested group, it is structured like:

 

All Layers -> Water -> Bodies Of Water

 

Where "All Layers" and "Water" are groups and "Bodies Of Water" is the layer.

 

I've tried what I feel like is every option, but the most logical to me would be:

 

var test = myDocument.layerSets["All Layers"].layerSets["Water"].getByName("Bodies Of Water");

 

Error 24: myDocument.layerSets["All Layers"].layerSets.Water.getByName is not a function;

 

Not sure why its not reading the formatting on the second layerSets array. No matter what I try I get an error, can anyone help?


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>