Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / What's wrong with the way I am reading animations?
  RSS 2.0 ATOM  

What's wrong with the way I am reading animations?
Rate this thread
 
57510
 
Permlink of this thread  
avatar
  • Total Posts: 38
  • Joined: 29 November 2010 01:07 PM

KFbxAnimLayerlCurrentAnimationLayer KFbxGetSrc<KFbxAnimStack>( FBXScene)->GetMember(FBX_TYPE(KFbxAnimLayer), 0);

//...

 
KFbxAnimCurvelAnimCurve[3];
 
lAnimCurve[0] BoneNodes[bn]->LclRotation.GetCurve<KFbxAnimCurve>(lCurrentAnimationLayerKFCURVENODE_R_X);
 
lAnimCurve[1] BoneNodes[bn]->LclRotation.GetCurve<KFbxAnimCurve>(lCurrentAnimationLayerKFCURVENODE_R_Y);
 
lAnimCurve[2] BoneNodes[bn]->LclRotation.GetCurve<KFbxAnimCurve>(lCurrentAnimationLayerKFCURVENODE_R_Z);

Those parts of my code used to work but after upgrading to the new version of the FBX SDK I get these unresolved externals:

1>OvglMedia.obj : error LNK2001: unresolved external symbol “private: static void (__cdecl* fbxsdk_2012_1::KFbxAnimCurveKey::mDeallocatorFct)(class fbxsdk_2012_1::KFbxAnimCurveKeyImpl *)” (?mDeallocatorFct@KFbxAnimCurveKey@fbxsdk_2012_1@@
0P6AXPAVKFbxAnimCurveKeyImpl@2@@ZA)
1>OvglMedia.obj : error LNK2001: unresolved external symbol “public: static class fbxsdk_2012_1::kFbxClassId fbxsdk_2012_1::KFbxAnimStack::ClassId” (?ClassId@KFbxAnimStack@fbxsdk_2012_1@@2VkFbxClassId@2@A)
1>OvglMedia.obj : error LNK2001: unresolved external symbol “public: static class fbxsdk_2012_1::kFbxClassId fbxsdk_2012_1::KFbxAnimLayer::ClassId” (?ClassId@KFbxAnimLayer@fbxsdk_2012_1@@2VkFbxClassId@2@A)
1>OvglMedia.obj : error LNK2001: unresolved external symbol “public: static class fbxsdk_2012_1::kFbxClassId fbxsdk_2012_1::KFbxAnimCurve::ClassId” (?ClassId@KFbxAnimCurve@fbxsdk_2012_1@@2VkFbxClassId@2@A)
1>C:\Users\Steven\Documents\My Projects\Ovgl\lib\Ovgld.exe : fatal error LNK1120: 4 unresolved externals



Replies: 0
avatar

Hi Steve,

I tried your code and I did not have such error.

Could your issue be the same as question 2.4 from the FAQ?

2.4 I get error LNK2001: unresolved external symbol “kFbxClassId”
It seems that you are using the dynamic library. Add KFBX_DLLINFO to the preprocessor definitions of your project.

I hope this helps.

Viviane
Maya Data Platform
Autodesk



Viviane Rochon
Maya Data Platform
Autodesk

Replies: 1
/img/forum/dark/default_avatar.png

Based on the error message, he is using the 2012.1 version, which seems to need FBXSDK_SHARED, rather than KFBX_DLLINFO. I just had to change this in my code.

Author: 0xc0deface

Replied: 27 September 2011 03:20 PM  
avatar

I already have that defined. I am pretty sure the API has changed which is causing the problem and I will add that so far I like the changes. However, I’m not sure how to properly retrieve animation data now.



Replies: 0
avatar

I think I may have fixed the first line but I’m not sure if it’s right:

KFbxAnimLayerlCurrentAnimationLayer = (KFbxAnimLayer*)((KFbxAnimStack*)FBXScene->GetSrcObject(0))->GetMember(0);

It compiles fine but I don’t even know if it does the same thing?



Replies: 0
avatar

Figured it out! Apparently everything works fine when I use the static libraries which is perfectly fine by me.

This guy also had the same problem: http://forum.openscenegraph.org/viewtopic.php?t=8564



Replies: 0