Fix T42000: STL export scale incorrect.

Not a bug, in fact, more like a feature request.
Added an option to take into account scene's scale on both export and import time.

Also added scaling/axis conversion to importer.
This commit is contained in:
Bastien Montagne
2014-10-07 16:15:53 +02:00
parent 54eaab823a
commit e6b174a3b6
2 changed files with 77 additions and 14 deletions

View File

@ -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)