FORUMS: list search recent posts

Parenting currently unparented layers

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Steven Perry
Parenting currently unparented layers
on Jan 5, 2017 at 9:40:44 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.)


Return to posts index

Walter Soyka
Re: Parenting currently unparented layers
on Jan 6, 2017 at 4:12:53 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 [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]