Dyntopo: missing PBVH update collapsing an edge

PBVH-nodes attached to the vertex to be deleted were updated,
but not nodes attached to the other vertex in the edge.
This commit is contained in:
Campbell Barton 2016-07-05 18:45:16 +10:00
parent 06c1e782b0
commit 037aa544cc
Notes: blender-bot 2023-02-14 07:46:49 +01:00
Referenced by issue #48779, Dyntopo Switching between relative and constant detail makes holes in viewport
1 changed files with 8 additions and 0 deletions

View File

@ -1299,6 +1299,14 @@ static void pbvh_bmesh_collapse_edge(
mid_v3_v3v3(v_conn->co, v_conn->co, v_del->co);
add_v3_v3(v_conn->no, v_del->no);
normalize_v3(v_conn->no);
/* update boundboxes attached to the connected vertex
* note that we can often get-away without this but causes T48779 */
BM_LOOPS_OF_VERT_ITER_BEGIN(l, v_conn) {
PBVHNode *f_node = pbvh_bmesh_node_from_face(bvh, l->f);
f_node->flag |= PBVH_UpdateDrawBuffers | PBVH_UpdateNormals | PBVH_UpdateBB;
}
BM_LOOPS_OF_VERT_ITER_END;
}
/* Delete v_del */