[Bf-blender-cvs] [397665dea3b] blender2.8: Fix: Deselecting bones using box select didn't work
Joshua Leung
noreply at git.blender.org
Tue May 22 16:44:24 CEST 2018
Commit: 397665dea3b904fe41ccceee09aeb0132c9674f1
Author: Joshua Leung
Date: Tue May 22 16:44:07 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB397665dea3b904fe41ccceee09aeb0132c9674f1
Fix: Deselecting bones using box select didn't work
Logic here was a bit broken.
1) We need to send updates even when deselecting bones, not only when we
actually end up select then.
2) Also, when bones are locked for "selectability", they should not be able
to be deselected.
===================================================================
M source/blender/editors/space_view3d/view3d_select.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 93ecb8a4b61..711bdac9dc0 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2134,9 +2134,12 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b
}
else {
bArmature *arm = base->object->data;
- bone->flag &= ~BONE_SELECTED;
- if (arm->act_bone == bone)
- arm->act_bone = NULL;
+ if ((bone->flag & BONE_UNSELECTABLE) == 0) {
+ bone->flag &= ~BONE_SELECTED;
+ bone_selected = true;
+ if (arm->act_bone == bone)
+ arm->act_bone = NULL;
+ }
}
}
else if (!bone_only) {
@@ -2170,6 +2173,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b
/* mask modifier ('armature' mode), etc. */
DEG_id_tag_update(&vc->obact->id, OB_RECALC_DATA);
}
+
}
}
}
More information about the Bf-blender-cvs
mailing list