mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-08 20:08:53 -05:00
Merge pull request #1010 from ousttrue/fix/export_divided_test
Fix/export divided test
This commit is contained in:
@@ -44,7 +44,9 @@ namespace UniGLTF
|
||||
var positionAccessorIndex = -1;
|
||||
if (sparseIndices.Length > 0)
|
||||
{
|
||||
#if VRM_DEVELOP
|
||||
Debug.LogFormat("Sparse {0}/{1}", sparseIndices.Length, positions.Length);
|
||||
#endif
|
||||
var sparseIndicesViewIndex = gltf.ExtendBufferAndGetViewIndex(gltfBuffer, sparseIndices);
|
||||
positionAccessorIndex = gltf.ExtendSparseBufferAndGetAccessorIndex(gltfBuffer, accessorCount, positions, sparseIndices, sparseIndicesViewIndex, glBufferTarget.NONE);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace UniGLTF
|
||||
// blendShape(morph target)
|
||||
for (int j = 0; j < mesh.blendShapeCount; ++j)
|
||||
{
|
||||
var blendShape = new MeshExportUtil.BlendShapeBuffer(indices.Length);
|
||||
var blendShape = new MeshExportUtil.BlendShapeBuffer(usedIndices.Count);
|
||||
|
||||
// aggriage morph target
|
||||
mesh.GetBlendShapeFrameVertices(j, 0, blendShapePositions, blendShapeNormals, null);
|
||||
|
||||
Reference in New Issue
Block a user