[Bf-blender-cvs] [390752a] master: Material could end up with invalid texture paint slots on changing engine.

Antony Riakiotakis noreply at git.blender.org
Thu Jul 24 10:30:06 CEST 2014


Commit: 390752a11ce5680c21ee1e2a77e9d23f6b8262f0
Author: Antony Riakiotakis
Date:   Thu Jul 24 10:29:55 2014 +0200
Branches: master
https://developer.blender.org/rB390752a11ce5680c21ee1e2a77e9d23f6b8262f0

Material could end up with invalid texture paint slots on changing
engine.

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

M	source/blender/editors/render/render_update.c

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

diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index f11af9b..8a034fd 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);
+		}
 	}
 }




More information about the Bf-blender-cvs mailing list