diff options
author | Bastien Montagne <bastien@blender.org> | 2022-07-27 11:49:29 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-07-27 12:10:45 +0300 |
commit | 13e17507c069e2e3eb4d4070b495073c28209215 (patch) | |
tree | 1c6a0a9f6c63fd94d81130435463255beb70e17f /source/blender/blenkernel/BKE_lib_id.h | |
parent | 4dd409a185e2211e541479d6a878b17d5c7e2bdf (diff) |
Fix crashes due to non-uniqueness in ID names in some cases.
Liboverrides are doing some very low-level manipulation of IDs in apply
code, to reduce over-head of name and sorting handling.
This requires specific care to ensure thatr the new namemap runtime data
remains up-to-date and valid. Otherwise, names of existing IDs would be
missing from the map, which would later lead to having several different
IDs with the same name. Critical corruption in Blender ID management.
Reported by animators at the Blender studio.
Regression from rB7f8d05131a77.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_id.h')
-rw-r--r-- | source/blender/blenkernel/BKE_lib_id.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index 59c842d614e..f4265dfd004 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -254,6 +254,8 @@ enum { LIB_ID_FREE_NO_DEG_TAG = 1 << 8, /** Do not attempt to remove freed ID from UI data/notifiers/... */ LIB_ID_FREE_NO_UI_USER = 1 << 9, + /** Do not remove freed ID's name from a potential runtime namemap. */ + LIB_ID_FREE_NO_NAMEMAP_REMOVE = 1 << 10, }; void BKE_libblock_free_datablock(struct ID *id, int flag) ATTR_NONNULL(); |