From d7d791f5a3e684559f34be7730477ab5127f9ed6 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 17 Apr 2015 23:44:06 +0300 Subject: [PATCH] Raise an exception if attempting to export a mesh with ngons Otherwise there will be a much more confusing errors down the line --- blender/io_mspgl/mesh.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.43.0