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 <bastien@blender.org>2021-02-25 14:37:31 +0300
committerBastien Montagne <bastien@blender.org>2021-02-25 19:48:54 +0300
commitb958a59c791f3f3ecd9039886b85920f0b12548c (patch)
tree40d67e02da3c76042c8015cf39db2abcb59a8149 /source/blender/blenkernel/BKE_lib_query.h
parent6daff9a08e79546a28a24a6306d9f067e7f7fa59 (diff)
BKE_lib_query: Add a function to detect and tag all unused IDs.
With the option to detect orphaned data recursively (i.e. if ID `a` is the only user of ID `b`, and ID `a` is unused, ID `b` will also get tagged as unused). To be used by the Purge operation.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_query.h')
-rw-r--r--source/blender/blenkernel/BKE_lib_query.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_lib_query.h b/source/blender/blenkernel/BKE_lib_query.h
index bdda5bb0372..f064d03261d 100644
--- a/source/blender/blenkernel/BKE_lib_query.h
+++ b/source/blender/blenkernel/BKE_lib_query.h
@@ -175,6 +175,13 @@ void BKE_library_ID_test_usages(struct Main *bmain,
bool *is_used_local,
bool *is_used_linked);
+void BKE_lib_query_unused_ids_tag(struct Main *bmain,
+ const int tag,
+ const bool do_local_ids,
+ const bool do_linked_ids,
+ const bool do_tag_recursive,
+ int *r_num_tagged);
+
void BKE_library_unused_linked_data_set_tag(struct Main *bmain, const bool do_init_tag);
void BKE_library_indirectly_used_data_tag_clear(struct Main *bmain);