Skip to content
Snippets Groups Projects
Commit 755af06f authored by Bastien Montagne's avatar Bastien Montagne
Browse files

STL import: Better to transform whole mesh at once, rather than each point in py.

Thanks Campbell for the headup.
parent e6b174a3
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment