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:
authorCampbell Barton <ideasman42@gmail.com>2011-06-22 17:11:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-22 17:11:08 +0400
commit181205be601a7192ba4d936386c1a08e61e4d609 (patch)
treec8acbe8f84530f8d5dc12b3ceef2739e65ff2cdb /add_mesh_BoltFactory/createMesh.py
parent72e2f73b37ab33a09345dec21035c46bd8c7f898 (diff)
fix for errors adding landscape and bolt objects in editmode
Diffstat (limited to 'add_mesh_BoltFactory/createMesh.py')
-rw-r--r--add_mesh_BoltFactory/createMesh.py5
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