From a21a1a7b8656d651a641e377a6d95a939174bcf6 Mon Sep 17 00:00:00 2001 From: John Kiril Swenson Date: Fri, 23 Aug 2024 09:15:38 +0200 Subject: [PATCH] VSE: Set "box select" default tool for preview and show toolbars Current default tool is "sample" which is a bit odd, and coupled with the fact that the toolbar is hidden by default, this can be confusing to new users, leading them to believe tweak/select tools are not supported for the VSE preview. This change: - Sets "box select" as the default tool for the Preview - Makes both Preview and Timeline toolbars shown by default Pull Request: https://projects.blender.org/blender/blender/pulls/126336 --- source/blender/blenkernel/BKE_blender_version.h | 2 +- .../blender/blenloader/intern/versioning_400.cc | 16 ++++++++++++++++ .../editors/space_sequencer/space_sequencer.cc | 1 - .../windowmanager/intern/wm_toolsystem.cc | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index ec3d7399a16..e66ca943e70 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -31,7 +31,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 19 +#define BLENDER_FILE_SUBVERSION 20 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and cancel loading the file, showing a warning to diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index ac3a6d7f3a6..2c8e18d181d 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -69,6 +69,7 @@ #include "BKE_node_runtime.hh" #include "BKE_paint.hh" #include "BKE_scene.hh" +#include "BKE_screen.hh" #include "BKE_tracking.h" #include "IMB_imbuf_enums.h" @@ -4568,6 +4569,21 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 20)) { + LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype == SPACE_SEQ) { + ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_TOOLS); + if (region != nullptr) { + region->flag &= ~RGN_FLAG_HIDDEN; + } + } + } + } + } + } + /** * Always bump subversion in BKE_blender_version.h when adding versioning * code here, and wrap it inside a MAIN_VERSION_FILE_ATLEAST check. diff --git a/source/blender/editors/space_sequencer/space_sequencer.cc b/source/blender/editors/space_sequencer/space_sequencer.cc index 0ebb63701c4..6e288fa06a8 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.cc +++ b/source/blender/editors/space_sequencer/space_sequencer.cc @@ -136,7 +136,6 @@ static SpaceLink *sequencer_create(const ScrArea * /*area*/, const Scene *scene) BLI_addtail(&sseq->regionbase, static_cast(region)); region->regiontype = RGN_TYPE_TOOLS; region->alignment = RGN_ALIGN_LEFT; - region->flag = RGN_FLAG_HIDDEN; /* Channels. */ region = MEM_cnew("channels for sequencer"); diff --git a/source/blender/windowmanager/intern/wm_toolsystem.cc b/source/blender/windowmanager/intern/wm_toolsystem.cc index a4a04076f41..4c34730f3d5 100644 --- a/source/blender/windowmanager/intern/wm_toolsystem.cc +++ b/source/blender/windowmanager/intern/wm_toolsystem.cc @@ -692,7 +692,7 @@ static const char *toolsystem_default_tool(const bToolKey *tkey) case SEQ_VIEW_SEQUENCE: return "builtin.select"; case SEQ_VIEW_PREVIEW: - return "builtin.sample"; + return "builtin.select_box"; case SEQ_VIEW_SEQUENCE_PREVIEW: return "builtin.select"; }