Some fbx animation stubs.

This commit is contained in:
lzwdgc 2020-12-09 22:27:20 +03:00
parent 1185a57df6
commit 7a7abb8253

View file

@ -202,6 +202,8 @@ static FbxMesh *create_mesh(FbxScene *s, const block &b)
lGeometryConverter.ComputePolygonSmoothingFromEdgeSmoothing(m);
}
//m->GetNode()->LclTranslation.GetCurve(myAnimLayer, KFCURVENODE_T_X, true);
return m;
}
@ -268,6 +270,13 @@ bool CreateScene(const model &model, const std::string &name, FbxManager* pSdkMa
static const char* gAmbientElementName = "AmbientUV";
static const char* gSpecularElementName = "SpecularUV";
// https://help.autodesk.com/view/FBX/2020/ENU/?guid=FBX_Developer_Help_animation_example_animating_a_node_html
// Create an animation stack
FbxAnimStack* myAnimStack = FbxAnimStack::Create(pScene, "My stack");
// Create the base layer (this is mandatory)
FbxAnimLayer* myAnimBaseLayer = FbxAnimLayer::Create(pScene, "Layer0");
myAnimStack->AddMember(myAnimBaseLayer);
int engine_id = 0;
int fx_id = 0;
for (auto &b : model.blocks)