mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 22:09:53 -05:00
add multi frame.
This commit is contained in:
parent
12ff8e983d
commit
d8408fcb3b
|
|
@ -427,24 +427,29 @@ namespace VRM
|
|||
}
|
||||
#endif
|
||||
|
||||
var weight = srcMesh.GetBlendShapeFrameWeight(i, 0);
|
||||
var frameCount = srcMesh.GetBlendShapeFrameCount(i);
|
||||
for(int f=0; f<frameCount; f++)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
mesh.AddBlendShapeFrame(name,
|
||||
weight,
|
||||
vertices,
|
||||
hasNormals > 0 ? normals : null,
|
||||
hasTangents > 0 ? tangents : null
|
||||
);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Debug.LogErrorFormat("fail to mesh.AddBlendShapeFrame {0}.{1}",
|
||||
mesh.name,
|
||||
srcMesh.GetBlendShapeName(i)
|
||||
);
|
||||
throw;
|
||||
var weight = srcMesh.GetBlendShapeFrameWeight(i, f);
|
||||
|
||||
try
|
||||
{
|
||||
mesh.AddBlendShapeFrame(name,
|
||||
weight,
|
||||
vertices,
|
||||
hasNormals > 0 ? normals : null,
|
||||
hasTangents > 0 ? tangents : null
|
||||
);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Debug.LogErrorFormat("fail to mesh.AddBlendShapeFrame {0}.{1}",
|
||||
mesh.name,
|
||||
srcMesh.GetBlendShapeName(i)
|
||||
);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user