mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 05:04:15 +01:00
Fix oversight in bone index mapping generation
This commit is contained in:
parent
f71d922198
commit
215f807483
1 changed files with 2 additions and 2 deletions
|
|
@ -88,13 +88,13 @@ public class MeshExporter
|
||||||
|
|
||||||
var indexMap = new Dictionary<ushort, int>();
|
var indexMap = new Dictionary<ushort, int>();
|
||||||
|
|
||||||
foreach (var xivBoneIndex in xivBoneTable.BoneIndex.Take(xivBoneTable.BoneCount))
|
foreach (var (xivBoneIndex, tableIndex) in xivBoneTable.BoneIndex.Take(xivBoneTable.BoneCount).WithIndex())
|
||||||
{
|
{
|
||||||
var boneName = _mdl.Bones[xivBoneIndex];
|
var boneName = _mdl.Bones[xivBoneIndex];
|
||||||
if (!boneNameMap.TryGetValue(boneName, out var gltfBoneIndex))
|
if (!boneNameMap.TryGetValue(boneName, out var gltfBoneIndex))
|
||||||
throw new Exception($"Armature does not contain bone \"{boneName}\" requested by mesh {_meshIndex}.");
|
throw new Exception($"Armature does not contain bone \"{boneName}\" requested by mesh {_meshIndex}.");
|
||||||
|
|
||||||
indexMap.Add(xivBoneIndex, gltfBoneIndex);
|
indexMap.Add((ushort)tableIndex, gltfBoneIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return indexMap;
|
return indexMap;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue