I am trying to create my own maya ascii export method.
For every keyframe of my animation I have a 4x4 rotation matrix. Because the object animating does not move or scale, I can extract a 3x3 rotation matrix from that 4x4.
Now I want to export that animation information to a Maya ASCII file in matrix form.
Suppose a sphere that in 30 frames rotated 90 degrees in Z.
If the animation were in Euler anglles, I would set the keyframes like this:
createNode animCurveTA -n "pSphere1_rotateZ";
rename -uid "6E6C8F30-324E-0634-4798-67BBA5FDDFCD";
setAttr ".tan" 18;
setAttr ".wgt" no;
setAttr -s 2 ".ktv[0:1]" 1 0 30 90;
setAttr ".roti" 5;
The bold line shows the animation attributes.
But in my case I don't have euler angles and I don't want to convert the rotation matrix to euler angles (due to singularity/gimbal lock problems). I read that maya can accept rotation matrices on ASCII files. How do I set the keyframes of that animation using rotation matrices? THANKS