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