Fix T62353: Cannot select object when calling Import Images as Planes

from menu while in Draw Mode
This commit is contained in:
Philipp Oeser 2019-03-18 20:45:07 +01:00
parent 742fa2002e
commit 1a5c86c9da
Notes: blender-bot 2023-02-14 03:26:10 +01:00
Referenced by issue blender/blender#62353, Cannot select object when calling Import Images as Planes from menu while in Draw Mode
1 changed files with 1 additions and 1 deletions

View File

@ -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)