📋 Metadata

💬 Content

Heya, I have a pme macro which does:

#store pivot mode
stored_pivot_mode = bpy.context.space_data.pivot_point

#change pivot mode to 3d cursor
bpy.context.space_data.pivot_point = ‘CURSOR’

#rotate
bpy.ops.transform.rotate(‘INVOKE_DEFAULT’, True)

#restore pivot mode
bpy.context.space_data.pivot_point = stored_pivot_mode

It works fine, but if I cancel the rotate it never restores the pivot mode, is there a way to brute force it back to the stored?


🔗 View on Blender Artists