FORUMS: list search recent posts

Reference to previous key frame

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Pablo Levin
Reference to previous key frame
on Sep 20, 2016 at 5:39:53 pm
Last Edited By Pablo Levin on Sep 20, 2016 at 5:41:54 pm

Hi all! I am needing to make reference to the previous keyframe. So then I can use something like .valueAtTime(prevKeyframe.time). I'm trying differents things since two days, but I canĀ“t figure it out.


Return to posts index

Dan Ebberts
Re: Reference to previous key frame
on Sep 20, 2016 at 5:51:39 pm

Depending on what you're trying to do, this might work:


n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}
}
if (n > 0)
t = key(n).time
else
t = 0;



Dan



Return to posts index

Pablo Levin
Re: Reference to previous key frame
on Sep 20, 2016 at 8:40:59 pm

Yes Dan! You are a genious!!

Thanks again!!!


Return to posts index


Pablo Levin
Re: Reference to previous key frame
on Sep 20, 2016 at 8:41:40 pm

*genius


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]