diff options
author | Ines Almeida <britalmeida@gmail.com> | 2015-04-12 13:38:18 +0300 |
---|---|---|
committer | Ines Almeida <britalmeida@gmail.com> | 2015-04-12 13:38:18 +0300 |
commit | c950b8f2892b985c4fa3e70cea572adda9608491 (patch) | |
tree | 9d1acd2a5aa200e0013019f1d39cf61e07e544ad /release/scripts | |
parent | 542a0c41d2c0a77de2d139bac8bc95c029ebf11c (diff) |
making add>lamp its own menu so it can be extended by addons
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index a23ad4209d5..32b8af140f4 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1043,6 +1043,17 @@ class INFO_MT_armature_add(Menu): layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA') +class INFO_MT_lamp_add(Menu): + bl_idname = "INFO_MT_lamp_add" + bl_label = "Lamp" + + def draw(self, context): + layout = self.layout + + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator_enum("object.lamp_add", "type") + + class INFO_MT_add(Menu): bl_label = "Add" @@ -1075,7 +1086,7 @@ class INFO_MT_add(Menu): layout.separator() layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA') - layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP') + layout.menu("INFO_MT_lamp_add", icon='OUTLINER_OB_LAMP') layout.separator() layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY') |