mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
7c54de4ab3
commit
dbf48758d9
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue