diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-22 17:11:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-22 17:11:08 +0400 |
commit | 181205be601a7192ba4d936386c1a08e61e4d609 (patch) | |
tree | c8acbe8f84530f8d5dc12b3ceef2739e65ff2cdb /add_mesh_BoltFactory | |
parent | 72e2f73b37ab33a09345dec21035c46bd8c7f898 (diff) |
fix for errors adding landscape and bolt objects in editmode
Diffstat (limited to 'add_mesh_BoltFactory')
-rw-r--r-- | add_mesh_BoltFactory/createMesh.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/add_mesh_BoltFactory/createMesh.py b/add_mesh_BoltFactory/createMesh.py index 4cec092d..1ff82229 100644 --- a/add_mesh_BoltFactory/createMesh.py +++ b/add_mesh_BoltFactory/createMesh.py @@ -2094,8 +2094,9 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Update mesh geometry after adding stuff. mesh.update() - # Deselect all objects. - bpy.ops.object.select_all(action='DESELECT') + # Deselect all objects when in object mode + if bpy.ops.object.select_all.poll(): + bpy.ops.object.select_all(action='DESELECT') if edit: # Replace geometry of existing object |