[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30343] branches/soc-2010-jwilkins/source/ blender/editors/sculpt_paint/sculpt.c: * removed unneeded autosmooth_overlap

Jason Wilkins Jason.A.Wilkins at gmail.com
Wed Jul 14 22:18:23 CEST 2010


Revision: 30343
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30343
Author:   jwilkins
Date:     2010-07-14 22:18:19 +0200 (Wed, 14 Jul 2010)

Log Message:
-----------
* removed unneeded autosmooth_overlap

Modified Paths:
--------------
    branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c

Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-14 20:16:04 UTC (rev 30342)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-14 20:18:19 UTC (rev 30343)
@@ -86,7 +86,7 @@
 #include "RE_render_ext.h"
 #include "RE_shader_ext.h"
 
-#include "gpu_buffers.h"
+#include "GPU_buffers.h"
 
 #include <math.h>
 #include <stdlib.h>
@@ -229,8 +229,6 @@
 	int alt_smooth;
 
 	float plane_trim_squared;
-
-	float autosmooth_overlap;
 } StrokeCache;
 
 /* ===== OPENGL =====
@@ -580,7 +578,7 @@
 /* Return modified brush strength. Includes the direction of the brush, positive
    values pull vertices, negative values push. Uses tablet pressure and a
    special multiplier found experimentally to scale the strength factor. */
-static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather, float overlap)
+static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
 {
 	Brush *brush = paint_brush(&sd->paint);
 
@@ -590,6 +588,8 @@
 	float pressure     = brush->flag & BRUSH_ALPHA_PRESSURE	? cache->pressure : 1;
 	float pen_flip     = cache->pen_flip ? -1 : 1;
 	float invert       = cache->invert ? -1 : 1;
+	float accum        = integrate_overlap(brush);
+	float overlap      = (brush->flag & BRUSH_SPACE_ATTEN && brush->flag & BRUSH_SPACE && !(brush->flag & BRUSH_ANCHORED)) && (brush->spacing < 100) ? 1.0f/accum : 1; // spacing is integer percentage of radius, divide by 50 to get normalized diameter
 	float flip         = dir * invert * pen_flip;
 
 	switch(brush->sculpt_tool){
@@ -2403,10 +2403,10 @@
 
 		if (brush->sculpt_tool != SCULPT_TOOL_SMOOTH && brush->autosmooth_factor > 0) {
 			if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) {
-				smooth(sd, ss, nodes, totnode, brush->autosmooth_factor*(1-ss->cache->pressure)*ss->cache->autosmooth_overlap);
+				smooth(sd, ss, nodes, totnode, brush->autosmooth_factor*(1-ss->cache->pressure));
 			}
 			else {
-				smooth(sd, ss, nodes, totnode, brush->autosmooth_factor*ss->cache->autosmooth_overlap);
+				smooth(sd, ss, nodes, totnode, brush->autosmooth_factor);
 			}
 		}
 
@@ -2580,13 +2580,9 @@
 	int i;
 
 	float feather = calc_symmetry_feather(sd, ss->cache);
-	float accum   = integrate_overlap(brush);
-	float overlap = (brush->flag & BRUSH_SPACE_ATTEN && brush->flag & BRUSH_SPACE && !(brush->flag & BRUSH_ANCHORED)) && (brush->spacing < 100) ? 1.0f/accum : 1; // spacing is integer percentage of radius, divide by 50 to get normalized diameter
 
-	ss->cache->autosmooth_overlap = overlap;
+	cache->bstrength= brush_strength(sd, cache, feather);
 
-	cache->bstrength= brush_strength(sd, cache, feather, overlap);
-
 	cache->symmetry= symm;
 
 	/* symm is a bit combination of XYZ - 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */ 





More information about the Bf-blender-cvs mailing list