Post #4745: I don’t see the reason for using a stack key. Since you have the correct script,
📋 Metadata
- Author: Pluglug
- Date: 2023-06-12 10:05:01
- Type:
answer - Quality Score: 8/10
- Reply to: post_04744
- Replies (1): post_04747
🏷️ Tags
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
I don’t see the reason for using a stack key. Since you have the correct script, why not just run it?
If you want to write it in the PME command tab, use ternary operator.
s = C.space_data.shading; s.light = 'MATCAP' if s.light == 'STUDIO' else 'STUDIO' if s.light == 'MATCAP' else None