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-03-12 11:41:00 +0300
committerBastien Montagne <bastien@blender.org>2021-03-12 11:46:11 +0300
commit4781ab0969cdb4e39a2a9947f2b1a613b13b6235 (patch)
treeaa80f528821e1f1ecc6ea481a1f3970a8e00ac9e /source/blender/blenkernel/BKE_lib_remap.h
parentfd4c01a75c34fa88a20d3967d02996c0c9815efe (diff)
IDRemap: Add option to also remap internal runtime ID pointers.
In some cases (advanced, low-level), we also want to remap pointers like `ID.newid` or `ID.orig_id`. Only known case currently is `id_delete`, to avoid leaving potential access to freed memory. See next commit and T86501.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_remap.h')
-rw-r--r--source/blender/blenkernel/BKE_lib_remap.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_lib_remap.h b/source/blender/blenkernel/BKE_lib_remap.h
index 6e81273b82b..705d2b030e5 100644
--- a/source/blender/blenkernel/BKE_lib_remap.h
+++ b/source/blender/blenkernel/BKE_lib_remap.h
@@ -78,6 +78,13 @@ enum {
ID_REMAP_SKIP_OVERRIDE_LIBRARY = 1 << 5,
/** Don't touch the user count (use for low level actions such as swapping pointers). */
ID_REMAP_SKIP_USER_CLEAR = 1 << 6,
+ /**
+ * Force internal ID runtime pointers (like `ID.newid`, `ID.orig_id` etc.) to also be processed.
+ * This should only be needed in some very specific cases, typically only BKE ID management code
+ * should need it (e.g. required from `id_delete` to ensure no runtime pointer remains using
+ * freed ones).
+ */
+ ID_REMAP_FORCE_INTERNAL_RUNTIME_POINTERS = 1 << 7,
};
/* Note: Requiring new_id to be non-null, this *may* not be the case ultimately,