Fix minor glitch w/ edit-bone center

Don't include the same point multiple times when calculating center with connected bones.
This commit is contained in:
Campbell Barton 2016-03-09 16:05:27 +11:00
parent 1f386cce5f
commit 95448e851b
1 changed files with 7 additions and 1 deletions

View File

@ -367,7 +367,13 @@ static int calc_manipulator_stats(const bContext *C)
calc_tw_center(scene, ebo->tail);
totsel++;
}
if (ebo->flag & BONE_ROOTSEL) {
if ((ebo->flag & BONE_ROOTSEL) &&
/* don't include same point multiple times */
((ebo->flag & BONE_CONNECTED) &&
(ebo->parent != NULL) &&
(ebo->parent->flag & BONE_TIPSEL) &&
EBONE_VISIBLE(arm, ebo->parent)) == 0)
{
calc_tw_center(scene, ebo->head);
totsel++;
}