From 0a3a6c52f972dcc4d3f6b5454bcd8f67202b0521 Mon Sep 17 00:00:00 2001 From: raveenajain Date: Tue, 30 Apr 2019 17:12:35 -0700 Subject: [PATCH] initial information needed for joint shape info --- libraries/fbx/src/GLTFSerializer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 622fb92ce7..9952072668 100755 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -874,6 +874,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& joint.isSkeletonJoint = false; hfmModel.joints.push_back(joint); } + hfmModel.shapeVertices.resize(hfmModel.joints.size()); // Build skeleton @@ -1243,6 +1244,13 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& } } + for (int clusterIndex = 0; clusterIndex < mesh.clusters.size() - 1; clusterIndex++) { + ShapeVertices& points = hfmModel.shapeVertices.at(clusterIndex); + for (glm::vec3 vertex : mesh.vertices) { + points.push_back(vertex); + } + } + mesh.meshExtents.reset(); foreach(const glm::vec3& vertex, mesh.vertices) { mesh.meshExtents.addPoint(vertex);