|
Good morning.
i used fbx sdk to create an importer, it works fine but, recently i exported a teapot mesh from 3ds Max, and when trying go import in my program it crash with an assertion failed like the attachment.
This is the code i used:
void TriangulateRecursive(KFbxNode* pNode) {
KFbxNodeAttribute* lNodeAttribute = pNode->GetNodeAttribute();
if (lNodeAttribute)
{
if (lNodeAttribute->GetAttributeType() == KFbxNodeAttribute::eMESH ||
lNodeAttribute->GetAttributeType() == KFbxNodeAttribute::eNURB ||
lNodeAttribute->GetAttributeType() == KFbxNodeAttribute::eNURBS_SURFACE ||
lNodeAttribute->GetAttributeType() == KFbxNodeAttribute::ePATCH)
{
KFbxGeometryConverter lConverter(pNode->GetFbxSdkManager());
lConverter.TriangulateInPlace(pNode);
}
}
const int lChildCount = pNode->GetChildCount();
for (int lChildIndex = 0; lChildIndex < lChildCount; ++lChildIndex)
{
TriangulateRecursive(pNode->GetChild(lChildIndex));
}
}
Why may be this?
| Attachment
|
|
|
|
|