diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-20 14:13:04 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-20 14:13:04 +0400 |
commit | 3ef73cf78c85678412b0d096340d4c0e6226ce2e (patch) | |
tree | 2c692bea748d57b0dbf093503f582beede5fa076 /io_mesh_stl | |
parent | f43ff0f90d7fdac977b62acc1ac81d01c4853ce3 (diff) |
Fix #23394: STL export script did not check if objects could be
converted to meshes, making export fail with empties and armatures.
Diffstat (limited to 'io_mesh_stl')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 3 |
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 |