To reproduce the problem and make the script runnable, make sure:
- Add a Ico Sphere to scene and
- Enter edit mode and select the top vertex
# It moves the selected vertices down a bit
import bpy, bmesh
ob = bpy.context.object
me = ob.data
bm = bmesh.from_edit_mesh(me)
act_vert = next(v for v in bm.verts if v.select)
act_vert.co.z -= 0.2
me.update(calc_edges=True, calc_edges_loose=True)
me.update_gpu_tag()
bmesh.update_edit_mesh(me)
After running the code, it looks like:
When press the Tab key twice (Go to object mode and switch back), the shading are completely different
I know I can run the operator bpy.ops.object.mode_set twice to update the mesh, but I want to know how to update it without exiting edit mode



