From 755af06fd32d5737b0b6f3bb2a70dd78f510cba9 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 7 Oct 2014 16:25:55 +0200 Subject: STL import: Better to transform whole mesh at once, rather than each point in py. Thanks Campbell for the headup. --- io_mesh_stl/blender_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'io_mesh_stl') 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() -- cgit v1.2.3