mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-13 22:39:39 -05:00
Merge pull request #2128 from notargs/set_weights_non_alloc
Add Vrm10RuntimeExpression.SetWeightNonAlloc method
This commit is contained in:
@@ -91,6 +91,18 @@ namespace UniVRM10
|
||||
Apply();
|
||||
}
|
||||
|
||||
public void SetWeightsNonAlloc(Dictionary<ExpressionKey, float> weights)
|
||||
{
|
||||
foreach (var (expressionKey, weight) in weights)
|
||||
{
|
||||
if (_inputWeights.ContainsKey(expressionKey))
|
||||
{
|
||||
_inputWeights[expressionKey] = weight;
|
||||
}
|
||||
}
|
||||
Apply();
|
||||
}
|
||||
|
||||
public void SetWeight(ExpressionKey expressionKey, float weight)
|
||||
{
|
||||
if (_inputWeights.ContainsKey(expressionKey))
|
||||
|
||||
Reference in New Issue
Block a user