Delete Duplicate Keyframes
Posted: January 11th, 2013, 6:17 pm
Hello! I'm wondering if you can help me write up a very quick script. It's similar to the aescripts jdSmartBaker, but much simpler.
I need a script that looks at the first keyframe and then continually deletes each keyframe after it that has the same value, until it hits a keyframe with a new value. Then, it repeats the same thing from that key frame. This would allow me to bake a stair-stepped animation, and then delete the unnecessary in-between keyframes to have it effectively "tween" the animation between the steps.
For example, an animation with 15 keyframes like this:
1, 1, 1, 1, 1, 1.5, 1.5, 1.5, 1.5, 2, 2, 2, 2, 2, 3,
Would become an animation with just 4 keyframes like this:
1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.625, 1.75, 1.875, 2, 2.2, 2.4, 2.6, 2.8, 3
Any help is much appreciated!
I need a script that looks at the first keyframe and then continually deletes each keyframe after it that has the same value, until it hits a keyframe with a new value. Then, it repeats the same thing from that key frame. This would allow me to bake a stair-stepped animation, and then delete the unnecessary in-between keyframes to have it effectively "tween" the animation between the steps.
For example, an animation with 15 keyframes like this:
1, 1, 1, 1, 1, 1.5, 1.5, 1.5, 1.5, 2, 2, 2, 2, 2, 3,
Would become an animation with just 4 keyframes like this:
1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.625, 1.75, 1.875, 2, 2.2, 2.4, 2.6, 2.8, 3
Any help is much appreciated!