manually make small changes to sync with trunk
[blender.git] / source / blender / editors / armature / armature_ops.c
1 /*
2  * $Id$
3  *
4  * ***** BEGIN GPL LICENSE BLOCK *****
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version. 
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  *
20  * The Original Code is Copyright (C) 2009 Blender Foundation.
21  * All rights reserved.
22  *
23  * 
24  * Contributor(s): Blender Foundation
25  *
26  * ***** END GPL LICENSE BLOCK *****
27  */
28
29 /** \file blender/editors/armature/armature_ops.c
30  *  \ingroup edarmature
31  */
32
33
34 #include <stdlib.h>
35 #include <math.h>
36
37 #include "BLO_sys_types.h"
38
39 #include "BLI_math.h"
40 #include "BLI_blenlib.h"
41
42
43 #include "RNA_access.h"
44
45 #include "WM_api.h"
46 #include "WM_types.h"
47
48 #include "ED_armature.h"
49 #include "ED_screen.h"
50 #include "ED_transform.h"
51
52 #include "armature_intern.h"
53
54 /* ************************** registration **********************************/
55
56 /* Both operators ARMATURE_OT_xxx and POSE_OT_xxx here */
57 void ED_operatortypes_armature(void)
58 {
59         /* EDIT ARMATURE */
60         WM_operatortype_append(ARMATURE_OT_bone_primitive_add);
61         
62         WM_operatortype_append(ARMATURE_OT_align);
63         WM_operatortype_append(ARMATURE_OT_calculate_roll);
64         WM_operatortype_append(ARMATURE_OT_switch_direction);
65         WM_operatortype_append(ARMATURE_OT_subdivide);
66         
67         WM_operatortype_append(ARMATURE_OT_parent_set);
68         WM_operatortype_append(ARMATURE_OT_parent_clear);
69         
70         WM_operatortype_append(ARMATURE_OT_select_all);
71         WM_operatortype_append(ARMATURE_OT_select_inverse);
72         WM_operatortype_append(ARMATURE_OT_select_hierarchy);
73         WM_operatortype_append(ARMATURE_OT_select_linked);
74
75         WM_operatortype_append(ARMATURE_OT_delete);
76         WM_operatortype_append(ARMATURE_OT_duplicate);
77         WM_operatortype_append(ARMATURE_OT_extrude);
78         WM_operatortype_append(ARMATURE_OT_hide);
79         WM_operatortype_append(ARMATURE_OT_reveal);
80         WM_operatortype_append(ARMATURE_OT_click_extrude);
81         WM_operatortype_append(ARMATURE_OT_fill);
82         WM_operatortype_append(ARMATURE_OT_merge);
83         WM_operatortype_append(ARMATURE_OT_separate);
84         
85         WM_operatortype_append(ARMATURE_OT_autoside_names);
86         WM_operatortype_append(ARMATURE_OT_flip_names);
87         
88         WM_operatortype_append(ARMATURE_OT_layers_show_all);
89         WM_operatortype_append(ARMATURE_OT_armature_layers);
90         WM_operatortype_append(ARMATURE_OT_bone_layers);
91
92         /* SKETCH */    
93         WM_operatortype_append(SKETCH_OT_gesture);
94         WM_operatortype_append(SKETCH_OT_delete);
95         WM_operatortype_append(SKETCH_OT_draw_stroke);
96         WM_operatortype_append(SKETCH_OT_draw_preview);
97         WM_operatortype_append(SKETCH_OT_finish_stroke);
98         WM_operatortype_append(SKETCH_OT_cancel_stroke);
99         WM_operatortype_append(SKETCH_OT_convert);
100         WM_operatortype_append(SKETCH_OT_select);
101
102         /* POSE */
103         WM_operatortype_append(POSE_OT_hide);
104         WM_operatortype_append(POSE_OT_reveal);
105         
106         WM_operatortype_append(POSE_OT_armature_apply);
107         WM_operatortype_append(POSE_OT_visual_transform_apply);
108         
109         WM_operatortype_append(POSE_OT_rot_clear);
110         WM_operatortype_append(POSE_OT_loc_clear);
111         WM_operatortype_append(POSE_OT_scale_clear);
112         WM_operatortype_append(POSE_OT_transforms_clear);
113         
114         WM_operatortype_append(POSE_OT_copy);
115         WM_operatortype_append(POSE_OT_paste);
116         
117         WM_operatortype_append(POSE_OT_select_all);
118         WM_operatortype_append(POSE_OT_select_inverse);
119
120         WM_operatortype_append(POSE_OT_select_parent);
121         WM_operatortype_append(POSE_OT_select_hierarchy);
122         WM_operatortype_append(POSE_OT_select_linked);
123         WM_operatortype_append(POSE_OT_select_constraint_target);
124         WM_operatortype_append(POSE_OT_select_grouped);
125         WM_operatortype_append(POSE_OT_select_flip_active);
126         
127         WM_operatortype_append(POSE_OT_group_add);
128         WM_operatortype_append(POSE_OT_group_remove);
129         WM_operatortype_append(POSE_OT_group_assign);
130         WM_operatortype_append(POSE_OT_group_unassign);
131         WM_operatortype_append(POSE_OT_group_select);
132         WM_operatortype_append(POSE_OT_group_deselect);
133         
134         WM_operatortype_append(POSE_OT_paths_calculate);
135         WM_operatortype_append(POSE_OT_paths_clear);
136         
137         WM_operatortype_append(POSE_OT_autoside_names);
138         WM_operatortype_append(POSE_OT_flip_names);
139
140         WM_operatortype_append(POSE_OT_quaternions_flip);
141         
142         WM_operatortype_append(POSE_OT_armature_layers);
143         WM_operatortype_append(POSE_OT_bone_layers);
144         
145         WM_operatortype_append(POSE_OT_propagate);
146         
147         /* POSELIB */
148         WM_operatortype_append(POSELIB_OT_browse_interactive);
149         WM_operatortype_append(POSELIB_OT_apply_pose);
150         
151         WM_operatortype_append(POSELIB_OT_pose_add);
152         WM_operatortype_append(POSELIB_OT_pose_remove);
153         WM_operatortype_append(POSELIB_OT_pose_rename);
154         
155         WM_operatortype_append(POSELIB_OT_new);
156         WM_operatortype_append(POSELIB_OT_unlink);
157         
158         WM_operatortype_append(POSELIB_OT_action_sanitise);
159         
160         /* POSE SLIDING */
161         WM_operatortype_append(POSE_OT_push);
162         WM_operatortype_append(POSE_OT_relax);
163         WM_operatortype_append(POSE_OT_breakdown);
164 }
165
166 void ED_operatormacros_armature(void)
167 {
168         wmOperatorType *ot;
169         wmOperatorTypeMacro *otmacro;
170         
171         ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
172         if(ot) {
173                 WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
174                 otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
175                 RNA_enum_set(otmacro->ptr, "proportional", 0);
176         }
177
178         ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
179         if(ot) {
180                 otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
181                 RNA_boolean_set(otmacro->ptr, "forked", 0);
182                 otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
183                 RNA_enum_set(otmacro->ptr, "proportional", 0);
184         }
185         
186         // XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate?
187         // that would require fixing a properties bug 19733
188         ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
189         if(ot) {
190                 otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
191                 RNA_boolean_set(otmacro->ptr, "forked", 1);
192                 otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
193                 RNA_enum_set(otmacro->ptr, "proportional", 0);
194         }
195 }
196
197 void ED_keymap_armature(wmKeyConfig *keyconf)
198 {
199         wmKeyMap *keymap;
200         wmKeyMapItem *kmi;
201         
202         /* Armature ------------------------ */
203         keymap= WM_keymap_find(keyconf, "Armature", 0, 0);
204         keymap->poll= ED_operator_editarmature;
205         
206         /* Armature -> Etch-A-Ton ------------------------ */
207         WM_keymap_add_item(keymap, "SKETCH_OT_delete", XKEY, KM_PRESS, 0, 0);
208         WM_keymap_add_item(keymap, "SKETCH_OT_delete", DELKEY, KM_PRESS, 0, 0);
209         WM_keymap_add_item(keymap, "SKETCH_OT_finish_stroke", RIGHTMOUSE, KM_PRESS, 0, 0);
210         WM_keymap_add_item(keymap, "SKETCH_OT_cancel_stroke", ESCKEY, KM_PRESS, 0, 0);
211         // Already part of view3d select
212         //WM_keymap_add_item(keymap, "SKETCH_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
213
214         /* sketch poll checks mode */   
215         WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
216         WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0);
217         kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
218         RNA_boolean_set(kmi->ptr, "snap", 1);
219         WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0);
220         kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0);
221         RNA_boolean_set(kmi->ptr, "snap", 1);
222
223         /* only set in editmode armature, by space_view3d listener */
224         WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0);
225         kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
226                 RNA_boolean_set(kmi->ptr, "unselected", 1);
227         WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
228         WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
229         WM_keymap_add_item(keymap, "ARMATURE_OT_calculate_roll", NKEY, KM_PRESS, KM_CTRL, 0);
230         
231         WM_keymap_add_item(keymap, "ARMATURE_OT_switch_direction", FKEY, KM_PRESS, KM_ALT, 0);
232         
233         WM_keymap_add_item(keymap, "ARMATURE_OT_bone_primitive_add", AKEY, KM_PRESS, KM_SHIFT, 0);
234         
235         WM_keymap_add_item(keymap, "ARMATURE_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
236         WM_keymap_add_item(keymap, "ARMATURE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);
237         
238         WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", AKEY, KM_PRESS, 0, 0);
239         WM_keymap_add_item(keymap, "ARMATURE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
240         
241         kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
242                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
243         kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
244                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
245                 RNA_boolean_set(kmi->ptr, "extend", 1);
246         
247         kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
248                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
249         kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
250                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
251                 RNA_boolean_set(kmi->ptr, "extend", 1);
252
253         WM_keymap_add_item(keymap, "ARMATURE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
254         
255         WM_keymap_add_item(keymap, "ARMATURE_OT_delete", XKEY, KM_PRESS, 0, 0);
256         WM_keymap_add_item(keymap, "ARMATURE_OT_delete", DELKEY, KM_PRESS, 0, 0);
257         WM_keymap_add_item(keymap, "ARMATURE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
258         WM_keymap_add_item(keymap, "ARMATURE_OT_extrude_move", EKEY, KM_PRESS, 0, 0);
259         WM_keymap_add_item(keymap, "ARMATURE_OT_extrude_forked", EKEY, KM_PRESS, KM_SHIFT, 0);
260         WM_keymap_add_item(keymap, "ARMATURE_OT_click_extrude", LEFTMOUSE, KM_CLICK, KM_CTRL, 0);
261         WM_keymap_add_item(keymap, "ARMATURE_OT_fill", FKEY, KM_PRESS, 0, 0);
262         WM_keymap_add_item(keymap, "ARMATURE_OT_merge", MKEY, KM_PRESS, KM_ALT, 0);
263         
264         WM_keymap_add_item(keymap, "ARMATURE_OT_separate", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
265         
266                 /* set flags */
267         WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
268         WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
269         WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, KM_PRESS, KM_ALT, 0);
270                 
271                 /* armature/bone layers */
272         WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0);
273         WM_keymap_add_item(keymap, "ARMATURE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0);
274         WM_keymap_add_item(keymap, "ARMATURE_OT_bone_layers", MKEY, KM_PRESS, 0, 0);
275         
276                 /* special transforms: */
277                 /*      1) envelope/b-bone size */
278         kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
279                 RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
280                 /*      2) set roll */
281         kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", RKEY, KM_PRESS, KM_CTRL, 0);
282                 RNA_enum_set(kmi->ptr, "mode", TFM_BONE_ROLL);
283                 
284                 /* menus */
285         WM_keymap_add_menu(keymap, "VIEW3D_MT_armature_specials", WKEY, KM_PRESS, 0, 0);
286
287         /* Pose ------------------------ */
288         /* only set in posemode, by space_view3d listener */
289         keymap= WM_keymap_find(keyconf, "Pose", 0, 0);
290         keymap->poll= ED_operator_posemode;
291         
292         /* set parent and add object are object-based operators, but we make them
293            available here because it's useful to do in pose mode too */
294         WM_keymap_add_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
295         WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
296         
297         WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0);
298         kmi= WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
299                 RNA_boolean_set(kmi->ptr, "unselected", 1);
300         WM_keymap_add_item(keymap, "POSE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
301         
302         WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_apply", AKEY, KM_PRESS, KM_CTRL, 0);
303         
304         // TODO: clear pose
305         WM_keymap_add_item(keymap, "POSE_OT_rot_clear", RKEY, KM_PRESS, KM_ALT, 0);
306         WM_keymap_add_item(keymap, "POSE_OT_loc_clear", GKEY, KM_PRESS, KM_ALT, 0);
307         WM_keymap_add_item(keymap, "POSE_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0);
308         
309         WM_keymap_add_item(keymap, "POSE_OT_quaternions_flip", FKEY, KM_PRESS, KM_ALT, 0);
310         
311         WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
312         WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
313         kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
314                 RNA_boolean_set(kmi->ptr, "flipped", 1);
315         
316         WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0);
317         WM_keymap_add_item(keymap, "POSE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
318
319         WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0);
320
321         kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
322                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
323         kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
324                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
325                 RNA_boolean_set(kmi->ptr, "extend", 1);
326         
327         kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
328                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
329         kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
330                 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
331                 RNA_boolean_set(kmi->ptr, "extend", 1);
332
333         WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
334         WM_keymap_add_item(keymap, "POSE_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
335         WM_keymap_add_item(keymap, "POSE_OT_select_flip_active", FKEY, KM_PRESS, KM_SHIFT, 0);
336         
337         WM_keymap_add_item(keymap, "POSE_OT_constraint_add_with_targets", CKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
338         WM_keymap_add_item(keymap, "POSE_OT_constraints_clear", CKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
339         WM_keymap_add_item(keymap, "POSE_OT_ik_add", IKEY, KM_PRESS, /*KM_CTRL|*/KM_SHIFT, 0);
340         WM_keymap_add_item(keymap, "POSE_OT_ik_clear", IKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
341         
342         WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_group", GKEY, KM_PRESS, KM_CTRL, 0);
343         
344                 /* set flags */
345         WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
346         WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
347         WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, KM_PRESS, KM_ALT, 0);
348
349                 /* armature/bone layers */
350         WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0);
351         WM_keymap_add_item(keymap, "POSE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0);
352         WM_keymap_add_item(keymap, "POSE_OT_bone_layers", MKEY, KM_PRESS, 0, 0);
353         
354                 /* special transforms: */
355                 /*      1) envelope/b-bone size */
356         kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
357                 RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
358         
359                 /* keyframes management */
360         WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_insert_menu", IKEY, KM_PRESS, 0, 0);
361         WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_delete_v3d", IKEY, KM_PRESS, KM_ALT, 0);
362         WM_keymap_verify_item(keymap, "ANIM_OT_keying_set_active_set", IKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0);
363         
364         /* Pose -> PoseLib ------------- */
365         /* only set in posemode, by space_view3d listener */
366         WM_keymap_add_item(keymap, "POSELIB_OT_browse_interactive", LKEY, KM_PRESS, KM_CTRL, 0);
367         
368         WM_keymap_add_item(keymap, "POSELIB_OT_pose_add", LKEY, KM_PRESS, KM_SHIFT, 0);
369         WM_keymap_add_item(keymap, "POSELIB_OT_pose_remove", LKEY, KM_PRESS, KM_ALT, 0);
370         WM_keymap_add_item(keymap, "POSELIB_OT_pose_rename", LKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
371         
372         /* Pose -> Pose Sliding ------------- */
373         /* only set in posemode, by space_view3d listener */
374         WM_keymap_add_item(keymap, "POSE_OT_push", EKEY, KM_PRESS, KM_CTRL, 0);
375         WM_keymap_add_item(keymap, "POSE_OT_relax", EKEY, KM_PRESS, KM_ALT, 0);
376         WM_keymap_add_item(keymap, "POSE_OT_breakdown", EKEY, KM_PRESS, KM_SHIFT, 0);
377 }
378