Simplify IPO from script

Hello,

In Action Editor there is a command “Clean Action”. I can select all channels and run this command on all of them. I’d like to do this very thing from a script. The reason is, that I have a script that creates a lot of key frames and I can not do anything with the blender (it’s very slow). But how do I run this command on a curve?


act = Blender.Armature.NLA.GetActions()["Action"]
# Can I call something like this?
CleanAction(act);

Or should I do it on IPOs as follows?


# Get all IPOs
AllIpos = Blender.Armature.NLA.GetActions()["Action"].getAllChannelIpos()
# Loop through all IPOS
for ipo in AllIpos.iteravlues()
    # Call Clean Action here?
    CleanAction(ipo)

How do I call CleanAction? Or what is it called. In general what is a good way to find this information. I do not think I clearly understand how to use API documentation for blender.

Thanks.

The clean functionality is very new… I don’t think anyone’s added access to it to the python api yet.

Thanks macouno!
The logical next question is how can I add it? Is it too involved to add a binding to this function?

I’m checking out blender repository. I’ll see if I can compile it (I am under Vista with vc8).
Thanks.