* Fix bug in last commit where boundary flags weren't properly
updated after symmetrize.
This commit is contained in:
parent
032a35fb50
commit
82f5e0200c
|
@ -693,6 +693,10 @@ void BKE_pbvh_bmesh_check_tris(PBVH *pbvh, PBVHNode *node);
|
|||
PBVHTriBuf *BKE_pbvh_bmesh_get_tris(PBVH *pbvh, PBVHNode *node);
|
||||
void BKE_pbvh_bmesh_free_tris(PBVH *pbvh, PBVHNode *node);
|
||||
|
||||
/*recalculates boundary flags for *all* vertices. used by
|
||||
symmetrize.*/
|
||||
void BKE_pbvh_recalc_bmesh_boundary(PBVH *pbvh);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -3211,6 +3211,23 @@ static void pbvh_bmesh_create_nodes_fast_recursive(
|
|||
|
||||
/***************************** Public API *****************************/
|
||||
|
||||
/*Used by symmetrize to update boundary flags*/
|
||||
void BKE_pbvh_recalc_bmesh_boundary(PBVH *pbvh)
|
||||
{
|
||||
BMVert *v;
|
||||
BMIter iter;
|
||||
|
||||
BM_ITER_MESH (v, &iter, pbvh->bm, BM_VERTS_OF_MESH) {
|
||||
MDynTopoVert *mv = BKE_PBVH_DYNVERT(pbvh->cd_dyn_vert, v);
|
||||
|
||||
if (BM_vert_is_boundary(v)) {
|
||||
mv->flag |= DYNVERT_BOUNDARY;
|
||||
} else {
|
||||
mv->flag &= ~DYNVERT_BOUNDARY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Build a PBVH from a BMesh */
|
||||
void BKE_pbvh_build_bmesh(PBVH *pbvh,
|
||||
BMesh *bm,
|
||||
|
|
|
@ -8990,6 +8990,8 @@ static int sculpt_symmetrize_exec(bContext *C, wmOperator *op)
|
|||
|
||||
BM_mesh_toolflags_set(ss->bm, false);
|
||||
|
||||
BKE_pbvh_recalc_bmesh_boundary(ss->pbvh);
|
||||
|
||||
/* Finish undo. */
|
||||
BM_log_all_added(ss->bm, ss->bm_log);
|
||||
SCULPT_undo_push_end();
|
||||
|
|
Loading…
Reference in New Issue