-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opti: prune garbage sample expression parameters found in VRChat's te…
…mplate asset
- Loading branch information
1 parent
aa69856
commit 787b515
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
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(); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters