Post #1227: Heya, I have a pme macro which does:
📋 Metadata
- Author: Way2Close
- Date: 2018-02-16 20:55:46
- Type:
question - Quality Score: 7/10
- Replies (1): post_01228
🏷️ Tags
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 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?