Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_stroke.c
| Show First 20 Lines • Show All 932 Lines • ▼ Show 20 Lines | struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf) | ||||
| static const char *name = "Paint Stroke Modal"; | static const char *name = "Paint Stroke Modal"; | ||||
| struct wmKeyMap *keymap = WM_modalkeymap_get(keyconf, name); | struct wmKeyMap *keymap = WM_modalkeymap_get(keyconf, name); | ||||
| /* this function is called for each spacetype, only needs to add map once */ | /* this function is called for each spacetype, only needs to add map once */ | ||||
| if (!keymap) { | if (!keymap) { | ||||
| keymap = WM_modalkeymap_add(keyconf, name, modal_items); | keymap = WM_modalkeymap_add(keyconf, name, modal_items); | ||||
| /* items for modal map */ | |||||
| WM_modalkeymap_add_item( | |||||
| keymap, ESCKEY, KM_PRESS, KM_ANY, 0, PAINT_STROKE_MODAL_CANCEL); | |||||
| } | } | ||||
| return keymap; | return keymap; | ||||
| } | } | ||||
| static void paint_stroke_add_sample( | static void paint_stroke_add_sample( | ||||
| const Paint *paint, | const Paint *paint, | ||||
| PaintStroke *stroke, | PaintStroke *stroke, | ||||
| ▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines | |||||