correct error in recent commit triangle-fill-dissolve, need to check if the edges face is removed (happens in rare cases).
This commit is contained in:
@@ -137,6 +137,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
if (use_dissolve) {
|
||||
BMO_ITER (e, &siter, op->slots_out, "geom.out", BM_EDGE) {
|
||||
if (LIKELY(e->l)) { /* in rare cases the edges face will have already been removed from the edge */
|
||||
BMFace *f_new;
|
||||
f_new = BM_faces_join_pair(bm, e->l->f,
|
||||
e->l->radial_next->f, e,
|
||||
@@ -149,6 +150,10 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_error_clear(bm);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BM_edge_kill(bm, e);
|
||||
}
|
||||
}
|
||||
|
||||
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user