Made it that hidden bones should arnt selected armature and posemode
authorCampbell Barton <ideasman42@gmail.com>
Mon, 28 May 2007 04:50:30 +0000 (04:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 28 May 2007 04:50:30 +0000 (04:50 +0000)
source/blender/src/editarmature.c

index 4db106478ce3e0fed772c989b89bd658da72ab21..c7b818482bda00b02e6205a0ca57051af4aab622 100644 (file)
@@ -1234,15 +1234,15 @@ void deselectall_armature(int toggle, int doundo)
                                        sel=0;
                                        break;
                                }
                                        sel=0;
                                        break;
                                }
-                       }
-//             }
+//                     }
+               }
        }
        else sel= toggle;
        
        /*      Set the flags */
        for (eBone=G.edbo.first;eBone;eBone=eBone->next){
                if (sel==1) {
        }
        else sel= toggle;
        
        /*      Set the flags */
        for (eBone=G.edbo.first;eBone;eBone=eBone->next){
                if (sel==1) {
-                       if(arm->layer & eBone->layer) {
+                       if(arm->layer & eBone->layer && (eBone->flag & BONE_HIDDEN_A)==0) {
                                eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
                                if(eBone->parent)
                                        eBone->parent->flag |= (BONE_TIPSEL);
                                eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
                                if(eBone->parent)
                                        eBone->parent->flag |= (BONE_TIPSEL);
@@ -2223,7 +2223,7 @@ void deselectall_posearmature (Object *ob, int test, int doundo)
        /*      Determine if we're selecting or deselecting     */
        if (test==1) {
                for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next)
        /*      Determine if we're selecting or deselecting     */
        if (test==1) {
                for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next)
-                       if(pchan->bone->layer & arm->layer)
+                       if(pchan->bone->layer & arm->layer && !(pchan->bone->flag & BONE_HIDDEN_P))
                                if(pchan->bone->flag & BONE_SELECTED)
                                        break;
                
                                if(pchan->bone->flag & BONE_SELECTED)
                                        break;
                
@@ -2235,7 +2235,7 @@ void deselectall_posearmature (Object *ob, int test, int doundo)
        
        /*      Set the flags accordingly       */
        for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
        
        /*      Set the flags accordingly       */
        for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
-               if(pchan->bone->layer & arm->layer) {
+               if(pchan->bone->layer & arm->layer && !(pchan->bone->flag & BONE_HIDDEN_P)) {
                        if(selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
                        else if(selectmode==1) pchan->bone->flag |= BONE_SELECTED;
                        else pchan->bone->flag &= ~BONE_ACTIVE;
                        if(selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
                        else if(selectmode==1) pchan->bone->flag |= BONE_SELECTED;
                        else pchan->bone->flag &= ~BONE_ACTIVE;