diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-09-29 15:48:03 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-09-29 15:48:03 +0400 |
commit | 2597377b5cc1c7b16e32a14376a4a07089b6e0e4 (patch) | |
tree | c79d4f17a52aeb519d61f314b787f0b5a28064a3 /release/scripts/ui/space_info.py | |
parent | 6e41dc857171590b0a975fe481116118fcfc1815 (diff) |
Fix #24054: Shift+A add menu in Surface editmode shows curve items.
Diffstat (limited to 'release/scripts/ui/space_info.py')
-rw-r--r-- | release/scripts/ui/space_info.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index a6fe679e716..a98ea4a3219 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -189,6 +189,21 @@ class INFO_MT_curve_add(bpy.types.Menu): layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text="Nurbs Circle") layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path") +class INFO_MT_edit_curve_add(bpy.types.Menu): + bl_idname = "INFO_MT_edit_curve_add" + bl_label = "Add" + + def draw(self, context): + is_surf = context.active_object.type == 'SURFACE' + + layout = self.layout + layout.operator_context = 'INVOKE_REGION_WIN' + + if is_surf: + INFO_MT_surface_add.draw(self, context) + else: + INFO_MT_curve_add.draw(self, context) + class INFO_MT_surface_add(bpy.types.Menu): bl_idname = "INFO_MT_surface_add" |