Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-01-30 23:41:44 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-01-31 00:33:20 +0300
commiteadfd901ad7c3af4d85b05618352a96a9b4ca9de (patch)
treea577398a8d9ae19219e41372ff7c6e01a32b4642 /source/blender/blenkernel/BKE_library_query.h
parentfbd28d375a758d81b925867efef4d02482d414c6 (diff)
Optimization: pass Main to BKE_library_foreach_ID_link() and use its relations.
Use Main->relations in BKE_library_foreach_ID_link(), when possible (i.e. IDWALK_READONLY is set), and if the data is available of course. This is quite minor optimization, no sensible improvements are expected, but does not hurt either to avoid potentially tens of looping over e.g. objects constraints and modifiers, or heap of drivers...
Diffstat (limited to 'source/blender/blenkernel/BKE_library_query.h')
-rw-r--r--source/blender/blenkernel/BKE_library_query.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_library_query.h b/source/blender/blenkernel/BKE_library_query.h
index c80eb7b0760..693d5e9a28b 100644
--- a/source/blender/blenkernel/BKE_library_query.h
+++ b/source/blender/blenkernel/BKE_library_query.h
@@ -80,7 +80,8 @@ enum {
};
/* Loop over all of the ID's this datablock links to. */
-void BKE_library_foreach_ID_link(struct ID *id, LibraryIDLinkCallback callback, void *user_data, int flag);
+void BKE_library_foreach_ID_link(
+ struct Main *bmain, struct ID *id, LibraryIDLinkCallback callback, void *user_data, int flag);
void BKE_library_update_ID_link_user(struct ID *id_dst, struct ID *id_src, const int cd_flag);
int BKE_library_ID_use_ID(struct ID *id_user, struct ID *id_used);