mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:01:18 +02:00
Try to apply the blendshape scale.
This commit is contained in:
parent
b04ed72b83
commit
8631cc3264
1 changed files with 9 additions and 0 deletions
|
@ -712,6 +712,15 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
||||||
FBXMesh& mesh = meshes[meshID];
|
FBXMesh& mesh = meshes[meshID];
|
||||||
mesh.blendshapes.resize(max(mesh.blendshapes.size(), index.first + 1));
|
mesh.blendshapes.resize(max(mesh.blendshapes.size(), index.first + 1));
|
||||||
mesh.blendshapes[index.first] = extracted.blendshape;
|
mesh.blendshapes[index.first] = extracted.blendshape;
|
||||||
|
|
||||||
|
// apply scale if non-unity
|
||||||
|
if (index.second != 1.0f) {
|
||||||
|
FBXBlendshape& blendshape = mesh.blendshapes[index.first];
|
||||||
|
for (int i = 0; i < blendshape.vertices.size(); i++) {
|
||||||
|
blendshape.vertices[i] *= index.second;
|
||||||
|
blendshape.normals[i] *= index.second;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get offset transform from mapping
|
// get offset transform from mapping
|
||||||
|
|
Loading…
Reference in a new issue