Commit: b5c841498c468771219b89c6b58bc751ee4e2472
Author: Campbell Barton
Date:   Mon Feb 4 14:40:11 2019 +1100
Branches: master
https://developer.blender.org/rBb5c841498c468771219b89c6b58bc751ee4e2472

Fix adding a paint texture slot not refreshing

Adding a new slot wasn't refreshing when the
object had no material.

===================================================================

M       source/blender/blenkernel/intern/material.c

===================================================================

diff --git a/source/blender/blenkernel/intern/material.c 
b/source/blender/blenkernel/intern/material.c
index b4dffc11037..17a26f1a4ba 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1089,7 +1089,8 @@ void BKE_texpaint_slot_refresh_cache(Scene *scene, 
Material *ma)
        if (!ma)
                return;
 
-       DEG_id_tag_update(&ma->id, ID_RECALC_SHADING);
+       /* COW needed when adding texture slot on an object with no materials. 
*/
+       DEG_id_tag_update(&ma->id, ID_RECALC_SHADING | ID_RECALC_COPY_ON_WRITE);
 
        if (ma->texpaintslot) {
                MEM_freeN(ma->texpaintslot);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to