partial fix for [#30732] bmesh: loop select continues through hidden sections.

loop cut and edge ring select still need to be fixed.
This commit is contained in:
Campbell Barton 2012-03-30 08:43:47 +00:00
parent e0d94b7244
commit 0e972b6293
2 changed files with 12 additions and 4 deletions

View File

@ -517,7 +517,9 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
l = BM_face_other_vert_loop(owalk.f_hub, lwalk->lastv, v);
nexte = BM_edge_exists(v, l->v);
if (!BLI_ghash_haskey(walker->visithash, nexte)) {
if (bmw_mask_check_edge(walker, nexte) &&
!BLI_ghash_haskey(walker->visithash, nexte))
{
lwalk = BMW_state_add(walker);
lwalk->cur = nexte;
lwalk->lastv = v;
@ -579,7 +581,10 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
}
if (l != NULL) {
if (l != e->l && !BLI_ghash_haskey(walker->visithash, l->e)) {
if (l != e->l &&
bmw_mask_check_edge(walker, l->e) &&
!BLI_ghash_haskey(walker->visithash, l->e))
{
if (!(owalk.is_boundary == FALSE && i != stopi)) {
lwalk = BMW_state_add(walker);
lwalk->cur = l->e;
@ -602,7 +607,10 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
v = i ? e->v2 : e->v1;
BM_ITER(nexte, &eiter, walker->bm, BM_EDGES_OF_VERT, v) {
if ((nexte->l == NULL) && !BLI_ghash_haskey(walker->visithash, nexte)) {
if ((nexte->l == NULL) &&
bmw_mask_check_edge(walker, nexte) &&
!BLI_ghash_haskey(walker->visithash, nexte))
{
lwalk = BMW_state_add(walker);
lwalk->cur = nexte;
lwalk->lastv = v;

View File

@ -900,7 +900,7 @@ static void walker_select(BMEditMesh *em, int walkercode, void *start, int selec
BMW_init(&walker, bm, walkercode,
BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP,
BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */
BMW_FLAG_TEST_HIDDEN,
BMW_NIL_LAY);
ele = BMW_begin(&walker, start);
for (; ele; ele = BMW_step(&walker)) {