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
This commit is contained in:
Pablo Dobarro 2020-07-14 23:15:13 +02:00
parent 613d314251
commit 10cacbbb15
Notes: blender-bot 2023-02-14 06:00:50 +01:00
Referenced by issue #77417, Sculpt - Grab - Topology automasking wierd behaviour
1 changed files with 2 additions and 2 deletions

View File

@ -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));