How to edit in Bmesh

This example assumes we have a mesh object in edit-mode

import bpy
import bmesh

Get the active mesh

obj = bpy.context.active_object
#obj = bpy.context.edit_object
me =
bm =

for face in bm.faces:
co = “”
for v in face.verts:
co =
print("Here is the last co: " + str(co))
bmesh.ops.create_vert(bm, co)

Show the updates in the viewport

and recalculate n-gon tessellation.

bmesh.update_edit_mesh(me, True)

I just want bmesh.ops.create_vert to work, and make a vert, then I want to also remove the vert.
How can I do this? This code gives me error saying bm is not a single BMesh type… I don’t understand it.

Yes, I’ve read the API about create_vert, but it doesn’t explain much… where should I look now???:frowning:

i wonder why there’s a create_vert operator… since you can create verts like

vert =,2,3)) # (1,2,3) is the coordinate

hmmm, seems easy. thanks! I found a workaround to this, not by python, but thanks anyway. it was fun to try out the new scriptings.

Blender really should have a better control over vert and mesh selection and editing with API.

thanks a lot!

somehow i cannot post a reply here…
Anyway, thank you for your replies.