Is there a better way to rotate the order of vertices of currently selected faces in edit mode? I've been playing with duplifaces and it turns out the orientation of the copied geometry depends on the order of the vertices in the face (https://developer.blender.org/T30547).  Since I'm unhappy with the orientation of some of my duplicated geometry, clearly I need to "rotate" the vertex order of some of the faces.

I've come up with this little python snippet, but it has one drawback I can think of.

# rotate selected face

import bpy
import bmesh

mesh = bpy.context.active_object.data
bm = bmesh.from_edit_mesh(mesh)

for face in bm.faces:
    if (face.select):
        vs = face.verts[:]
        vs2 = vs[1:]+vs[:1]
        # face.verts =vs2 # fails because verts is read-only
        bm.faces.remove(face)
        f2 = bm.faces.new(vs2)
        f2.select = True

# trigger UI update    
bmesh.update_edit_mesh(mesh)


The drawback is that it destroys the old face and creates a new one.  I suspect that there will be some cases where information on the old face will be lost.

Just for some flavor, here's an illustration of a situation where you might want manual control over the orientation:
The UI isn't updating because the script does not call

bmesh.update_edit_mesh(mesh)


(I got this from how to use BMesh to add verts, faces, and edges to existing geometry )