diff options
author | Alessio Monti di Sopra <a.monti> | 2019-11-30 09:03:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-11-30 09:08:04 +0300 |
commit | dc87d09b8b3249898e0f0d301fa22f03cff9d6d5 (patch) | |
tree | 44b22d9d1046dc30c7ae340eb544712630b7cd6b /release/scripts/startup | |
parent | f478fef9d6b0609f4bb60fd98e9292b60927b80e (diff) |
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.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 8 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_graph.py | 9 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_nla.py | 8 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_time.py | 9 |
5 files changed, 30 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index fac8ff238c0..3b498b834bf 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -288,7 +288,8 @@ class DOPESHEET_MT_editor_menus(Menu): layout.menu("DOPESHEET_MT_view") layout.menu("DOPESHEET_MT_select") - layout.menu("DOPESHEET_MT_marker") + if st.show_markers: + layout.menu("DOPESHEET_MT_marker") if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action is not None): layout.menu("DOPESHEET_MT_channel") @@ -322,9 +323,12 @@ class DOPESHEET_MT_view(Menu): layout.prop(st, "show_group_colors") layout.prop(st, "show_interpolation") layout.prop(st, "show_extremes") - layout.prop(st, "show_marker_lines") layout.prop(st, "use_auto_merge_keyframes") + layout.separator() + layout.prop(st, "show_markers") + + layout.separator() layout.prop(st, "show_seconds") layout.prop(st, "show_locked_time") diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 15ef7b0ef82..188741956ab 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -94,10 +94,12 @@ class GRAPH_MT_editor_menus(Menu): bl_label = "" def draw(self, _context): + st = _context.space_data layout = self.layout layout.menu("GRAPH_MT_view") layout.menu("GRAPH_MT_select") - layout.menu("GRAPH_MT_marker") + if st.mode != 'DRIVERS' and st.show_markers: + layout.menu("GRAPH_MT_marker") layout.menu("GRAPH_MT_channel") layout.menu("GRAPH_MT_key") @@ -117,9 +119,12 @@ class GRAPH_MT_view(Menu): layout.prop(st, "show_cursor") layout.prop(st, "show_sliders") layout.prop(st, "show_group_colors") - layout.prop(st, "show_marker_lines") layout.prop(st, "use_auto_merge_keyframes") + if st.mode != 'DRIVERS': + layout.separator() + layout.prop(st, "show_markers") + layout.separator() layout.prop(st, "use_beauty_drawing") diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index 825e4b41609..24d6f65d9b9 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -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") diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 4d9a4646f5f..b4f841d2eb8 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -134,7 +134,8 @@ class SEQUENCER_MT_editor_menus(Menu): if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: layout.menu("SEQUENCER_MT_select") - layout.menu("SEQUENCER_MT_marker") + if st.show_markers: + layout.menu("SEQUENCER_MT_marker") layout.menu("SEQUENCER_MT_add") layout.menu("SEQUENCER_MT_strip") @@ -268,7 +269,8 @@ class SEQUENCER_MT_view(Menu): layout.prop(st, "show_seconds") layout.prop(st, "show_strip_offset") - layout.prop(st, "show_marker_lines") + layout.separator() + layout.prop(st, "show_markers") if is_preview: layout.separator() diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index 04a904edde3..6d60c67ded0 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -90,6 +90,7 @@ class TIME_MT_editor_menus(Menu): def draw(self, _context): layout = self.layout horizontal = (layout.direction == 'VERTICAL') + st = _context.space_data if horizontal: row = layout.row() sub = row.row(align=True) @@ -109,7 +110,8 @@ class TIME_MT_editor_menus(Menu): sub = row.row(align=True) sub.menu("TIME_MT_view") - sub.menu("TIME_MT_marker") + if st.show_markers: + sub.menu("TIME_MT_marker") class TIME_MT_marker(Menu): @@ -135,7 +137,10 @@ class TIME_MT_view(Menu): layout.separator() - layout.prop(st, "show_marker_lines") + layout.prop(st, "show_markers") + + layout.separator() + layout.prop(scene, "show_keys_from_selected_only") layout.separator() |