mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 02:35:06 +08:00
efa263b551
* feat: add version defines for VRCSDK * chore: early return if VRCSDK project but not VRChat avatar
23 lines
637 B
C#
23 lines
637 B
C#
#if MA_VRCSDK3_AVATARS
|
|
|
|
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)
|
|
{
|
|
if (!context.AvatarDescriptor) return;
|
|
|
|
var expParams = context.AvatarDescriptor.expressionParameters;
|
|
if (expParams != null && context.IsTemporaryAsset(expParams))
|
|
{
|
|
expParams.parameters = expParams.parameters.Where(p => !string.IsNullOrEmpty(p.name)).ToArray();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif |