diff --git a/CHANGELOG.md b/CHANGELOG.md index 443ada6..269c771 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * `Keep MMD Blend Shapes` is now `MMD Compatibility` and also prevents the first 3 fx layers to get merged or deleted. [(more)](https://github.com/d4rkc0d3r/d4rkAvatarOptimizer/issues/122) * Rewrote handling of material property animations with WD ON while using `Shader Toggles`. * It now tracks which meshes are animated and put those into a mask in the material instead of checking for NaN values. +* Automatically add the mesh of RealKissSystem to exclusions internally. ### Bug Fixes * Copy the toggle `Normalized Blend Values` of direct blend trees. [(more)](https://github.com/d4rkc0d3r/d4rkAvatarOptimizer/issues/120) diff --git a/Editor/d4rkAvatarOptimizer.cs b/Editor/d4rkAvatarOptimizer.cs index 2b48f5f..46cb37d 100644 --- a/Editor/d4rkAvatarOptimizer.cs +++ b/Editor/d4rkAvatarOptimizer.cs @@ -4862,6 +4862,12 @@ public HashSet GetAllExcludedTransforms() { var hardCodedExclusions = new List() { "_VirtualLens_Root", }.Select(s => GetTransformFromPath(s)).ToList(); + hardCodedExclusions.AddRange(transform.GetComponentsInChildren(true) + .Where(c => c.collisionTags.Any(t => t == "superneko.realkiss.contact.mouth")) + .Select(c => c.transform.parent) + .Where(t => t != null) + .Select(t => t.Cast().FirstOrDefault(child => child.TryGetComponent(out SkinnedMeshRenderer _))) + .Where(t => t != null)); foreach (var excludedTransform in ExcludeTransforms.Concat(hardCodedExclusions)) { if (excludedTransform == null) continue;