[Bf-blender-cvs] [f69aaf71f82] master: WM: Support opening backup .blend files via drag-drop

Pablo Vazquez noreply at git.blender.org
Tue Sep 27 19:19:58 CEST 2022


Commit: f69aaf71f82ad9c52a8590479dbb20e1c2916f1e
Author: Pablo Vazquez
Date:   Tue Sep 27 19:19:29 2022 +0200
Branches: master
https://developer.blender.org/rBf69aaf71f82ad9c52a8590479dbb20e1c2916f1e

WM: Support opening backup .blend files via drag-drop

Add support for opening Blender backup `.blend` files (`.blend1`, `.blend2`, etc) by dropping them into the window, just like regular .blend files.

{F13393482, size=full}

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D15700

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

M	source/blender/editors/screen/screen_ops.c

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

diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index c24850fdad5..e04cf5c6d68 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -5742,7 +5742,7 @@ static void keymap_modal_set(wmKeyConfig *keyconf)
 static bool blend_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
 {
   if (drag->type == WM_DRAG_PATH) {
-    if (ELEM(drag->icon, ICON_FILE_BLEND, ICON_BLENDER)) {
+    if (ELEM(drag->icon, ICON_FILE_BLEND, ICON_FILE_BACKUP, ICON_BLENDER)) {
       return true;
     }
   }



More information about the Bf-blender-cvs mailing list