Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 13 Jul 2017 11:24:02 +0000 (21:24 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 13 Jul 2017 11:24:02 +0000 (21:24 +1000)
source/blender/editors/sculpt_paint/paint_image_proj.c

index d47c96bf22cb303a3bdefb7ddd82114a82878bff..eeb357d43e725b01fd5521475178e70ea7b13712 100644 (file)
@@ -3713,8 +3713,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;
                        }