cull baked animations key frames

Hi, I made some animations with IKs then baked them. Now I have some animations with a couple of hundred keyframes which is OK but I’d like to take 1 keyframe for every 5 (or delete the 4 in between perhaps)

Is there a script out there that does this? Or can someone give me a pointer on how to make one?



Really good question. This kind of macro command is the kind of task bpython is up for. If you have any idea about a script you could do, I suggest you to start by browsing the epydoc, accessible in the doc section of
So here for example you want to take ipo info based on time. You will need:
Blender.Set() to change frame
and the Blender.Ipo() module to play with that.

If it’s because you don’t know python. do the tut over at python .org
and ask question here too.

The chance you find script already done for this specific pursope is low. better do it yourself.
good day!

Sounds like a job for the weekend :slight_smile:

thanks for the tips, I’ll have a look at the links. I’ll post something if I get it working…

Hah, I just posted the same question! :slight_smile: It looks like there’s no script for this, unfortunately. If you plan to write your own, please know that simply deleting every x keyframes is a bad way to do it- you’ll lose a lot of detail since the reduction isn’t concerned with the actual shape of the IPO curves.

A better way to do it is to consider the curves’ rate of change in its slope, its 2nd derivitave i believe, and delete keyframes only when it drops below a certain threshold.

Best of all is a proper bezier decimator, like Inkscape’s simplify operation, but I couldn’t find any info on coding one. Still if there’s no satisfactory solution out eventually, I’ll prolly make a decimator like the one above since it’s something I really need.

Ah yes, so you did :slight_smile:

You’re right about the IPO curves of course - I haven’t used python before but I do have a fair bit of programming experience and I gather python isn’t too complex so I’m going to have a go this weekend (or tonight, if I can be bothered) I’ll see how easy it is to delete every x keyframe for each bone first and get that working, then I might have a go at an actual simplify operation. I’ll see how it goes, and post any progress. innit.