From b621123e1b2118087223267598d887e8484aba40 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 31 Jul 2012 22:34:04 +0300 Subject: [PATCH] Fix exporting compound objects with no materials --- blender/io_mesh_mspgl/mesh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blender/io_mesh_mspgl/mesh.py b/blender/io_mesh_mspgl/mesh.py index ce4a7fd9..99fb2ee4 100644 --- a/blender/io_mesh_mspgl/mesh.py +++ b/blender/io_mesh_mspgl/mesh.py @@ -67,7 +67,6 @@ class Face: self.vertices = mf.vertices[:] self.uvs = [] self.flag = False - self.material = None def __getattr__(self, attr): return getattr(self._mface, attr) @@ -178,7 +177,8 @@ class Mesh: offset = len(self.faces) for f in other.faces: f.index += offset - f.material = material_map[f.material_index] + if other.materials: + f.material_index = material_map[f.material_index] self.faces.append(f) for e in other.edges.values(): -- 2.45.2