[Bf-extensions-cvs] [1a5c86c9] master: Fix T62353: Cannot select object when calling Import Images as Planes from menu while in Draw Mode
Philipp Oeser
noreply at git.blender.org
Mon Mar 18 20:49:27 CET 2019
Commit: 1a5c86c9da51d957632ab8b7f4ad624f8aa86a1b
Author: Philipp Oeser
Date: Mon Mar 18 20:45:07 2019 +0100
Branches: master
https://developer.blender.org/rBA1a5c86c9da51d957632ab8b7f4ad624f8aa86a1b
Fix T62353: Cannot select object when calling Import Images as Planes
from menu while in Draw Mode
===================================================================
M io_import_images_as_planes.py
===================================================================
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index fdff3603..8cdfac07 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -871,7 +871,7 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
# this won't work in edit mode
editmode = context.preferences.edit.use_enter_edit_mode
context.preferences.edit.use_enter_edit_mode = False
- if context.active_object and context.active_object.mode == 'EDIT':
+ if context.active_object and context.active_object.mode != 'OBJECT':
bpy.ops.object.mode_set(mode='OBJECT')
self.import_images(context)
More information about the Bf-extensions-cvs
mailing list