From 1fe1321b6ca8b584e830ab7ec700b9312a3dca90 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 24 Oct 2019 10:53:46 -0700 Subject: [PATCH] Disable GLTF skinning --- libraries/fbx/src/GLTFSerializer.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 021821befd..456bad9346 100755 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -1543,6 +1543,24 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& } } + // TODO: Fix skinning and remove this workaround which disables skinning + { + std::vector meshToRootJoint; + meshToRootJoint.resize(hfmModel.meshes.size(), -1); + std::vector meshToClusterSize; + meshToClusterSize.resize(hfmModel.meshes.size()); + for (auto& shape : hfmModel.shapes) { + shape.skinDeformer = hfm::UNDEFINED_KEY; + } + + for (auto& mesh : hfmModel.meshes) { + mesh.clusterWeights.clear(); + mesh.clusterIndices.clear(); + mesh.clusterWeightsPerVertex = 0; + } + + } + return true; }