From 0f7299bb2c09d5ea2678a6b803ab48fa8d5b2e4d Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 27 Jul 2020 15:33:09 +0900 Subject: [PATCH] use BlendShapeKey.CreateFromPreset --- Assets/VRM.Samples/Scripts/AIUEO.cs | 8 ++++---- Assets/VRM/UniVRM/Scripts/BlendShape/Blinker.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/VRM.Samples/Scripts/AIUEO.cs b/Assets/VRM.Samples/Scripts/AIUEO.cs index 9e2175207..a7a7e61b8 100644 --- a/Assets/VRM.Samples/Scripts/AIUEO.cs +++ b/Assets/VRM.Samples/Scripts/AIUEO.cs @@ -30,17 +30,17 @@ namespace VRM.Samples { for (var value = 0.0f; value <= 1.0f; value += velocity) { - BlendShapes.ImmediatelySetValue(preset, value); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), value); yield return null; } - BlendShapes.ImmediatelySetValue(preset, 1.0f); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), 1.0f); yield return new WaitForSeconds(wait); for (var value = 1.0f; value >= 0; value -= velocity) { - BlendShapes.ImmediatelySetValue(preset, value); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), value); yield return null; } - BlendShapes.ImmediatelySetValue(preset, 0); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), 0); yield return new WaitForSeconds(wait * 2); } diff --git a/Assets/VRM/UniVRM/Scripts/BlendShape/Blinker.cs b/Assets/VRM/UniVRM/Scripts/BlendShape/Blinker.cs index 45dd32f58..40e31fd1b 100644 --- a/Assets/VRM/UniVRM/Scripts/BlendShape/Blinker.cs +++ b/Assets/VRM/UniVRM/Scripts/BlendShape/Blinker.cs @@ -71,10 +71,10 @@ namespace VRM break; } - BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, value); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), value); yield return null; } - BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, 1.0f); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), 1.0f); // wait... yield return new WaitForSeconds(m_closingTime); @@ -90,10 +90,10 @@ namespace VRM break; } - BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, value); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), value); yield return null; } - BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, 0); + BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), 0); } }