[Bf-blender-cvs] [10a87860548] blender2.8: Removal of "extend" option for ARMATURE_OT_select_linked
Dalai Felinto
noreply at git.blender.org
Tue Oct 9 23:40:56 CEST 2018
Commit: 10a87860548be05b169863ac41b097182f5d9d58
Author: Dalai Felinto
Date: Tue Oct 9 18:27:27 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB10a87860548be05b169863ac41b097182f5d9d58
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.
===================================================================
M source/blender/editors/armature/armature_select.c
===================================================================
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 */
More information about the Bf-blender-cvs
mailing list