From 478dd2d960cb91cf682aea37c6e4eb523a81b578 Mon Sep 17 00:00:00 2001 From: alteredq Date: Mon, 21 Mar 2011 17:53:35 +0100 Subject: [PATCH] Fixed bug in OBJ converter. This one was messing up face types for faces with more than 4 vertices (which are truncated to quads). --- utils/exporters/convert_obj_three.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/exporters/convert_obj_three.py b/utils/exporters/convert_obj_three.py index 7ab36cf2..b4f34473 100644 --- a/utils/exporters/convert_obj_three.py +++ b/utils/exporters/convert_obj_three.py @@ -580,10 +580,10 @@ def generate_face(f): hasMaterial = True # for the moment OBJs without materials get default material hasFaceUvs = False # not supported in OBJ - hasFaceVertexUvs = ( len(f['uv']) == nVertices ) + hasFaceVertexUvs = ( len(f['uv']) >= nVertices ) hasFaceNormals = False # don't export any face normals (as they are computed in engine) - hasFaceVertexNormals = ( len(f["normal"]) == nVertices and SHADING == "smooth" ) + hasFaceVertexNormals = ( len(f["normal"]) >= nVertices and SHADING == "smooth" ) hasFaceColors = False # not supported in OBJ hasFaceVertexColors = False # not supported in OBJ