Skip to content

Commit

Permalink
change argument name.
Browse files Browse the repository at this point in the history
  • Loading branch information
hecomi committed Jan 6, 2023
1 parent c9c3e36 commit 765102d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ protected override void OnApplyBlendShapes()
if (index < 0 || index >= clips.Length) continue;
var clip = clips[index];
var weight = bs.weight * bs.maxWeight * volume;
vrm10Instance.Runtime.Expression.SetWeight(new ExpressionKey(clip.Preset, clip.Clip.name), weight);
var key = new ExpressionKey(clip.Preset, clip.Clip.name);
vrm10Instance.Runtime.Expression.SetWeight(key, weight);
}
}

public new BlendShapeInfo AddBlendShape(string phoneme, string blendShape)
public new BlendShapeInfo AddBlendShape(string phoneme, string expression)
{
var bs = GetBlendShapeInfo(phoneme);
if (bs == null) bs = new BlendShapeInfo() { phoneme = phoneme };
Expand All @@ -36,7 +37,7 @@ protected override void OnApplyBlendShapes()
if (!vrm10Instance || !vrm10Instance.Vrm) return bs;

var clips = vrm10Instance.Vrm.Expression.Clips;
int index = clips.ToList().FindIndex(x => x.Clip.name == blendShape);
int index = clips.ToList().FindIndex(x => x.Clip.name == expression);
bs.index = index - 1;

return bs;
Expand Down

0 comments on commit 765102d

Please sign in to comment.