Merge pull request #3607 from contriteobserver/ColladaSubmeshFix
ColladaLoader now assigns individual material indices to submeshes as neededpull/3625/head^2
commit
754b2ba434
|
@ -557,7 +557,12 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser &pParser, const Colla
|
|||
faceStart += submesh.mNumFaces;
|
||||
|
||||
// assign the material index
|
||||
std::map<std::string, size_t>::const_iterator subMatIt = mMaterialIndexByName.find(submesh.mMaterial);
|
||||
if (subMatIt != mMaterialIndexByName.end()) {
|
||||
dstMesh->mMaterialIndex = static_cast<unsigned int>(subMatIt->second);
|
||||
} else {
|
||||
dstMesh->mMaterialIndex = matIdx;
|
||||
}
|
||||
if (dstMesh->mName.length == 0) {
|
||||
dstMesh->mName = mid.mMeshOrController;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue