[Bf-extensions-cvs] [487778f6] blender2.8: Fix T57660: Export of STL format causes an exception.
Bastien Montagne
noreply at git.blender.org
Tue Nov 6 21:59:52 CET 2018
Commit: 487778f6774950a6fa6074ebefd137c275514940
Author: Bastien Montagne
Date: Tue Nov 6 21:56:54 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBA487778f6774950a6fa6074ebefd137c275514940
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).
===================================================================
M io_mesh_stl/__init__.py
M io_mesh_stl/blender_utils.py
===================================================================
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py
index 6859627c..b1807d2a 100644
--- a/io_mesh_stl/__init__.py
+++ b/io_mesh_stl/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "STL format",
"author": "Guillaume Bouchard (Guillaum)",
- "version": (1, 1, 2),
+ "version": (1, 1, 3),
"blender": (2, 80, 0),
"location": "File > Import-Export > Stl",
"description": "Import-Export STL files",
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)
More information about the Bf-extensions-cvs
mailing list