From 074bb39f3f6c29625ac834d4851905c095ad218c Mon Sep 17 00:00:00 2001 From: Seva Alekseyev Date: Fri, 23 Oct 2015 12:57:56 -0400 Subject: Fix: validating Extrusions after applying textures. Validation may remove vertices/faces from a mesh, so assumptions about mesh size might be off after validation. --- io_scene_x3d/import_x3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io_scene_x3d') diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index 82a27d33..bf8e52b1 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 -- cgit v1.2.3