I want to use python to rotate a vertices selection in edit mode, around the pivot point (z-axis constrained).
The following command does not work as intented. It rotates the mesh but not around the pivot point, but around the object itself (as if the pivot point was in the center of the mesh).
bpy.ops.transform.rotate(value=0.378874, axis=(0, 0, 1), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
Is this a bug? How can i do rotation around the pivot point?
I tried your suggestion but it does not seem to be a center_override in the "transform .rotate function".
>> bpy.ops.transform.rotate(value=radians(45), ... axis=(0, 0, 1), ... center_override=(0, 1, 0), ... constraint_orientation='GLOBAL') Traceback (most recent call last): File "<blender_console>", line 4, in <module> File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\modules\bpy\ops.py", line 189, in __call__ ret = op_call(self.idname_py(), None, kw) TypeError: Converting py args to operator properties: : keyword "center_override" unrecognized
Is my context wrong? or do I need to do something else before?
I also tried to change the pivot point by doing:
but that did not help either (getview3d() returns bpy.context.screen.areas[x] where x is the VIEW_3D area) I also tried to change the origin of the object (in objectmode) and set it to cursor but when i rotated the mesh in edit mode, it ignored both the origin of the object and the pivot point.
I am still missing something...
Thanx and have a Merry Christmas! Sp