Post #1228:
Wa
📋 Metadata
- Author: roaoao
- Date: 2018-02-17 00:44:36
- Type:
answer - Quality Score: 7/10
- Reply to: post_01227
- Replies (1): post_01229
🏷️ Tags
macro scripting intermediate solved
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
Way2Close:
Heya, I have a pme macro which does:
store pivot mode
stored_pivot_mode = bpy.context.space_data.pivot_pointchange 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_modeIt 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?
Hi, try to restore the pivot mode in the 3rd slot:
bpy.ops.transform.rotate('INVOKE_DEFAULT', True); bpy.context.space_data.pivot_point = stored_pivot_mode