Fix T41227: Do not select unselectable items when unhiding them!
This commit is contained in:
@@ -1343,7 +1343,9 @@ static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
|
||||
if (arm->layer & ebone->layer) {
|
||||
if (ebone->flag & BONE_HIDDEN_A) {
|
||||
ebone->flag |= (BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
|
||||
if (!(ebone->flag & BONE_UNSELECTABLE)) {
|
||||
ebone->flag |= (BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
|
||||
}
|
||||
ebone->flag &= ~BONE_HIDDEN_A;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1074,7 +1074,9 @@ static int show_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
|
||||
if (arm->layer & bone->layer) {
|
||||
if (bone->flag & BONE_HIDDEN_P) {
|
||||
bone->flag &= ~BONE_HIDDEN_P;
|
||||
bone->flag |= BONE_SELECTED;
|
||||
if (!(bone->flag & BONE_UNSELECTABLE)) {
|
||||
bone->flag |= BONE_SELECTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,9 @@ static int object_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
/* XXX need a context loop to handle such cases */
|
||||
for (base = FIRSTBASE; base; base = base->next) {
|
||||
if ((base->lay & v3d->lay) && base->object->restrictflag & OB_RESTRICT_VIEW) {
|
||||
base->flag |= SELECT;
|
||||
if (!(base->object->restrictflag & OB_RESTRICT_SELECT)) {
|
||||
base->flag |= SELECT;
|
||||
}
|
||||
base->object->flag = base->flag;
|
||||
base->object->restrictflag &= ~OB_RESTRICT_VIEW;
|
||||
changed = true;
|
||||
|
||||
Reference in New Issue
Block a user