mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
Assimp just armature tests
Remove the check for incomplete scene Move child recursion to assimpAppNode in BuildChildList same for meshes
This commit is contained in:
parent
e3e5fc3d0f
commit
2606b6366b
3 changed files with 24 additions and 21 deletions
|
|
@ -231,7 +231,7 @@ void AssimpShapeLoader::enumerateScene()
|
|||
// Read the file
|
||||
mScene = mImporter.ReadFile(shapePath.getFullPath().c_str(), ppsteps);
|
||||
|
||||
if (!mScene || (mScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE) || !mScene->mRootNode) {
|
||||
if (!mScene || !mScene->mRootNode) {
|
||||
Con::errorf("[ASSIMP] ERROR: Could not load file: %s", shapePath.getFullPath().c_str());
|
||||
Con::errorf("[ASSIMP] Importer error: %s", mImporter.GetErrorString());
|
||||
TSShapeLoader::updateProgress(TSShapeLoader::Load_Complete, "Import failed");
|
||||
|
|
@ -341,24 +341,7 @@ void AssimpShapeLoader::processAssimpNode(const aiNode* node, const aiScene* sce
|
|||
else
|
||||
{
|
||||
currNode = new AssimpAppNode(scene, node, parentNode);
|
||||
|
||||
if (parentNode)
|
||||
{
|
||||
parentNode->addChild(currNode);
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < node->mNumMeshes; i++)
|
||||
{
|
||||
U32 meshIdx = node->mMeshes[i];
|
||||
const aiMesh* mesh = scene->mMeshes[meshIdx];
|
||||
AssimpAppMesh* curMesh = new AssimpAppMesh(mesh, currNode);
|
||||
currNode->addMesh(curMesh);
|
||||
}
|
||||
}
|
||||
// Recursively process child nodes
|
||||
for (U32 i = 0; i < node->mNumChildren; i++)
|
||||
{
|
||||
processAssimpNode(node->mChildren[i], scene, currNode);
|
||||
processNode(currNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue