|
Hi,
Thank you. I did try that code, I had to modify a bit to fit with my sdk version, so it ended up as
// Change rotation order for desired nodes
lpNode->SetRotationOrder(KFbxNode::eDESTINATION_SET , /*KFbxNode::*/eEULER_ZXY);
lExportScene->GetRootNode()->ConvertPivotAnimationRecursive(lAnimStack->GetName(), KFbxNode::eDESTINATION_SET, lFrameRate);
That didn’t seem to make a difference. On further inspection, if I use ImportScene, I can see the rotations are 180 to 0, but when I use:
Matx = lExportScene->GetEvaluator()->GetNodeGlobalTransform(lpNode, nowtime);
vect = Matx.GetR();
I get -90 to +90 and also there are euler inversions in Tilt and Roll (Rx and Rz) flips from 180 to 0 instantly
The default Motion Builder camera appears to look up the -Z axis and be at -90 where the default Maya camera would be saying 0. Thus I think that GetGlobalTransform returns the MotionBuilder(FBX) transform, and not the Maya one? I did try:
KFbxAxisSystem SceneAxisSystem = pScene->GetGlobalSettings().GetAxisSystem()
KFbxAxisSystem OurAxisSystem(KFbxAxisSystem::eMayaYUp)
if(SceneAxisSystem != OurAxisSystem)
{
fbxinfo_log("Converting Scene to Maya Y Up\n");
OurAxisSystem.ConvertScene(pScene);
}
All I really want to find out at the point is the Camera Position and Orientation at each frame of the move regardless of how it is animated and parented in Maya Yup space or even FBX space if I have to, I can always convert - but I believe that is a major reason for using FBX…
Thanks
Simon
Author: SimonWakley
|