Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-15 06:03:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-15 06:03:31 +0400
commita91f51b67b48c0a78032ed569d5a163718ec5cce (patch)
treec1caa69eaa41d0a9333825c6f87a315aa4a38568
parentd94fe64d724cc13ab155a016d656371c865d212f (diff)
allow deselection when bones BONE_UNSELECTABLE flag is set (lasso/box/circle select)
-rw-r--r--source/blender/editors/armature/armature_select.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index 6a9036e75dc..d2d13ec8598 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -434,7 +434,7 @@ void ED_armature_deselect_all_visible(Object *obedit)
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
/* first and foremost, bone must be visible and selected */
- if (EBONE_SELECTABLE(arm, ebone)) {
+ if (EBONE_VISIBLE(arm, ebone)) {
ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
}
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index c119fe24210..96cd5a22f58 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -609,7 +609,7 @@ static void do_lasso_select_armature__doSelectBone(void *userData, struct EditBo
LassoSelectUserData *data = userData;
bArmature *arm = data->vc->obedit->data;
- if (EBONE_SELECTABLE(arm, ebone)) {
+ if (data->select ? EBONE_SELECTABLE(arm, ebone) : EBONE_VISIBLE(arm, ebone)) {
bool is_point_done = false;
int points_proj_tot = 0;
@@ -1907,7 +1907,7 @@ static int do_armature_box_select(ViewContext *vc, rcti *rect, bool select, bool
int index = buffer[(4 * a) + 3];
if (index != -1) {
ebone = BLI_findlink(arm->edbo, index & ~(BONESEL_ANY));
- if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
+ if ((select == false) || ((ebone->flag & BONE_UNSELECTABLE) == 0)) {
if (index & BONESEL_TIP) {
ebone->flag |= BONE_DONE;
if (select) ebone->flag |= BONE_TIPSEL;
@@ -1937,7 +1937,7 @@ static int do_armature_box_select(ViewContext *vc, rcti *rect, bool select, bool
if (index != -1) {
ebone = BLI_findlink(arm->edbo, index & ~(BONESEL_ANY));
if (index & BONESEL_BONE) {
- if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
+ if ((select == false) || ((ebone->flag & BONE_UNSELECTABLE) == 0)) {
if (!(ebone->flag & BONE_DONE)) {
if (select)
ebone->flag |= (BONE_ROOTSEL | BONE_TIPSEL | BONE_SELECTED);
@@ -1974,7 +1974,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b
if (bone_only) {
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
- if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
+ if ((select == false) || ((pchan->bone->flag & BONE_UNSELECTABLE) == 0)) {
pchan->bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
}
@@ -2622,7 +2622,7 @@ static void do_circle_select_armature__doSelectBone(void *userData, struct EditB
CircleSelectUserData *data = userData;
bArmature *arm = data->vc->obedit->data;
- if (EBONE_SELECTABLE(arm, ebone)) {
+ if (data->select ? EBONE_SELECTABLE(arm, ebone) : EBONE_VISIBLE(arm, ebone)) {
bool is_point_done = false;
int points_proj_tot = 0;