Skip to content

Commit 7140aaf

Browse files
committed
Fixed skeletal mesh data packing to apply bone weights, fixed tests
1 parent 7650911 commit 7140aaf

File tree

2 files changed

+251
-120
lines changed

2 files changed

+251
-120
lines changed

packer/src/types/SkeletalMeshDataPacker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static void GetMeshData(const aiScene* scene,
2828
{
2929
for (uint32_t i = 0; i < mesh->mNumVertices; i++)
3030
{
31-
Siege::SkinnedVertex vertex {};
31+
Siege::SkinnedVertex vertex;
3232
vertex.bones = {-1, -1, -1, -1};
3333
vertex.weights = {0.f, 0.f, 0.f, 0.f};
3434

@@ -86,7 +86,7 @@ static void GetMeshData(const aiScene* scene,
8686
for (int32_t j = 0; j < currentBone->mNumWeights; ++j)
8787
{
8888
aiVertexWeight weight = currentBone->mWeights[j];
89-
Siege::SkinnedVertex vertex = meshData.vertices[weight.mVertexId];
89+
Siege::SkinnedVertex& vertex = meshData.vertices[weight.mVertexId];
9090
for (int32_t k = 0; k < 4; ++k)
9191
{
9292
if (vertex.bones[k] < 0)

0 commit comments

Comments
 (0)