[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57716] branches/soc-2013-paint/source/ blender: Fix 2d masking for pressure masking, also change pressure cutoff so that

Antony Riakiotakis kalast at gmail.com
Tue Jun 25 00:41:38 CEST 2013


Revision: 57716
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57716
Author:   psy-fi
Date:     2013-06-24 22:41:38 +0000 (Mon, 24 Jun 2013)
Log Message:
-----------
Fix 2d masking for pressure masking, also change pressure cutoff so that
high luminance areas show up first when pressure increases.

Modified Paths:
--------------
    branches/soc-2013-paint/source/blender/blenkernel/intern/brush.c
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_2d.c

Modified: branches/soc-2013-paint/source/blender/blenkernel/intern/brush.c
===================================================================
--- branches/soc-2013-paint/source/blender/blenkernel/intern/brush.c	2013-06-24 22:41:37 UTC (rev 57715)
+++ branches/soc-2013-paint/source/blender/blenkernel/intern/brush.c	2013-06-24 22:41:38 UTC (rev 57716)
@@ -761,7 +761,7 @@
 
 	switch(br->mask_pressure) {
 		case BRUSH_MASK_PRESSURE_CUTOFF:
-			intensity  = (intensity < ups->pressure_value)? 1.0 : 0.0;
+			intensity  = ((1.0 - intensity) < ups->pressure_value)? 1.0 : 0.0;
 			break;
 		case BRUSH_MASK_PRESSURE_RAMP:
 			intensity = ups->pressure_value + intensity*(1.0 - ups->pressure_value);

Modified: branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_2d.c
===================================================================
--- branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_2d.c	2013-06-24 22:41:37 UTC (rev 57715)
+++ branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_2d.c	2013-06-24 22:41:38 UTC (rev 57716)
@@ -609,7 +609,9 @@
 	if (painter->cache.is_maskbrush) {
 		bool renew_maxmask = false;
 		/* invalidate case for all mapping modes */
-		if (diameter != cache->lastsize) {
+		if (diameter != cache->lastsize ||
+		    alpha != cache->lastalpha)
+		{
 			renew_maxmask = true;
 		}
 		if (brush->mask_mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) {
@@ -662,8 +664,7 @@
 	    brush->jitter != cache->lastjitter ||
 	    tex_rotation != cache->last_tex_rotation ||
 	    mask_rotation != cache->last_mask_rotation ||
-	    do_random ||
-	    brush->mask_pressure)
+	    do_random)
 	{
 		if (cache->ibuf) {
 			IMB_freeImBuf(cache->ibuf);




More information about the Bf-blender-cvs mailing list