[Bf-blender-cvs] [9de18c361bb] master: Outliner: Use `shift` for restrict button child toggle

Nathan Craddock noreply at git.blender.org
Wed Aug 26 19:25:48 CEST 2020


Commit: 9de18c361bb4efa11016b6a6671b6409cfe5a2fb
Author: Nathan Craddock
Date:   Wed Aug 26 11:19:19 2020 -0600
Branches: master
https://developer.blender.org/rB9de18c361bb4efa11016b6a6671b6409cfe5a2fb

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

===================================================================

M	source/blender/editors/space_outliner/outliner_draw.c

===================================================================

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



More information about the Bf-blender-cvs mailing list