diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-11 21:32:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-12 01:17:52 +0300 |
commit | f1ad2ab85f6fc800a1d250d9f43a844c7da145eb (patch) | |
tree | beef271c41c122eda68c4d30f10109186a1aca7c /source/blender/blenkernel/intern | |
parent | 8e4066b9d335d9e38d0f77e3cf69cd7b8f03a606 (diff) |
Minor optimization to BKE_library_tag_unused_linked_data().
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/library_query.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index cec7fbacd80..d286c0af8c5 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -1232,6 +1232,10 @@ void BKE_library_tag_unused_linked_data(Main *bmain, const bool do_init_tag) while (i--) { for (ID *id = lb_array[i]->first; id; id = id->next) { + if (id->tag & LIB_TAG_DOIT) { + /* Unused ID (so far), no need to check it further. */ + continue; + } BKE_library_foreach_ID_link(id, foreach_libblock_tag_unused_linked_data_callback, &do_loop, IDWALK_NOP); } } |