[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58251] trunk/blender/source/blender/ editors: allow deselection when bones BONE_UNSELECTABLE flag is set (lasso/ box/circle select)
Campbell Barton
ideasman42 at gmail.com
Mon Jul 15 04:03:35 CEST 2013
Revision: 58251
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58251
Author: campbellbarton
Date: 2013-07-15 02:03:31 +0000 (Mon, 15 Jul 2013)
Log Message:
-----------
allow deselection when bones BONE_UNSELECTABLE flag is set (lasso/box/circle select)
Modified Paths:
--------------
trunk/blender/source/blender/editors/armature/armature_select.c
trunk/blender/source/blender/editors/space_view3d/view3d_select.c
Modified: trunk/blender/source/blender/editors/armature/armature_select.c
===================================================================
--- trunk/blender/source/blender/editors/armature/armature_select.c 2013-07-15 01:47:01 UTC (rev 58250)
+++ trunk/blender/source/blender/editors/armature/armature_select.c 2013-07-15 02:03:31 UTC (rev 58251)
@@ -434,7 +434,7 @@
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);
}
}
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_select.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_select.c 2013-07-15 01:47:01 UTC (rev 58250)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_select.c 2013-07-15 02:03:31 UTC (rev 58251)
@@ -609,7 +609,7 @@
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 @@
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 @@
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 @@
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 @@
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;
More information about the Bf-blender-cvs
mailing list