I am creating a script to rotate a vertex selection in a very specific way. I have so far figured out how to set the pivot point to ACTIVE ELEMENT, following a hint from this thread on context overrides:
However, the transform.rotate command doesn't take into account whether the constraint_orientation is GLOBAL or LOCAL or any other. My Edit Mode vertex selection always rotates around Global axis.
I have also looked into transforming with object.matrix_world and mathutils.Matrix.Rotation but I'm not sure if this is going to work for vertex selections? It seems to be working only for Object, not Mesh Data?
Could anyone help me figure out how I can use Local or Custom Transformation as the constraint_orientation when rotating a Vertex Selection in Edit Mode, or whether there's another path to this. Thanks!