diff options
| author | yum <yum.food.vr@gmail.com> | 2025-12-03 15:23:49 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-12-03 15:23:52 -0800 |
| commit | 2e6f64192c4e882f6d312161b215128fc3f4fd1d (patch) | |
| tree | 70a4a3c7881cafbc11804f67423c1f4f3568f8a5 | |
| parent | 3e1b80b24a9e507110725be2a51c8b1acb79897b (diff) | |
add inverted mesh toggle list to togglespec
| -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
|
