[Bf-extensions-cvs] [08eb518] master: Fix T48323: VRML2 tessellation fails in some cases

Campbell Barton noreply at git.blender.org
Tue May 3 08:23:50 CEST 2016


Commit: 08eb51821ce3e4f9cbe9b69428c6e2aaff9ce164
Author: Campbell Barton
Date:   Tue May 3 16:27:07 2016 +1000
Branches: master
https://developer.blender.org/rBA08eb51821ce3e4f9cbe9b69428c6e2aaff9ce164

Fix T48323: VRML2 tessellation fails in some cases

Apply tessellation before transformation, patch from @anpaza.

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

M	io_scene_vrml2/export_vrml2.py

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

diff --git a/io_scene_vrml2/export_vrml2.py b/io_scene_vrml2/export_vrml2.py
index 0a664e2..06f79fc 100644
--- a/io_scene_vrml2/export_vrml2.py
+++ b/io_scene_vrml2/export_vrml2.py
@@ -178,8 +178,9 @@ def save_object(fw, global_matrix,
             bm = bmesh.new()
             bm.from_mesh(me)
 
-    bm.transform(global_matrix * obj.matrix_world)
+    # triangulate first so tessellation matches the view-port.
     bmesh.ops.triangulate(bm, faces=bm.faces)
+    bm.transform(global_matrix * obj.matrix_world)
 
     # default empty
     material_colors = []



More information about the Bf-extensions-cvs mailing list