FORUMS: list search recent posts

Using Layer control to select particular layers.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Justin Maloney
Using Layer control to select particular layers.
on Mar 30, 2015 at 3:30:27 pm

Hey there, I'm trying to make a Layer Control box that can switch which layers are visible (say flip the selected layer's opacity from "0" to "100")

I'm also trying to control the layers in a pre-comp, from a master comp.

For example:
I have a Master Comp with a Pre-Comp imbedded. And a Null object (named "Shape Selector") with the layer control.

Inside the Pre-comp, I have the layers I'd like to switch between. ("Circle", "Square", and "Triangle")

Is an expression that lets me switch between the shape layers in the pre-comp, from the Master Comp, even possible?

Thanks very much in advance =D


Return to posts index

Dan Ebberts
Re: Using Layer control to select particular layers.
on Mar 30, 2015 at 4:27:12 pm

The layer control dropdown only lists the layers in the comp with the control, so it wouldn't work across comps.

Dan



Return to posts index

Dan Ebberts
Re: Using Layer control to select particular layers.
on Mar 30, 2015 at 6:05:58 pm

I think the best you could do is maybe use a slider control in the Master Comp and then use an expression like this on the opacity of the shapes in the pre-comp:

if (Math.round(comp("Master Comp").layer("Shape Selector").effect("Slider Control")("Slider")) == index) 100 else 0


Dan



Return to posts index


Justin Maloney
Re: Using Layer control to select particular layers.
on Mar 31, 2015 at 8:09:53 pm

That could work. But the other animators I'm making this for would be thrown for a loop for with a control like that. It was for a character rig I'm building. I wanted to make it so they could easily select a different hair style, nose style, wardrobe, etc, with drop down boxes. I stuck with check box controls for each option.

thisComp.layer("Hair Styles").effect("Emo Swoosh")("Checkbox") *100

But I'll keep what you showed me in mind for other things =D


Return to posts index

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