Merged changes in the trunk up to revision 47977.
[blender.git] / source / blender / bmesh / operators / bmo_utils.c
index 1ec4d4ab6d4a9705281868af1fe835770bebb99f..b076d835ea151ef88a7f49131db28d44e22abbc7 100644 (file)
@@ -887,6 +887,7 @@ typedef struct SimSel_VertExt {
        BMVert *v;
        union {
                int num_faces; /* adjacent faces */
        BMVert *v;
        union {
                int num_faces; /* adjacent faces */
+               int num_edges; /* adjacent edges */
                MDeformVert *dvert; /* deform vertex */
        };
 } SimSel_VertExt;
                MDeformVert *dvert; /* deform vertex */
        };
 } SimSel_VertExt;
@@ -942,6 +943,9 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op)
                                        v_ext[i].dvert = NULL;
                                }
                                break;
                                        v_ext[i].dvert = NULL;
                                }
                                break;
+                       case SIMVERT_EDGE:
+                               v_ext[i].num_edges = BM_vert_edge_count(v);
+                               break;
                }
 
                i++;
                }
 
                i++;
@@ -984,6 +988,13 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op)
                                                        }
                                                }
                                                break;
                                                        }
                                                }
                                                break;
+                                       case SIMVERT_EDGE:
+                                               /* number of adjacent edges */
+                                               if (v_ext[i].num_edges == v_ext[indices[idx]].num_edges) {
+                                                       BMO_elem_flag_enable(bm, v, VERT_MARK);
+                                                       cont = FALSE;
+                                               }
+                                               break;
                                }
                        }
                }
                                }
                        }
                }