=bmesh= fixed an edgesplit bug

This commit is contained in:
Joseph Eagar
2011-06-05 00:54:14 +00:00
parent 62a33391c9
commit e86d85b78e
2 changed files with 11 additions and 8 deletions

View File

@@ -2696,9 +2696,9 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
else BM_SetIndex(e, 0);
}
/*handle case of one vert selected. we identify
the closest edge around that vert to the mouse cursor,
then rip the two adjacent edges in the vert fan.*/
/*handle case of one vert selected. identify
closest edge around that vert to mouse cursor,
then rip two adjacent edges in the vert fan.*/
if (em->bm->totvertsel == 1 && em->bm->totedgesel == 0 && em->bm->totfacesel == 0) {
singlesel = 1;

View File

@@ -72,12 +72,13 @@ DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Object *ob
em = CDDM_To_BMesh(ob, dm, NULL);
bm = em->bm;
BM_Compute_Normals(bm);
BMO_push(bm, NULL);
if (emd->flags & MOD_EDGESPLIT_FROMANGLE) {
BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, l) {
BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
float edge_angle_cos;
if (l->radial_next == l)
@@ -91,9 +92,11 @@ DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Object *ob
}
}
BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
if (BM_TestHFlag(e, BM_SHARP))
BMO_SetFlag(bm, e, EDGE_MARK);
if (emd->flags & MOD_EDGESPLIT_FROMFLAG) {
BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
if (BM_TestHFlag(e, BM_SHARP))
BMO_SetFlag(bm, e, EDGE_MARK);
}
}
BMO_CallOpf(bm, "edgesplit edges=%fe", EDGE_MARK);