From 162a431486c6150bdb01bcab0a5f42e413ed3f5b Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 17 Apr 2018 22:14:22 +0900 Subject: [PATCH] allow empty blendShape --- Scripts/SkinnedMeshUtility/Editor/BoneNormalizer.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Scripts/SkinnedMeshUtility/Editor/BoneNormalizer.cs b/Scripts/SkinnedMeshUtility/Editor/BoneNormalizer.cs index 77cce24f3..bebd2ffce 100644 --- a/Scripts/SkinnedMeshUtility/Editor/BoneNormalizer.cs +++ b/Scripts/SkinnedMeshUtility/Editor/BoneNormalizer.cs @@ -223,16 +223,18 @@ namespace VRM { mesh.AddBlendShapeFrame(name, weight, - hasVertices && vertices.Length == mesh.vertexCount ? vertices : null, + vertices, hasNormals && normals.Length == mesh.vertexCount ? normals : null, hasTangents && tangents.Length == mesh.vertexCount ? tangents : null ); } - catch (Exception) + catch (Exception ex) { - Debug.LogWarningFormat("{0}.{1}", mesh.name, srcMesh.GetBlendShapeName(i)); - - throw; + Debug.LogWarningFormat("fail to mesh.AddBlendShapeFrame {0}.{1}: {2}", + mesh.name, + srcMesh.GetBlendShapeName(i), + ex + ); } }