hi everyone:
I knew you guy could solve the problem in seconds . however it traps me for days long
and here is it:
environment: 3DSMAX2015 VS2013 FBXSDK2015.1
i want to create scaling animation for a mesh node :
FbxTime ftime;
FbxAnimCurveNode* scalingnode = node->LclScaling.GetCurveNode(layer1, true);
FbxAnimCurveNode* translationode = node->LclTranslation.GetCurveNode(layer1, true);
FbxAnimCurveNode* rotationode = node->LclRotation.GetCurveNode(layer1, true);
FbxAnimCurve* curvesx = node->LclScaling.GetCurve(layer1, FBXSDK_CURVENODE_COMPONENT_X, true);
curvesx->KeyModifyBegin();
ftime.SetSecondDouble(0.0);
curvesx->KeyAdd(ftime);
curvesx->KeySet(0, ftime, 1.00);
ftime.SetSecondDouble(0.6);
curvesx->KeyAdd(ftime);
curvesx->KeySet(1, ftime, 10.00);
curvesx->KeyModifyEnd();
the procedures may look like the code above, and it is successfully when exporting the scene fbx file.
trouble is when I open it in 3dsmax the scaling curves (XYZ scale)are totally at the value 0.000 !!!!!!!!!!!!
and I even cant find my mesh (cause it has already scale to 0.00!!) (see the attachment)
but no big mistake when export translation and rotation curve;
someone help me and tell me why?
truly appreciate for your help.
Solved! Go to Solution.
Solved by 294967969. Go to Solution.
okey okey i gotcha what happend to my work
it is :
FbxAnimStack* stack1 = FbxAnimStack::Create(scene, "base stack"); FbxAnimLayer* layer1= FbxAnimLayer::Create(scene, "dance001"); stack1->AddMember(layer1);
do check your animation layer is added on the very animation stack you have just created. code above is the right way.
and the mistake step is you got your animation stack in this way:
FbxAnimStack* GetAnimStack(FbxScene* scene)
{ FbxCriteria condi = FbxCriteria::ObjectTypeStrict(FbxAnimStack::ClassId);
int numstacks = scene->GetSrcObjectCount(condi);
FbxAnimStack* stackT = FbxCast<FbxAnimStack>(scene->GetSrcObject(condi, 0));
return stackT;
}
that is what i used to get the animation stack , it do returns an animation stack , and the program runs well,
that is all about my question
hope the information could help some guy.
Can't find what you're looking for? Ask the community or share your knowledge.