diff options
Diffstat (limited to 'io_mesh_stl/blender_utils.py')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py index a13277ad..6c22cf57 100644 --- a/io_mesh_stl/blender_utils.py +++ b/io_mesh_stl/blender_utils.py @@ -21,11 +21,14 @@ import bpy -def create_and_link_mesh(name, faces, points): +def create_and_link_mesh(name, faces, points, global_matrix): """ Create a blender mesh and object called name from a list of *points* and *faces* and link it in the current scene. """ + 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) |