diff options
author | Mikhail Rachinskiy <mikhail.rachinskiy@gmail.com> | 2019-10-15 13:09:44 +0300 |
---|---|---|
committer | Mikhail Rachinskiy <mikhail.rachinskiy@gmail.com> | 2019-10-15 13:09:44 +0300 |
commit | 0260327cff34787394cf9aaa3e8cc5bd35cb0a25 (patch) | |
tree | 9770b287c1f5b90afeeaecfcc0a731a9eecd8b32 /io_mesh_stl/blender_utils.py | |
parent | 376fa84e78be926b2ee7ce2b86c25d737ed6ab21 (diff) |
STL: cleanup and PEP8
Unused imports, move rare imports inside functions, correct description.
Diffstat (limited to 'io_mesh_stl/blender_utils.py')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py index d1b14cf6..8589e196 100644 --- a/io_mesh_stl/blender_utils.py +++ b/io_mesh_stl/blender_utils.py @@ -18,10 +18,6 @@ # <pep8 compliant> -import bpy -import array -from itertools import chain - def create_and_link_mesh(name, faces, face_nors, points, global_matrix): """ @@ -29,6 +25,10 @@ def create_and_link_mesh(name, faces, face_nors, points, global_matrix): *points* and *faces* and link it in the current scene. """ + import array + from itertools import chain + import bpy + mesh = bpy.data.meshes.new(name) mesh.from_pydata(points, [], faces) @@ -77,6 +77,8 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False): Split the quad into two triangles """ + import bpy + # get the editmode data ob.update_from_editmode() |