From 1ecf9ccf5fdb8f1ce928ed74582c27c831630eba Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Wed, 13 Mar 2013 12:52:44 +0000 Subject: Outliner fix: selecting a bone did not unselect other bones when they are located in a hidden layer --- .../blender/editors/space_outliner/outliner_select.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 29c5b97a7f7..6fcfb457615 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -460,9 +460,13 @@ static int tree_element_active_posechannel(bContext *C, Scene *scene, TreeElemen if (set) { if (!(pchan->bone->flag & BONE_HIDDEN_P)) { - if (set == 2) ED_pose_deselectall(ob, 2); // 2 = clear active tag - else ED_pose_deselectall(ob, 0); // 0 = deselect - + if (set != 2) { + bPoseChannel *pchannel; + /* single select forces all other bones to get unselected */ + for (pchannel = ob->pose->chanbase.first; pchannel; pchannel = pchannel->next) + pchannel->bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); + } + if (set == 2 && (pchan->bone->flag & BONE_SELECTED)) { pchan->bone->flag &= ~BONE_SELECTED; } @@ -497,8 +501,12 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te, if (!(bone->flag & BONE_HIDDEN_P)) { Object *ob = OBACT; if (ob) { - if (set == 2) ED_pose_deselectall(ob, 2); // 2 is clear active tag - else ED_pose_deselectall(ob, 0); + if (set != 2) { + bPoseChannel *pchannel; + /* single select forces all other bones to get unselected */ + for (pchannel = ob->pose->chanbase.first; pchannel; pchannel = pchannel->next) + pchannel->bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); + } } if (set == 2 && (bone->flag & BONE_SELECTED)) { -- cgit v1.2.3