fix [#28788] Scale using "Individual origins" in bones

works for rotate and scale
This commit is contained in:
Campbell Barton 2011-10-02 19:57:34 +00:00
parent ccb7a81d86
commit 74c681330f
2 changed files with 8 additions and 6 deletions

@ -2612,7 +2612,9 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
} }
else if (t->flag & T_EDIT) { else if (t->flag & T_EDIT) {
if(t->settings->selectmode & SCE_SELECT_FACE) { if( (t->settings->selectmode & SCE_SELECT_FACE) ||
(t->obedit && t->obedit->type == OB_ARMATURE))
{
copy_v3_v3(center, td->center); copy_v3_v3(center, td->center);
} }
else { else {
@ -2902,10 +2904,10 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* local constraint shouldn't alter center */ /* local constraint shouldn't alter center */
if (around == V3D_LOCAL) { if (around == V3D_LOCAL) {
if (t->flag & (T_OBJECT|T_POSE)) { if ( (t->flag & (T_OBJECT|T_POSE)) ||
center = td->center; (t->settings->selectmode & SCE_SELECT_FACE) ||
} (t->obedit && t->obedit->type == OB_ARMATURE))
else if (t->settings->selectmode & SCE_SELECT_FACE) { {
center = td->center; center = td->center;
} }
} }

@ -1194,7 +1194,7 @@ static void createTransArmatureVerts(TransInfo *t)
if (ebo->flag & BONE_TIPSEL) if (ebo->flag & BONE_TIPSEL)
{ {
copy_v3_v3(td->iloc, ebo->tail); copy_v3_v3(td->iloc, ebo->tail);
copy_v3_v3(td->center, td->iloc); copy_v3_v3(td->center, (t->around==V3D_LOCAL) ? ebo->head : td->iloc);
td->loc= ebo->tail; td->loc= ebo->tail;
td->flag= TD_SELECTED; td->flag= TD_SELECTED;
if (ebo->flag & BONE_EDITMODE_LOCKED) if (ebo->flag & BONE_EDITMODE_LOCKED)