I didn't think baking animation worked by randomly selecting joints, I thought you had to select the hierarchy first, you would basically have to manually select the first joint you created in your chain, for instance the pelvis joint, then run your script, starting with selecting the hierarchy, then baking the animation in script : -
Mel script to select the hierarchy is small and simple : -
baking the animation will be a 1 line script also ( depending on your requirements, this may change ) : -
BakeSimulation will be based on the defaults you have set up inside your EDIT > KEYS > BAKE SIMULATION options dialog, hierarchy must be selected as is, then whatever YOUR particular requirements are : -
so, in effect, the entire script would be ( manually select root bone first ) : -
Code:
select -hi;
BakeSimulation;
However,
ivars is correct also, to select every bone in a scene ( multiple characters ), the command
Code:
select -r `ls -type joint`;
works perfectly, I guess you need to do a little testing, been some time since I did any animation related work.
EDIT : QUICK TEST, seems to work fine here, just tested two characters seperately animated in the same scene ( no manual preselection needed ) : -
Code:
select -r `ls -type joint`;
BakeSimulation;
based on this setup in my bake simulation options dialog : -
