Cleanup: remove redundant operator

This commit is contained in:
Campbell Barton 2018-07-11 13:07:30 +02:00
parent 1d83fe82bc
commit e461d01657
3 changed files with 3 additions and 36 deletions

View File

@ -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.) */

View File

@ -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 */

View File

@ -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;
}
/** \} */