From a2f135e7d725d3a9232dfef1ee19ecae2efb9e31 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 11 Feb 2011 12:09:15 +0000 Subject: use mesh.validate() to ensure all meshes of imported data is ok and wont crash blender. --- io_scene_x3d/import_x3d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'io_scene_x3d') diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index b4b9fe09..e9393234 100644 --- a/io_scene_x3d/import_x3d.py +++ b/io_scene_x3d/import_x3d.py @@ -1699,7 +1699,7 @@ def importMesh_IndexedFaceSet(geom, bpyima, ancestry): #for f in faces: # bpymesh.faces.extend(faces, smooth=True) - # bpymesh.calcNormals() + bpymesh.validate() bpymesh.update() if len(bpymesh.faces) != len(faces): @@ -1916,7 +1916,7 @@ def importMesh_PointSet(geom, ancestry): bpymesh.vertices.add(len(points)) bpymesh.vertices.foreach_set("co", [a for v in points for a in v]) - # bpymesh.calcNormals() # will just be dummy normals + # No need to validate bpymesh.update() return bpymesh -- cgit v1.2.3