Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects fix time-remap last keyframe blank problem

  • fix time-remap last keyframe blank problem

    Posted by Andy Engelkemier on July 15, 2009 at 1:39 pm

    I first posted a question over in basic because I thought I was just missing something, but was actually doing it right I am told.

    I often create a time remap to extend the end of a composition. But then I have to go back one frame from the out point and add another keyframe, then delete the last one, because the default keyframe ends up being blank.

    I made a script to solve this, but I’m sure it could be better.
    First problem is I didn’t know how to do <= (less than or equal to), so I just subtracted on frame using thisComp.frameDuration. I'd like the key(2) part to really say, the last key. I'm not sure how to accomplish that. I'm not clear on what that means also, because I didn't think I would be able to add keys in the middle and still have it work, but it looks to keep working even if there are 5 keys there. Below is the expression I used. I hope you guys can give me some help. if (time < (thisLayer.timeRemap.key(2).time - thisComp.frameDuration)){ value }else{ value - thisComp.frameDuration }

    Kevin Camp replied 16 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Kevin Camp

    July 15, 2009 at 2:25 pm

    this will use the value of the last keyframe, whether there is 1 or 100 (or more) keyframes:

    if (time >= (thisLayer.timeRemap.key(numKeys).time)){
    value – thisComp.frameDuration;
    }else{
    value;
    }

    i think the problem you will have with presets is that the key framed values are fixed when you save the preset. so if you have a comp that is 1 second, the last time remap keyframe value is 01;00. if you apply that preset to an animation that is 2 seconds, it will hold at 00;29, since that was how the preset was created…

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Andy Engelkemier

    July 15, 2009 at 2:52 pm

    shoot, you’re right. Anyone know how to write a script for this?

  • Andy Engelkemier

    July 15, 2009 at 2:57 pm

    although, I just thought about it, and couldn’t a script actually add a key one frame before the last key and then delete the last key all in one step? That would be handy. That way I could hit one hotkey to create the Time Remap correctly the first time.
    I still can’t understand why it is the way it is.

  • Kevin Camp

    July 15, 2009 at 3:36 pm

    [Andy Engelkemier] “couldn’t a script actually add a key one frame before the last key and then delete the last key all in one step?”

    yes. i don’t know enough java to write a script, but you might post in the ae expression forum, or on aenhancers (they have a forum for script requests — you might search their scripts first to see if they already have one).

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

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