[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28991] branches/soc-2010-jwilkins/source/ blender/editors/sculpt_paint/sculpt.c: Fixed bug in clay ( miscalculated the flatten plane)

Jason Wilkins Jason.A.Wilkins at gmail.com
Wed May 26 00:45:53 CEST 2010


Revision: 28991
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28991
Author:   jwilkins
Date:     2010-05-26 00:45:53 +0200 (Wed, 26 May 2010)

Log Message:
-----------
Fixed bug in clay (miscalculated the flatten plane)

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-05-25 20:22:21 UTC (rev 28990)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-05-25 22:45:53 UTC (rev 28991)
@@ -739,17 +739,17 @@
 /* Handles clipping against a mirror modifier and SCULPT_LOCK axis flags */
 static void sculpt_clip(Sculpt *sd, SculptSession *ss, float *co, const float val[3])
 {
-	int i;
+    int i;
 
-	for(i=0; i<3; ++i) {
-		if(sd->flags & (SCULPT_LOCK_X << i))
-			continue;
+    for(i=0; i<3; ++i) {
+        if(sd->flags & (SCULPT_LOCK_X << i))
+            continue;
 
-		if((ss->cache->flag & (CLIP_X << i)) && (fabs(co[i]) <= ss->cache->clip_tolerance[i]))
-			co[i]= 0.0f;
-		else
-			co[i]= val[i];
-	}		
+        if((ss->cache->flag & (CLIP_X << i)) && (fabs(co[i]) <= ss->cache->clip_tolerance[i]))
+            co[i]= 0.0f;
+        else
+            co[i]= val[i];
+    }		
 }
 
 static void add_norm_if(float view_vec[3], float out[3], float out_flip[3], float fno[3])
@@ -1366,7 +1366,7 @@
     calc_flatten_center(sd, ss, nodes, totnode, center);
 
     mul_v3_v3v3(temp, area_normal, ss->cache->scale);
-    mul_v3_v3fl(temp, ss->cache->scale, ss->cache->radius * bstrength);
+    mul_v3_fl(temp, ss->cache->radius * bstrength);
     add_v3_v3(center, temp);
 
     flip = bstrength < 0;





More information about the Bf-blender-cvs mailing list