From c78c7262ff7aa0abf4d243c84887158b730581da Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 7 May 2014 00:13:35 +0300 Subject: [PATCH] Fix exporting meshes without UV coordinates --- blender/io_mspgl/export_mesh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blender/io_mspgl/export_mesh.py b/blender/io_mspgl/export_mesh.py index cc8ee6ff..f429ff31 100644 --- a/blender/io_mspgl/export_mesh.py +++ b/blender/io_mspgl/export_mesh.py @@ -312,7 +312,7 @@ class MeshExporter: fmt.append("VERTEX3") out_file.begin("vertices", *fmt) normal = None - uvs = [None]*(max(u[0] for u in texunits)+1) + uvs = {} tan = None bino = None group = None @@ -321,7 +321,7 @@ class MeshExporter: out_file.write("normal3", *v.normal) normal = v.normal for i, u in texunits: - if v.uvs[i]!=uvs[i]: + if v.uvs[i]!=uvs.get(i): if u.unit==0 or force_unit0: out_file.write("texcoord2", *v.uvs[i]) else: -- 2.43.0