[Bf-extensions-cvs] [074bb39] master: Fix: validating Extrusions after applying textures. Validation may remove vertices/faces from a mesh, so assumptions about mesh size might be off after validation.

Seva Alekseyev noreply at git.blender.org
Fri Oct 23 18:58:07 CEST 2015


Commit: 074bb39f3f6c29625ac834d4851905c095ad218c
Author: Seva Alekseyev
Date:   Fri Oct 23 12:57:56 2015 -0400
Branches: master
https://developer.blender.org/rBA074bb39f3f6c29625ac834d4851905c095ad218c

Fix: validating Extrusions after applying textures. Validation may remove vertices/faces from a mesh, so assumptions about mesh size might be off after validation.

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

M	io_scene_x3d/import_x3d.py

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

diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index 82a27d3..bf8e52b 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -2253,7 +2253,6 @@ def importMesh_Extrusion(geom, ancestry, bpyima):
 
     bpymesh = bpy.data.meshes.new(name="Extrusion")
     bpymesh.from_pydata(verts, [], faces)
-    bpymesh.validate(True)
 
     # Polygons and loops here, not tessfaces. The way we deal with
     # textures in triangular meshes doesn't apply.
@@ -2310,6 +2309,7 @@ def importMesh_Extrusion(geom, ancestry, bpyima):
                       in scaledLoopVertex(mloops[lb + i].vertex_index % nc)]
         importMesh_ApplyTextureToLoops(bpymesh, bpyima, loops)
 
+    bpymesh.validate(True)
     bpymesh.update()
     return bpymesh



More information about the Bf-extensions-cvs mailing list