diff --git a/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/MeshExportValidator.cs b/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/MeshExportValidator.cs index 5ab9e55a8..5c760aead 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/MeshExportValidator.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/MeshExportValidator.cs @@ -52,6 +52,7 @@ namespace UniGLTF MATERIALS_GREATER_THAN_SUBMESH_COUNT, MATERIALS_CONTAINS_NULL, UNKNOWN_SHADER, + MULTIFRAME_BLENDSHAPE, } public IEnumerable Validate(GameObject ExportRoot) @@ -78,6 +79,22 @@ namespace UniGLTF yield return Validation.Error($"{info.Renderers}: {Messages.MATERIALS_CONTAINS_NULL.Msg()}"); } } + + // blendShapeFraem + var shapeCount = info.Mesh.blendShapeCount; + var multiFrameShapes = new List(); + for (int i = 0; i < shapeCount; ++i) + { + if (info.Mesh.GetBlendShapeFrameCount(i) > 1) + { + multiFrameShapes.Add($"[{i}]{info.Mesh.GetBlendShapeName(i)}"); + } + } + if (multiFrameShapes.Count > 0) + { + var names = String.Join(", ", multiFrameShapes); + yield return Validation.Error($"{names}: {Messages.MULTIFRAME_BLENDSHAPE.Msg()}"); + } } foreach (var m in Meshes.GetUniqueMaterials())