Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

simplest problem about scaling animation

1 REPLY 1
SOLVED
Reply
Message 1 of 2
294967969
454 Views, 1 Reply

simplest problem about scaling animation

hi everyone:

I knew you guy could solve the problem in seconds . however it traps me for days long Smiley Sad 

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;

ret.png

someone help me and tell me why?

 

truly appreciate for your help.Smiley Embarassed

1 REPLY 1
Message 2 of 2
294967969
in reply to: 294967969

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, Smiley Mad 

 

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.

Post to forums  

Autodesk Design & Make Report