From 165bfce94e985898027d748331898efe9ad6f53c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 12 Apr 2008 14:53:29 +0000 Subject: Fix for bug #8934: parenting or connecting armature bones didn't really sync tip and root selection intuitively. --- source/blender/src/buttons_editing.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 80ca4db9cac..313fc0d5e2c 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -4001,15 +4001,26 @@ static void attach_bone_to_parent_cb(void *bonev, void *arg2_unused) { 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; } -- cgit v1.2.3