[Bf-blender-cvs] [dc87d09b8b3] master: UI: allow to hide markers region per editor
Alessio Monti di Sopra
noreply at git.blender.org
Sat Nov 30 07:09:25 CET 2019
Commit: dc87d09b8b3249898e0f0d301fa22f03cff9d6d5
Author: Alessio Monti di Sopra
Date: Sat Nov 30 17:03:22 2019 +1100
Branches: master
https://developer.blender.org/rBdc87d09b8b3249898e0f0d301fa22f03cff9d6d5
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.
===================================================================
M release/scripts/startup/bl_ui/space_dopesheet.py
M release/scripts/startup/bl_ui/space_graph.py
M release/scripts/startup/bl_ui/space_nla.py
M release/scripts/startup/bl_ui/space_sequencer.py
M release/scripts/startup/bl_ui/space_time.py
M source/blender/blenkernel/BKE_blender_version.h
M source/blender/blenloader/intern/versioning_280.c
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/editors/animation/anim_markers.c
M source/blender/editors/space_action/space_action.c
M source/blender/editors/space_graph/space_graph.c
M source/blender/editors/space_nla/space_nla.c
M source/blender/editors/space_sequencer/sequencer_draw.c
M source/blender/editors/space_sequencer/space_sequencer.c
M source/blender/makesdna/DNA_action_types.h
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
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()
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index c38e6e14d70..f1c45ac0b45 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -27,7 +27,7 @@
* \note Use #STRINGIFY() rather than defining with quotes.
*/
#define BLENDER_VERSION 282
-#define BLENDER_SUBVERSION 2
+#define BLENDER_SUBVERSION 3
/** Several breakages with 280, e.g. collections vs layers. */
#define BLENDER_MINVERSION 280
#define BLENDER_MINSUBVERSION 0
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 47e55a55ea1..6c8b14ad5c7 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3394,19 +3394,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- if (!MAIN_VERSION_ATLEAST(bmain, 280, 45)) {
- for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
- for (ScrArea *area = screen->areabase.first; area; area = area->next) {
- for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
- if (sl->spacetype == SPACE_SEQ) {
- SpaceSeq *sseq = (SpaceSeq *)sl;
- sseq->flag |= SEQ_SHOW_MARKER_LINES;
- }
- }
- }
- }
- }
-
if (!MAIN_VERSION_ATLEAST(bmain, 280, 46)) {
/* Add wireframe color. */
if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "wire_color_type")) {
@@ -4222,9 +4209,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- {
- /* Versioning code until next subversion bump goes here. */
-
+ if (!MAIN_VERSION_ATLEAST(bmain, 282, 3)) {
/* Remove Unified pressure/size and pressure/alpha */
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
ToolSettings *ts = scene->toolsettings;
@@ -4249,5 +4234,39 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ /* Make markers region visible by default. */
+ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+ for (ScrArea *area = screen->areabase.first; area; area = area->next) {
+ for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
+ switch (sl->spacetype) {
+ case SPACE_SEQ: {
+ SpaceSeq *sseq = (SpaceSeq *)sl;
+ sseq->flag |= SEQ_SHOW_MARKERS;
+ break;
+ }
+ case SPACE_ACTION: {
+ SpaceAction *saction = (SpaceAction *)sl;
+ saction->flag |= SACTION_SHOW_MARKERS;
+ break;
+ }
+ case SPACE_GRAPH: {
+ SpaceGraph *sipo = (SpaceGraph *)sl;
+ sipo->flag |= SIPO_SHOW_MARKERS;
+ break;
+ }
+ case SPACE_NLA: {
+ SpaceNla *snla = (SpaceNla *)sl;
+ snla->flag |= SNLA_SHOW_MARKERS;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ {
+ /* Versioning code until next subversion bump goes here. */
}
}
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index f2d6db886d3..1c88f6b00af 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -150,10 +150,9 @@ static void blo_update_defaults_screen(bScreen *screen,
}
}
else if (sa->spacetype == SPACE_ACTION) {
- /* Show marker lines, hide channels and collapse summary in timelines. */
+ /* Show markers region, hide channels and collapse summary in timelines. */
SpaceAction *saction = sa->spacedata.first;
- saction->flag |= SACTION_SHOW_MARKER_LINES;
-
+ saction->flag |= SACTION_SHOW_MARKERS;
if (saction->mode == SACTCONT_TIMELINE) {
saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED;
@@ -166,11 +165,15 @@ static void blo_update_defaults_screen(bScreen *screen,
}
else if (sa->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = sa->spacedata.first;
- sipo->flag |= SIPO_MARKER_LINES;
+ sipo->flag |= SIPO_SHOW_MARKERS;
}
else if (sa->spacetype == SPACE_NLA) {
SpaceNla *snla = sa->spacedata.first;
- snla->flag |= SNLA_SHOW_MARKER_LINES;
+ snla->flag |= SNLA_SHOW_MARKERS;
+ }
+ else if (sa->spacetype == SPACE_SEQ) {
+ SpaceSeq *seq = sa->spacedata.first;
+ seq->flag |= SEQ_SHOW_MARKERS;
}
else if (sa->spacetype == SPACE_TEXT) {
/* Show syntax and line numbers in Script workspace text ed
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list