Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MeshSetPlugin] Fixes issue with importing over rigid meshes (1.0.6.2) #205

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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