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>2016-01-06 21:34:42 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-01-06 21:48:10 +0300
commit4acf0f05a1ec0b96c4a2e9c3628190f52a3590e2 (patch)
tree6c58b90f9133ce30d3e7b125181c5c267885b698 /source/blender/blenkernel/BKE_library_query.h
parentea7a2766f6054bf991dee746408f45c535c324b5 (diff)
'users of ID' py API.
This mainly adds bpy.data.user_map() method, which goes over the whole Main database to build a mapping (dict) {ID: {users_of_that_ID}}. Very handy to check and debug ID usages, but could also be really valuable for py addons creating temporary scenes, or some exporters, etc. Note: current code in master's libquery misses some IDs (and reports some it should not, like nodetrees), this is fixed in id-remap but still needs serious review before going to master. This basically means that current bpy.data.user_map() **will not** report a complete and exhaustive state of dependencies between IDs. Should work OK in most cases though. Original work/idea comes from id-remap branch, was heavily reworked by @campbellbarton and myself for master. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D1678
Diffstat (limited to 'source/blender/blenkernel/BKE_library_query.h')
-rw-r--r--source/blender/blenkernel/BKE_library_query.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_library_query.h b/source/blender/blenkernel/BKE_library_query.h
index 194b6f0e6b3..f07644dc833 100644
--- a/source/blender/blenkernel/BKE_library_query.h
+++ b/source/blender/blenkernel/BKE_library_query.h
@@ -65,4 +65,6 @@ enum {
void BKE_library_foreach_ID_link(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);
+
#endif /* __BKE_LIBRARY_QUERY_H__ */