[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58250] trunk/blender/source/blender/ editors/armature/armature_select.c: fix [#36128] Not deselect all bone when I press the A button in edit mode
Campbell Barton
ideasman42 at gmail.com
Mon Jul 15 03:47:03 CEST 2013
Revision: 58250
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58250
Author: campbellbarton
Date: 2013-07-15 01:47:01 +0000 (Mon, 15 Jul 2013)
Log Message:
-----------
fix [#36128] Not deselect all bone when I press the A button in edit mode
Modified Paths:
--------------
trunk/blender/source/blender/editors/armature/armature_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:34:59 UTC (rev 58249)
+++ trunk/blender/source/blender/editors/armature/armature_select.c 2013-07-15 01:47:01 UTC (rev 58250)
@@ -597,38 +597,48 @@
int action = RNA_enum_get(op->ptr, "action");
if (action == SEL_TOGGLE) {
- action = SEL_SELECT;
/* Determine if there are any selected bones
* And therefore whether we are selecting or deselecting */
- if (CTX_DATA_COUNT(C, selected_bones) > 0)
- action = SEL_DESELECT;
+ action = SEL_SELECT;
+ CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones)
+ {
+ if (ebone->flag & (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL)) {
+ action = SEL_DESELECT;
+ break;
+ }
+ }
+ CTX_DATA_END;
}
/* Set the flags */
CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones)
{
/* ignore bone if selection can't change */
- if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
- switch (action) {
- case SEL_SELECT:
+ switch (action) {
+ case SEL_SELECT:
+ if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if (ebone->parent)
+ if (ebone->parent) {
ebone->parent->flag |= (BONE_TIPSEL);
- break;
- case SEL_DESELECT:
+ }
+ }
+ break;
+ case SEL_DESELECT:
+ ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ break;
+ case SEL_INVERT:
+ if (ebone->flag & BONE_SELECTED) {
ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- break;
- case SEL_INVERT:
- if (ebone->flag & BONE_SELECTED) {
- ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- }
- else {
+ }
+ else {
+ if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if (ebone->parent)
+ if (ebone->parent) {
ebone->parent->flag |= (BONE_TIPSEL);
+ }
}
- break;
- }
+ }
+ break;
}
}
CTX_DATA_END;
More information about the Bf-blender-cvs
mailing list