diff options
author | Bastien Montagne <bastien@blender.org> | 2022-07-27 15:56:40 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-07-27 16:33:29 +0300 |
commit | 9f53272df461ef040aed422e7fdbdaf390e23341 (patch) | |
tree | 648f08404f1238e3e0b8981b5c0accbb8fd00602 /source | |
parent | 58dcd2099876d679f7bc51901c82b2f04e9ce659 (diff) |
Fix more issues with new name map and liboverrides.
Follow-up to rB13e17507c069, forgot to handle shapekeys...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index 8ca42905042..4ad8d26cd2a 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -3657,7 +3657,9 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) Key *tmp_key = BKE_key_from_id(tmp_id); if (local_key != nullptr && tmp_key != nullptr) { tmp_key->id.flag |= (local_key->id.flag & LIB_EMBEDDED_DATA_LIB_OVERRIDE); + BKE_main_namemap_remove_name(bmain, &tmp_key->id, tmp_key->id.name + 2); tmp_key->id.lib = local_key->id.lib; + BLI_strncpy(tmp_key->id.name, local_key->id.name, sizeof(tmp_key->id.name)); } PointerRNA rnaptr_src, rnaptr_dst, rnaptr_storage_stack, *rnaptr_storage = nullptr; @@ -3741,6 +3743,8 @@ void BKE_lib_override_library_main_update(Main *bmain) Main *orig_gmain = G_MAIN; G_MAIN = bmain; + BLI_assert(BKE_main_namemap_validate(bmain)); + FOREACH_MAIN_ID_BEGIN (bmain, id) { if (id->override_library != nullptr) { BKE_lib_override_library_update(bmain, id); |