Selecing a pose bone in outliner deselect others
This mimics what is now the behaviour for edit bones as well.
See e6151bc4c1
.
And it also matches what we do in the viewport when selecting bones.
This commit is contained in:
@@ -586,11 +586,27 @@ static eOLDrawState tree_element_active_posechannel(
|
|||||||
if (!(pchan->bone->flag & BONE_HIDDEN_P)) {
|
if (!(pchan->bone->flag & BONE_HIDDEN_P)) {
|
||||||
|
|
||||||
if (set != OL_SETSEL_EXTEND) {
|
if (set != OL_SETSEL_EXTEND) {
|
||||||
bPoseChannel *pchannel;
|
/* Single select forces all other bones to get unselected. */
|
||||||
/* single select forces all other bones to get unselected */
|
uint objects_len = 0;
|
||||||
for (pchannel = ob->pose->chanbase.first; pchannel; pchannel = pchannel->next) {
|
Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(view_layer, NULL, &objects_len, OB_MODE_POSE);
|
||||||
pchannel->bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
|
for (uint object_index = 0; object_index < objects_len; object_index++) {
|
||||||
|
Object *ob_iter = BKE_object_pose_armature_get(objects[object_index]);
|
||||||
|
|
||||||
|
/* Sanity checks. */
|
||||||
|
if (ELEM(NULL, ob_iter, ob_iter->pose, ob_iter->data)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
bPoseChannel *pchannel;
|
||||||
|
for (pchannel = ob_iter->pose->chanbase.first; pchannel; pchannel = pchannel->next) {
|
||||||
|
pchannel->bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ob != ob_iter) {
|
||||||
|
DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
MEM_freeN(objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((set == OL_SETSEL_EXTEND) && (pchan->bone->flag & BONE_SELECTED)) {
|
if ((set == OL_SETSEL_EXTEND) && (pchan->bone->flag & BONE_SELECTED)) {
|
||||||
|
Reference in New Issue
Block a user