Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-12 18:53:29 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-12 18:53:29 +0400
commit165bfce94e985898027d748331898efe9ad6f53c (patch)
tree65dc11e93ef1240c169fe4e0b86c13ce6d9726ba /source
parent0b60ff01b4cf3f6cfad294c2cefe9028f6b6f5d3 (diff)
Fix for bug #8934: parenting or connecting armature bones didn't really
sync tip and root selection intuitively.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/buttons_editing.c17
1 files changed, 14 insertions, 3 deletions
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;
}