-
script access to nested composition layers
This seems like such a simple issue, but I can’t find information on it in the AE scripting guide or online.
I have a composition which contains multiple layers that are themselves compositions that contain layers. (I imported a Photoshop file with 2 levels of nested layers).
I am wanting to script the action of turning all the layers and their sublayers into 3d layers. But I can’t figure out how to access the nested layers.
Suppose I am viewing the main composition as my active item. I’ve tried app.project.activeItem.layer(1).layers, but this doesn’t work, because app.project.activeItem.layer(1) is an AVLayer, and AVLayer objects don’t have their own layer collections to access. But in the app UI, that layer(1) is clearly a CompItem, and CompItems should have accessible layer collections.
Thanks for any help you can provide!