-
Notifications
You must be signed in to change notification settings - Fork 27
/
prefs_sel_keymap.py
127 lines (101 loc) · 4.43 KB
/
prefs_sel_keymap.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import bpy
from bpy.types import PropertyGroup
from bpy.props import *
from .keymap import addon_keymaps
class prefs(PropertyGroup):
brush_circle_select: BoolProperty(default=False)
def label_row(path, prop, row, label):
row.label(text=label)
row.prop(path, prop, text='')
def keymap_row(items, key, row, label):
row.label(text=label)
row.prop(items[key], 'type', text='', full_event=True)
row.prop(items[key], 'value', text='')
def draw(preference, context, layout):
# label_row(preference.keymap, 'brush_circle_select',
# layout.row(), 'Circle Select - Blender Brush Behavior')
# layout.separator()
keymap = addon_keymaps[0]
keymap_items = keymap.keymap_items
keymap_row(keymap_items, 'New Click Selection',
layout.row(), 'New Click Selection Key')
keymap_row(keymap_items, 'Add Click Selection',
layout.row(), 'Add Click Selection Key')
keymap_row(keymap_items, 'New Loop Selection',
layout.row(), 'New Loop Selection Key')
keymap_row(keymap_items, 'Add Loop Selection',
layout.row(), 'Add Loop Selection Key')
keymap_row(keymap_items, 'New Shortest Path Selection',
layout.row(), 'New Shortest Path Selection Key')
keymap_row(keymap_items, 'Add Shortest Path Selection',
layout.row(), 'Add Shortest Path Selection Key')
#
layout.separator()
#
keymap_row(keymap_items, 'Invert Selection',
layout.row(), 'Invert Selection Key')
keymap_row(keymap_items, 'Select Linked',
layout.row(), 'Select Linked Key')
keymap_row(keymap_items, 'Select Hover Linked',
layout.row(), 'Select Hover Linked Key')
keymap_row(keymap_items, 'Select All',
layout.row(), 'Select All Key')
keymap_row(keymap_items, 'Deselect All',
layout.row(), 'Deselect All Key')
#
layout.separator()
#
keymap_row(keymap_items, 'Box Select Start',
layout.row(), 'Box Select Start Key')
keymap_row(keymap_items, 'Box Select Start Selection',
layout.row(), 'Box Select Start Selection Key')
keymap_row(keymap_items, 'Box New Selection',
layout.row(), 'Box New Selection Key')
keymap_row(keymap_items, 'Box Add Selection',
layout.row(), 'Box Add Selection Key')
keymap_row(keymap_items, 'Box Remove Selection',
layout.row(), 'Box Remove Selection Key')
#
layout.separator()
#
keymap_row(keymap_items, 'Circle Select Start',
layout.row(), 'Circle Select Start Key')
keymap_row(keymap_items, 'Circle Select Start Selection',
layout.row(), 'Circle Select Start Selection Key')
keymap_row(keymap_items, 'Circle End Selection',
layout.row(), 'Circle End Selection Key')
keymap_row(keymap_items, 'Circle Add Selection',
layout.row(), 'Circle Add Selection Key')
keymap_row(keymap_items, 'Circle Remove Selection',
layout.row(), 'Circle Remove Selection Key')
keymap_row(keymap_items, 'Circle Resize Mode Start',
layout.row(), 'Circle Resize Mode Start Key')
keymap_row(keymap_items, 'Circle Resize Confirm',
layout.row(), 'Circle Resize Confirm Key')
keymap_row(keymap_items, 'Circle Increase Size 1',
layout.row(), 'Circle Increase Size Key 1')
keymap_row(keymap_items, 'Circle Increase Size 2',
layout.row(), 'Circle Increase Size Key 2')
keymap_row(keymap_items, 'Circle Decrease Size 1',
layout.row(), 'Circle Decrease Size Key 1')
keymap_row(keymap_items, 'Circle Decrease Size 2',
layout.row(), 'Circle Decrease Size Key 2')
#
layout.separator()
#
keymap_row(keymap_items, 'Lasso Select Start',
layout.row(), 'Lasso Select Start Key')
keymap_row(keymap_items, 'Lasso Select Start Selection',
layout.row(), 'Lasso Select Start Selection Key')
keymap_row(keymap_items, 'Lasso New Selection',
layout.row(), 'Lasso New Selection Key')
keymap_row(keymap_items, 'Lasso Add Selection',
layout.row(), 'Lasso Add Selection Key')
keymap_row(keymap_items, 'Lasso Remove Selection',
layout.row(), 'Lasso Remove Selection Key')
def register():
bpy.utils.register_class(prefs)
return
def unregister():
bpy.utils.unregister_class(prefs)
return