diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-06-18 23:16:31 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-06-24 18:28:51 +0300 |
commit | 255638d2235e5890a38751d9a33432c5e35d3daa (patch) | |
tree | 76784af718d054603ad0cfe0f152627a53f64632 | |
parent | 2b522e3345a490ff8ad387ed4f2214e32b7dac57 (diff) |
Fix Surface Smooth not taking the sculpt mask into account
The sculpt mask was hardcoded to 0.0
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8071
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_smooth.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c index 02c7b65dcb7..3ef8c43ee56 100644 --- a/source/blender/editors/sculpt_paint/sculpt_smooth.c +++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c @@ -545,10 +545,15 @@ static void SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex( { SCULPT_orig_vert_data_update(&orig_data, &vd); if (sculpt_brush_test_sq_fn(&test, vd.co)) { - const float fade = - bstrength * - SCULPT_brush_strength_factor( - ss, brush, vd.co, sqrtf(test.dist), vd.no, vd.fno, 0.0f, vd.index, thread_id); + const float fade = bstrength * SCULPT_brush_strength_factor(ss, + brush, + vd.co, + sqrtf(test.dist), + vd.no, + vd.fno, + vd.mask ? *vd.mask : 0.0f, + vd.index, + thread_id); float disp[3]; SCULPT_surface_smooth_laplacian_step(ss, @@ -586,10 +591,15 @@ static void SCULPT_do_surface_smooth_brush_displace_task_cb_ex( BKE_pbvh_vertex_iter_begin(ss->pbvh, data->nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_sq_fn(&test, vd.co)) { - const float fade = - bstrength * - SCULPT_brush_strength_factor( - ss, brush, vd.co, sqrtf(test.dist), vd.no, vd.fno, 0.0f, vd.index, thread_id); + const float fade = bstrength * SCULPT_brush_strength_factor(ss, + brush, + vd.co, + sqrtf(test.dist), + vd.no, + vd.fno, + vd.mask ? *vd.mask : 0.0f, + vd.index, + thread_id); SCULPT_surface_smooth_displace_step( ss, vd.co, ss->cache->surface_smooth_laplacian_disp, vd.index, beta, fade); } |