=bmesh= fixed loop select for wire edges
authorJoseph Eagar <joeedh@gmail.com>
Tue, 30 Aug 2011 02:11:19 +0000 (02:11 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Tue, 30 Aug 2011 02:11:19 +0000 (02:11 +0000)
source/blender/bmesh/intern/bmesh_walkers_impl.c

index e7dc82b57ca2750b4072271912f594ac818bfa68..4b7e9c339bb7ee6d9ccec5d79e1687ca87f9a544 100644 (file)
@@ -389,9 +389,24 @@ static void *loopWalker_step(BMWalker *walker)
        
        rlen = owalk.startrad;
        l = e->l;
-       if (!l)
+       
+       /*handle wire edge case*/
+       if (!l && val == 2) {
+               e = bmesh_disk_nextedge(e, v);
+               
+               if (!BLI_ghash_haskey(walker->visithash, e)) {
+                       BMW_pushstate(walker);
+                       lwalk = walker->currentstate;
+                       *lwalk = owalk;
+                       lwalk->cur = e;
+                       lwalk->lastv = v;
+                       
+                       BLI_ghash_insert(walker->visithash, e, NULL);                   
+               }
+               
                return owalk.cur;
-
+       }
+       
        if (val == 4 || val == 2 || rlen == 1) {                
                i = 0;
                stopi = val / 2;