diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2020-01-13 15:26:35 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2020-01-13 15:26:35 +0300 |
commit | 2ffb35765e88fa190ad2c8ca7ff01ebc74ed5837 (patch) | |
tree | a357d5ad0a35241e6a8f703d745f8344a0154921 /io_mesh_stl | |
parent | ea1aedbc57d46cedfae09be286b3fd64fa54c2c7 (diff) | |
parent | 2d192b40050e63b198c3287d9a7ada5f3352c589 (diff) |
Merge remote-tracking branch 'origin/blender-v2.81-release' into blender-v2.82-release
This was neglected in the 2.81 development cycle, so master didn't
include some commits when we created this branch.
Diffstat (limited to 'io_mesh_stl')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 4 |
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 |