what to return from OnAssignMaterialModel?

Hi,

I'm implementing my own ModelPostprocessor.OnAssignMaterialModel and I want to override materials just for some meshes. For others I would return material which was passed in as a parameter, but that doesn't work if material is Default-Diffuse, I get errors:

OnAssignMaterial must return a persistent material (AssetDatabase.CreateAsset)

Is there a proper solution for this?

Figured it out: if you don't want to override material you have to return null (it says so in the documentation...).