modular-avatar/Editor/ReactiveObjects/AnimationGeneration/AnimatedProperty.cs
bd_ 30cafb21e4
fix: incorrect handling of shape key deletion (#1258)
This change reworks delete handling to be more consistent with other properties,
by treating it as a virtual property (`deletedShape.{blendshapeName}`) instead of
a weird additional field of blendshape keys. This then fixes a number of issues
(e.g. broken preview for delete keys).

Fixes: #1253
2024-10-03 20:16:53 -07:00

28 lines
769 B
C#

using System.Collections.Generic;
using UnityEngine;
namespace nadena.dev.modular_avatar.core.editor
{
internal class AnimatedProperty
{
public TargetProp TargetProp { get; }
public string ControlParam { get; set; }
public object currentState;
// Objects which trigger deletion of this shape key.
public List<ReactionRule> actionGroups = new List<ReactionRule>();
public AnimatedProperty(TargetProp key, float currentState)
{
TargetProp = key;
this.currentState = currentState;
}
public AnimatedProperty(TargetProp key, Object currentState)
{
TargetProp = key;
this.currentState = currentState;
}
}
}