Skip to content

Commit

Permalink
Fix T52833: OBJ triangulate doesn't match viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
ideasman42 committed Sep 25, 2017
1 parent 1d81ecb commit ce76856
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions io_scene_obj/export_obj.py
Expand Up @@ -396,15 +396,16 @@ def findVertexGroupName(face, vWeightMap):
if me is None:
continue

# _must_ do this before applying transformation, else tessellation may differ
if EXPORT_TRI:
# _must_ do this first since it re-allocs arrays
mesh_triangulate(me)

me.transform(EXPORT_GLOBAL_MATRIX * ob_mat)
# If negative scaling, we have to invert the normals...
if ob_mat.determinant() < 0.0:
me.flip_normals()

if EXPORT_TRI:
# _must_ do this first since it re-allocs arrays
mesh_triangulate(me)

if EXPORT_UV:
faceuv = len(me.uv_textures) > 0
if faceuv:
Expand Down

0 comments on commit ce76856

Please sign in to comment.