mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-13 22:39:39 -05:00
Merge pull request #2155 from Santarh/editorToolCanControlCustomExpressions
VRM10ExpressionEditorTool can control custom expressions.
This commit is contained in:
@@ -89,11 +89,8 @@ namespace UniVRM10
|
||||
foreach (var kv in runtime.GetWeights())
|
||||
{
|
||||
var key = kv.Key;
|
||||
if (kv.Key.Preset != ExpressionPreset.custom)
|
||||
{
|
||||
var value = ExpressionPresetSlider(expression, kv.Key.Preset, kv.Value);
|
||||
m_map[key] = value;
|
||||
}
|
||||
var value = ExpressionSlider(key, kv.Value);
|
||||
m_map[key] = value;
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
@@ -118,10 +115,10 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
float ExpressionPresetSlider(VRM10ObjectExpression expression, ExpressionPreset preset, float value)
|
||||
float ExpressionSlider(ExpressionKey key, float value)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(Style);
|
||||
EditorGUILayout.LabelField(preset.ToString());
|
||||
EditorGUILayout.LabelField(key.ToString());
|
||||
value = EditorGUILayout.Slider(value, 0, 1.0f);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user