diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-12 00:29:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-12 01:17:52 +0300 |
commit | f6ab97c1ae0f4605a15dd486cfd6388c75cc2e86 (patch) | |
tree | d04e0001bec37c201936dc7cb28933529285c8cf /source/blender/blenkernel/BKE_library_query.h | |
parent | f1ad2ab85f6fc800a1d250d9f43a844c7da145eb (diff) |
Enhance BKE_library_make_local() to make it much quicker in complex cases.
Basic idea is to split first loop in two, and run checks before making
anything actually local, to detect data-blocks that we can directly make
local (because we are sure they are only used by already/future local
datablocks).
This allows to avoid a lot of overhead in later 'cleanup' steps of this
function, here with barbershop shot it's four times quicker (from 190s to 48s).
We are still far from the instantaneous results of MakeLocal in 2.77,
but in that version main characters lose their connection to their
armature and remain static after makelocal, so guess new code is still
better. ;)
There are probably more optimizations possible here, but would rather
polish this area of code once we get rid of proxies, those really
make it a nightmare to work on.
Diffstat (limited to 'source/blender/blenkernel/BKE_library_query.h')
-rw-r--r-- | source/blender/blenkernel/BKE_library_query.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_library_query.h b/source/blender/blenkernel/BKE_library_query.h index c6b63754b57..1fd671953c2 100644 --- a/source/blender/blenkernel/BKE_library_query.h +++ b/source/blender/blenkernel/BKE_library_query.h @@ -89,5 +89,6 @@ bool BKE_library_ID_is_indirectly_used(struct Main *bmain, void *idv); void BKE_library_ID_test_usages(struct Main *bmain, void *idv, bool *is_used_local, bool *is_used_linked); void BKE_library_tag_unused_linked_data(struct Main *bmain, const bool do_init_tag); +void BKE_library_indirectly_used_data_tag_clear(struct Main *bmain); #endif /* __BKE_LIBRARY_QUERY_H__ */ |