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:
authorAntony Riakiotakis <kalast@gmail.com>2014-07-24 12:29:55 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-07-24 12:29:55 +0400
commit390752a11ce5680c21ee1e2a77e9d23f6b8262f0 (patch)
tree6824ccb0e911d77fbc5e089f8df596928a524a68 /source/blender/editors
parentf5cee25a1229420c6e5df4aee63a191f8268f6a0 (diff)
Material could end up with invalid texture paint slots on changing
engine.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/render/render_update.c6
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);
+ }
}
}