diff --git a/release/datafiles/blender_icons.png b/release/datafiles/blender_icons.png index 09a63f4c47d..55a83964a8b 100644 Binary files a/release/datafiles/blender_icons.png and b/release/datafiles/blender_icons.png differ diff --git a/release/datafiles/prvicons.png b/release/datafiles/prvicons.png index 364d9678f0b..dc31964b33f 100644 Binary files a/release/datafiles/prvicons.png and b/release/datafiles/prvicons.png differ diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 435b968f243..256545bab70 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -67,6 +67,7 @@ class FILEBROWSER_HT_header(Header): row.label(params.filter_glob) else: row.prop(params, "use_filter_blender", text="") + row.prop(params, "use_filter_backup", text="") row.prop(params, "use_filter_image", text="") row.prop(params, "use_filter_movie", text="") row.prop(params, "use_filter_script", text="") diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index b3efcf1cd54..e400e44e944 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -799,13 +799,12 @@ DEF_ICON(NDOF_TRANS) DEF_ICON(LAYER_USED) DEF_ICON(LAYER_ACTIVE) #ifndef DEF_ICON_BLANK_SKIP + /* available */ DEF_ICON(BLANK254) DEF_ICON(BLANK255) DEF_ICON(BLANK256) DEF_ICON(BLANK257) DEF_ICON(BLANK257b) - - /* available */ DEF_ICON(BLANK258) DEF_ICON(BLANK259) DEF_ICON(BLANK260) @@ -890,8 +889,8 @@ DEF_ICON(FORWARD) DEF_ICON(BLANK313) DEF_ICON(BLANK314) DEF_ICON(BLANK315) - DEF_ICON(BLANK316) #endif +DEF_ICON(FILE_BACKUP) DEF_ICON(DISK_DRIVE) /* SHADING / TEXT */ diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 66a255f9a47..fb438ae45fb 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -257,7 +257,7 @@ static int get_file_icon(struct direntry *file) else if (file->flags & BLENDERFILE) return ICON_FILE_BLEND; else if (file->flags & BLENDERFILE_BACKUP) - return ICON_FILE_BLEND; + return ICON_FILE_BACKUP; else if (file->flags & IMAGEFILE) return ICON_FILE_IMAGE; else if (file->flags & MOVIEFILE) diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 562fcfd633d..7f0af36d5d6 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -143,7 +143,8 @@ typedef struct FolderList { #define SPECIAL_IMG_FONTFILE 8 #define SPECIAL_IMG_UNKNOWNFILE 9 #define SPECIAL_IMG_LOADING 10 -#define SPECIAL_IMG_MAX SPECIAL_IMG_LOADING + 1 +#define SPECIAL_IMG_BACKUP 11 +#define SPECIAL_IMG_MAX SPECIAL_IMG_BACKUP + 1 static ImBuf *gSpecialFileImages[SPECIAL_IMG_MAX]; @@ -683,6 +684,9 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index) else if (file->flags & IMAGEFILE) { ibuf = gSpecialFileImages[SPECIAL_IMG_LOADING]; } + else if (file->flags & BLENDERFILE_BACKUP) { + ibuf = gSpecialFileImages[SPECIAL_IMG_BACKUP]; + } return ibuf; } @@ -817,8 +821,10 @@ int ED_file_extension_icon(const char *relname) { int type = file_extension_type(relname); - if (type == BLENDERFILE || type == BLENDERFILE_BACKUP) + if (type == BLENDERFILE) return ICON_FILE_BLEND; + else if (type == BLENDERFILE_BACKUP) + return ICON_FILE_BACKUP; else if (type == IMAGEFILE) return ICON_FILE_IMAGE; else if (type == MOVIEFILE) @@ -1303,7 +1309,7 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float if (limg->flags & IMAGEFILE) { limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_IMAGE); } - else if (limg->flags & BLENDERFILE) { + else if (limg->flags & (BLENDERFILE | BLENDERFILE_BACKUP)) { limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_BLEND); } else if (limg->flags & MOVIEFILE) { @@ -1360,7 +1366,7 @@ void thumbnails_start(struct FileList *filelist, const struct bContext *C) tj->filelist = filelist; for (idx = 0; idx < filelist->numfiles; idx++) { if (!filelist->filelist[idx].image) { - if ( (filelist->filelist[idx].flags & (IMAGEFILE | MOVIEFILE | BLENDERFILE)) ) { + if ( (filelist->filelist[idx].flags & (IMAGEFILE | MOVIEFILE | BLENDERFILE | BLENDERFILE_BACKUP)) ) { FileImage *limg = MEM_callocN(sizeof(struct FileImage), "loadimage"); BLI_strncpy(limg->path, filelist->filelist[idx].path, FILE_MAX); limg->index = idx; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 4b3288a0a90..4a29ae03d9d 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2826,6 +2826,12 @@ static void rna_def_fileselect_params(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_FILE_PARAMS, NULL); + prop = RNA_def_property(srna, "use_filter_backup", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE_BACKUP); + RNA_def_property_ui_text(prop, "Filter BlenderBackup files", "Show .blend1, .blend2, etc. files"); + RNA_def_property_ui_icon(prop, ICON_FILE_BACKUP, 0); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_FILE_PARAMS, NULL); + prop = RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE); RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files");