📋 Metadata
- Author: Way2Close
- Date: 2018-02-16 20:55:46
- Type:
question - Replies (1): post_01228
💬 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?