fix [#26895] STL import in Win 7 64bit

This commit is contained in:
Campbell Barton
2011-05-05 08:27:07 +00:00
parent 9a3d798003
commit 1113b9f137
2 changed files with 14 additions and 5 deletions

View File

@ -30,13 +30,16 @@ def create_and_link_mesh(name, faces, points):
mesh = bpy.data.meshes.new(name)
mesh.from_pydata(points, [], faces)
ob = bpy.data.objects.new(name, mesh)
bpy.context.scene.objects.link(ob)
# update mesh to allow proper display
mesh.validate()
mesh.update()
scene = bpy.context.scene
obj = bpy.data.objects.new(name, mesh)
scene.objects.link(obj)
obj.select = True
def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
'''