diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-25 03:52:13 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-01-01 18:21:36 +0300 |
commit | bfae39e9c191d4f94cd36726ff2d6c1029128463 (patch) | |
tree | b1919e10ba513ab9063a8d1c7aa0b0bff46e7e37 | |
parent | e89f46fe7727f163039e979b37c7726a76e56bd7 (diff) |
Fix T52833: OBJ triangulate doesn't match viewport
-rw-r--r-- | io_scene_obj/export_obj.py | 9 |
1 files changed, 5 insertions, 4 deletions
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: |