From 4e5ab5e25c212a0006f6c900be1a1d073ec03ae2 Mon Sep 17 00:00:00 2001 From: Emiliana <38952746+emilianavt@users.noreply.github.com> Date: Tue, 30 Jun 2020 14:16:08 +0200 Subject: [PATCH] Detecting custom eyebrow blendshape clips in `OpenSeeVRMDriver` is now case insensitive. --- Examples/OpenSeeVRMDriver.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Examples/OpenSeeVRMDriver.cs b/Examples/OpenSeeVRMDriver.cs index bd7c5b3..acd2bbe 100644 --- a/Examples/OpenSeeVRMDriver.cs +++ b/Examples/OpenSeeVRMDriver.cs @@ -520,20 +520,20 @@ public class OpenSeeVRMDriver : MonoBehaviour { return; // Check if the model has set up blendshape clips. Thanks do Deat for this idea! - bool foundClipUp = false; - bool foundClipDown = false; + string foundClipUp = null; + string foundClipDown = null; foreach (BlendShapeClip clip in vrmBlendShapeProxy.BlendShapeAvatar.Clips) { if (clip.Preset == BlendShapePreset.Unknown) { - if (clip.BlendShapeName == "Brows up") - foundClipUp = true; - if (clip.BlendShapeName == "Brows down") - foundClipDown = true; + if (clip.BlendShapeName.ToUpper() == "BROWS UP") + foundClipUp = clip.BlendShapeName; + if (clip.BlendShapeName.ToUpper() == "BROWS DOWN") + foundClipDown = clip.BlendShapeName; } } - if (foundClipUp && foundClipDown) { + if (foundClipUp != null && foundClipDown != null) { browClips = new BlendShapeKey[2] { - new BlendShapeKey("Brows up"), - new BlendShapeKey("Brows down") + new BlendShapeKey(foundClipUp), + new BlendShapeKey(foundClipDown) }; return; }