diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-07 18:25:55 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-07 18:25:55 +0400 |
commit | 755af06fd32d5737b0b6f3bb2a70dd78f510cba9 (patch) | |
tree | 358d6dd55398f569196d88a638c481a2b67c351f /io_mesh_stl | |
parent | e6b174a3b618907ed189c1fe95df7c9b19fc62ca (diff) |
STL import: Better to transform whole mesh at once, rather than each point in py.
Thanks Campbell for the headup.
Diffstat (limited to 'io_mesh_stl')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py index 6c22cf57..c4e73747 100644 --- a/io_mesh_stl/blender_utils.py +++ b/io_mesh_stl/blender_utils.py @@ -28,10 +28,9 @@ def create_and_link_mesh(name, faces, points, global_matrix): """ from mathutils import Vector - points = tuple(global_matrix * Vector(p) for p in points) - mesh = bpy.data.meshes.new(name) mesh.from_pydata(points, [], faces) + mesh.transform(global_matrix) # update mesh to allow proper display mesh.validate() |