diff options
author | William Reynish <billrey@me.com> | 2019-05-07 21:49:53 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2019-05-07 21:49:53 +0300 |
commit | 0c0254018c64365630b6b6fab069d2d0499c8c96 (patch) | |
tree | 3680160fe177af50d8bf182b5bde799a2671127f /release/scripts/startup/bl_ui/space_nla.py | |
parent | 37eb1090148057e9c1ecaae6a94bf97c8e51dd61 (diff) |
UI: Add initial context menu to NLA
Adding to both default and Industry Compat keymap
Diffstat (limited to 'release/scripts/startup/bl_ui/space_nla.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_nla.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index ba94769d2c0..324f92daaa2 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -240,6 +240,49 @@ class NLA_MT_snap_pie(Menu): pie.operator("nla.snap", text="Nearest Second").type = 'NEAREST_SECOND' pie.operator("nla.snap", text="Nearest Marker").type = 'NEAREST_MARKER' +class NLA_MT_context_menu(Menu): + bl_label = "NLA Context Menu" + + def draw(self, context): + layout = self.layout + scene = context.scene + + if scene.is_nla_tweakmode: + layout.operator("nla.tweakmode_exit", text="Stop Editing Stashed Action").isolate_action = True + layout.operator("nla.tweakmode_exit", text="Stop Tweaking Strip Actions") + else: + layout.operator("nla.tweakmode_enter", text="Start Editing Stashed Action").isolate_action = True + layout.operator("nla.tweakmode_enter", text="Start Tweaking Strip Actions") + + layout.separator() + + layout.operator("nla.duplicate", text="Duplicate").linked = False + layout.operator("nla.duplicate", text="Linked Duplicate").linked = True + + layout.separator() + + layout.operator("nla.split") + layout.operator("nla.delete") + + layout.separator() + + layout.operator("nla.swap") + + layout.separator() + + layout.operator_menu_enum("nla.snap", "type", text="Snap") + + +class NLA_MT_channel_context_menu(Menu): + bl_label = "NLA Channel Context Menu" + + def draw(self, context): + layout = self.layout + + layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...") + layout.operator("anim.channels_clean_empty") + + classes = ( NLA_HT_header, @@ -251,6 +294,8 @@ classes = ( NLA_MT_add, NLA_MT_edit_transform, NLA_MT_snap_pie, + NLA_MT_context_menu, + NLA_MT_channel_context_menu, NLA_PT_filters, ) |