Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using an expression to control only the position of the second keyframe

  • Using an expression to control only the position of the second keyframe

    Posted by David Cabestany on September 21, 2015 at 3:31 pm

    I have a map, made out of dots, which show specific branch locations across the country and that at the end need to move all to the headquarters and form the logo in there. Each dot has to travel a specific path and land in the same spot. There are over 165 dots in the comp.

    Is there a way to keyframe the initial position on each dot and then have them all follow one leader to the final position but without affecting the where they’re coming from? Pretty much a simple position to position expression, but that only occurs on the second keyframe.

    Is this possible?

    Thanks in advance,
    D.

    David Cabestany replied 10 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Kalleheikki Kannisto

    September 21, 2015 at 5:52 pm

    If all you dots are separate layers, no need for expressions: you can copy the final position keyframe from the home office, select all your other dots at the final position point in time and paste. The same position keyframe will be pasted on each layer.

  • David Cabestany

    September 21, 2015 at 6:50 pm

    True, but too impractical if revisions are needed down the line. Anyway, I found an expression that was close enough to what I needed, I only tweaked it a bit to fit it to my needs. I’m pasting it down in case anyone else finds it useful.

    The expression was written than none other than Dan Ebberts, so once again many thanks to him.

    if(numKeys >= 2){

    t1 = key(1).time;
    t2 = key(2).time;
    x=valueAtTime(t2);
    p1 = thisComp.layer("scl & xp").effect("hq pos")("Point");
    linear(time,t1,t2,x,p1)
    }else
    value

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