for (std::pair<std::string, std::pair<unsigned int, glm::mat4>> pair: mesh.boneMap) {
std::string nodeName = pair.first;
+
+ if (animMap->count(nodeName) <= 0) break;
+
unsigned int boneId = pair.second.first;
// This is actually an inverse-bind matrix
// i.e. position of the mesh in bone space
}
// TODO: handle default material inserted at the end by assimp
- for (unsigned int i = 0; i < scene->mNumMaterials - 1; i++) {
+ for (unsigned int i = 0; i < scene->mNumMaterials; i++) {
const aiMaterial &material = *scene->mMaterials[i];
materials.push_back(Material(material, *scene, p.progId));
}