Post #2084:
co
📋 Metadata
- Author: roaoao
- Date: 2019-03-22 12:53:04
- Type:
answer - Quality Score: 8/10
- Reply to: post_02082
- Replies (1): post_02085
🏷️ Tags
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
coreyon:
i found a way to toggle “Rotate around selection”
Commandtab:vIn = C.user_preferences.view.use_rotate_around_active ; vOut = str(vIn) ; O.pme.overlay(text="Normal Rotate = "+vOut) ; C.user_preferences.view.use_rotate_around_active = 0 if vOut == "True" else 0; C.user_preferences.view.use_rotate_around_active = 1 if vOut == "False" else 0;
Good code. But I think you can remove this part: C.user_preferences.view.use_rotate_around_active = 0 if vOut == "True" else 0;
Final code:
vIn = C.user_preferences.view.use_rotate_around_active ; vOut = str(vIn) ; O.pme.overlay(text="Normal Rotate = "+vOut) ; C.user_preferences.view.use_rotate_around_active = 1 if vOut == "False" else 0;