Added option in shift-g to select verts by number of connected edges (valence).
This commit is contained in:
@@ -72,7 +72,8 @@ enum {
|
||||
enum {
|
||||
SIMVERT_NORMAL = 0,
|
||||
SIMVERT_FACE,
|
||||
SIMVERT_VGROUP
|
||||
SIMVERT_VGROUP,
|
||||
SIMVERT_EDGE
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
@@ -873,6 +873,7 @@ typedef struct SimSel_VertExt {
|
||||
BMVert *v;
|
||||
union {
|
||||
int num_faces; /* adjacent faces */
|
||||
int num_edges; /* adjacent edges */
|
||||
MDeformVert *dvert; /* deform vertex */
|
||||
};
|
||||
} SimSel_VertExt;
|
||||
@@ -928,6 +929,9 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op)
|
||||
v_ext[i].dvert = NULL;
|
||||
}
|
||||
break;
|
||||
case SIMVERT_EDGE:
|
||||
v_ext[i].num_edges = BM_vert_edge_count(v);
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
@@ -970,6 +974,13 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,6 +676,7 @@ static EnumPropertyItem prop_similar_types[] = {
|
||||
{SIMVERT_NORMAL, "NORMAL", 0, "Normal", ""},
|
||||
{SIMVERT_FACE, "FACE", 0, "Amount of Adjacent Faces", ""},
|
||||
{SIMVERT_VGROUP, "VGROUP", 0, "Vertex Groups", ""},
|
||||
{SIMVERT_EDGE, "EDGE", 0, "Amount of connecting edges", ""},
|
||||
|
||||
{SIMEDGE_LENGTH, "LENGTH", 0, "Length", ""},
|
||||
{SIMEDGE_DIR, "DIR", 0, "Direction", ""},
|
||||
|
||||
Reference in New Issue
Block a user