Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Controlling Layers inside a Precomp

  • Controlling Layers inside a Precomp

    Posted by Mikhail Shraga on April 10, 2008 at 4:45 pm

    Hi.
    I’m new to expressions. I’d like to learn to control elements within a pre-comp. Is that possible.
    For example:

    i ma working in a composition called Maincomp.

    Layer1 is a null. It has an Angle Control in its effects.

    Comp2 is a pre-comp which contains the layer Square inside of it.

    Can i use the angle control in Layer1 to control the scale of Square?

    many many thanks!

    Dan Ebberts replied 18 years, 1 month ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    April 10, 2008 at 4:54 pm

    Sure – the syntax will look something like this:

    temp = comp(“Maincomp”).layer(“Layer1”).effect(“Angle Control”)(“Angle”);
    [temp, temp]

    Dan

  • Fernando Gutierrez

    April 10, 2008 at 7:34 pm

    Ok, but going a bit further…

    on the main comp, i got a camera, that is already rotaded and etc…
    inside the pre-comp there is a 3D layer… how to make it always “looking” into the camera angle?

  • Dan Ebberts

    April 10, 2008 at 8:01 pm

    Something like this:

    c = comp(“Maincomp”);
    l = c.layer(thisComp.name);
    p = l.fromWorld(c.activeCamera.toWorld([0,0,0]));
    lookAt(p,position)

    Dan

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