From 9de18c361bb4efa11016b6a6671b6409cfe5a2fb Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Wed, 26 Aug 2020 11:19:19 -0600 Subject: Outliner: Use `shift` for restrict button child toggle The `ctrl` key was mapped to recursive bone selectable and visibility toggling. This changes the key to `shift` to be consistent with objects and collections. Also adds an explanation to the tooltip. Part of T77408 Differential Revision: https://developer.blender.org/D8650 --- .../blender/editors/space_outliner/outliner_draw.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 277ecc60669..fbef3aa07d7 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -182,7 +182,7 @@ static void restrictbutton_bone_visibility_fn(bContext *C, void *poin, void *UNU { Bone *bone = (Bone *)poin; - if (CTX_wm_window(C)->eventstate->ctrl) { + if (CTX_wm_window(C)->eventstate->shift) { restrictbutton_recursive_bone(bone, BONE_HIDDEN_P, (bone->flag & BONE_HIDDEN_P) != 0); } } @@ -194,7 +194,7 @@ static void restrictbutton_bone_select_fn(bContext *C, void *UNUSED(poin), void bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } - if (CTX_wm_window(C)->eventstate->ctrl) { + if (CTX_wm_window(C)->eventstate->shift) { restrictbutton_recursive_bone(bone, BONE_UNSELECTABLE, (bone->flag & BONE_UNSELECTABLE) != 0); } @@ -209,7 +209,7 @@ static void restrictbutton_ebone_select_fn(bContext *C, void *UNUSED(poin), void ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } - if (CTX_wm_window(C)->eventstate->ctrl) { + if (CTX_wm_window(C)->eventstate->shift) { restrictbutton_recursive_ebone( C, ebone, BONE_UNSELECTABLE, (ebone->flag & BONE_UNSELECTABLE) != 0); } @@ -224,7 +224,7 @@ static void restrictbutton_ebone_visibility_fn(bContext *C, void *UNUSED(poin), ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } - if (CTX_wm_window(C)->eventstate->ctrl) { + if (CTX_wm_window(C)->eventstate->shift) { restrictbutton_recursive_ebone(C, ebone, BONE_HIDDEN_A, (ebone->flag & BONE_HIDDEN_A) != 0); } @@ -1300,7 +1300,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, 0, -1, -1, - TIP_("Restrict visibility in the 3D View")); + TIP_("Restrict visibility in the 3D View\n" + "* Shift to set children")); UI_but_func_set(bt, restrictbutton_bone_visibility_fn, bone, NULL); UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); @@ -1321,7 +1322,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, 0, 0, 0, - TIP_("Restrict selection in the 3D View")); + TIP_("Restrict selection in the 3D View\n" + "* Shift to set children")); UI_but_func_set(bt, restrictbutton_bone_select_fn, ob->data, bone); UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); @@ -1345,7 +1347,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, 0, 0, 0, - TIP_("Restrict visibility in the 3D View")); + TIP_("Restrict visibility in the 3D View\n" + "* Shift to set children")); UI_but_func_set(bt, restrictbutton_ebone_visibility_fn, NULL, ebone); UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); @@ -1366,7 +1369,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, 0, 0, 0, - TIP_("Restrict selection in the 3D View")); + TIP_("Restrict selection in the 3D View\n" + "* Shift to set children")); UI_but_func_set(bt, restrictbutton_ebone_select_fn, NULL, ebone); UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); -- cgit v1.2.3