From: Mikko Rasa Date: Fri, 17 Apr 2015 20:44:06 +0000 (+0300) Subject: Raise an exception if attempting to export a mesh with ngons X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=d7d791f5a3e684559f34be7730477ab5127f9ed6 Raise an exception if attempting to export a mesh with ngons Otherwise there will be a much more confusing errors down the line --- diff --git a/blender/io_mspgl/mesh.py b/blender/io_mspgl/mesh.py index 3ad3cecc..04b2b51f 100644 --- a/blender/io_mspgl/mesh.py +++ b/blender/io_mspgl/mesh.py @@ -148,6 +148,8 @@ class Mesh: self.assign_texture_units() for f in self.faces: + if len(f.vertices)>4: + raise ValueError("Ngons are not supported") f.vertices = [self.vertices[i] for i in f.vertices] for v in f.vertices: v.faces.append(f)