mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
17 lines
553 B
C#
17 lines
553 B
C#
using System.Linq;
|
|
using nadena.dev.ndmf;
|
|
|
|
namespace nadena.dev.modular_avatar.core.editor
|
|
{
|
|
internal class PruneParametersPass : Pass<PruneParametersPass>
|
|
{
|
|
protected override void Execute(ndmf.BuildContext context)
|
|
{
|
|
var expParams = context.AvatarDescriptor.expressionParameters;
|
|
if (expParams != null && context.IsTemporaryAsset(expParams))
|
|
{
|
|
expParams.parameters = expParams.parameters.Where(p => !string.IsNullOrEmpty(p.name)).ToArray();
|
|
}
|
|
}
|
|
}
|
|
} |