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:
Diffstat (limited to 'io_mesh_stl/blender_utils.py')
-rw-r--r--io_mesh_stl/blender_utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py
index 5b3bdd77..0177d0d6 100644
--- a/io_mesh_stl/blender_utils.py
+++ b/io_mesh_stl/blender_utils.py
@@ -31,6 +31,9 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
Split the quad into two triangles
'''
+ if ob.type not in ('MESH', 'CURVE', 'SURFACE', 'META'):
+ return ()
+
# get the modifiers
mesh = ob.create_mesh(bpy.context.scene,
True, "PREVIEW") if apply_modifier else ob.data