Skip to content

Commit

Permalink
[MeshSetPlugin] Fixes issue with importing over rigid meshes (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
wannkunstbeikor committed Dec 22, 2022
1 parent 747797d commit 6bda5fc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Plugins/MeshSetPlugin/FrostyMeshSetEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2540,6 +2540,17 @@ private void ProcessSection(FbxNode[] sectionNodes, MeshSetLod meshLod, int sect
ushort[] finalBoneIndices = vertex.GetValue<ushort[]>("BoneIndices");
byte[] finalBoneWeights = vertex.GetValue<byte[]>("BoneWeights");

// for some reason some rigid meshes have bone indices and weights
// so we just make them all 0
if (finalBoneIndices == null)
{
finalBoneIndices = new ushort[8];
}
if (finalBoneWeights == null)
{
finalBoneWeights = new byte[8];
}

int currentStride = 0;
foreach (GeometryDeclarationDesc.Element elem in meshSection.GeometryDeclDesc[0].Elements)
{
Expand Down

0 comments on commit 6bda5fc

Please sign in to comment.