From 10cacbbb159d95de00ac31befa466238c389f0b2 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 14 Jul 2020 23:15:13 +0200 Subject: Fix T77417: Topology Automasking not working with individual vertices The flood fill operation was setting the mask using to_v, so in the first iteration when the floodfill callback was using the active vertex as from_v and any other neighbor as to_v, the mask for the active vertex was never set. Now the mask is set using from_v and it checks if it should continue propagating to the next neighbor using to_v. Reviewed By: sergey Maniphest Tasks: T77417 Differential Revision: https://developer.blender.org/D8294 --- source/blender/editors/sculpt_paint/sculpt_automasking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint/sculpt_automasking.c') diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.c b/source/blender/editors/sculpt_paint/sculpt_automasking.c index 48b278e52b6..39a480756d8 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automasking.c +++ b/source/blender/editors/sculpt_paint/sculpt_automasking.c @@ -127,11 +127,11 @@ typedef struct AutomaskFloodFillData { } AutomaskFloodFillData; static bool automask_floodfill_cb( - SculptSession *ss, int UNUSED(from_v), int to_v, bool UNUSED(is_duplicate), void *userdata) + SculptSession *ss, int from_v, int to_v, bool UNUSED(is_duplicate), void *userdata) { AutomaskFloodFillData *data = userdata; - data->automask_factor[to_v] = 1.0f; + data->automask_factor[from_v] = 1.0f; return (!data->use_radius || SCULPT_is_vertex_inside_brush_radius_symm( SCULPT_vertex_co_get(ss, to_v), data->location, data->radius, data->symm)); -- cgit v1.2.3