LC #42 Pipers Alley

View Full Version : keying hide object on previous current and next frame?

01-08-2008, 10:02 PM
hey guys couldn't find this on the board.

How can I key an object to stay visible on a current frame, and key non visible on its previous and next frame?

So that the selected object gets three total keys. Off on previous, On on Current, and Off on Next.

thanks for the help!

01-09-2008, 12:07 AM
Like this?

// get selected objects
string $sel[] = `ls -sl`;
// get current frame
int $time = `currentTime -q`;

// set keyframes
// for previous frame
setKeyframe -t ($time - 1) -v 0 ($sel[0] + ".v");
// for current frame
setKeyframe -t $time -v 1 ($sel[0] + ".v");
// for next frame
setKeyframe -t ($time + 1) -v 0 ($sel[0] + ".v");

CGTalk Moderation
01-09-2008, 12:07 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.