diff --git a/release/datafiles/userdef/userdef_default.c b/release/datafiles/userdef/userdef_default.c index 0463399f6ba..4b9ceb18bad 100644 --- a/release/datafiles/userdef/userdef_default.c +++ b/release/datafiles/userdef/userdef_default.c @@ -140,7 +140,7 @@ const UserDef U_default = { .pad_rot_angle = 15, .rvisize = 25, .rvibright = 8, - .recent_files = 20, + .recent_files = 200, .smooth_viewtx = 200, .glreslimit = 0, .color_picker_type = USER_CP_CIRCLE_HSV, diff --git a/scripts/startup/bl_operators/wm.py b/scripts/startup/bl_operators/wm.py index 1e551edee28..e161555c9a8 100644 --- a/scripts/startup/bl_operators/wm.py +++ b/scripts/startup/bl_operators/wm.py @@ -3422,10 +3422,15 @@ class WM_MT_splash(Menu): col2 = split.column() col2_title = col2.row() - found_recent = col2.template_recent_files() + found_recent = col2.template_recent_files(rows=5) if found_recent: col2_title.label(text="Recent Files") + + col_more = col2.column() + col_more.operator_context = 'INVOKE_DEFAULT' + more_props = col_more.operator("wm.search_single_menu", text="More...", icon='VIEWZOOM') + more_props.menu_idname = "TOPBAR_MT_file_open_recent" else: # Links if no recent files. col2_title.label(text="Getting Started") diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 89ad53389a0..b3df809b4db 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -27,7 +27,7 @@ /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 95 +#define BLENDER_FILE_SUBVERSION 96 /* 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_userdef.cc b/source/blender/blenloader/intern/versioning_userdef.cc index 611a006e9bc..52cb528ebe0 100644 --- a/source/blender/blenloader/intern/versioning_userdef.cc +++ b/source/blender/blenloader/intern/versioning_userdef.cc @@ -1684,6 +1684,13 @@ void blo_do_versions_userdef(UserDef *userdef) userdef->flag |= USER_FILECOMPRESS; } + if (!USER_VERSION_ATLEAST(500, 96)) { + /* Increase the number of recently-used files if using the old default value. */ + if (userdef->recent_files == 20) { + userdef->recent_files = 200; + } + } + /** * Always bump subversion in BKE_blender_version.h when adding versioning * code here, and wrap it inside a USER_VERSION_ATLEAST check. diff --git a/source/blender/editors/space_topbar/space_topbar.cc b/source/blender/editors/space_topbar/space_topbar.cc index 58500a81496..99a7b43e119 100644 --- a/source/blender/editors/space_topbar/space_topbar.cc +++ b/source/blender/editors/space_topbar/space_topbar.cc @@ -186,16 +186,26 @@ static void topbar_header_region_message_subscribe(const wmRegionMessageSubscrib mbus, &workspace->id, workspace, WorkSpace, tools, &msg_sub_value_region_tag_redraw); } -static void recent_files_menu_draw(const bContext * /*C*/, Menu *menu) +static void recent_files_menu_draw(const bContext *C, Menu *menu) { uiLayout *layout = menu->layout; layout->operator_context_set(blender::wm::OpCallContext::InvokeDefault); - if (uiTemplateRecentFiles(layout, U.recent_files) != 0) { - layout->separator(); - layout->op("WM_OT_clear_recent_files", IFACE_("Clear Recent Files List..."), ICON_TRASH); + const bool is_menu_search = CTX_data_int_get(C, "is_menu_search").value_or(false); + if (is_menu_search) { + uiTemplateRecentFiles(layout, U.recent_files); } else { - layout->label(IFACE_("No Recent Files"), ICON_NONE); + const int limit = std::min(U.recent_files, 20); + if (uiTemplateRecentFiles(layout, limit) != 0) { + layout->separator(); + PointerRNA search_props = layout->op( + "WM_OT_search_single_menu", IFACE_("More..."), ICON_VIEWZOOM); + RNA_string_set(&search_props, "menu_idname", "TOPBAR_MT_file_open_recent"); + layout->op("WM_OT_clear_recent_files", IFACE_("Clear Recent Files List..."), ICON_TRASH); + } + else { + layout->label(IFACE_("No Recent Files"), ICON_NONE); + } } } diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc index 1578d3cb817..6611fc5df3d 100644 --- a/source/blender/makesrna/intern/rna_userdef.cc +++ b/source/blender/makesrna/intern/rna_userdef.cc @@ -7177,7 +7177,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); prop = RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 0, 30); + RNA_def_property_range(prop, 0, 1000); RNA_def_property_ui_text( prop, "Recent Files", "Maximum number of recently opened files to remember");