Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2009 Blender Foundation. 00019 * All rights reserved. 00020 * 00021 * 00022 * Contributor(s): Blender Foundation 00023 * 00024 * ***** END GPL LICENSE BLOCK ***** 00025 */ 00026 00032 #include <stdlib.h> 00033 #include <math.h> 00034 00035 #include "BLO_sys_types.h" 00036 00037 #include "BLI_math.h" 00038 #include "BLI_blenlib.h" 00039 00040 00041 #include "RNA_access.h" 00042 00043 #include "WM_api.h" 00044 #include "WM_types.h" 00045 00046 #include "ED_armature.h" 00047 #include "ED_screen.h" 00048 #include "ED_transform.h" 00049 00050 #include "armature_intern.h" 00051 00052 /* ************************** registration **********************************/ 00053 00054 /* Both operators ARMATURE_OT_xxx and POSE_OT_xxx here */ 00055 void ED_operatortypes_armature(void) 00056 { 00057 /* EDIT ARMATURE */ 00058 WM_operatortype_append(ARMATURE_OT_bone_primitive_add); 00059 00060 WM_operatortype_append(ARMATURE_OT_align); 00061 WM_operatortype_append(ARMATURE_OT_calculate_roll); 00062 WM_operatortype_append(ARMATURE_OT_switch_direction); 00063 WM_operatortype_append(ARMATURE_OT_subdivide); 00064 00065 WM_operatortype_append(ARMATURE_OT_parent_set); 00066 WM_operatortype_append(ARMATURE_OT_parent_clear); 00067 00068 WM_operatortype_append(ARMATURE_OT_select_all); 00069 WM_operatortype_append(ARMATURE_OT_select_inverse); 00070 WM_operatortype_append(ARMATURE_OT_select_hierarchy); 00071 WM_operatortype_append(ARMATURE_OT_select_linked); 00072 00073 WM_operatortype_append(ARMATURE_OT_delete); 00074 WM_operatortype_append(ARMATURE_OT_duplicate); 00075 WM_operatortype_append(ARMATURE_OT_extrude); 00076 WM_operatortype_append(ARMATURE_OT_hide); 00077 WM_operatortype_append(ARMATURE_OT_reveal); 00078 WM_operatortype_append(ARMATURE_OT_click_extrude); 00079 WM_operatortype_append(ARMATURE_OT_fill); 00080 WM_operatortype_append(ARMATURE_OT_merge); 00081 WM_operatortype_append(ARMATURE_OT_separate); 00082 00083 WM_operatortype_append(ARMATURE_OT_autoside_names); 00084 WM_operatortype_append(ARMATURE_OT_flip_names); 00085 00086 WM_operatortype_append(ARMATURE_OT_layers_show_all); 00087 WM_operatortype_append(ARMATURE_OT_armature_layers); 00088 WM_operatortype_append(ARMATURE_OT_bone_layers); 00089 00090 /* SKETCH */ 00091 WM_operatortype_append(SKETCH_OT_gesture); 00092 WM_operatortype_append(SKETCH_OT_delete); 00093 WM_operatortype_append(SKETCH_OT_draw_stroke); 00094 WM_operatortype_append(SKETCH_OT_draw_preview); 00095 WM_operatortype_append(SKETCH_OT_finish_stroke); 00096 WM_operatortype_append(SKETCH_OT_cancel_stroke); 00097 WM_operatortype_append(SKETCH_OT_convert); 00098 WM_operatortype_append(SKETCH_OT_select); 00099 00100 /* POSE */ 00101 WM_operatortype_append(POSE_OT_hide); 00102 WM_operatortype_append(POSE_OT_reveal); 00103 00104 WM_operatortype_append(POSE_OT_armature_apply); 00105 WM_operatortype_append(POSE_OT_visual_transform_apply); 00106 00107 WM_operatortype_append(POSE_OT_rot_clear); 00108 WM_operatortype_append(POSE_OT_loc_clear); 00109 WM_operatortype_append(POSE_OT_scale_clear); 00110 WM_operatortype_append(POSE_OT_transforms_clear); 00111 WM_operatortype_append(POSE_OT_user_transforms_clear); 00112 00113 WM_operatortype_append(POSE_OT_copy); 00114 WM_operatortype_append(POSE_OT_paste); 00115 00116 WM_operatortype_append(POSE_OT_select_all); 00117 00118 WM_operatortype_append(POSE_OT_select_parent); 00119 WM_operatortype_append(POSE_OT_select_hierarchy); 00120 WM_operatortype_append(POSE_OT_select_linked); 00121 WM_operatortype_append(POSE_OT_select_constraint_target); 00122 WM_operatortype_append(POSE_OT_select_grouped); 00123 WM_operatortype_append(POSE_OT_select_flip_active); 00124 00125 WM_operatortype_append(POSE_OT_group_add); 00126 WM_operatortype_append(POSE_OT_group_remove); 00127 WM_operatortype_append(POSE_OT_group_move); 00128 WM_operatortype_append(POSE_OT_group_sort); 00129 WM_operatortype_append(POSE_OT_group_assign); 00130 WM_operatortype_append(POSE_OT_group_unassign); 00131 WM_operatortype_append(POSE_OT_group_select); 00132 WM_operatortype_append(POSE_OT_group_deselect); 00133 00134 WM_operatortype_append(POSE_OT_paths_calculate); 00135 WM_operatortype_append(POSE_OT_paths_clear); 00136 00137 WM_operatortype_append(POSE_OT_autoside_names); 00138 WM_operatortype_append(POSE_OT_flip_names); 00139 00140 WM_operatortype_append(POSE_OT_rotation_mode_set); 00141 00142 WM_operatortype_append(POSE_OT_quaternions_flip); 00143 00144 WM_operatortype_append(POSE_OT_armature_layers); 00145 WM_operatortype_append(POSE_OT_bone_layers); 00146 00147 WM_operatortype_append(POSE_OT_propagate); 00148 00149 /* POSELIB */ 00150 WM_operatortype_append(POSELIB_OT_browse_interactive); 00151 WM_operatortype_append(POSELIB_OT_apply_pose); 00152 00153 WM_operatortype_append(POSELIB_OT_pose_add); 00154 WM_operatortype_append(POSELIB_OT_pose_remove); 00155 WM_operatortype_append(POSELIB_OT_pose_rename); 00156 00157 WM_operatortype_append(POSELIB_OT_new); 00158 WM_operatortype_append(POSELIB_OT_unlink); 00159 00160 WM_operatortype_append(POSELIB_OT_action_sanitise); 00161 00162 /* POSE SLIDING */ 00163 WM_operatortype_append(POSE_OT_push); 00164 WM_operatortype_append(POSE_OT_relax); 00165 WM_operatortype_append(POSE_OT_breakdown); 00166 } 00167 00168 void ED_operatormacros_armature(void) 00169 { 00170 wmOperatorType *ot; 00171 wmOperatorTypeMacro *otmacro; 00172 00173 ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); 00174 if(ot) { 00175 ot->description= "Make copies of the selected bones within the same armature and move them"; 00176 WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate"); 00177 otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); 00178 RNA_enum_set(otmacro->ptr, "proportional", 0); 00179 } 00180 00181 ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER); 00182 if(ot) { 00183 ot->description= "Create new bones from the selected joints and move them"; 00184 otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); 00185 RNA_boolean_set(otmacro->ptr, "forked", FALSE); 00186 otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); 00187 RNA_enum_set(otmacro->ptr, "proportional", 0); 00188 } 00189 00190 // XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate? 00191 // that would require fixing a properties bug 19733 00192 ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER); 00193 if(ot) { 00194 ot->description= "Create new bones from the selected joints and move them"; 00195 otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); 00196 RNA_boolean_set(otmacro->ptr, "forked", TRUE); 00197 otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); 00198 RNA_enum_set(otmacro->ptr, "proportional", 0); 00199 } 00200 } 00201 00202 void ED_keymap_armature(wmKeyConfig *keyconf) 00203 { 00204 wmKeyMap *keymap; 00205 wmKeyMapItem *kmi; 00206 00207 /* Armature ------------------------ */ 00208 keymap= WM_keymap_find(keyconf, "Armature", 0, 0); 00209 keymap->poll= ED_operator_editarmature; 00210 00211 /* Armature -> Etch-A-Ton ------------------------ */ 00212 WM_keymap_add_item(keymap, "SKETCH_OT_delete", XKEY, KM_PRESS, 0, 0); 00213 WM_keymap_add_item(keymap, "SKETCH_OT_delete", DELKEY, KM_PRESS, 0, 0); 00214 WM_keymap_add_item(keymap, "SKETCH_OT_finish_stroke", RIGHTMOUSE, KM_PRESS, 0, 0); 00215 WM_keymap_add_item(keymap, "SKETCH_OT_cancel_stroke", ESCKEY, KM_PRESS, 0, 0); 00216 // Already part of view3d select 00217 //WM_keymap_add_item(keymap, "SKETCH_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); 00218 00219 /* sketch poll checks mode */ 00220 WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); 00221 WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0); 00222 kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); 00223 RNA_boolean_set(kmi->ptr, "snap", TRUE); 00224 WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0); 00225 kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0); 00226 RNA_boolean_set(kmi->ptr, "snap", TRUE); 00227 00228 /* only set in editmode armature, by space_view3d listener */ 00229 kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0); 00230 RNA_boolean_set(kmi->ptr, "unselected", FALSE); 00231 kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); 00232 RNA_boolean_set(kmi->ptr, "unselected", TRUE); 00233 00234 WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); 00235 WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); 00236 WM_keymap_add_item(keymap, "ARMATURE_OT_calculate_roll", NKEY, KM_PRESS, KM_CTRL, 0); 00237 00238 WM_keymap_add_item(keymap, "ARMATURE_OT_switch_direction", FKEY, KM_PRESS, KM_ALT, 0); 00239 00240 WM_keymap_add_item(keymap, "ARMATURE_OT_bone_primitive_add", AKEY, KM_PRESS, KM_SHIFT, 0); 00241 00242 WM_keymap_add_item(keymap, "ARMATURE_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); 00243 WM_keymap_add_item(keymap, "ARMATURE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0); 00244 00245 kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", AKEY, KM_PRESS, 0, 0); 00246 RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); 00247 kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); 00248 RNA_enum_set(kmi->ptr, "action", SEL_INVERT); 00249 00250 kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); 00251 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); 00252 RNA_boolean_set(kmi->ptr, "extend", FALSE); 00253 kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); 00254 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); 00255 RNA_boolean_set(kmi->ptr, "extend", TRUE); 00256 00257 kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); 00258 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); 00259 RNA_boolean_set(kmi->ptr, "extend", FALSE); 00260 kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); 00261 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); 00262 RNA_boolean_set(kmi->ptr, "extend", TRUE); 00263 00264 WM_keymap_add_item(keymap, "ARMATURE_OT_select_linked", LKEY, KM_PRESS, 0, 0); 00265 00266 WM_keymap_add_item(keymap, "ARMATURE_OT_delete", XKEY, KM_PRESS, 0, 0); 00267 WM_keymap_add_item(keymap, "ARMATURE_OT_delete", DELKEY, KM_PRESS, 0, 0); 00268 WM_keymap_add_item(keymap, "ARMATURE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0); 00269 WM_keymap_add_item(keymap, "ARMATURE_OT_extrude_move", EKEY, KM_PRESS, 0, 0); 00270 WM_keymap_add_item(keymap, "ARMATURE_OT_extrude_forked", EKEY, KM_PRESS, KM_SHIFT, 0); 00271 WM_keymap_add_item(keymap, "ARMATURE_OT_click_extrude", LEFTMOUSE, KM_CLICK, KM_CTRL, 0); 00272 WM_keymap_add_item(keymap, "ARMATURE_OT_fill", FKEY, KM_PRESS, 0, 0); 00273 WM_keymap_add_item(keymap, "ARMATURE_OT_merge", MKEY, KM_PRESS, KM_ALT, 0); 00274 00275 WM_keymap_add_item(keymap, "ARMATURE_OT_separate", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); 00276 00277 /* set flags */ 00278 WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, KM_PRESS, KM_SHIFT, 0); 00279 WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); 00280 WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, KM_PRESS, KM_ALT, 0); 00281 00282 /* armature/bone layers */ 00283 WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0); 00284 WM_keymap_add_item(keymap, "ARMATURE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0); 00285 WM_keymap_add_item(keymap, "ARMATURE_OT_bone_layers", MKEY, KM_PRESS, 0, 0); 00286 00287 /* special transforms: */ 00288 /* 1) envelope/b-bone size */ 00289 kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); 00290 RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE); 00291 /* 2) set roll */ 00292 kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", RKEY, KM_PRESS, KM_CTRL, 0); 00293 RNA_enum_set(kmi->ptr, "mode", TFM_BONE_ROLL); 00294 00295 /* menus */ 00296 WM_keymap_add_menu(keymap, "VIEW3D_MT_armature_specials", WKEY, KM_PRESS, 0, 0); 00297 00298 /* Pose ------------------------ */ 00299 /* only set in posemode, by space_view3d listener */ 00300 keymap= WM_keymap_find(keyconf, "Pose", 0, 0); 00301 keymap->poll= ED_operator_posemode; 00302 00303 /* set parent and add object are object-based operators, but we make them 00304 available here because it's useful to do in pose mode too */ 00305 WM_keymap_add_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); 00306 WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0); 00307 00308 kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0); 00309 RNA_boolean_set(kmi->ptr, "unselected", FALSE); 00310 kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); 00311 RNA_boolean_set(kmi->ptr, "unselected", TRUE); 00312 00313 WM_keymap_add_item(keymap, "POSE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); 00314 00315 WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_apply", AKEY, KM_PRESS, KM_CTRL, 0); 00316 00317 // TODO: clear pose 00318 WM_keymap_add_item(keymap, "POSE_OT_rot_clear", RKEY, KM_PRESS, KM_ALT, 0); 00319 WM_keymap_add_item(keymap, "POSE_OT_loc_clear", GKEY, KM_PRESS, KM_ALT, 0); 00320 WM_keymap_add_item(keymap, "POSE_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0); 00321 00322 WM_keymap_add_item(keymap, "POSE_OT_quaternions_flip", FKEY, KM_PRESS, KM_ALT, 0); 00323 00324 WM_keymap_add_item(keymap, "POSE_OT_rotation_mode_set", RKEY, KM_PRESS, KM_CTRL, 0); 00325 00326 WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0); 00327 kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0); 00328 RNA_boolean_set(kmi->ptr, "flipped", FALSE); 00329 00330 kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); 00331 RNA_boolean_set(kmi->ptr, "flipped", TRUE); 00332 00333 kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0); 00334 RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); 00335 kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); 00336 RNA_enum_set(kmi->ptr, "action", SEL_INVERT); 00337 00338 WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0); 00339 00340 kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); 00341 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); 00342 RNA_boolean_set(kmi->ptr, "extend", FALSE); 00343 kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); 00344 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); 00345 RNA_boolean_set(kmi->ptr, "extend", TRUE); 00346 00347 kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); 00348 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); 00349 RNA_boolean_set(kmi->ptr, "extend", FALSE); 00350 kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); 00351 RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); 00352 RNA_boolean_set(kmi->ptr, "extend", TRUE); 00353 00354 WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0); 00355 WM_keymap_add_item(keymap, "POSE_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); 00356 WM_keymap_add_item(keymap, "POSE_OT_select_flip_active", FKEY, KM_PRESS, KM_SHIFT, 0); 00357 00358 WM_keymap_add_item(keymap, "POSE_OT_constraint_add_with_targets", CKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); 00359 WM_keymap_add_item(keymap, "POSE_OT_constraints_clear", CKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); 00360 WM_keymap_add_item(keymap, "POSE_OT_ik_add", IKEY, KM_PRESS, /*KM_CTRL|*/KM_SHIFT, 0); 00361 WM_keymap_add_item(keymap, "POSE_OT_ik_clear", IKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); 00362 00363 WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_group", GKEY, KM_PRESS, KM_CTRL, 0); 00364 00365 /* set flags */ 00366 WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, KM_PRESS, KM_SHIFT, 0); 00367 WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); 00368 WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, KM_PRESS, KM_ALT, 0); 00369 00370 /* armature/bone layers */ 00371 WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0); 00372 WM_keymap_add_item(keymap, "POSE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0); 00373 WM_keymap_add_item(keymap, "POSE_OT_bone_layers", MKEY, KM_PRESS, 0, 0); 00374 00375 /* special transforms: */ 00376 /* 1) envelope/b-bone size */ 00377 kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); 00378 RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE); 00379 00380 /* keyframes management */ 00381 WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_insert_menu", IKEY, KM_PRESS, 0, 0); 00382 WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_delete_v3d", IKEY, KM_PRESS, KM_ALT, 0); 00383 WM_keymap_verify_item(keymap, "ANIM_OT_keying_set_active_set", IKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0); 00384 00385 /* Pose -> PoseLib ------------- */ 00386 /* only set in posemode, by space_view3d listener */ 00387 WM_keymap_add_item(keymap, "POSELIB_OT_browse_interactive", LKEY, KM_PRESS, KM_CTRL, 0); 00388 00389 WM_keymap_add_item(keymap, "POSELIB_OT_pose_add", LKEY, KM_PRESS, KM_SHIFT, 0); 00390 WM_keymap_add_item(keymap, "POSELIB_OT_pose_remove", LKEY, KM_PRESS, KM_ALT, 0); 00391 WM_keymap_add_item(keymap, "POSELIB_OT_pose_rename", LKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); 00392 00393 /* Pose -> Pose Sliding ------------- */ 00394 /* only set in posemode, by space_view3d listener */ 00395 WM_keymap_add_item(keymap, "POSE_OT_push", EKEY, KM_PRESS, KM_CTRL, 0); 00396 WM_keymap_add_item(keymap, "POSE_OT_relax", EKEY, KM_PRESS, KM_ALT, 0); 00397 WM_keymap_add_item(keymap, "POSE_OT_breakdown", EKEY, KM_PRESS, KM_SHIFT, 0); 00398 } 00399