Copying a Contrained Armature's Motion to an Uncontrained Armature

I have a problem with the blender GE where it seems as though using an animated armature within the GE that possesses any kind of contraint such as IK solvers or Floor contraints will cause blender to crash upon exiting the game.

For more info please read my first and last post on this thread: http://blenderartists.org/forum/showthread.php?t=87977

So, right now I’m thinking that I need a python script that will allow me to make an armature that has the contraints on it that I want to be there to animate with. Then, with the script, I would want a second armature to be automatically generated whose bones will follow the exact positions of the first armature, even though this second armature has no contraints on it and hopefully also, no parenting of any kind.

There are a lot of scripts out there with ambiguous names and poor documentation. So I am asking here whether or not there is a scipt like that already in existence. If not, then I am asking whether or not this plan sounds feasible (this is my first blender script that I’m trying to write).

The PLAN:

  1. Make a contrained armature(1) and rig and animate it
  2. Have the script take inventory of every bone in the armature(1).
  3. Have the script produce another uncontrained unparented armature(2) and generate bones at a 1:1 ratio, taking all names of said bones and modifing them with a prefix or suffix such as “NC” or “NO” which would stand for ‘Not Contrained’.
  4. Then follow the Local positions of the contrained armature(1)'s bones for a given Action.
  5. Then, somehow ( would it be through IPO?) frame by frame, tell the bones of uncontrained armature(2) that they should follow the exact paths of the contrainted armature(1).
  6. Then, save the duplicated Action to the uncontrained armature(2) also using either an “NC” or “NO” prefix or suffix.

This way, you can retain the quality of a contrained rig and then trasfer them to an uncontrained one which would

A) be lighter on the game engine and
B) NOT CRASH; (hell even the Crystal Space exporter crashes when I use a contrained rig)

Tell me if I’m off base here I asked for advice from Animation and Game forum and noone seems to know what I’m talking about.

I’m hoping Social or Ideasman or someone can help me here. So just tell me if this post doesn’t make sense, I will try to make it clearer if I need to.

Makes sense to me. Isn’t the “bake” button in the action editor what you are looking for?

I read something about that function being broken. There is a bake action script for that. I even took some code from it to make pydrivers.

Thanks, I found a link to a script. It’s wierd how nobody seems to be aware of action baking not working. I guess people don’t export too often. I’ve been having this issue for 3 days, I’m so glad I hope the script works!

I’m aware that the builtin baking method is just about totally useless. It is already on my list of things to look into sometime in the future, after sorting out ‘more important’ things first.

Aligorith

Sorry, I never had to even look into scripts seriously before. This was my first look into blender scripting stuff so I was completely unfamilair with everything - also I was unfamiliar with baking too and plus the myster of the engine crashing. There were a lot of unknowns for me and not too many people knew what I was getting at.

But I found a script to fix it and now baking works GREAT!