-
get nearestKey’s time? I think…
Right now I have pretty much used Dan Ebbert’s expression for the pendulum and tweaked it for use on the bend effect.
The problem I’m having is I may need this to happen in the middle of a composition. Instead of time I created another variable that = time – inpoint;. Ok that works, but that makes it to so I have to edit the layer inpoint for each layer. The inpoint may Really be related to a keyframe. I know there are a few acceptable ways to do this, but i’m trying to learn scripting as well. In my case, this works ok for now, but I’d like to know how to do it.
So I really want to do time minus the time at the first keyframe of a time remap. I thought I could just do: time – nearestKey(t); but that’s not working. I think all nearestKey is giving me is the key index? I’m not sure how to check returned values, and I’m clicking on the error, but it won’t tell me what is wrong.
I’m guessing I need to somehow find the time of the first key after the inPoint and subtract That value from time.