ScriptSpot

Forum topic · General Scripting

Change the tangent type for certain frames

By sebastian___ · 2007-09-27

Description

Anyone know a method to change for a selected object, the tangent type on certain frames ?
For example I have a cube with an animation and the keyframes have the "smooth" tangent type. I have keyframes on lots of frames, but I want for example, on frame 5, 12, 25, to change the tangent type to : Step.

EDIT : I forgot to add : This will be useful, because I have to do this a lot, but with a script, it will become very simple. All I have to do is to enter the frames numbers and press enter.

Comments (1)

sebastian___ · 2007-10-05

The answer would be this :

a = getKeyIndex $box.pos.controller 50f
$box.pos.controller.keys[a].inTangentType = #step

Explanations : getKeyIndex command - returns the key index on your desired time frame