[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60358] trunk/blender/source/blender/ editors/sculpt_paint/sculpt.c: Fix #36695, brushes would behave differently in scaled objects (tested

Antony Riakiotakis kalast at gmail.com
Tue Sep 24 17:17:57 CEST 2013


Revision: 60358
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60358
Author:   psy-fi
Date:     2013-09-24 15:17:57 +0000 (Tue, 24 Sep 2013)
Log Message:
-----------
Fix #36695, brushes would behave differently in scaled objects (tested
by applying scale). It looks that only layer brush needs this
correction.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-09-24 15:16:46 UTC (rev 60357)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-09-24 15:17:57 UTC (rev 60358)
@@ -1791,7 +1791,6 @@
 
 	/* offset with as much as possible factored in already */
 	mul_v3_v3fl(offset, ss->cache->sculpt_normal_symm, ss->cache->radius);
-	mul_v3_v3(offset, ss->cache->scale);
 	mul_v3_fl(offset, bstrength);
 
 	/* threaded loop over nodes */
@@ -1836,7 +1835,6 @@
 
 	/* offset with as much as possible factored in already */
 	mul_v3_v3fl(offset, ss->cache->sculpt_normal_symm, ss->cache->radius);
-	mul_v3_v3(offset, ss->cache->scale);
 	mul_v3_fl(offset, bstrength);
 	
 	/* we divide out the squared alpha and multiply by the squared crease to give us the pinch strength */
@@ -2265,8 +2263,7 @@
 				if (vd.fno) copy_v3_v3(val, vd.fno);
 				else normal_short_to_float_v3(val, vd.no);
 				
-				mul_v3_fl(val, fade * ss->cache->radius);
-				mul_v3_v3v3(proxy[vd.i], val, ss->cache->scale);
+				mul_v3_v3fl(proxy[vd.i], val, fade * ss->cache->radius);
 
 				if (vd.mvert)
 					vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
@@ -2645,8 +2642,7 @@
 
 	displace = radius * offset;
 
-	mul_v3_v3v3(temp, an, ss->cache->scale);
-	mul_v3_fl(temp, displace);
+	mul_v3_v3fl(temp, an, displace);
 	add_v3_v3(fc, temp);
 
 	#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
@@ -2715,8 +2711,7 @@
 
 	displace = radius * (0.25f + offset);
 
-	mul_v3_v3v3(temp, an, ss->cache->scale);
-	mul_v3_fl(temp, displace);
+	mul_v3_v3fl(temp, an, displace);
 	add_v3_v3(fc, temp);
 
 	/* add_v3_v3v3(p, ss->cache->location, an); */
@@ -2803,8 +2798,7 @@
 
 	displace = radius * (0.25f + offset);
 
-	mul_v3_v3v3(temp, sn, ss->cache->scale);
-	mul_v3_fl(temp, displace);
+	mul_v3_v3fl(temp, sn, displace);
 	add_v3_v3(fc, temp);
 
 	/* init mat */
@@ -2883,8 +2877,7 @@
 
 	displace = radius * offset;
 
-	mul_v3_v3v3(temp, an, ss->cache->scale);
-	mul_v3_fl(temp, displace);
+	mul_v3_v3fl(temp, an, displace);
 	add_v3_v3(fc, temp);
 
 	#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
@@ -2947,8 +2940,7 @@
 
 	displace = -radius * offset;
 
-	mul_v3_v3v3(temp, an, ss->cache->scale);
-	mul_v3_fl(temp, displace);
+	mul_v3_v3fl(temp, an, displace);
 	add_v3_v3(fc, temp);
 
 	#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)




More information about the Bf-blender-cvs mailing list