[Bf-blender-cvs] [10cacbbb159] master: Fix T77417: Topology Automasking not working with individual vertices

Pablo Dobarro noreply at git.blender.org
Wed Jul 15 16:16:04 CEST 2020


Commit: 10cacbbb159d95de00ac31befa466238c389f0b2
Author: Pablo Dobarro
Date:   Tue Jul 14 23:15:13 2020 +0200
Branches: master
https://developer.blender.org/rB10cacbbb159d95de00ac31befa466238c389f0b2

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

===================================================================

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



More information about the Bf-blender-cvs mailing list