diff options
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 8efd6ab3fbe..b0f4cf062f6 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1232,7 +1232,8 @@ static float neighbor_average_mask(SculptSession *ss, unsigned vert) /* Same logic as neighbor_average(), but for bmesh rather than mesh */ static void bmesh_neighbor_average(float avg[3], BMVert *v) { - const int vfcount = BM_vert_face_count(v); + /* logic for 3 or more is identical */ + const int vfcount = BM_vert_face_count_ex(v, 3); /* Don't modify corner vertices */ if (vfcount > 1) { @@ -1247,7 +1248,7 @@ static void bmesh_neighbor_average(float avg[3], BMVert *v) for (i = 0; i < ARRAY_SIZE(adj_v); i++) { const BMVert *v_other = adj_v[i]; - if (vfcount != 2 || BM_vert_face_count(v_other) <= 2) { + if (vfcount != 2 || BM_vert_face_count_ex(v_other, 2) <= 2) { add_v3_v3(avg, v_other->co); total++; } |