[Bf-blender-cvs] [a231637faee] master: Sculpt: Respect hiding when creating face sets from loose parts

Hans Goudey noreply at git.blender.org
Fri Sep 16 05:55:33 CEST 2022


Commit: a231637faeef8f562d40893b7131db3e668a317c
Author: Hans Goudey
Date:   Thu Sep 15 22:54:41 2022 -0500
Branches: master
https://developer.blender.org/rBa231637faeef8f562d40893b7131db3e668a317c

Sculpt: Respect hiding when creating face sets from loose parts

Different areas of the mesh can be "loose parts" visually when separated
by hidden areas. This is consistent with other areas of sculpt mode that
also treat hidden areas differently.

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

M	source/blender/editors/sculpt_paint/sculpt_face_set.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c
index 90b92845b09..091d9fbffe8 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@ -517,12 +517,12 @@ typedef bool (*face_sets_flood_fill_test)(
     BMesh *bm, BMFace *from_f, BMEdge *from_e, BMFace *to_f, const float threshold);
 
 static bool sculpt_face_sets_init_loose_parts_test(BMesh *UNUSED(bm),
-                                                   BMFace *UNUSED(from_f),
+                                                   BMFace *from_f,
                                                    BMEdge *UNUSED(from_e),
-                                                   BMFace *UNUSED(to_f),
+                                                   BMFace *to_f,
                                                    const float UNUSED(threshold))
 {
-  return true;
+  return BM_elem_flag_test(from_f, BM_ELEM_HIDDEN) == BM_elem_flag_test(to_f, BM_ELEM_HIDDEN);
 }
 
 static bool sculpt_face_sets_init_normals_test(



More information about the Bf-blender-cvs mailing list