Post #3984: Yes, you can even nest them and use different modifier keys in the same item
📋 Metadata
- Author: Motiomancer
- Date: 2021-08-09 16:59:20
- Type:
answer - Quality Score: 9/10
- Reply to: post_03982
🏷️ Tags
⚙️ Related PME Features
- Pie Menu Editor
- Python Scripting
💬 Content
Yes, you can even nest them and use different modifier keys in the same item
In command tab:
1 modifier key
operator2 if E.alt == True else operator1
2 modifier keys
operator2 if E.alt == True else (operator3 if E.ctrl == True else operator1)
3 modifier keys
operator2 if E.alt == True else (operator3 if E.ctrl == True else (operator4 if E.shift == True else operator1))
E.alt, E.ctrl and E.shift are interchangeable and operator1 its going to be the item with no modifier key.
A working example:
bpy.ops.object.modifier_add('EXEC_DEFAULT', True, type='BEVEL') if E.alt == True else (bpy.ops.object.modifier_add('EXEC_DEFAULT', True, type='SOLIDIFY') if E.ctrl == True else (bpy.ops.object.modifier_add('EXEC_DEFAULT', True, type='DECIMATE') if E.shift == True else bpy.ops.object.subdivision_set('EXEC_DEFAULT', True, level=1, relative=False)))
❤️ 2 likes