diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-07-24 12:29:55 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-07-24 12:29:55 +0400 |
commit | 390752a11ce5680c21ee1e2a77e9d23f6b8262f0 (patch) | |
tree | 6824ccb0e911d77fbc5e089f8df596928a524a68 /source/blender/editors/render | |
parent | f5cee25a1229420c6e5df4aee63a191f8268f6a0 (diff) |
Material could end up with invalid texture paint slots on changing
engine.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_update.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index f11af9b4d51..8a034fdd8b5 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -45,6 +45,7 @@ #include "BLI_utildefines.h" #include "BKE_context.h" +#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_icons.h" #include "BKE_main.h" @@ -178,7 +179,10 @@ void ED_render_engine_changed(Main *bmain) /* reset texture painting */ for (ma = bmain->mat.first; ma; ma = ma->id.next) { - BKE_texpaint_slots_clear(ma); + if (ma->texpaintslot) { + BKE_texpaint_slots_clear(ma); + DAG_id_tag_update(&ma->id, 0); + } } } |