Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to add a specific value to a specific keyframe

  • How to add a specific value to a specific keyframe

    Posted by Rafael Braz on April 28, 2018 at 10:18 pm

    Hi.

    So, I have a shape layer which adjusts itself to another text layer.

    This expression is under transform shape scale property.

    t = thisComp.layer("PERGUNTA");
    tRect = t.sourceRectAtTime(time,false);
    tUL = t.toComp([tRect.left,tRect.top]);
    tLR = t.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);
    myRect = sourceRectAtTime(time,false);
    myUL = toComp([myRect.left,myRect.top]);
    myLR = toComp([myRect.left+myRect.width,myRect.top+myRect.height]);
    margin = 50;
    [(tLR[0]-tUL[0] + 2*margin)/(myLR[0]-myUL[0]),(tLR[1]-tUL[1]+ 2*margin)/(myLR[1]-myUL[1])]*100

    I want this expression to define the properties of the 2nd keyframe as the first is always a 100%/100%.

    Can I add a fixed ease between this keyframes or only linear animations?

    Thanks in advance.

    Rafael Braz replied 8 years ago 1 Member · 2 Replies
  • 2 Replies
  • Rafael Braz

    April 28, 2018 at 10:27 pm

    I just tried this as for in and out animations (100%/100% to specific and specific to 100%/100%)

    t = thisComp.layer("PERGUNTA");
    v1 = key(1).value;
    v2 = key(2).value;
    tRect = t.sourceRectAtTime(time,false);
    tUL = t.toComp([tRect.left,tRect.top]);
    tLR = t.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);
    myRect = sourceRectAtTime(time,false);
    myUL = toComp([myRect.left,myRect.top]);
    myLR = toComp([myRect.left+myRect.width,myRect.top+myRect.height]);
    margin = 50;
    linear(v1,[(tLR[0]-tUL[0] + 2*margin)/(myLR[0]-myUL[0]),(tLR[1]-tUL[1]+ 2*margin)/(myLR[1]-myUL[1])]*100,[(tLR[0]-tUL[0] + 2*margin)/(myLR[0]-myUL[0]),(tLR[1]-tUL[1]+ 2*margin)/(myLR[1]-myUL[1])]*100,v1);

  • Rafael Braz

    May 3, 2018 at 4:23 pm

    Guys, any hints? Am I tripping on expressions? 🙁

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