only paint onto selected faces when painting mask is enabled. (request from Carsten)
authorCampbell Barton <ideasman42@gmail.com>
Thu, 2 Oct 2008 01:12:37 +0000 (01:12 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 2 Oct 2008 01:12:37 +0000 (01:12 +0000)
source/blender/src/imagepaint.c

index 164c368b6fae4070cc658511448afebd5d9c410b..cc3951f4e902f71ea88029b7cac3cc617c7c224e 100644 (file)
@@ -720,7 +720,9 @@ static void imapaint_paint_stroke(ImagePaintState *s, BrushPainter *painter, sho
 
        if (texpaint) {
                /* pick new face and image */
-               if (facesel_face_pick(s->me, mval, &newfaceindex, 0)) {
+               if (    facesel_face_pick(s->me, mval, &newfaceindex, 0) &&
+                               ((G.f & G_FACESELECT)==0 || (s->me->mface+newfaceindex)->flag & ME_FACE_SEL)
+               ) {
                        ImBuf *ibuf;
                        
                        newimage = (Image*)((s->me->mtface+newfaceindex)->tpage);