Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Parenting currently unparented layers

  • Parenting currently unparented layers

    Posted by Steven Perry on January 5, 2017 at 9:40 pm

    I have 50+ layers, some of them parented to others, some of them not.

    I need a way to select the currently un-parented layers, so I can scoot them out of the screen (parented to a null)

    Any way to do this? (No I don’t want to use a camera to scoot most of the art out of the frame.)

    Walter Soyka replied 9 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Walter Soyka

    January 6, 2017 at 4:12 pm

    Here’s a very quick script to do it:
    10927_keenselectunparentedlayers.jsx.zip

    Unzip this, put the .jsx file in your After Effects script folder [link], then invoke it from the File > Scripts > keen-SelectUnparentedLayers.jsx menu.

    The code is simple and does not do any error-checking. You need to make sure that you have a comp active (timeline panel is open), otherwise Ae will throw an ungraceful error.

    Here’s the code, in case you’re curious:
    // selects un-parented layers in the active comp.

    for (i=1; i<=app.project.activeItem.numLayers; i++) {
    if (app.project.activeItem.layers[i].parent == null) app.project.activeItem.layers[i].selected = true else app.project.activeItem.layers[i].selected = false;
    }

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

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