Revert multiplication order change from revision 23692

The previous order is correct, the new order forced all global scale on local axis (in object mode).

The "problem" with scaling (or mirroring) in object mode along an axis that is not aligned along one of the local axis is that the result has to be decomposed (as best it can by TransMat3ToSize) into scaling factors along local axis. The more axis aligned the object is, the more "correct" it will look, with the worse being a scale along two local axis when the scaling axis is right between them.

One "solution" could be to make all Mirror transform in object mode work on local axis only (but I don't think that would be correct, since it still works correctly on aligned axis).
This commit is contained in:
Martin Poirier 2009-10-26 19:50:07 +00:00
parent 4fcd358e53
commit 6565193523

@ -2342,7 +2342,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
if (t->flag & (T_OBJECT|T_TEXTURE|T_POSE)) { if (t->flag & (T_OBJECT|T_TEXTURE|T_POSE)) {
float obsizemat[3][3]; float obsizemat[3][3];
// Reorient the size mat to fit the oriented object. // Reorient the size mat to fit the oriented object.
Mat3MulMat3(obsizemat, td->axismtx, tmat); Mat3MulMat3(obsizemat, tmat, td->axismtx);
//printmatrix3("obsizemat", obsizemat); //printmatrix3("obsizemat", obsizemat);
TransMat3ToSize(obsizemat, td->axismtx, fsize); TransMat3ToSize(obsizemat, td->axismtx, fsize);
//printvecf("fsize", fsize); //printvecf("fsize", fsize);