View Full Version : previous keyframe

04 April 2009, 08:26 PM
Hey Guys,

Simple question I guess.
I want to query the time (and value) of the first keyframe before my current time.
So a check of the 'current' time is needed, and check for what is the first key coming 'before this time'. But I thought there was a command (with use of certain tags) that would instantly give you the 'last key'.

So if time = 12
en keys are at 1, 5, 9 and 15 the key at 9 would be returned.

Hope somebody can help me out.

04 April 2009, 12:08 PM
int $previousKey = `findKeyframe -timeSlider -which previous`;
print $previousKey;

hope it helps



04 April 2009, 12:36 AM

sorry a bit lazy and tired... however maybe you can get some ideas by looking at this script I once made... --> scrub keyframe (

hope that helps a bit or can give some ideas... :)

kind regards


CGTalk Moderation
04 April 2009, 12:36 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.