=== Transform ===

Reverting Aligorith's fix for bug Bugfix #5833 (the fix was incorrect, see bug report for details).

That means the translation part when rotating "free" bones in pose mode is still broken.
This commit is contained in:
Martin Poirier
2007-02-05 18:00:03 +00:00
parent abc2a4ca44
commit 4754e37539
2 changed files with 5 additions and 27 deletions

View File

@@ -122,15 +122,7 @@ static void helpline(TransInfo *t, float *vec)
}
else if(t->flag & T_POSE) {
Object *ob=t->poseobj;
float tmat[4][4];
Mat4One(tmat);
VECCOPY(tmat[3], vecrot);
if(ob) {
Mat4MulMat4(tmat, ob->obmat, tmat);
VECCOPY(vecrot, tmat[3]);
}
if(ob) Mat4MulVecfl(ob->obmat, vecrot);
}
getmouseco_areawin(mval);

View File

@@ -640,24 +640,14 @@ void restoreTransObjects(TransInfo *t)
void calculateCenter2D(TransInfo *t)
{
if (t->flag & T_EDIT) {
Object *ob= G.obedit;
if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= G.obedit?G.obedit:t->poseobj;
float vec[3];
VECCOPY(vec, t->center);
Mat4MulVecfl(ob->obmat, vec);
projectIntView(t, vec, t->center2d);
}
else if (t->flag & T_POSE) {
Object *ob= t->poseobj;
float mat[4][4];
Mat4One(mat);
VECCOPY(mat[3], t->center);
Mat4MulMat4(mat, ob->obmat, mat);
projectIntView(t, mat[3], t->center2d);
}
else {
projectIntView(t, t->center, t->center2d);
}
@@ -671,8 +661,8 @@ void calculateCenterCursor(TransInfo *t)
VECCOPY(t->center, cursor);
/* If edit or pose mode, move cursor in local space */
if (t->flag & T_EDIT) {
Object *ob= G.obedit;
if (t->flag & (T_EDIT|T_POSE)) {
Object *ob = G.obedit?G.obedit:t->poseobj;
float mat[3][3], imat[3][3];
VecSubf(t->center, t->center, ob->obmat[3]);
@@ -680,10 +670,6 @@ void calculateCenterCursor(TransInfo *t)
Mat3Inv(imat, mat);
Mat3MulVecfl(imat, t->center);
}
else if (t->flag & T_POSE) {
Object *ob= t->poseobj;
armature_loc_world_to_pose(ob, cursor, t->center);
}
calculateCenter2D(t);
}