mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-11 23:19:00 +08:00
chore: ignore inactive root in GetTargetGroups
This commit is contained in:
parent
f799af4c03
commit
817390a950
@ -18,7 +18,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
public ImmutableList<RenderGroup> GetTargetGroups(ComputeContext context)
|
public ImmutableList<RenderGroup> GetTargetGroups(ComputeContext context)
|
||||||
{
|
{
|
||||||
var roots = context.GetAvatarRoots();
|
var roots = context.GetAvatarRoots()
|
||||||
|
.Where(r => context.ActiveInHierarchy(r) is true);
|
||||||
var removers = roots
|
var removers = roots
|
||||||
.SelectMany(r => context.GetComponentsInChildren<ModularAvatarRemoveVertexColor>(r, true))
|
.SelectMany(r => context.GetComponentsInChildren<ModularAvatarRemoveVertexColor>(r, true))
|
||||||
.Select(rvc => (ToPathString(context, rvc.transform),
|
.Select(rvc => (ToPathString(context, rvc.transform),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region
|
#region
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
@ -63,6 +63,11 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
foreach (var root in ctx.GetAvatarRoots())
|
foreach (var root in ctx.GetAvatarRoots())
|
||||||
{
|
{
|
||||||
|
if (ctx.ActiveInHierarchy(root) is false)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx.GetComponentsInChildren<ModularAvatarScaleAdjuster>(root, true).Length == 0)
|
if (ctx.GetComponentsInChildren<ModularAvatarScaleAdjuster>(root, true).Length == 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user