Would it be possible to record animations in playmode?

I am working on a project where I animate a character rig procedurally. I would like to capture this movement in an animation clip.

Is it possible to access clip curves and add keys programmatically?

Tax

Here is a link:
http://forum.unity3d.com/threads/91331-simple-swf-animations-into-unity3?p=591163#post591163