[Bf-blender-cvs] [099d47f8a31] master: Sequencer: revert selection & keymap changes from D7679

Campbell Barton noreply at git.blender.org
Thu Jun 18 09:18:03 CEST 2020


Commit: 099d47f8a310ca6b89adb4e61cc7ec15cc9c11d9
Author: Campbell Barton
Date:   Thu Jun 18 16:30:56 2020 +1000
Branches: master
https://developer.blender.org/rB099d47f8a310ca6b89adb4e61cc7ec15cc9c11d9

Sequencer: revert selection & keymap changes from D7679

These changes aren't aligned with other timeline selection keymaps
(graph & action for e.g.).

Revert these changes, shortcuts to time-line editors
should take other similar spaces into account.

===================================================================

M	release/scripts/presets/keyconfig/keymap_data/blender_default.py
M	source/blender/editors/space_sequencer/sequencer_select.c

===================================================================

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 1f5613c86bb..c0f99bdb8a1 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -2467,7 +2467,7 @@ def km_sequencer(params):
          {"properties": [("all", False)]}),
         ("sequencer.gap_remove", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True},
          {"properties": [("all", True)]}),
-        ("sequencer.gap_insert", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True}, None),
+        ("sequencer.gap_insert", {"type": 'EQUAL', "value": 'PRESS', "shift": True}, None),
         ("sequencer.snap", {"type": 'S', "value": 'PRESS', "shift": True}, None),
         ("sequencer.swap_inputs", {"type": 'S', "value": 'PRESS', "alt": True}, None),
         *(
@@ -2523,14 +2523,6 @@ def km_sequencer(params):
          {"properties": [("side", 'LEFT')]}),
         ("sequencer.select_side_of_frame", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
          {"properties": [("side", 'RIGHT')]}),
-        ("sequencer.select_side_of_frame", {"type": 'EQUAL', "value": 'PRESS'},
-         {"properties": [("side", 'OVERLAP')]}),
-        ("sequencer.select_side_of_frame", {"type": 'LEFT_BRACKET', "value": 'PRESS', "shift": True},
-         {"properties": [("side", 'LEFT'), ("extend", True)]}),
-        ("sequencer.select_side_of_frame", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True},
-         {"properties": [("side", 'RIGHT'), ("extend", True)]}),
-        ("sequencer.select_side_of_frame", {"type": 'EQUAL', "value": 'PRESS', "shift": True},
-         {"properties": [("side", 'OVERLAP'), ("extend", True)]}),
 
         *_template_items_context_menu("SEQUENCER_MT_context_menu", params.context_menu_event),
     ])
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 2686edd58a5..85b70354ab3 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -409,32 +409,15 @@ static int sequencer_select_exec(bContext *C, wmOperator *op)
   /* Select left, right or overlapping the current frame. */
   if (side_of_frame) {
     /* Use different logic for this. */
-    float x;
     if (extend == false) {
       ED_sequencer_deselect_all(scene);
     }
 
-    /* 10px margin around current frame to select under the current frame with mouse. */
-    float margin = BLI_rctf_size_x(&v2d->cur) / BLI_rcti_size_x(&v2d->mask) * 10;
-    x = UI_view2d_region_to_view_x(v2d, mval[0]);
-    if (x >= CFRA - margin && x <= CFRA + margin) {
-      x = CFRA;
-    }
+    const float x = UI_view2d_region_to_view_x(v2d, mval[0]);
 
     SEQP_BEGIN (ed, seq) {
-      bool test = false;
-      /* FIXME(campbell): this functionality is only in the sequencer,
-       * either we should support this for all timeline views or remove it. */
-      if ((x == CFRA) && (seq->startdisp <= CFRA) && (seq->enddisp >= CFRA)) {
-        /* Select overlapping the current frame. */
-        test = true;
-      }
-      else if ((x < CFRA && seq->enddisp <= CFRA) || (x > CFRA && seq->startdisp >= CFRA)) {
+      if (((x < CFRA) && (seq->enddisp <= CFRA)) || ((x >= CFRA) && (seq->startdisp >= CFRA))) {
         /* Select left or right. */
-        test = true;
-      }
-
-      if (test) {
         seq->flag |= SELECT;
         recurs_sel_seq(seq);
       }
@@ -1023,7 +1006,6 @@ static int sequencer_select_side_of_frame_exec(bContext *C, wmOperator *op)
 void SEQUENCER_OT_select_side_of_frame(wmOperatorType *ot)
 {
   static const EnumPropertyItem sequencer_select_left_right_types[] = {
-      {0, "OVERLAP", 0, "Overlap", "Select overlapping the current frame"},
       {-1, "LEFT", 0, "Left", "Select to the left of the current frame"},
       {1, "RIGHT", 0, "Right", "Select to the right of the current frame"},
       {0, NULL, 0, NULL, NULL},



More information about the Bf-blender-cvs mailing list