From dc87d09b8b3249898e0f0d301fa22f03cff9d6d5 Mon Sep 17 00:00:00 2001 From: Alessio Monti di Sopra Date: Sat, 30 Nov 2019 17:03:22 +1100 Subject: 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. --- source/blender/editors/space_nla/space_nla.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_nla/space_nla.c') diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index f274f3c93ec..5cd2a86adf8 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -71,7 +71,7 @@ static SpaceLink *nla_new(const ScrArea *sa, const Scene *scene) /* set auto-snapping settings */ snla->autosnap = SACTSNAP_FRAME; - snla->flag = SNLA_SHOW_MARKER_LINES; + snla->flag = SNLA_SHOW_MARKERS; /* header */ ar = MEM_callocN(sizeof(ARegion), "header for nla"); @@ -274,10 +274,9 @@ static void nla_main_region_draw(const bContext *C, ARegion *ar) /* markers */ UI_view2d_view_orthoSpecial(ar, v2d, 1); int marker_draw_flag = DRAW_MARKERS_MARGIN; - if (snla->flag & SNLA_SHOW_MARKER_LINES) { - marker_draw_flag |= DRAW_MARKERS_LINES; + if (snla->flag & SNLA_SHOW_MARKERS) { + ED_markers_draw(C, marker_draw_flag); } - ED_markers_draw(C, marker_draw_flag); /* preview range */ UI_view2d_view_ortho(v2d); -- cgit v1.2.3