From d609bd366814a8579606fce74a3e1ccafdd0454d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 14 Oct 2025 16:59:34 +0200 Subject: [PATCH] Cleanup: document id_lib_extern() Add documentation for `id_lib_extern()`. No functional changes. Pull Request: https://projects.blender.org/blender/blender/pulls/148006 --- source/blender/blenkernel/BKE_lib_id.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/blender/blenkernel/BKE_lib_id.hh b/source/blender/blenkernel/BKE_lib_id.hh index f7f4a6475d7..f77024bcaa1 100644 --- a/source/blender/blenkernel/BKE_lib_id.hh +++ b/source/blender/blenkernel/BKE_lib_id.hh @@ -615,6 +615,17 @@ void BKE_libblock_management_main_remove(Main *bmain, void *idv); void BKE_libblock_management_usercounts_set(Main *bmain, void *idv); void BKE_libblock_management_usercounts_clear(Main *bmain, void *idv); +/** + * Flag this linked ID as directly used by another ID in the current blend file. + * + * If the ID was marked as indirectly/weakly linked, those flags are cleared. + * + * This is a no-op when `id` is `nullptr` or not linked. + * + * This status is rechecked for the whole Main data-base as a step of pre-blendfile writing (see + * #write_id_direct_linked_data_process_cb() and its usage in #write_file_handle). This ensures + * that no reference to indirectly used IDs are kept in the written blendfile. + */ void id_lib_extern(ID *id); void id_lib_indirect_weak_link(ID *id); /**