From 14f2597d7e518be552020875e52c5d6804b48a1e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 7 Jan 2015 14:10:14 +0100 Subject: [PATCH] More tweak to preview commit - do not 'render' non-used IDs either. Thanks to Campbell for the headup. --- source/blender/windowmanager/intern/wm_files.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 622e86a8e02..4dfe157416b 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -903,8 +903,9 @@ static void wm_ensure_previews(bContext *C, Main *mainvar) for (i = 0; lb[i]; i++) { for (id = lb[i]->first; id; id = id->next) { - /* Only preview non-library datablocks, lib ones do not pertain to this .blend file! */ - if (!id->lib) { + /* Only preview non-library datablocks, lib ones do not pertain to this .blend file! + * Same goes for ID with no user. */ + if (!id->lib && (id->us != 0)) { UI_id_icon_render(C, id, false, false); UI_id_icon_render(C, id, true, false); }