This may happen if materials are defined on the object rather than on
the mesh.
progress.push_task_slice("LOD {}".format(lod_index), i, len(lods))
material_map = None
- mapped_count = sum(m.material_map for m in l.data.materials)
+ mapped_count = sum(m.material_map for m in l.data.materials if m)
if mapped_count:
material_map_tech = l.data.materials[0].technique
tech_mismatch = any(m.technique!=material_map_tech for m in l.data.materials)