[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14855] trunk/blender/source/blender/src/ sculptmode.c: fix for [#11597] 2.46R5 and probably problem of all 2. 46Rx - UNPREDICTED DRAW sculpt brush
Campbell Barton
ideasman42 at gmail.com
Thu May 15 21:49:36 CEST 2008
Revision: 14855
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14855
Author: campbellbarton
Date: 2008-05-15 21:49:34 +0200 (Thu, 15 May 2008)
Log Message:
-----------
fix for [#11597] 2.46R5 and probably problem of all 2.46Rx - UNPREDICTED DRAW sculpt brush
front and back face test was reversed. This problem still shows up when sculpting from the inside of a mesh, but this
cant be worked around unless its know which faces are visible or not. (tried some different workarounds but this
seems acceptable)
Modified Paths:
--------------
trunk/blender/source/blender/src/sculptmode.c
Modified: trunk/blender/source/blender/src/sculptmode.c
===================================================================
--- trunk/blender/source/blender/src/sculptmode.c 2008-05-15 19:44:34 UTC (rev 14854)
+++ trunk/blender/source/blender/src/sculptmode.c 2008-05-15 19:49:34 UTC (rev 14855)
@@ -438,15 +438,15 @@
}
}
-static void add_norm_if(const BrushAction *a, float out[3], float out_flip[3], const short no[3])
+static void add_norm_if(float view_vec[3], float out[3], float out_flip[3], const short no[3])
{
float fno[3] = {no[0], no[1], no[2]};
Normalize(fno);
- if((Inpf(((BrushAction*)a)->symm.out, fno)) < 0) {
+ if((Inpf(view_vec, fno)) > 0) {
VecAddf(out, out, fno);
- } else if (out[0]==0.0 && out[1]==0.0 && out[2]==0.0) {
+ } else {
VecAddf(out_flip, out_flip, fno); /* out_flip is used when out is {0,0,0} */
}
}
@@ -465,11 +465,11 @@
if(sculptmode_brush()->flag & SCULPT_BRUSH_ANCHORED) {
for(; node; node = node->next)
- add_norm_if(a, out, out_flip, a->orig_norms[node->Index]);
+ add_norm_if(((BrushAction*)a)->symm.out, out, out_flip, a->orig_norms[node->Index]);
}
else {
for(; node; node = node->next)
- add_norm_if(a, out, out_flip, me->mvert[node->Index].no);
+ add_norm_if(((BrushAction*)a)->symm.out, out, out_flip, me->mvert[node->Index].no);
}
if (out[0]==0.0 && out[1]==0.0 && out[2]==0.0) {
More information about the Bf-blender-cvs
mailing list