i’m trying to transfer to 2.8 my custom keymap from 2.7 and just can’t figure out how to assign hotkey to particular type of transform orientation.
It has a pie menu in 2.8, so I’d recommend looking at the Python code for the pie menus.
wm.context_set_enum
scene.transform_orientation_slots[0].type
GLOBAL, LOCAL, NORMAL, GIMBAL, VIEW, CURSOR
it worked, thank you!
@jenkm - could one do the same thing with the Snap elements? i.e, snap to INCREMENTS, VERTEX etc etc? I know its also an enum value but is calling for a “Set” and not a “String” when I try to assign this… ideally I’d like to assing different “F” keys to each element
Try this:
wm.context_set_value
scene.tool_settings.snap_elements
{"FACE"}
For a set: {"VERTEX", "FACE"}
.
“INCREMENT”, “VERTEX”, “EDGE”, “FACE”, “VOLUME”, “EDGE_MIDPOINT”, “EDGE_PERPENDICULAR”
@jenkm thank you mate this did the trick… I should of been assigning it a “value” not an enum, and I was missing the curly brackets w/ string quotes…