[Bf-blender-cvs] [22ec991] master: Fix T46331: File open does not show thumbnails, when a filter_glob is provided by python scripts.

Bastien Montagne noreply at git.blender.org
Wed Sep 30 20:21:08 CEST 2015


Commit: 22ec991e6b8f19da39ac27f988f1eaab3027b421
Author: Bastien Montagne
Date:   Wed Sep 30 20:19:21 2015 +0200
Branches: master
https://developer.blender.org/rB22ec991e6b8f19da39ac27f988f1eaab3027b421

Fix T46331: File open does not show thumbnails, when a filter_glob is provided by python scripts.

No reason to exclude usual file-type 'guessing' for operator-filtered extensions...

Safe for 2.76, should we need to merge more fixes.

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

M	source/blender/editors/space_file/filelist.c

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

diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 0d1aff0..1b5987d 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -2215,11 +2215,9 @@ static int filelist_readjob_list_dir(
 			}
 			/* Otherwise, do not check extensions for directories! */
 			else if (!(entry->typeflag & FILE_TYPE_DIR)) {
+				entry->typeflag = file_extension_type(root, entry->relpath);
 				if (filter_glob[0] && BLI_testextensie_glob(entry->relpath, filter_glob)) {
-					entry->typeflag = FILE_TYPE_OPERATOR;
-				}
-				else {
-					entry->typeflag = file_extension_type(root, entry->relpath);
+					entry->typeflag |= FILE_TYPE_OPERATOR;
 				}
 			}




More information about the Bf-blender-cvs mailing list