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

This commit is contained in:
Seva Alekseyev (NIH) 2015-10-23 12:57:56 -04:00
parent 4b870b9fc3
commit 074bb39f3f
1 changed files with 1 additions and 1 deletions

View File

@ -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