2024-02-12 13:59:23 +08:00
|
|
|
|
#if MA_VRCSDK3_AVATARS
|
|
|
|
|
|
|
|
|
|
using System.Linq;
|
2023-12-26 15:10:45 +08:00
|
|
|
|
using nadena.dev.ndmf;
|
|
|
|
|
|
|
|
|
|
namespace nadena.dev.modular_avatar.core.editor
|
|
|
|
|
{
|
|
|
|
|
internal class PruneParametersPass : Pass<PruneParametersPass>
|
|
|
|
|
{
|
|
|
|
|
protected override void Execute(ndmf.BuildContext context)
|
|
|
|
|
{
|
2024-10-28 01:06:35 +08:00
|
|
|
|
if (!context.AvatarDescriptor) return;
|
|
|
|
|
|
2023-12-26 15:10:45 +08:00
|
|
|
|
var expParams = context.AvatarDescriptor.expressionParameters;
|
|
|
|
|
if (expParams != null && context.IsTemporaryAsset(expParams))
|
|
|
|
|
{
|
|
|
|
|
expParams.parameters = expParams.parameters.Where(p => !string.IsNullOrEmpty(p.name)).ToArray();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-02-12 13:59:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|