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:
authorMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-12-04 07:46:23 +0300
committerMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-12-04 07:46:23 +0300
commit2f425cc128b8b709cc1ebf2c96ad372778f4aeda (patch)
treeee7f25aab16c6f8e34e6b54c1db49bbea0c30adb /io_mesh_stl
parent5f1ad50707e7aa640ffcef93c90c9997c99d5c50 (diff)
STL: fix T72145 crash exporting object without data
Diffstat (limited to 'io_mesh_stl')
-rw-r--r--io_mesh_stl/blender_utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py
index 8589e196..97621d11 100644
--- a/io_mesh_stl/blender_utils.py
+++ b/io_mesh_stl/blender_utils.py
@@ -80,7 +80,8 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
import bpy
# get the editmode data
- ob.update_from_editmode()
+ if ob.mode == "EDIT":
+ ob.update_from_editmode()
# get the modifiers
if use_mesh_modifiers:
@@ -94,6 +95,7 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
mesh = mesh_owner.to_mesh()
except RuntimeError:
return
+
if mesh is None:
return