UI: allow to hide markers region per editor

Instead of having the option to show marker lines,
make the marker region optional.

- Added a Show Markers entry in the View menu of the animation editors.
- If the markers region is not active then the Marker menu gets hidden.
- Removed marker menu from the driver editor
  and don't allow to use marker operators.
This commit is contained in:
Alessio Monti di Sopra
2019-11-30 17:03:22 +11:00
committed by Campbell Barton
parent f478fef9d6
commit dc87d09b8b
17 changed files with 179 additions and 110 deletions

View File

@@ -71,10 +71,12 @@ class NLA_MT_editor_menus(Menu):
bl_label = ""
def draw(self, _context):
st = _context.space_data
layout = self.layout
layout.menu("NLA_MT_view")
layout.menu("NLA_MT_select")
layout.menu("NLA_MT_marker")
if st.show_markers:
layout.menu("NLA_MT_marker")
layout.menu("NLA_MT_edit")
layout.menu("NLA_MT_add")
@@ -96,8 +98,10 @@ class NLA_MT_view(Menu):
layout.prop(st, "show_locked_time")
layout.prop(st, "show_strip_curves")
layout.separator()
layout.prop(st, "show_markers")
layout.prop(st, "show_local_markers")
layout.prop(st, "show_marker_lines")
layout.separator()
layout.operator("anim.previewrange_set")