mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-08 11:59:26 -05:00
impl expression binary and override combination
https://github.com/vrm-c/vrm-specification/pull/487
This commit is contained in:
@@ -75,15 +75,45 @@ namespace UniVRM10
|
||||
{
|
||||
if (key.IsBlink)
|
||||
{
|
||||
actualWeights[key] = actualWeights[key] * blinkMultiplier;
|
||||
if (_expressions[key].IsBinary)
|
||||
{
|
||||
if (blinkMultiplier < 1.0f)
|
||||
{
|
||||
actualWeights[key] = 0.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actualWeights[key] = actualWeights[key] * blinkMultiplier;
|
||||
}
|
||||
}
|
||||
else if (key.IsLookAt)
|
||||
{
|
||||
actualWeights[key] = actualWeights[key] * lookAtMultiplier;
|
||||
if (_expressions[key].IsBinary)
|
||||
{
|
||||
if (lookAtMultiplier < 1.0f)
|
||||
{
|
||||
actualWeights[key] = 0.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actualWeights[key] = actualWeights[key] * lookAtMultiplier;
|
||||
}
|
||||
}
|
||||
else if (key.IsMouth)
|
||||
{
|
||||
actualWeights[key] = actualWeights[key] * mouthMultiplier;
|
||||
if (_expressions[key].IsBinary)
|
||||
{
|
||||
if (mouthMultiplier < 1.0f)
|
||||
{
|
||||
actualWeights[key] = 0.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actualWeights[key] = actualWeights[key] * mouthMultiplier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user