diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-10-10 00:27:27 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-10-10 00:33:16 +0300 |
commit | 10a87860548be05b169863ac41b097182f5d9d58 (patch) | |
tree | 74615cdfc5856e50202a6e28af565bb39c3e1456 /source/blender/editors/armature/armature_select.c | |
parent | 3f93091e8bdb3ad9e1e2c2c68396cc6e83433749 (diff) |
Removal of "extend" option for ARMATURE_OT_select_linked
This property (even in 2.7) was not working. In fact it behaves as extended
when extended was FALSE.
Besides all that, the operator is not affected my multi-objects, so it
is good to go.
Diffstat (limited to 'source/blender/editors/armature/armature_select.c')
-rw-r--r-- | source/blender/editors/armature/armature_select.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index 15ccc24ebe2..846221ca39c 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -288,16 +288,15 @@ void *get_nearest_bone( /* called in space.c */ /* previously "selectconnected_armature" */ -static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEvent *event) +static int armature_select_linked_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { bArmature *arm; EditBone *bone, *curBone, *next; - const bool extend = RNA_boolean_get(op->ptr, "extend"); view3d_operator_needs_opengl(C); Base *base = NULL; - bone = get_nearest_bone(C, event->mval, !extend, &base); + bone = get_nearest_bone(C, event->mval, true, &base); if (!bone) return OPERATOR_CANCELLED; @@ -307,12 +306,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv /* Select parents */ for (curBone = bone; curBone; curBone = next) { if ((curBone->flag & BONE_UNSELECTABLE) == 0) { - if (extend) { - curBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); - } - else { - curBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); - } + curBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } if (curBone->flag & BONE_CONNECTED) @@ -327,10 +321,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv next = curBone->next; if ((curBone->parent == bone) && (curBone->flag & BONE_UNSELECTABLE) == 0) { if (curBone->flag & BONE_CONNECTED) { - if (extend) - curBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); - else - curBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + curBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); bone = curBone; break; } @@ -370,9 +361,6 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - - /* properties */ - RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); } /* utility function for get_nearest_editbonepoint */ |