Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 25 Jan 2018 09:15:31 +0000 (10:15 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 25 Jan 2018 09:15:31 +0000 (10:15 +0100)
Conflicts:
source/blender/blenkernel/intern/library_remap.c

1  2 
source/blender/blenkernel/intern/library_remap.c

index fb672cb8b9f8f6a1f159767bc315f28a75577ca3,31dc46a55f09eff8e4d7d7008f8926f561e65e7c..6d4c4082810e3a256962a717619a57882950416c
@@@ -205,11 -194,12 +205,13 @@@ static int foreach_libblock_remap_callb
                        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))
 +                  (skip_indirect && is_indirect) ||
 +                  (is_reference && skip_reference))
                {
                        if (is_indirect) {
                                id_remap_data->skipped_indirect++;