Showing the changes to libraries/render-utils/src/Model.cpp (1 of 36 files). Show all
Unified · Split
| @@ -1533,12 +1533,11 @@ void Model::setBlendedVertices(int blendNumber, const QVector<BlendshapeOffset>& · 1532 unmodified lines | |||
| 1533 | for (int i = 0; i < fbxGeometry.meshes.size(); i++) { | 1533 | for (int i = 0; i < fbxGeometry.meshes.size(); i++) { |
| 1534 | const FBXMesh& mesh = fbxGeometry.meshes.at(i); | 1534 | const FBXMesh& mesh = fbxGeometry.meshes.at(i); |
| 1535 | auto meshBlendshapeOffsets = _blendshapeOffsets.find(i); | 1535 | auto meshBlendshapeOffsets = _blendshapeOffsets.find(i); |
| 1536 | if (mesh.blendshapes.isEmpty() || meshBlendshapeOffsets == _blendshapeOffsets.end()) { | 1536 | if (mesh.blendshapes.isEmpty() || meshBlendshapeOffsets == _blendshapeOffsets.end() || meshBlendshapeOffsets == _blendshapeOffsets.end()) { |
| 1537 | continue; | 1537 | continue; |
| 1538 | } | 1538 | } |
| 1539 | 1539 | ||
| 1540 | const auto& buffer = _blendshapeBuffers.find(i); | 1540 | const auto& buffer = _blendshapeBuffers.find(i); |
| 1541 | assert(buffer != _blendshapeBuffers.end()); | ||
| 1542 | const auto blendshapeOffsetSize = meshBlendshapeOffsets->second.size() * sizeof(BlendshapeOffset); | 1541 | const auto blendshapeOffsetSize = meshBlendshapeOffsets->second.size() * sizeof(BlendshapeOffset); |
| 1543 | buffer->second->setData(blendshapeOffsetSize, (gpu::Byte*) blendshapeOffsets.constData() + index * sizeof(BlendshapeOffset)); | 1542 | buffer->second->setData(blendshapeOffsetSize, (gpu::Byte*) blendshapeOffsets.constData() + index * sizeof(BlendshapeOffset)); |
| 1544 | 1543 | ||