diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-01-25 12:11:12 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-01-25 12:11:12 +0300 |
commit | 566eb60d817da3e32661efda59b20f6f893ff7cc (patch) | |
tree | 48b068dcc571f03e364dfcad750768616cf0b2b3 /source/blender | |
parent | 693b41eb17557ba12e7c64c5ba589c499ff45c4d (diff) |
Fix T53363: Blender won't update mesh's usercount when deleting object datablocks in Editmode.
Only do special handling of ob->data pointer in case we are remapping to
a valid (non-NULL) other obdata. Otherwise, handle it as any other
'remapping to NULL' case.
Hopefully not breaking anything else...
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library_remap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index 49effd033e3..31dc46a55f0 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -194,9 +194,11 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id id->tag |= LIB_TAG_DOIT; } - /* Special hack in case it's Object->data and we are in edit mode (skipped_direct too). */ + /* Special hack in case it's Object->data and we are in edit mode, and new_id is not NULL + * (otherwise, we follow common NEVER_NULL flags). + * (skipped_indirect too). */ if ((is_never_null && skip_never_null) || - (is_obj_editmode && (((Object *)id)->data == *id_p)) || + (is_obj_editmode && (((Object *)id)->data == *id_p) && new_id != NULL) || (skip_indirect && is_indirect)) { if (is_indirect) { |