[Bf-blender-cvs] [7dda5ac5ba0] temp_bmesh_multires: A few small fixes for last commit
Joseph Eagar
noreply at git.blender.org
Tue Jul 20 13:29:42 CEST 2021
Commit: 7dda5ac5ba0a50327362f6b2161bd21fb5abba39
Author: Joseph Eagar
Date: Tue Jul 20 04:29:23 2021 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rB7dda5ac5ba0a50327362f6b2161bd21fb5abba39
A few small fixes for last commit
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
M source/blender/editors/sculpt_paint/sculpt_face_set.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index f647e4a5136..931c9d7f4f1 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3645,12 +3645,28 @@ static void do_topology_rake_bmesh_task_cb_ex(void *__restrict userdata,
SCULPT_curvature_begin(ss, node, false);
}
+ const bool have_bmesh = BKE_pbvh_type(ss->pbvh) == PBVH_BMESH;
+
PBVHVertexIter vd;
BKE_pbvh_vertex_iter_begin (ss->pbvh, node, vd, PBVH_ITER_UNIQUE) {
if (!sculpt_brush_test_sq_fn(&test, vd.co)) {
continue;
}
+ /* ignore boundary verts
+ might want to call normal smooth with
+ rake's projection in this case, I'm not entirely sure
+ - joeedh
+ */
+ if (have_bmesh) {
+ BMVert *v = (BMVert *)vd.vertex.i;
+ MDynTopoVert *mv = BKE_PBVH_DYNVERT(ss->cd_dyn_vert, v);
+
+ if (mv->flag & (DYNVERT_BOUNDARY | DYNVERT_FSET_BOUNDARY)) {
+ continue;
+ }
+ }
+
float direction2[3];
const float fade =
bstrength *
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c
index f0f15fe3e3f..fa9cd782f83 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@ -291,6 +291,9 @@ static void do_draw_face_sets_brush_task_cb_ex(void *__restrict userdata,
int fset = BM_ELEM_CD_GET_INT(f, ss->cd_faceset_offset);
if (fade > 0.05f && fset > 0) {
+ MDynTopoVert *mv = BKE_PBVH_DYNVERT(ss->cd_dyn_vert, v);
+ mv->flag |= DYNVERT_NEED_BOUNDARY;
+
BM_ELEM_CD_SET_INT(f, ss->cd_faceset_offset, active_fset);
}
}
More information about the Bf-blender-cvs
mailing list