diff options
Diffstat (limited to 'Scripts/YOTSCore.cs')
| -rw-r--r-- | Scripts/YOTSCore.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Scripts/YOTSCore.cs b/Scripts/YOTSCore.cs index b5f08f6..0fc8ccb 100644 --- a/Scripts/YOTSCore.cs +++ b/Scripts/YOTSCore.cs @@ -42,6 +42,11 @@ namespace YOTS [SerializeField]
public List<string> meshToggles = new List<string>();
+ // The name of meshes to *disable* when the toggle is turned on.
+ // For example, if you want to hide certain meshes when this toggle is active.
+ [SerializeField]
+ public List<string> inverseMeshToggles = new List<string>();
+
// Blendshapes to animate.
[SerializeField]
public List<BlendShapeSpec> blendShapes = new List<BlendShapeSpec>();
@@ -847,6 +852,11 @@ namespace YOTS onAnim.meshToggles.Add(new GeneratedMeshToggle { path = mesh, value = 1.0f });
}
}
+ if (toggle.inverseMeshToggles != null) {
+ foreach (var mesh in toggle.inverseMeshToggles) {
+ onAnim.meshToggles.Add(new GeneratedMeshToggle { path = mesh, value = 0.0f });
+ }
+ }
if (toggle.blendShapes != null) {
foreach (var bs in toggle.blendShapes) {
// Validate that either path or paths is specified
@@ -910,6 +920,11 @@ namespace YOTS offAnim.meshToggles.Add(new GeneratedMeshToggle { path = mesh, value = 0.0f });
}
}
+ if (toggle.inverseMeshToggles != null) {
+ foreach (var mesh in toggle.inverseMeshToggles) {
+ offAnim.meshToggles.Add(new GeneratedMeshToggle { path = mesh, value = 1.0f });
+ }
+ }
if (toggle.blendShapes != null) {
foreach (var bs in toggle.blendShapes) {
// Validate that either path or paths is specified
|
