diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-25 19:07:30 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-25 19:22:49 +0400 |
commit | 18060d863207d98a06b743437f2353516605436e (patch) | |
tree | 12c659f67eca3ed79e8ab81f267f86bb5faf25a4 /source/blender/editors/armature/armature_ops.c | |
parent | dd86773969e6eb6db69495dfee07688fe4bdf8bd (diff) |
Fix T39895: Displaying the armature layers popup in edit mode always fails.
In fact, armature layers operators (set layers, and show all) were kind of messy and broken
in Edit mode (Select layers had two different operators for Pose and Edit modes, both
using the same funcs that could only work in Pose mode, Show All was supposed to be
used in both modes but again, its exec code could only work in Pose one).
Fixed that by:
* Using only one op for each task, for both modes (with adapted poll func).
* Replacing 'object from context' access by an helper that returns the right Armature
object in both Edit and Pose modes.
Diffstat (limited to 'source/blender/editors/armature/armature_ops.c')
-rw-r--r-- | source/blender/editors/armature/armature_ops.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index f3c23c1f202..b7e38546ca2 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -139,7 +139,6 @@ void ED_operatortypes_armature(void) WM_operatortype_append(POSE_OT_quaternions_flip); - WM_operatortype_append(POSE_OT_armature_layers); WM_operatortype_append(POSE_OT_bone_layers); WM_operatortype_append(POSE_OT_propagate); @@ -284,7 +283,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, KM_PRESS, KM_ALT, 0); - + /* armature/bone layers */ WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0); @@ -385,7 +384,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf) /* armature/bone layers */ WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "POSE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "ARMATURE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "POSE_OT_bone_layers", MKEY, KM_PRESS, 0, 0); /* special transforms: */ |