Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Locking a keyframe value using expressions

  • Locking a keyframe value using expressions

    Posted by Dennis Cheung on June 9, 2011 at 9:18 pm

    Hi,

    If I have two keyframes on the POSITION property, let’s say. Is there a way I can allow the next animator to freely reposition the layer in the first keyframe, while locking the value of second keyframe so it always end up at the same location on screen?
    I need to be able to assign the first keyframe can start anywhere, but it always ends up at the same spot.

    Thanks for reading, I appreciate any help.

    Dennis

    Dan Ebberts replied 14 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dennis Cheung

    June 9, 2011 at 10:10 pm

    Or rather, if I can dictate the first and second keyframes’ value using expression, that would solve the problem too. I guess I would use a Point Control for keyframe 1 and type the location for keyframe 2. That would force my animation to end at the same spot every time.

    Thanks again for reading.

  • Dan Ebberts

    June 9, 2011 at 10:45 pm

    You didn’t mention whether this is linear motion or not, but if it is then you could let the other animator position a null and then use an expression like this:


    if(numKeys >= 2){
    t1 = key(1).time;
    t2 = key(2).time;
    p1 = thisComp.layer("Null 1").transform.position.valueAtTime(t1);
    linear(time,t1,t2,p1,valueAtTime(t2))
    }else
    value

    Dan

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