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:
authorCampbell Barton <ideasman42@gmail.com>2010-09-13 11:30:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-13 11:30:11 +0400
commitcd1dc29e65a7fb8c1c823be840fedaad795608d6 (patch)
treefe1b3ecb95bb8b5d34414db1f1644f79263c8ce0 /source
parent0c815a42fd42ffb19321945617686ff82921b873 (diff)
patch [#23221] Merge bone : Within chains : infinite loop
from Yvon Tanguy (vono)
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/armature/editarmature.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 6bda6b5069c..85ae2fba24c 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -3107,8 +3107,8 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
/* step 2a: parent children of in-between bones to newbone */
for (chain= chains->first; chain; chain= chain->next) {
/* ick: we need to check if parent of each bone in chain is one of the bones in the */
+ short found= 0;
for (ebo= chain->data; ebo; ebo= ebo->parent) {
- short found= 0;
/* try to find which bone from the list to be removed, is the parent */
for (ebone= end; ebone; ebone= ebone->parent) {
@@ -3124,6 +3124,9 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
break;
}
}
+ if (found) {
+ break;
+ }
}
/* step 2b: parent child of end to newbone (child from this chain) */
@@ -3135,6 +3138,9 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
ebone= (ebo == start) ? (NULL) : (ebo->parent);
bone_free(arm, ebo);
}
+
+ newbone->flag |= (BONE_ROOTSEL|BONE_TIPSEL|BONE_SELECTED);
+ ED_armature_sync_selection(arm->edbo);
}