Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 20 Mar 2018 10:33:59 +0000 (11:33 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 20 Mar 2018 10:33:59 +0000 (11:33 +0100)
Conflicts:
source/blender/blenkernel/intern/library_query.c

1  2 
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/material.c

index 27a2916ef922b65db54a0ea67cceb8020c5220ea,d59658a2a078e271ec65a816b5d80a093783d2b4..bed2244702f00ca3fe53389af6b25c47ada6bc10
@@@ -672,7 -691,9 +672,10 @@@ void BKE_library_foreach_ID_link(Main *
                                        library_foreach_ID_as_subdata_link((ID **)&material->nodetree, callback, user_data, flag, &data);
                                }
                                CALLBACK_INVOKE(material->group, IDWALK_CB_USER);
 +                              CALLBACK_INVOKE(material->edit_image, IDWALK_CB_USER);
+                               if (material->texpaintslot != NULL) {
+                                       CALLBACK_INVOKE(material->texpaintslot->ima, IDWALK_CB_NOP);
+                               }
                                break;
                        }
  
index a0059a99473f246b80f60f23423dbc487d1d08e8,01f166253861e52e5db75ad6b30eee6366d7c2b4..2971f56c775a01093c7473889e3970c32766aed6
@@@ -261,9 -256,11 +261,13 @@@ void BKE_material_copy_data(Main *bmain
                ma_dst->preview = NULL;
        }
  
+       if (ma_src->texpaintslot != NULL) {
+               ma_dst->texpaintslot = MEM_dupallocN(ma_src->texpaintslot);
+       }
        BLI_listbase_clear(&ma_dst->gpumaterial);
 +
 +      /* TODO Duplicate Engine Settings and set runtime to NULL */
  }
  
  Material *BKE_material_copy(Main *bmain, const Material *ma)