Revision: 14395
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14395
Author:   blendix
Date:     2008-04-12 16:53:29 +0200 (Sat, 12 Apr 2008)

Log Message:
-----------

Fix for bug #8934: parenting or connecting armature bones didn't really
sync tip and root selection intuitively.

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_editing.c

Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c  2008-04-12 14:30:17 UTC 
(rev 14394)
+++ trunk/blender/source/blender/src/buttons_editing.c  2008-04-12 14:53:29 UTC 
(rev 14395)
@@ -4001,15 +4001,26 @@
 {
        EditBone *ebone= bonev;
        
-       if (ebone->parent && (ebone->flag & BONE_CONNECTED)) {
-               /* Attach this bone to its parent */
-               VECCOPY(ebone->head, ebone->parent->tail);
+       if (ebone->parent) {
+               if(ebone->flag & BONE_CONNECTED) {
+                       /* Attach this bone to its parent */
+                       VECCOPY(ebone->head, ebone->parent->tail);
+
+                       if(ebone->flag & BONE_ROOTSEL)
+                               ebone->parent->flag |= BONE_TIPSEL;
+               }
+               else if(!(ebone->parent->flag & BONE_ROOTSEL)) {
+                       ebone->parent->flag &= ~BONE_TIPSEL;
+               }
        }
 }
 
 static void parnr_to_editbone(EditBone *bone)
 {
        if (bone->parNr == -1){
+               if(bone->parent && !(bone->parent->flag & BONE_ROOTSEL))
+                       bone->parent->flag &= ~BONE_TIPSEL;
+
                bone->parent = NULL;
                bone->flag &= ~BONE_CONNECTED;
        }


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to