diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-02 21:33:48 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-02 21:33:48 +0400 |
commit | 6f3400ca521e84b1b627f2b5a53835d73e3ed2ea (patch) | |
tree | de3f9d78f38aa26b4c46098653d090352d8fb644 /release | |
parent | d64661b5078cd4781bd58fce6fadedac511c4132 (diff) |
Clip editor: cleanup of View menu - do not show operators which doesn't make sense in dopesheet/curve view
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_clip.py | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 0b96ec772c8..e2fa67e3873 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -776,27 +776,28 @@ class CLIP_MT_view(Menu): layout = self.layout sc = context.space_data - layout.prop(sc, "show_seconds") - layout.separator() - - layout.operator("clip.properties", icon='MENU_PANEL') - layout.operator("clip.tools", icon='MENU_PANEL') - layout.separator() + if sc.view == 'CLIP': + layout.operator("clip.properties", icon='MENU_PANEL') + layout.operator("clip.tools", icon='MENU_PANEL') + layout.separator() - layout.operator("clip.view_selected") - layout.operator("clip.view_all") + layout.operator("clip.view_selected") + layout.operator("clip.view_all") - layout.separator() - layout.operator("clip.view_zoom_in") - layout.operator("clip.view_zoom_out") + layout.separator() + layout.operator("clip.view_zoom_in") + layout.operator("clip.view_zoom_out") - layout.separator() + layout.separator() - ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1)) + ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1)) - for a, b in ratios: - text = "Zoom %d:%d" % (a, b) - layout.operator("clip.view_zoom_ratio", text=text).ratio = a / b + for a, b in ratios: + text = "Zoom %d:%d" % (a, b) + layout.operator("clip.view_zoom_ratio", text=text).ratio = a / b + else: + layout.prop(sc, "show_seconds") + layout.separator() layout.separator() layout.operator("screen.area_dupli") |