Made some improvements to the script. After almost blowing my brains out trying to debug again all the matrix math, it seems the additive results were not being added correctly to the control rig’s bind pose.
Anyway, I switched from getting the bind pose from the control rig for the actual “stance pose” for the bone skeleton. This is the pose stored when you “add the character”. I get it’s matrix and paste it on a frame on another layer at take03. It shouldn’t be needed if the bones have zeroed out rotations though.
From all that debugging I’ve learned a couple of things:
- How to install numpy and any other modules/libraries to Mobu’s python;
- That Mobu crashes if I try to extend a list of FBMatrix() to another list (but append works);
- That to get the stance pose I need to necessarily do a .SetMatrix then .AnimationNode.KeyCandidate(). And obviously a .GetMatrix before that to find the stance matrix.
I will post more about the modules thingy on the next days.