Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-04 06:40:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-04 06:47:02 +0300
commitb5c841498c468771219b89c6b58bc751ee4e2472 (patch)
treee6d48678caf56c1811a1fe9cd218a0847a42c6a6
parente6a917cd4e94841b72a9a7b4fb777fa00a37d2f9 (diff)
Fix adding a paint texture slot not refreshing
Adding a new slot wasn't refreshing when the object had no material.
-rw-r--r--source/blender/blenkernel/intern/material.c3
1 files changed, 2 insertions, 1 deletions
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);