mirror of
https://github.com/blender/blender-addons.git
synced 2025-08-20 13:22:58 +00:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user