Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects script access to nested composition layers

  • script access to nested composition layers

    Posted by Sasha Akhavi on June 27, 2016 at 4:05 am

    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!

    Frank Uver replied 1 year, 1 month ago 3 Members · 3 Replies
  • 3 Replies
  • Walter Soyka

    June 27, 2016 at 11:09 am

    [Sasha Akhavi] “layer(1) is clearly a CompItem, and CompItems should have accessible layer collections.”

    app.project.activeItem.layer(1) is not a CompItem, it’s an AVLayer.

    app.project.activeItem.layer(1).source, however, is a CompItem, and be addressed the way you expect.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Sasha Akhavi

    June 27, 2016 at 1:07 pm

    Fantastic, thanks, I’ll try this.

  • Frank Uver

    April 11, 2025 at 5:06 pm

    Hi, how’s it going?
    I know it’s been awhile, could you by any chance send me this script you worked on?
    Would highly appreciate it!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy