diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-06-26 15:14:01 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-06-26 15:14:51 +0300 |
commit | 0e75aa44fb9a5036bc11610c369618fe1fdb327b (patch) | |
tree | 49644931e8d52c96e9658d654ab2d4c48fcf7675 /source/blender | |
parent | 25eb0c9cf481a8bb03c6db773cafdff4c1f49986 (diff) |
Fix T78304: Scaling without a constraint axis shows wrong parameters in Adjust Last operator panel
Caused by {rB600fd1c6f0ed}
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 00f1d78881f..dce3cb47b10 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1597,11 +1597,19 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if (!(t->con.mode & CON_APPLY) && (t->flag & T_MODAL) && ELEM(t->mode, TFM_TRANSLATION, TFM_RESIZE)) { /* When redoing these modes the first time, it's more convenient to save - * the Global orientation. */ - mul_m3_v3(t->spacemtx, t->values_final); - unit_m3(t->spacemtx); + * in the Global orientation. */ + if (t->mode == TFM_TRANSLATION) { + mul_m3_v3(t->spacemtx, t->values_final); + } + else { + float tmat[3][3], sizemat[3][3]; + size_to_mat3(sizemat, t->values_final); + mul_m3_m3m3(tmat, t->spacemtx, sizemat); + mat3_to_size(t->values_final, tmat); + } BLI_assert(t->orient_curr == 0); + unit_m3(t->spacemtx); t->orient[0].type = V3D_ORIENT_GLOBAL; } |