Post #2371: Good tool
. H
📋 Metadata
- Author: roaoao
- Date: 2019-05-31 01:15:50
- Type:
answer - Quality Score: 9/10
- Reply to: post_02365
- Replies (1): post_02373
🏷️ Tags
⚙️ Related PME Features
- Python Scripting
- Property Editor
- Pie Menu Editor
💬 Content
Good tool
. Here is an example:
Getter should return item index:
ts = C.tool_settings; upe = ts.use_proportional_edit; upc = ts.use_proportional_connected; upp = ts.use_proportional_projected; return upe and (not upc and not upp and 1 or upc and not upp and 2 or not upc and upp and 3 or -1) or 0
Setter: Update settings using item index (value):
ts = C.tool_settings; ts.use_proportional_edit = value > 0; ts.use_proportional_connected = value == 2; ts.use_proportional_projected = value == 3
❤️ 1 likes