diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-02 07:51:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-02 07:51:16 +0400 |
commit | 56c127e721681f6978870218b28d8edf5287fbf7 (patch) | |
tree | 488d03fb32e9cd1dff586e3c18718f3dcaec64ee /source/blender/bmesh/operators/bmo_extrude.c | |
parent | 670cdd5381b23b7ae1808262a12c0423c8fa73c7 (diff) |
fix - extrude could create hidden faces when the only connected face to an edge was hidden, the hidden setting would be copied to the newly created face.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_extrude.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_extrude.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index 77ba69b2372..981232b4d66 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -116,46 +116,46 @@ void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op) static void bm_extrude_copy_face_loop_attributes(BMesh *bm, BMFace *f, BMEdge *e, BMEdge *newedge) { BMIter iter; - BMLoop *l, *l2; - - /* copy attribute */ - l = BM_iter_new(&iter, bm, BM_LOOPS_OF_FACE, f); - for ( ; l; l = BM_iter_step(&iter)) { + BMLoop *l, *l_other; + /* copy attributes */ + BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) { if (l->e != e && l->e != newedge) { continue; } - l2 = l->radial_next; + l_other = l->radial_next; - if (l2 == l) { - l2 = newedge->l; + if (l_other == l) { + l_other = newedge->l; - if (l2 != l) { - BM_elem_attrs_copy(bm, bm, l2->f, l->f); + if (l_other != l) { + BM_elem_attrs_copy(bm, bm, l_other->f, f); + BM_elem_flag_disable(f, BM_ELEM_HIDDEN); /* possibly we copy from a hidden face */ - BM_elem_attrs_copy(bm, bm, l2, l); - l2 = l2->next; + BM_elem_attrs_copy(bm, bm, l_other, l); + l_other = l_other->next; l = l->next; - BM_elem_attrs_copy(bm, bm, l2, l); + BM_elem_attrs_copy(bm, bm, l_other, l); } } else { - BM_elem_attrs_copy(bm, bm, l2->f, l->f); + BM_elem_attrs_copy(bm, bm, l_other->f, f); + BM_elem_flag_disable(f, BM_ELEM_HIDDEN); /* possibly we copy from a hidden face */ - /* copy dat */ - if (l2->v == l->v) { - BM_elem_attrs_copy(bm, bm, l2, l); - l2 = l2->next; + /* copy data */ + if (l_other->v == l->v) { + BM_elem_attrs_copy(bm, bm, l_other, l); + l_other = l_other->next; l = l->next; - BM_elem_attrs_copy(bm, bm, l2, l); + BM_elem_attrs_copy(bm, bm, l_other, l); } else { - l2 = l2->next; - BM_elem_attrs_copy(bm, bm, l2, l); - l2 = l2->prev; + l_other = l_other->next; + BM_elem_attrs_copy(bm, bm, l_other, l); + l_other = l_other->prev; l = l->next; - BM_elem_attrs_copy(bm, bm, l2, l); + BM_elem_attrs_copy(bm, bm, l_other, l); } } } |