Apply Preset to ModelImporter in AssetPostProcessor

We have implemented an AssetPostprocessor class to apply a editor preset to fbx modelImporter. Everything worked fine in version 2018.3.. When we switched to 2018.4., the source avatar is not applied properly while importing. The source avatar has been correctly set and in the editor the source avatar is set to the expected pre-configured avatar, however, with an “Update” button besides it. And the imported animation clips in the fbx is not right. After clicking the “Update” button and applying the setting, the animation clips are then properly imported. Is there any way to do the same thing through script as clicking the “update” button and applying it?

I found the solution to my problem. The skeleton fbx that create the humanoid avatar was exported with a scale factor of “0.01” unit as “Meters” from maya. However, the animation fbxes that need to apply the source avatar was exported with scale factor “1” and unit as “Centimeters”. After changing the animation fbx export setting the same as skeleton fbx in Maya, the Unity import process works fine.