From 6bd750bc01fc5eb5b695e616bc5efb5166441bca Mon Sep 17 00:00:00 2001 From: John Kiril Swenson Date: Sun, 25 May 2025 16:22:16 -0500 Subject: [PATCH] Fix (unreported): VSE: Strips not deselected on press With #128051, the default timeline tool changed to a `sequencer.select` on press with no associated properties (before, it had `deselect_all`). This meant that retiming key selection broke (as reported in #129892) and strips would only deselect on release if clicking into empty space (due to a separate keymap item in the global sequencer keymap). This patch reverts 97e44901b4 while keeping its fix, in favor of a more robust solution (just add `deselect_all` to the keymap item properties in the box select tool). --- scripts/presets/keyconfig/keymap_data/blender_default.py | 5 +++-- source/blender/editors/space_sequencer/sequencer_retiming.cc | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/presets/keyconfig/keymap_data/blender_default.py b/scripts/presets/keyconfig/keymap_data/blender_default.py index 27fa1829c8c..f92ccfa2676 100644 --- a/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -8188,7 +8188,8 @@ def km_sequencer_tool_generic_select_rcs(params): def km_sequencer_tool_generic_select_lcs(params): return [ - ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None), + ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("deselect_all", True)]}), ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, {"properties": [("toggle", True)]}), ("anim.change_frame", {"type": 'RIGHTMOUSE', "value": 'PRESS', @@ -8201,7 +8202,7 @@ def km_sequencer_tool_generic_select_box(params, *, fallback): _fallback_id("Sequencer Tool: Select Box", fallback), {"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'}, {"items": [ - # Combine the tweak functionality into the select box tool. + # Add tweak functionality to the select box tool. # This gives one standard tool for all selection and transform behavior. *(km_sequencer_tool_generic_select_rcs(params) if (params.select_mouse == 'RIGHTMOUSE') else diff --git a/source/blender/editors/space_sequencer/sequencer_retiming.cc b/source/blender/editors/space_sequencer/sequencer_retiming.cc index 8e0d58975fb..ac3afffbf40 100644 --- a/source/blender/editors/space_sequencer/sequencer_retiming.cc +++ b/source/blender/editors/space_sequencer/sequencer_retiming.cc @@ -847,10 +847,9 @@ wmOperatorStatus sequencer_retiming_key_select_exec(bContext *C, Scene *scene = CTX_data_scene(C); Editing *ed = seq::editing_get(scene); + const bool deselect_all = RNA_boolean_get(op->ptr, "deselect_all"); const bool wait_to_deselect_others = RNA_boolean_get(op->ptr, "wait_to_deselect_others"); const bool toggle = RNA_boolean_get(op->ptr, "toggle"); - bool deselect_all = RNA_boolean_get(op->ptr, "deselect_all"); - deselect_all |= !toggle; /* Clicked on an unselected key. */ if (!seq::retiming_selection_contains(ed, key) && !toggle) {