ModelImporter : how do I set the avatar definition programatically on import

Hi,

I use the PostProcessor a lot, so I would like to automate animations importation. Every time I import an animation into Unity, I have to manually set the Rig options and avatar for an animation. I would like to automate that. Unfortunately, the ModelImporter class doesn’t give me access to the Rig settings. I can only assign modelImporter.animationType . But I also need to set the Avatar definition programatically (copy from avatar and set the path to the avatar asset). Is it possible right now? Thanks

Does anyone have a similar issue?

ModelImporter Model = assetImporter as ModelImporter;

foreach ( ModelImporterClipAnimation M in Model.clipAnimations )
{
M.maskSource = YourAvatar;
}

enjoy