mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Add shape key names
This commit is contained in:
parent
989915ddbe
commit
6a2b802196
1 changed files with 6 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ using Lumina.Extensions;
|
|||
using Penumbra.GameData.Files;
|
||||
using SharpGLTF.Geometry;
|
||||
using SharpGLTF.Geometry.VertexTypes;
|
||||
using SharpGLTF.IO;
|
||||
using SharpGLTF.Materials;
|
||||
|
||||
namespace Penumbra.Import.Modules;
|
||||
|
|
@ -124,7 +125,7 @@ public sealed class MeshConverter
|
|||
.Skip(shape.ShapeMeshStartIndex[_lod])
|
||||
.Take(shape.ShapeMeshCount[_lod])
|
||||
.Where(shapeMesh => shapeMesh.MeshIndexOffset == Mesh.StartIndex)
|
||||
.SelectMany(shapeMesh =>
|
||||
.SelectMany(shapeMesh =>
|
||||
_mdl.ShapeValues
|
||||
.Skip((int)shapeMesh.ShapeValueOffset)
|
||||
.Take((int)shapeMesh.ShapeValueCount)
|
||||
|
|
@ -147,6 +148,10 @@ public sealed class MeshConverter
|
|||
);
|
||||
}
|
||||
|
||||
meshBuilder.Extras = JsonContent.CreateFrom(new Dictionary<string, object>() {
|
||||
{"targetNames", shapeNames}
|
||||
});
|
||||
|
||||
return meshBuilder;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue