improved last commit:
materials do not get exported on meshes which have export_mesh for given layer deactived