diff --git a/Scripts/BlendShape/BlendShapeClip.cs b/Scripts/BlendShape/BlendShapeClip.cs
index 4b883fdc4..6f3a5f3a2 100644
--- a/Scripts/BlendShape/BlendShapeClip.cs
+++ b/Scripts/BlendShape/BlendShapeClip.cs
@@ -58,6 +58,50 @@ namespace VRM
return m_prefab;
}
}
+
+ ///
+ /// Apply BlendShape for Preview
+ ///
+ ///
+ ///
+ public void Apply(Transform root, float value)
+ {
+ if (Values != null)
+ {
+ foreach (var x in Values)
+ {
+ var target = root.Find(x.RelativePath);
+ if (target != null)
+ {
+ var sr = target.GetComponent();
+ if (sr != null)
+ {
+ sr.SetBlendShapeWeight(x.Index, x.Weight * value);
+ }
+ }
+ }
+ }
+
+ /*
+ if (MaterialValues != null)
+ {
+ foreach (var x in MaterialValues)
+ {
+ var target = root.Find(x.RelativePath);
+ if (target != null)
+ {
+ var sr = target.GetComponent();
+ if (sr != null)
+ {
+ var m = sr.sharedMaterials[x.Index];
+ var color = x.BaseValue + (x.TargetValue - x.BaseValue) * value;
+ m.SetColor(x.ValueName, color);
+ }
+ }
+ }
+ }
+ */
+ }
#endif
///