Showing the changes to libraries/render-utils/src/Model.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1572,9 +1572,13 @@ void Model::applyMaterialMapping() { · 1571 unmodified lines | ||
| 1572 | 1572 | |
| 1573 | 1573 | auto& materialMapping = getMaterialMapping(); |
| 1574 | 1574 | for (auto& mapping : materialMapping) { |
| 1575 | − std::set<unsigned int> shapeIDs = getMeshIDsFromMaterialID(QString(mapping.first.c_str())); | |
| 1576 | 1575 | auto networkMaterialResource = mapping.second; |
| 1577 | − if (!networkMaterialResource || shapeIDs.size() == 0) { | |
| 1576 | + if (!networkMaterialResource) { | |
| 1577 | + continue; | |
| 1578 | + } | |
| 1579 | + | |
| 1580 | + std::set<unsigned int> shapeIDs = getMeshIDsFromMaterialID(QString(mapping.first.c_str())); | |
| 1581 | + if (shapeIDs.size() == 0) { | |
| 1578 | 1582 | continue; |
| 1579 | 1583 | } |
| 1580 | 1584 | |