diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/armature/armature_intern.h | 1 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 32 |
3 files changed, 3 insertions, 36 deletions
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index a37a2bada08..7c0dd09a237 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -137,7 +137,6 @@ void POSE_OT_rotation_mode_set(struct wmOperatorType *ot); void POSE_OT_quaternions_flip(struct wmOperatorType *ot); void POSE_OT_bone_layers(struct wmOperatorType *ot); -void POSE_OT_toggle_bone_selection_overlay(struct wmOperatorType *ot); /* ******************************************************* */ /* Pose Tool Utilities (for PoseLib, Pose Sliding, etc.) */ diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index 8ea03fa242d..039bb7f1847 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -132,8 +132,6 @@ void ED_operatortypes_armature(void) WM_operatortype_append(POSE_OT_bone_layers); - WM_operatortype_append(POSE_OT_toggle_bone_selection_overlay); - WM_operatortype_append(POSE_OT_propagate); /* POSELIB */ @@ -377,7 +375,9 @@ void ED_keymap_armature(wmKeyConfig *keyconf) 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); WM_keymap_add_item(keymap, "POSE_OT_bone_layers", MKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "POSE_OT_toggle_bone_selection_overlay", ZKEY, KM_PRESS, 0, 0); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", ZKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "data_path", "space_data.overlay.show_bone_select"); /* special transforms: */ /* 1) envelope/b-bone size */ diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 39f532ef1db..a9ba8c405ba 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -1248,35 +1248,3 @@ void POSE_OT_quaternions_flip(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } - -/* -------------------------------------------------------------------- */ -/** \name Toggle Bone selection Overlay Operator - * \{ */ - -static int toggle_bone_selection_exec(bContext *C, wmOperator *UNUSED(op)) -{ - View3D *v3d = CTX_wm_view3d(C); - v3d->overlay.flag ^= V3D_OVERLAY_BONE_SELECT; - ED_view3d_shade_update(CTX_data_main(C), v3d, CTX_wm_area(C)); - WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); - return OPERATOR_FINISHED; -} - -static bool pose_select_linked_poll(bContext *C) -{ - return (ED_operator_view3d_active(C) && ED_operator_posemode(C)); -} - -void POSE_OT_toggle_bone_selection_overlay(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Toggle Bone Selection Overlay"; - ot->description = "Toggle bone selection overlay of the viewport"; - ot->idname = "POSE_OT_toggle_bone_selection_overlay"; - - /* api callbacks */ - ot->exec = toggle_bone_selection_exec; - ot->poll = pose_select_linked_poll; -} - -/** \} */ |