fix: shape changer preview overrides default blendshape values inappropriately (#1250)

Closes: #1227
This commit is contained in:
bd_ 2024-10-02 19:48:38 -07:00 committed by GitHub
parent 409592f952
commit 4ec36ca489
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -101,6 +101,7 @@ namespace nadena.dev.modular_avatar.core.editor
var activeRule = prop.actionGroups.LastOrDefault(rule => rule.InitiallyActive); var activeRule = prop.actionGroups.LastOrDefault(rule => rule.InitiallyActive);
if (activeRule == null || activeRule.Value is not float value) continue; if (activeRule == null || activeRule.Value is not float value) continue;
if (activeRule.ControllingObject == null) continue; // default value is being inherited
value = Math.Clamp(value, 0, 100); value = Math.Clamp(value, 0, 100);