Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-05 12:27:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-05 12:27:07 +0400
commit1113b9f1378fddb9cfee2f25447fc97905ef3cc4 (patch)
tree54c25b205af8f36e978884dcb40a122b686e4c3b /io_mesh_stl/blender_utils.py
parent9a3d79800361f1a05f3bb6b5fe4b2e9e031a15aa (diff)
fix [#26895] STL import in Win 7 64bit
Diffstat (limited to 'io_mesh_stl/blender_utils.py')
-rw-r--r--io_mesh_stl/blender_utils.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py
index 1058064b..8d19e30c 100644
--- a/io_mesh_stl/blender_utils.py
+++ b/io_mesh_stl/blender_utils.py
@@ -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):
'''