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
This commit is contained in:
Nathan Craddock 2020-08-26 11:19:19 -06:00
parent 70151e41dc
commit 9de18c361b
1 changed files with 12 additions and 8 deletions

View File

@ -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);