diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-04 06:40:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-04 06:47:02 +0300 |
commit | b5c841498c468771219b89c6b58bc751ee4e2472 (patch) | |
tree | e6d48678caf56c1811a1fe9cd218a0847a42c6a6 /source | |
parent | e6a917cd4e94841b72a9a7b4fb777fa00a37d2f9 (diff) |
Fix adding a paint texture slot not refreshing
Adding a new slot wasn't refreshing when the
object had no material.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 3 |
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); |