diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_nla.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_nla.py | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index b6c2d078960..1d4b7c6828f 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -19,9 +19,10 @@ # <pep8 compliant> import bpy +from bpy.types import Header, Menu -class NLA_HT_header(bpy.types.Header): +class NLA_HT_header(Header): bl_space_type = 'NLA_EDITOR' def draw(self, context): @@ -35,20 +36,18 @@ class NLA_HT_header(bpy.types.Header): row.template_header() if context.area.show_menus: - sub = row.row(align=True) - - sub.menu("NLA_MT_view") - sub.menu("NLA_MT_select") - sub.menu("NLA_MT_marker") - sub.menu("NLA_MT_edit") - sub.menu("NLA_MT_add") + row.menu("NLA_MT_view") + row.menu("NLA_MT_select") + row.menu("NLA_MT_marker") + row.menu("NLA_MT_edit") + row.menu("NLA_MT_add") dopesheet_filter(layout, context) layout.prop(st, "auto_snap", text="") -class NLA_MT_view(bpy.types.Menu): +class NLA_MT_view(Menu): bl_label = "View" def draw(self, context): @@ -56,8 +55,6 @@ class NLA_MT_view(bpy.types.Menu): st = context.space_data - layout.column() - layout.operator("nla.properties", icon='MENU_PANEL') layout.separator() @@ -82,13 +79,12 @@ class NLA_MT_view(bpy.types.Menu): layout.operator("screen.screen_full_area") -class NLA_MT_select(bpy.types.Menu): +class NLA_MT_select(Menu): bl_label = "Select" def draw(self, context): layout = self.layout - layout.column() # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None layout.operator("nla.select_all_toggle") layout.operator("nla.select_all_toggle", text="Invert Selection").invert = True @@ -102,7 +98,7 @@ class NLA_MT_select(bpy.types.Menu): layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT' -class NLA_MT_marker(bpy.types.Menu): +class NLA_MT_marker(Menu): bl_label = "Marker" def draw(self, context): @@ -110,7 +106,6 @@ class NLA_MT_marker(bpy.types.Menu): #layout.operator_context = 'EXEC_REGION_WIN' - layout.column() layout.operator("marker.add", "Add Marker") layout.operator("marker.duplicate", text="Duplicate Marker") layout.operator("marker.delete", text="Delete Marker") @@ -121,7 +116,7 @@ class NLA_MT_marker(bpy.types.Menu): layout.operator("marker.move", text="Grab/Move Marker") -class NLA_MT_edit(bpy.types.Menu): +class NLA_MT_edit(Menu): bl_label = "Edit" def draw(self, context): @@ -129,7 +124,6 @@ class NLA_MT_edit(bpy.types.Menu): scene = context.scene - layout.column() layout.menu("NLA_MT_edit_transform", text="Transform") layout.operator_menu_enum("nla.snap", "type", text="Snap") @@ -164,13 +158,12 @@ class NLA_MT_edit(bpy.types.Menu): layout.operator("nla.tweakmode_enter", text="Start Tweaking Strip Actions") -class NLA_MT_add(bpy.types.Menu): +class NLA_MT_add(Menu): bl_label = "Add" def draw(self, context): layout = self.layout - layout.column() layout.operator("nla.actionclip_add") layout.operator("nla.transition_add") layout.operator("nla.soundclip_add") @@ -184,13 +177,12 @@ class NLA_MT_add(bpy.types.Menu): layout.operator("nla.tracks_add", text="Add Tracks Above Selected").above_selected = True -class NLA_MT_edit_transform(bpy.types.Menu): +class NLA_MT_edit_transform(Menu): bl_label = "Transform" def draw(self, context): layout = self.layout - layout.column() layout.operator("transform.translate", text="Grab/Move") layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND' layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE' |