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-07-07 21:51:21 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-07 22:21:33 +0300
commite2d469f8786530488ea3afc257b3ff33c07990fc (patch)
treef30c9bd2afc8be35cea3fb47dc0bcd57cae11db5 /source/blender/blenkernel/BKE_library_query.h
parentb651812721ebf7e6da43e122514df7b69035386d (diff)
libquery: add new 'BKE_library_idtype_can_use_idtype()' helper.
This should allow us to avoid a lot of useless processing when iterating over the whole main database (unlink/remap/usages checks/etc.). Note that some ID types report they can use any type for now, due to fuzzyness/indefined nature of some usages (like constraints/modifiers/game logic, or ID pointer of nodes...). Maybe we could address this (like e.g. adding defines in relevant headers to restrict ID types used by constraints, by modifiers, etc.). But don’t think this is top priority for now.
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 77a3b31f805..f7cdf1f50fc 100644
--- a/source/blender/blenkernel/BKE_library_query.h
+++ b/source/blender/blenkernel/BKE_library_query.h
@@ -76,6 +76,8 @@ void BKE_library_update_ID_link_user(struct ID *id_dst, struct ID *id_src, const
int BKE_library_ID_use_ID(struct ID *id_user, struct ID *id_used);
+bool BKE_library_idtype_can_use_idtype(const short id_type_owner, const short id_type_used);
+
bool BKE_library_ID_is_locally_used(struct Main *bmain, void *idv);
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);