Post #2447: : post_02448
๐ท๏ธ Tags
pie-menu hotkeys advanced solved
โ๏ธ Related PME Features
- Custom Python scripting
- Mode toggling
- Operator integration
๐ฌ Content
Colacuve:
I was wondering if it would be easy enough for this to include draw/object mode for when grease pencil is selected
You can use something like this (Custom tab):
ao = C.active_object; toggle_modes = dict(MESH=("OBJECT", "EDIT"), GPENCIL=("OBJECT", "PAINT_GPENCIL")); modes = ao and toggle_modes.get(ao.type, toggle_modes["MESH"]) or toggle_modes["MESH"]; mode = modes[0] if ao and ao.mode == modes[1] else modes[1]; ao and operator(L, "object.mode_set", text=L.enum_item_name(ao, "mode", ao.mode), icon_value=L.enum_item_icon(ao, "mode", ao.mode), mode=mode) or operator(L, "pme.message_box", text="None", message="None object")
Colacuve:
it would be great if items like greasepencil and lights were separate categories as wellโฆ
Yes, Iโll try to add them in the next version.
โค๏ธ 1 likes