PDA

View Full Version : previous keyframe


BigRoyNL
04-08-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.

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

hope it helps

cheers

Craig

strarup
04-16-2009, 12:36 AM
Hi,

sorry a bit lazy and tired... however maybe you can get some ideas by looking at this script I once made... --> scrub keyframe (http://forums.cgsociety.org/showthread.php?t=559154)

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

kind regards

Strarup

CGTalk Moderation
04-16-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.