-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeymaps.py
29 lines (21 loc) · 933 Bytes
/
keymaps.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import bpy
# -----------------------------------------------------------------------------
# Keymaps (For Register)
# -----------------------------------------------------------------------------
def ntzSym_regKMs(addon_keymaps):
wm = bpy.context.window_manager
#------------------------------ 3D View Generic ----------------------------------------------------------------------------
'''
#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="3D View Generic", space_type="VIEW_3D")
kmi = km.keymap_items.new("ntz_sym.performsym", type = "F", ctrl=False, shift=False, alt=False, value = "PRESS")
#add list of keymaps
addon_keymaps.append(km)
'''
def ntzSym_unregKMs(addon_keymaps):
# handle the keymap
wm = bpy.context.window_manager
for km in addon_keymaps:
wm.keyconfigs.addon.keymaps.remove(km)
# clear the list
addon_keymaps.clear()