Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-15 13:09:44 +0300
committerMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-15 13:09:44 +0300
commit0260327cff34787394cf9aaa3e8cc5bd35cb0a25 (patch)
tree9770b287c1f5b90afeeaecfcc0a731a9eecd8b32 /io_mesh_stl/blender_utils.py
parent376fa84e78be926b2ee7ce2b86c25d737ed6ab21 (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.py10
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()