diff options
Diffstat (limited to 'io_mesh_stl/blender_utils.py')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py index 0177d0d6..76dc86b9 100644 --- a/io_mesh_stl/blender_utils.py +++ b/io_mesh_stl/blender_utils.py @@ -31,12 +31,12 @@ 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 + try: + mesh = ob.create_mesh(bpy.context.scene, + apply_modifier, "PREVIEW") + except SystemError: + return () def iter_face_index(): ''' |