diff options
author | Bastien Montagne <bastien@blender.org> | 2021-11-01 16:42:56 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-11-01 17:46:28 +0300 |
commit | e85e126e3f52723da62b258cc9b196a9f15e34fd (patch) | |
tree | 596b6542545e9f562fdc2448dea34ed003a103d5 /source/blender/blenkernel/intern/lib_remap.c | |
parent | 64de6ad4fe4ada417869c936106f184e455b848d (diff) |
IDRemap: Add option to force remapping obdata in edit mode.
In theory we should never allow remapping of Objects' obdata ID pointer
when the object is in Edit mode. But there are some cases were this is
needed, so adding yet another exception option to remapping flags.
Preliminary change to fix T92629.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_remap.c')
-rw-r--r-- | source/blender/blenkernel/intern/lib_remap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c index 248d85bcae0..15cc9d3c653 100644 --- a/source/blender/blenkernel/intern/lib_remap.c +++ b/source/blender/blenkernel/intern/lib_remap.c @@ -132,7 +132,8 @@ static int foreach_libblock_remap_callback(LibraryIDLinkCallbackData *cb_data) const bool is_obj = (GS(id_owner->name) == ID_OB); const bool is_obj_proxy = (is_obj && (((Object *)id_owner)->proxy || ((Object *)id_owner)->proxy_group)); - const bool is_obj_editmode = (is_obj && BKE_object_is_in_editmode((Object *)id_owner)); + const bool is_obj_editmode = (is_obj && BKE_object_is_in_editmode((Object *)id_owner) && + (id_remap_data->flag & ID_REMAP_FORCE_OBDATA_IN_EDITMODE) == 0); const bool is_never_null = ((cb_flag & IDWALK_CB_NEVER_NULL) && (new_id == NULL) && (id_remap_data->flag & ID_REMAP_FORCE_NEVER_NULL_USAGE) == 0); const bool skip_reference = (id_remap_data->flag & ID_REMAP_SKIP_OVERRIDE_LIBRARY) != 0; |