Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression doesn’t work with keyframes

  • Expression doesn’t work with keyframes

    Posted by Fernando Duque on September 3, 2024 at 3:08 pm

    Hi, I’ve been searching the forum and I think I know where my problem comes from but I can’t get it to work.

    I’ve made an expression with which I control the rotation of several layers of a precomp with a controller that is in another comp. The expression works great but when I apply keyframes it stops working. I’ve applied the expression to the rotation of the layer:

    comp(“Binny_Front_FULL”).layer(“Brazo L”).transform.rotation


    The precomposition has the time remapped with an expression to be able to select the frame that I want to show at any given time:


    a=thisComp.layer(“Brazo Control L”).effect(“Slider Control”)(“Slider”)

    framesToTime(a)


    I think the problem comes from the remapper. I’ve tried to apply “valueAtTime()” in the rotation expression but I can’t get it to work.

    This is the expression that I’ve applied without success. The rotation works until keyframes are applied to animate:

    C = comp(“Binny_Front_FULL”);

    ctrl = C.layer(“Brazo L”).transform.rotation;

    L = C.layer(thisComp.name);

    ctrl.valueAtTime(time+L.startTime)

    I would appreciate help on this.

    Thanks a lot!

    Fernando Duque replied 8 months, 1 week ago 3 Members · 6 Replies
  • 6 Replies
  • Sean Cole

    September 3, 2024 at 5:20 pm

    L = C.layer(thisComp.name);<div>
    </div><div>I’m assuming you do in fact have a Layer labelled “Binny_Front_FULL” in your Comp. If not, that would cause non-function. </div>

  • Yoan Boisjoli

    September 3, 2024 at 5:28 pm

    Haven’t had time to test it out but try this instead:

    C = comp(“Binny_Front_FULL”);

    ctrl = C.layer(“Brazo L”).transform.rotation;

    L = C.layer(thisComp.name);

    remappedTime = L.timeRemap.value;

    ctrl.valueAtTime(remappedTime);

  • Fernando Duque

    September 4, 2024 at 7:55 am

    Hi, thanks for your reply.

    I have te remapped layer and the controller inside <b style=”font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>“Binny_Front_FULL”. The remapped layer hav an expresion and inside it I have the layers I want to control.

    <b style=”font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>Everything works fine til I create a keyframe in the controller

  • Fernando Duque

    September 4, 2024 at 7:59 am

    Hi Yoan, thanks for your reply.

    Your expresion doesn’t fix the problem. Works fiine until I create a keyframe.

    Thanks!

  • Yoan Boisjoli

    September 5, 2024 at 2:44 pm

    Hey Fernando, does this help?

    C = comp(“Binny_Front_FULL”);

    ctrl = C.layer(“Brazo L”).transform.rotation;

    L = C.layer(thisComp.name);

    remappedTime = L.timeRemap.value;

    ctrl.valueAtTime(remappedTime + L.startTime);

  • Fernando Duque

    September 10, 2024 at 2:14 pm

    Hi Yoan, the same as befoe.

    I have restarted the configuration and the expressions to avoid to use time remapping and works fine.

    Thanks for your time!

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