diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-06 23:56:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-06 23:56:54 +0300 |
commit | 487778f6774950a6fa6074ebefd137c275514940 (patch) | |
tree | de9e9f1c1197ccb80867d057f0ce0b6f7c14e0fb /io_mesh_stl/blender_utils.py | |
parent | f6a54aa234d6d59ceac15f2944c2ddc5f29aac0a (diff) |
Fix T57660: Export of STL format causes an exception.
Raising StopIteration was never a good idea to abort a generator
function, and since 3.6 it's converted to a regular RuntimeError
exception!
Proper way to do that is just to use return statement (as long as there
is a yield statement somewhere in the function code, it is a generator,
and return statement has proper special handling in that case).
Diffstat (limited to 'io_mesh_stl/blender_utils.py')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py index ee5cb098..1dfa76d8 100644 --- a/io_mesh_stl/blender_utils.py +++ b/io_mesh_stl/blender_utils.py @@ -84,7 +84,7 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False): try: mesh = ob.to_mesh(bpy.context.depsgraph, use_mesh_modifiers) except RuntimeError: - raise StopIteration + return mat = global_matrix @ ob.matrix_world mesh.transform(mat) |