Script (JavaScript) to search, store, and select nested layers.
I'm trying to sort out a way to search through nested layers for any layer starting with *, store them all to an array, and then use an array index to select the corresponding nested layer. I currently have a method that this works for but it feels inefficient and requires interations every time I try to access a nested layer and check for names. It seems like saving the entire path (app.activeDocument.layers[#].layers[#].getByName....) stored into the array would be the cleanest for working on the layer in the future however I can't seem to use the path once it goes into the array (app.activeDocument.activeLayer = path[0] for example does not work). Any help would be apprecaited.
