Fixed division by zero error when downloading assets
Fixed exporting multiple MMD models
This commit is contained in:
@@ -38,6 +38,7 @@ public class ModelExporter
|
||||
writer.Close();
|
||||
fileStream.Close();
|
||||
|
||||
ClearBlendShape(container);
|
||||
UmaViewerUI.Instance.ShowMessage($"PMX Save at {path}", UIMessageType.Success);
|
||||
}
|
||||
|
||||
@@ -153,6 +154,19 @@ public class ModelExporter
|
||||
facial.ChangeMorph();
|
||||
}
|
||||
|
||||
private static void ClearBlendShape(UmaContainerCharacter container)
|
||||
{
|
||||
if (!container.FaceDrivenKeyTarget) return;
|
||||
//assuming base meshes do not have any blend shapes
|
||||
foreach (SkinnedMeshRenderer s in container.GetComponentsInChildren<SkinnedMeshRenderer>())
|
||||
{
|
||||
if (s.name.Contains("M_Face") || s.name.Contains("M_Mayu") || s.name.Contains("M_Hair"))
|
||||
{
|
||||
s.sharedMesh.ClearBlendShapes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Morph[] ReadMorph(List<Renderer> renderers)
|
||||
{
|
||||
List<Morph> morphs = new List<Morph>();
|
||||
|
||||
Reference in New Issue
Block a user