Fix T73681: Python exception adding Empty objects via object_data_add
with "Enter Edit Mode" enabled It is valild to add Empties this way, but we cannot enter editmode on those.
This commit is contained in:
@@ -161,7 +161,7 @@ def object_data_add(context, obdata, operator=None, name=None):
|
||||
bpy.ops.object.mode_set(mode='EDIT')
|
||||
else:
|
||||
layer.objects.active = obj_new
|
||||
if context.preferences.edit.use_enter_edit_mode:
|
||||
if obdata and context.preferences.edit.use_enter_edit_mode:
|
||||
bpy.ops.object.mode_set(mode='EDIT')
|
||||
|
||||
return obj_new
|
||||
|
Reference in New Issue
Block a user