[Bf-blender-cvs] [248bba81e7a] master: Fix texture paint crash when painting onto stencil

Campbell Barton noreply at git.blender.org
Thu Jul 13 12:42:43 CEST 2017


Commit: 248bba81e7a0312addaecba4626ed51f0df79161
Author: Campbell Barton
Date:   Thu Jul 13 20:48:55 2017 +1000
Branches: master
https://developer.blender.org/rB248bba81e7a0312addaecba4626ed51f0df79161

Fix texture paint crash when painting onto stencil

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

M	source/blender/editors/sculpt_paint/paint_image_proj.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index d0f1cc99b8d..b43581170d0 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3712,8 +3712,12 @@ static void project_paint_prepare_all_faces(
 				}
 
 				/* don't allow using the same inage for painting and stencilling */
-				if (slot->ima == ps->stencil_ima)
+				if (slot->ima == ps->stencil_ima) {
+					/* While this shouldn't be used, face-winding reads all polys.
+					 * It's less trouble to set all faces to valid UV's, avoiding NULL checks all over. */
+					ps->dm_mloopuv[lt->poly] = mloopuv_base;
 					continue;
+				}
 				
 				tpage = slot->ima;
 			}




More information about the Bf-blender-cvs mailing list