ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

Dave LaRonde
Re: Parenting currently unparented layers
on Jan 5, 2017 at 11:12:00 pm

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

I'd do this:
  • Make a null for the un-parented layers.
  • Find the point where the scooting is to begin.
  • Make all the currently-parented layers shy so you don't see them.
  • Ctl-click (Cmd-click Mac) to select & highlight the un-parented layers (don't Select All).
  • Grab the parenting pick-whip for one of the layers, and drag it to the new null -- they're all parented now.
  • Un-shy the already-parented layers.
  • Scoot away.

There really isn't much of an easier way to do it that I know about.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


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 >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]