[Bf-extensions-cvs] [bfae39e9] blender-v2.79a-release: Fix T52833: OBJ triangulate doesn't match viewport

Campbell Barton noreply at git.blender.org
Mon Jan 1 16:36:26 CET 2018


Commit: bfae39e9c191d4f94cd36726ff2d6c1029128463
Author: Campbell Barton
Date:   Mon Sep 25 10:52:13 2017 +1000
Branches: blender-v2.79a-release
https://developer.blender.org/rBAbfae39e9c191d4f94cd36726ff2d6c1029128463

Fix T52833: OBJ triangulate doesn't match viewport

===================================================================

M	io_scene_obj/export_obj.py

===================================================================

diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index e28d607d..15b80ab3 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -396,15 +396,16 @@ def write_file(filepath, objects, scene,
                         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:



More information about the Bf-extensions-cvs mailing list