mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-30 23:01:24 -05:00
GetBlendShapeWeight, SetBlendShapeWeight 前後で100倍する
This commit is contained in:
@@ -192,11 +192,11 @@ namespace UniVRM10
|
||||
//EditorGUI.indentLevel += 1;
|
||||
for (int i = 0; i < mesh.blendShapeCount; ++i)
|
||||
{
|
||||
var src = renderer.GetBlendShapeWeight(i);
|
||||
var dst = EditorGUILayout.Slider(mesh.GetBlendShapeName(i), src, 0, 100.0f);
|
||||
var src = renderer.GetBlendShapeWeight(i) * 0.01f;
|
||||
var dst = EditorGUILayout.Slider(mesh.GetBlendShapeName(i), src, 0, 1.0f);
|
||||
if (dst != src)
|
||||
{
|
||||
renderer.SetBlendShapeWeight(i, dst);
|
||||
renderer.SetBlendShapeWeight(i, dst * 100.0f);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
@@ -236,7 +236,7 @@ namespace UniVRM10
|
||||
maxWeightName = name;
|
||||
maxWeight = weight;
|
||||
}
|
||||
list.Add(new MorphTargetBinding(relativePath, i, weight));
|
||||
list.Add(new MorphTargetBinding(relativePath, i, weight * 0.01f));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace UniVRM10
|
||||
{
|
||||
if (x.Index >= 0 && x.Index < SkinnedMeshRenderer.sharedMesh.blendShapeCount)
|
||||
{
|
||||
SkinnedMeshRenderer.SetBlendShapeWeight(x.Index, x.Weight * weight);
|
||||
SkinnedMeshRenderer.SetBlendShapeWeight(x.Index, x.Weight * weight * 100.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user