Fix T44553.
authorAntony Riakiotakis <kalast@gmail.com>
Tue, 19 May 2015 09:48:05 +0000 (11:48 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Tue, 19 May 2015 09:49:46 +0000 (11:49 +0200)
Front face option did not get the correct normals to function - area
normal would always point to the direction of the stroke

source/blender/editors/sculpt_paint/sculpt.c

index 0d1ee08cc752f1f65b3fafef2f178221564d6f18..8bdbe23ead8b85d93462d14d3ea5056c64d166b5 100644 (file)
@@ -2747,7 +2747,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
                                                /* note, the normal from the vertices is ignored,
                                                 * causes glitch with planes, see: T44390 */
                                                const float fade = bstrength * tex_strength(ss, brush, vd.co, sqrtf(test.dist),
-                                                                                           NULL, area_no, vd.mask ? *vd.mask : 0.0f);
+                                                                                           vd.no, vd.fno, vd.mask ? *vd.mask : 0.0f);
 
                                                mul_v3_v3fl(proxy[vd.i], val, fade);
 
@@ -2851,7 +2851,7 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t
                                                 * causes glitch with planes, see: T44390 */
                                                const float fade = bstrength * tex_strength(ss, brush, vd.co,
                                                                                            ss->cache->radius * test.dist,
-                                                                                           NULL, area_no, vd.mask ? *vd.mask : 0.0f);
+                                                                                           vd.no, vd.fno, vd.mask ? *vd.mask : 0.0f);
 
                                                mul_v3_v3fl(proxy[vd.i], val, fade);