Revision: 20944 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20944 Author: joeedh Date: 2009-06-16 23:33:12 +0200 (Tue, 16 Jun 2009)
Log Message: ----------- last commit was accidental. anyway, face loop select mostly works now. there's still some issues. shift-unselecting loops isn't working right now, need to fix it. Modified Paths: -------------- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_walkers.c branches/bmesh/blender/source/blender/editors/mesh/editmesh_tools.c Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_walkers.c =================================================================== --- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_walkers.c 2009-06-16 21:28:19 UTC (rev 20943) +++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_walkers.c 2009-06-16 21:33:12 UTC (rev 20944) @@ -56,7 +56,7 @@ typedef struct faceloopWalker { struct faceloopWalker * prev; - BMFace *f; + BMLoop *l; } faceloopWalker; /* NOTE: this comment is out of date, update it - joeedh @@ -553,7 +553,6 @@ static void *loopWalker_step(BMWalker *walker) { loopWalker *lwalk = walker->currentstate, owalk; - BMIter iter; BMEdge *e = lwalk->cur, *nexte = NULL; BMLoop *l, *l2; BMVert *v; @@ -606,7 +605,7 @@ static void faceloopWalker_begin(BMWalker *walker, void *data) { - faceloopWalker *lwalk; + faceloopWalker *lwalk, owalk; BMEdge *e = data; BMW_pushstate(walker); @@ -615,7 +614,20 @@ lwalk = walker->currentstate; lwalk->l = e->loop; + BLI_ghash_insert(walker->visithash, lwalk->l->f, NULL); + /*rewind*/ + while (walker->currentstate) { + owalk = *((faceloopWalker*)walker->currentstate); + BMW_walk(walker); + } + + BMW_pushstate(walker); + lwalk = walker->currentstate; + *lwalk = owalk; + + BLI_ghash_free(walker->visithash, NULL, NULL); + walker->visithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp); BLI_ghash_insert(walker->visithash, lwalk->l->f, NULL); } @@ -634,15 +646,20 @@ BMFace *f = lwalk->l->f; BMLoop *l = lwalk->l; + BMW_popstate(walker); + l = l->head.next->next; + if (l == l->radial.next->data) { + l = l->head.prev->prev; + } l = l->radial.next->data; - - BMW_popstate(walker); - if (!BLI_ghash_haskey(walker->visithash, l->f)) { + if (l->f->len == 4 && !BLI_ghash_haskey(walker->visithash, l->f)) { BMW_pushstate(walker); lwalk = walker->currentstate; lwalk->l = l; + + BLI_ghash_insert(walker->visithash, l->f, NULL); } return f; Modified: branches/bmesh/blender/source/blender/editors/mesh/editmesh_tools.c =================================================================== --- branches/bmesh/blender/source/blender/editors/mesh/editmesh_tools.c 2009-06-16 21:28:19 UTC (rev 20943) +++ branches/bmesh/blender/source/blender/editors/mesh/editmesh_tools.c 2009-06-16 21:33:12 UTC (rev 20944) @@ -1307,6 +1307,7 @@ /* Note, these values must match delete_mesh() event values */ static EnumPropertyItem prop_mesh_delete_types[] = { + {7, "DISSOLVE", "Dissolve Verts", ""}, {10,"VERT", "Vertices", ""}, {1, "EDGE", "Edges", ""}, {2, "FACE", "Faces", ""}, @@ -1314,7 +1315,6 @@ {4, "EDGE_FACE","Edges & Faces", ""}, {5, "ONLY_FACE","Only Faces", ""}, {6, "EDGE_LOOP","Edge Loop", ""}, - {7, "DISSOLVE","Dissolve Verts", ""}, {0, NULL, NULL, NULL} }; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs