diff options
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_filter_mesh.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index 4f22ad6a9b0..94b6e0eb864 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -223,7 +223,16 @@ static void mesh_filter_task_cb(void *__restrict userdata, if (ss->filter_cache->active_face_set != SCULPT_FACE_SET_NONE) { if (!SCULPT_vertex_has_face_set(ss, vd.index, ss->filter_cache->active_face_set)) { - continue; + /* Surface Smooth can't skip the loop for this vertex as it needs to calculate its + * laplacian_disp. This value is accessed from the vertex neighbors when deforming the + * vertices, so it is needed for all vertices even if they are not going to be displaced. + */ + if (filter_type == MESH_FILTER_SURFACE_SMOOTH) { + fade = 0.0f; + } + else { + continue; + } } /* Skip the edges of the face set when relaxing or smoothing. * There is a relax face set option to relax the boundaries independently. */ @@ -429,6 +438,13 @@ static void mesh_filter_surface_smooth_displace_task_cb( if (fade == 0.0f) { continue; } + + if (ss->filter_cache->active_face_set != SCULPT_FACE_SET_NONE) { + if (!SCULPT_vertex_has_face_set(ss, vd.index, ss->filter_cache->active_face_set)) { + continue; + } + } + SCULPT_surface_smooth_displace_step(ss, vd.co, ss->filter_cache->surface_smooth_laplacian_disp, |