Mecanim- change Layer mask at runningTime

Hi

I wanted to ask you guys if there is anyway to change the AvatarMask applied to a layer at running time. I can do it from the Editor manually but I cant find anywhere in the script reference how to do it by code.

thx in Advance

Zbrusher

I have the same problem, one solution is to have two identical layers each with the different masks, and then switch between them, but there must be a better solution.