[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33888] trunk/blender/source/blender/ editors/sculpt_paint/sculpt.c: Bugfix #25371
Ton Roosendaal
ton at blender.org
Fri Dec 24 16:30:14 CET 2010
Revision: 33888
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33888
Author: ton
Date: 2010-12-24 16:30:13 +0100 (Fri, 24 Dec 2010)
Log Message:
-----------
Bugfix #25371
Sculpt: brush type "Grab" with option "Frontface only" was flipping
back and forth when grabbing outside of original brush area.
Reason: it was calling a function that used deformed coordinates
for getting normal, clipped by brush area. Now it uses original
coordinates, so it always finds normal.
Nicholas can determine better if tag "cache->original" should be
set as default for this brush type, this far I don't dare to go :)
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 2010-12-24 13:24:26 UTC (rev 33887)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c 2010-12-24 15:30:13 UTC (rev 33888)
@@ -411,7 +411,6 @@
else {
dot= dot_v3v3(fno, sculpt_normal);
}
-
return dot > 0 ? dot : 0;
}
else {
@@ -1331,9 +1330,14 @@
int n;
float len;
- if (brush->normal_weight > 0 || brush->flag & BRUSH_FRONTFACE)
+ if (brush->normal_weight > 0 || brush->flag & BRUSH_FRONTFACE) {
+ int cache= 1;
+ /* grab brush requires to test on original data */
+ SWAP(int, ss->cache->original, cache);
calc_sculpt_normal(sd, ss, an, nodes, totnode);
-
+ SWAP(int, ss->cache->original, cache);
+ }
+
copy_v3_v3(grab_delta, ss->cache->grab_delta_symmetry);
len = len_v3(grab_delta);
More information about the Bf-blender-cvs
mailing list