Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Changing Values in a Precomp

  • Changing Values in a Precomp

    Posted by Jaime Matthew on September 23, 2020 at 11:26 pm

    I’m trying to do something that seems relatively simple, but it’s beyond my skills with expressions.

    I have a layer in a pre-comp that I want to be able to scale (and set keyframes) from the master comp so that I can set the timing in the main comp (and possibly impact multiple precomps at the same time).

    I won’t know the durations of the shots ahead of time, so being able to put the keyframes in the parent shot will save me a world of grief in these templates.

    Andrei Popa replied 5 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    September 24, 2020 at 6:00 am

    This was my setup. If you change anything(comp name, precomp name, effect name) you must also change it in the expression.

    Main composition name = Main Comp

    Pre-comp name(as layer, this means as seen in timeline, not project panel) = Shot 1

    Add a 3D point effect to pre-comp.

    I named it CTRL.

    Now go inside the precomp and on the layer that you want the scale to be modified write this expression:

    myComp = comp("Main Comp");
    myLayer = myComp.layer("Shot 1");
    myEffect = myLayer.effect("CTRL")("ADBE Point3D Control-0001");
    myEffect.valueAtTime(sourceTime(time)+myLayer.inPoint);

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