chore: ignore inactive root in GetTargetGroups

This commit is contained in:
tliks 2025-01-30 23:50:46 +09:00 committed by bd_
parent 89d38c5371
commit 8414d203e5
2 changed files with 8 additions and 2 deletions

View File

@ -18,7 +18,8 @@ namespace nadena.dev.modular_avatar.core.editor
public ImmutableList<RenderGroup> GetTargetGroups(ComputeContext context)
{
var roots = context.GetAvatarRoots();
var roots = context.GetAvatarRoots()
.Where(r => context.ActiveInHierarchy(r) is true);
var removers = roots
.SelectMany(r => context.GetComponentsInChildren<ModularAvatarRemoveVertexColor>(r, true))
.Select(rvc => (ToPathString(context, rvc.transform),

View File

@ -1,4 +1,4 @@
#region
#region
using System.Collections.Generic;
using System.Collections.Immutable;
@ -63,6 +63,11 @@ namespace nadena.dev.modular_avatar.core.editor
foreach (var root in ctx.GetAvatarRoots())
{
if (ctx.ActiveInHierarchy(root) is false)
{
continue;
}
if (ctx.GetComponentsInChildren<ModularAvatarScaleAdjuster>(root, true).Length == 0)
{
continue;