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