Commit: dcd662c6951c33cb1d72ed693348595227efc9ae
Author: Campbell Barton
Date:   Tue Jan 13 02:36:51 2015 +1100
Branches: master
https://developer.blender.org/rBdcd662c6951c33cb1d72ed693348595227efc9ae

BMesh: Tweak behavior for select more/less

Stepping over faces gives overall nice results but it stopped wire edges from 
working.
Now step over wire too.

===================================================================

M       source/blender/bmesh/operators/bmo_utils.c

===================================================================

diff --git a/source/blender/bmesh/operators/bmo_utils.c 
b/source/blender/bmesh/operators/bmo_utils.c
index e7b65a1..da1991a 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -236,6 +236,20 @@ static void bmo_region_extend_expand(
                                                        
bmo_face_flag_set_flush(bm, f, SEL_FLAG, true);
                                                }
                                        }
+
+                                       /* handle wire edges (when stepping 
over faces) */
+                                       {
+                                               BMIter eiter;
+                                               BMEdge *e;
+                                               BM_ITER_ELEM (e, &eiter, v, 
BM_EDGES_OF_VERT) {
+                                                       if (BM_edge_is_wire(e)) 
{
+                                                               if 
(!BMO_elem_flag_test(bm, e, SEL_FLAG)) {
+                                                                       
BMO_elem_flag_enable(bm, e, SEL_FLAG);
+                                                                       
BMO_elem_flag_enable(bm, BM_edge_other_vert(e, v), SEL_FLAG);
+                                                               }
+                                                       }
+                                               }
+                                       }
                                }
                        }
                }
@@ -306,6 +320,21 @@ static void bmo_region_extend_contract(
                                                break;
                                        }
                                }
+
+                               /* handle wire edges (when stepping over faces) 
*/
+                               if (!found) {
+                                       BMIter eiter;
+                                       BMEdge *e;
+
+                                       BM_ITER_ELEM (e, &eiter, v, 
BM_EDGES_OF_VERT) {
+                                               if (BM_edge_is_wire(e)) {
+                                                       if 
(!BMO_elem_flag_test(bm, e, SEL_ORIG)) {
+                                                               found = true;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                               }
                        }
 
                        if (found) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to