#mission by ruu
import bpy
import bmesh
def select_vertices():
""" select every vertex of the current object which has exactly 4 edges.
"""
bpy.ops.object.mode_set(mode='EDIT')
obj = bpy.context.active_object
bm = bmesh.from_edit_mesh(obj.data)
for v in bm.verts:
if 4==len(v.link_edges):
v.select = True
print(v)
bmesh.update_edit_mesh(obj.data)
#
select_vertices()
|
Blender python API quick-start
Syntax highlighting by Pygments.