|
Hi and thank you for your answer Viviane,
I am however not sure I understand your suggestion. I am using the FBX SDK to load a .fbx file via a KFbxImporter (pretty much like examples/ImportScene) then parse the KFbxScene content to our native structures.
I am walking the node tree as the exporter goes (in a rather chaotic way, eg. grabbing bones as they come into play on a mesh, etc...) but I fail to see how I could “setup the node tree” myself. I expect it to be in a complete state and ready for parsing after the importer is done loading the file.
Is there an additional step I am missing? In order to bake the motion for a node I basically do:
... fbx_scene->GetEvaluator()->SetContext(anim_stack) ...
for (KTime t = tStart; t < (tEnd + tStep) t += tStep) ... fbx_scene->GetEvaluator()->GetNodeGlobalTransform(pNode, t)
Yes, in case of multiple animstack the evaluator context will be swapped with each node several times but this surely isn’t a problem?
I am skipping a lot of details but I believe the problem boils down to this group of lines.
The export was fine when using
pNode->GetGlobalFromCurrentTake(t)
instead of
fbx_scene->GetEvaluator()->GetNodeGlobalTransform(pNode, t)
Ps: Sorry for the odd formatting the post would appear truncated on the board without it.
Emmanuel
|