Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Keyframe Controller

  • Keyframe Controller

    Posted by Ariel Levental on April 29, 2007 at 2:37 pm

    Hello All
    i’ve been reading this forum for quite a while now and it’s been REALLY helplful with making sense of the whole expressio issue.
    maybe you guys can help me with a problem.
    i want one layers’ Oapcity keyframes to control other layers’ opacity keyframes.
    really easy huh ??? well, i know i can pickwhip the properties together. BUT !!!
    i need the other layers to offset in time.
    basicly, if my control layer has on and off KF’s at the begining time code. i’d like the other offset layers to have the exact KF’s – each corresponding to it’s in or out point.

    Ariel Levental replied 19 years, 3 months ago 3 Members · 3 Replies
  • 3 Replies
  • Filip Vandueren

    April 29, 2007 at 3:06 pm

    Every proprety has the method called valueAtTime().
    As the name suggests, this retrieves not the current value of a property, but at a specific time.

    Your problem would be figuring out at what time you want to sample the opacity values, here’s the solution:


    controller=thisComp.layer("controller");
    t=time-controller.inPoint-inPoint;
    controller.opacity.valueAtTime(t);

    if the controller-layer starts at frame 0, the 2nd line could read “t=time-inPoint”, but this is more universal.

  • Dan Ebberts

    April 29, 2007 at 6:29 pm

    Unless I’m missing something, it seems like you have to flip the sign of the controller’s in point:

    controller=thisComp.layer(“controller”);
    t=time+controller.inPoint-inPoint;
    controller.opacity.valueAtTime(t);

    Dan

  • Ariel Levental

    April 29, 2007 at 9:50 pm

    THANK YOU SO SO MUCH.
    you guys really saved me from individually keyframing about 200 or so layers, each with it’s own in Point.
    Expressions ROCK !!!!
    Next stop – SCRIPTING !!!!

    Thanks again.

    Ariel

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