[Bf-blender-cvs] [c77f3b5] asset-experiments: Fix flickering of previews during listing process.

Bastien Montagne noreply at git.blender.org
Sat May 9 16:43:09 CEST 2015


Commit: c77f3b57bc4baf81efdabf6e22e83e691d012993
Author: Bastien Montagne
Date:   Sat May 9 16:06:30 2015 +0200
Branches: asset-experiments
https://developer.blender.org/rBc77f3b57bc4baf81efdabf6e22e83e691d012993

Fix flickering of previews during listing process.

We cannot keep 'stable' list of items during listing process (each time new
entries are added, we have to filter and sort the whole lot again, which
means rebuilding 'draw' data from scratch - previews included).

Just wait until our filelist is complete to generate/use previews.

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

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 3c9e5d6..a122ff2 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1751,7 +1751,8 @@ void filelist_cache_previews_set(FileList *filelist, const bool use_previews)
 	if (use_previews == (cache->previews_pool != NULL)) {
 		return;
 	}
-	else if (use_previews) {
+	/* Do not start preview work while listing, gives nasty flickering! */
+	else if (use_previews && filelist->filelist_ready) {
 		TaskScheduler *scheduler = BLI_task_scheduler_get();
 		TaskPool *pool;
 		int num_tasks = 4;




More information about the Bf-blender-cvs mailing list