[Bf-blender-cvs] [3d9da00] asset-experiments: Make imbuf_thumb for .blend a bit less stupid & noisy regarding missing previews.
Bastien Montagne
noreply at git.blender.org
Tue Jun 16 17:33:29 CEST 2015
Commit: 3d9da00815b08dc2081f11d087a0cc45d846928e
Author: Bastien Montagne
Date: Tue Jun 16 15:45:52 2015 +0200
Branches: asset-experiments
https://developer.blender.org/rB3d9da00815b08dc2081f11d087a0cc45d846928e
Make imbuf_thumb for .blend a bit less stupid & noisy regarding missing previews.
A file which does not have *any* preview is perfectly valid, error is only when there
are some previews, but not the same number as actual datablocks...
===================================================================
M source/blender/imbuf/intern/thumbs_blend.c
===================================================================
diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c
index d506dd5..26fa18f 100644
--- a/source/blender/imbuf/intern/thumbs_blend.c
+++ b/source/blender/imbuf/intern/thumbs_blend.c
@@ -148,7 +148,10 @@ ImBuf *IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const
BLO_blendhandle_close(libfiledata);
if (!previews || (nnames != nprevs)) {
- printf("%s: error, found %d items, %d previews\n", __func__, nnames, nprevs);
+ if (previews != 0) {
+ /* No previews at all is not a bug! */
+ printf("%s: error, found %d items, %d previews\n", __func__, nnames, nprevs);
+ }
BLI_linklist_free(previews, BKE_previewimg_freefunc);
BLI_linklist_free(names, free);
return NULL;
More information about the Bf-blender-cvs
mailing list