Quick fix for [#32764] Some new object types are added at the origin instead of the 3D cursor

Own fault (r50994). Those "add object" ops really need a cleanup to make them more consistent! Will try to see this tomorrow.
This commit is contained in:
Bastien Montagne
2012-10-04 20:59:47 +00:00
parent 41202e25e7
commit e5ec9f9f95

View File

@@ -289,8 +289,11 @@ class INFO_MT_add(Menu):
layout.separator()
layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE')
# XXX Quick fix for [#32764].
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
layout.operator_context = 'EXEC_REGION_WIN'
layout.separator()
layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')