[Bf-blender-cvs] [f44a34fc55b] master: BKE_lib_remap: add comment note about some remapping options.
Bastien Montagne
noreply at git.blender.org
Fri Apr 29 17:57:51 CEST 2022
Commit: f44a34fc55ba367e201d13cf0a1eddfe13199f8a
Author: Bastien Montagne
Date: Fri Apr 29 16:31:27 2022 +0200
Branches: master
https://developer.blender.org/rBf44a34fc55ba367e201d13cf0a1eddfe13199f8a
BKE_lib_remap: add comment note about some remapping options.
Fact that those options are only used in a specific case, and that the
same behavior is ensured in a different part of the code in other cases,
is fairly confusing and unfortunate... At least document it.
===================================================================
M source/blender/blenkernel/BKE_lib_remap.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_lib_remap.h b/source/blender/blenkernel/BKE_lib_remap.h
index b66d53b2321..57afbefd508 100644
--- a/source/blender/blenkernel/BKE_lib_remap.h
+++ b/source/blender/blenkernel/BKE_lib_remap.h
@@ -182,11 +182,18 @@ typedef enum IDRemapperApplyOptions {
*
* For remapping the old ID users will be decremented and the new ID users will be
* incremented. When un-assigning the old ID users will be decremented.
+ *
+ * NOTE: Currently unused by main remapping code, since usercount is handled by
+ * `foreach_libblock_remap_callback_apply` there, depending on whether the remapped pointer does
+ * use it or not. Need for rare cases in UI handling though (see e.g. `image_id_remap` in
+ * `space_image.c`).
*/
ID_REMAP_APPLY_UPDATE_REFCOUNT = (1 << 0),
/**
* Make sure that the new ID datablock will have a 'real' user.
+ *
+ * NOTE: See Note for #ID_REMAP_APPLY_UPDATE_REFCOUNT above.
*/
ID_REMAP_APPLY_ENSURE_REAL = (1 << 1),
More information about the Bf-blender-cvs
mailing list