diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-25 19:54:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-25 19:54:09 +0300 |
commit | ce81cce75d4dc0d2defc1a3efe18998dd975ffed (patch) | |
tree | 1b17400dd35fb0ede47cd9dfcfa6e999357aea2b /source/blender/editors | |
parent | d6f69a2c194b3b35f52c8e691c7d9b7625a727f8 (diff) |
Fix #26158: The layer hight of the layer tool cannot longer be controled by the strength of the brush, as it was in 2.49
Layer height used to be controlled with brush radius, quite confusing decision.
Added new property for brushes - height for adjusting affectable brush height
(it could be not only layer height in the future).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 29730e8fc69..7505fdb0ecf 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1519,7 +1519,7 @@ static void do_layer_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int Brush *brush = paint_brush(&sd->paint); float bstrength= ss->cache->bstrength; float area_normal[3], offset[3]; - float lim= ss->cache->radius / 4; + float lim= brush->height; int n; if(bstrength < 0) @@ -1552,15 +1552,15 @@ static void do_layer_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { - if(sculpt_brush_test(&test, vd.co)) { - const float fade = bstrength*ss->cache->radius*tex_strength(ss, brush, vd.co, test.dist)*frontface(brush, area_normal, vd.no, vd.fno); + if(sculpt_brush_test(&test, origco[vd.i])) { + const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist)*frontface(brush, area_normal, vd.no, vd.fno); float *disp= &layer_disp[vd.i]; float val[3]; *disp+= fade; /* Don't let the displacement go past the limit */ - if((lim < 0 && *disp < lim) || (lim > 0 && *disp > lim)) + if((lim < 0 && *disp < lim) || (lim >= 0 && *disp > lim)) *disp = lim; mul_v3_v3fl(val, offset, *disp); |