Showing the changes to libraries/render-utils/src/Model.cpp (1 of 10 files). Show all
Unified · Split
| @@ -189,7 +189,7 @@ bool Model::shouldInvalidatePayloadShapeKey(int meshIndex) { · 188 unmodified lines | ||
| 189 | 189 | const auto& networkMeshes = getNetworkModel()->getMeshes(); |
| 190 | 190 | // if our index is ever out of range for either meshes or networkMeshes, then skip it, and set our _meshGroupsKnown |
| 191 | 191 | // to false to rebuild out mesh groups. |
| 192 | − if (meshIndex < 0 || meshIndex >= (int)networkMeshes.size() || meshIndex >= (int)hfmModel.meshes.size() /* || meshIndex >= (int)_meshStates.size()*/) { | |
| 192 | + if (meshIndex < 0 || meshIndex >= (int)networkMeshes.size() || meshIndex >= (int)hfmModel.meshes.size()) { | |
| 193 | 193 | _needsFixupInScene = true; // trigger remove/add cycle |
| 194 | 194 | invalidCalculatedMeshBoxes(); // if we have to reload, we need to assume our mesh boxes are all invalid |
| 195 | 195 | return true; |
| @@ -252,9 +252,6 @@ void Model::updateRenderItems() { · 56 unmodified lines | ||
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | Transform renderTransform = modelTransform; |
| 255 | − // if (meshState.clusterMatrices.size() <= 1) { | |
| 256 | − // renderTransform = modelTransform.worldTransform(shapeState._rootFromJointTransform); | |
| 257 | − // } | |
| 258 | 255 | data.updateTransform(renderTransform); |
| 259 | 256 | data.updateTransformAndBound(modelTransform.worldTransform(shapeState._rootFromJointTransform)); |
| 260 | 257 | |
| @@ -299,12 +296,10 @@ void Model::reset() { · 38 unmodified lines | ||
| 299 | 296 | } |
| 300 | 297 | |
| 301 | 298 | void Model::updateShapeStatesFromRig() { |
| 302 | − { // Shapes state: | |
| 303 | − for (auto& shape : _shapeStates) { | |
| 304 | − uint32_t jointId = shape._jointIndex; | |
| 305 | − if (jointId < (uint32_t) _rig.getJointStateCount()) { | |
| 306 | − shape._rootFromJointTransform = _rig.getJointTransform(jointId); | |
| 307 | − } | |
| 299 | + for (auto& shape : _shapeStates) { | |
| 300 | + uint32_t jointId = shape._jointIndex; | |
| 301 | + if (jointId < (uint32_t) _rig.getJointStateCount()) { | |
| 302 | + shape._rootFromJointTransform = _rig.getJointTransform(jointId); | |
| 308 | 303 | } |
| 309 | 304 | } |
| 310 | 305 | } |