[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57631] branches/soc-2013-paint/source/ blender/editors/sculpt_paint/paint_image_proj.c: Fix masks not working well with recent mask pressure cutoff feature in

Antony Riakiotakis kalast at gmail.com
Fri Jun 21 12:35:52 CEST 2013


Revision: 57631
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57631
Author:   psy-fi
Date:     2013-06-21 10:35:52 +0000 (Fri, 21 Jun 2013)
Log Message:
-----------
Fix masks not working well with recent mask pressure cutoff feature in
projection painting (2d case coming next). Also revert 56986, it seems
to not be necessary anymore? At least bug #35426 seems to be working
without it now. I hope this won't backfire

Modified Paths:
--------------
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_proj.c

Modified: branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
--- branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_proj.c	2013-06-21 10:35:47 UTC (rev 57630)
+++ branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_proj.c	2013-06-21 10:35:52 UTC (rev 57631)
@@ -252,7 +252,6 @@
 	bool do_masking;              /* use masking during painting. Some operations such as airbrush may disable */
 	bool is_texbrush;              /* only to avoid running  */
 	bool is_maskbrush;            /* mask brush is applied before masking */
-	bool is_maskbrush_tiled;      /* mask brush is applied after masking */
 #ifndef PROJ_DEBUG_NOSEAMBLEED
 	float seam_bleed_px;
 #endif
@@ -3895,10 +3894,6 @@
 							mask *= texrgba[3];
 						}
 
-						if (ps->is_maskbrush_tiled) {
-							mask *= BKE_brush_sample_masktex(ps->scene, ps->brush, projPixel->projCoSS, thread_index, pool);
-						}
-
 						/* extra mask for normal, layer stencil, .. */
 						mask *= ((float)projPixel->mask) * (1.0f / 65535.0f);
 
@@ -4117,24 +4112,13 @@
 		                  (brush->mtex.tex && !ELEM3(brush->mtex.brush_map_mode, MTEX_MAP_MODE_TILED, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_3D)))
 		                 ? false : true;
 		ps->is_texbrush = (brush->mtex.tex && brush->imagepaint_tool == PAINT_TOOL_DRAW) ? true : false;
-		ps->is_maskbrush = false;
-		ps->is_maskbrush_tiled = false;
-		if (brush->mask_mtex.tex) {
-			if (ELEM(brush->mask_mtex.brush_map_mode, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED)
-			    && !brush->mask_pressure) {
-				ps->is_maskbrush_tiled = true;
-			}
-			else {
-				ps->is_maskbrush = true;
-			}
-		}
+		ps->is_maskbrush = (brush->mask_mtex.tex)? true : false;
 	}
 	else {
 		/* brush may be NULL*/
 		ps->do_masking = false;
 		ps->is_texbrush = false;
 		ps->is_maskbrush = false;
-		ps->is_maskbrush_tiled = false;
 	}
 
 	/* sizeof(ProjPixel), since we alloc this a _lot_ */
@@ -4325,7 +4309,6 @@
 	/* override */
 	ps.is_texbrush = false;
 	ps.is_maskbrush = false;
-	ps.is_maskbrush_tiled = false;
 	ps.do_masking = false;
 	orig_brush_size = BKE_brush_size_get(scene, ps.brush);
 	BKE_brush_size_set(scene, ps.brush, 32); /* cover the whole image */




More information about the Bf-blender-cvs mailing list