From: Mikko Rasa Date: Sat, 27 Jul 2024 13:18:15 +0000 (+0300) Subject: Skip empty material slots on a Mesh X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=c3a7f59ec1bcf33cf2c532d035e2c689c852150b;p=libs%2Fgl.git Skip empty material slots on a Mesh They may occur if materials are intended to be supplied by the object instead of the mesh. --- diff --git a/blender/io_mspgl/mesh.py b/blender/io_mspgl/mesh.py index 8ad77bda..c0d9c11b 100644 --- a/blender/io_mspgl/mesh.py +++ b/blender/io_mspgl/mesh.py @@ -194,6 +194,8 @@ class Mesh: has_normal_maps = False splat_material = None for m in self.materials: + if not m: + continue mat = Material(m) for p in itertools.chain(mat.properties, *(s.properties for s in mat.sub_materials)): if p.tex_keyword=="normal_map" and p.texture: