diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-09-24 16:35:49 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-09-24 16:36:01 +0300 |
commit | 58dc059ad32db15b43f24d235b6f3a5785a6433a (patch) | |
tree | f07fdb5e137ab588350da8e188f0dd5006b9e137 /source | |
parent | f3ac39b857394d804df04d893517ebd1a403de19 (diff) |
Fix T81096, T81127: Errors with the typed value for x-axis constrain
`applyNumInput` does not write all axis values and does not consider
the orientation.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_mode_edge_seq_slide.c | 4 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_mode_translate.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_mode_edge_seq_slide.c b/source/blender/editors/transform/transform_mode_edge_seq_slide.c index d2474d78387..befd54c3636 100644 --- a/source/blender/editors/transform/transform_mode_edge_seq_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_seq_slide.c @@ -93,13 +93,13 @@ static void applySeqSlideValue(TransInfo *t, const float val[2]) static void applySeqSlide(TransInfo *t, const int mval[2]) { char str[UI_MAX_DRAW_STR]; - float values_final[3]; + float values_final[2] = {0.0f}; snapSequenceBounds(t, mval); if (applyNumInput(&t->num, values_final)) { if (t->con.mode & CON_APPLY) { if (t->con.mode & CON_AXIS0) { - /* Do nothing. */ + mul_v2_v2fl(values_final, t->spacemtx[0], values_final[0]); } else { mul_v2_v2fl(values_final, t->spacemtx[1], values_final[0]); diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c index 758a6d04f11..c17e6e596e0 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -355,7 +355,7 @@ static void applyTranslationValue(TransInfo *t, const float vec[3]) static void applyTranslation(TransInfo *t, const int UNUSED(mval[2])) { char str[UI_MAX_DRAW_STR]; - float global_dir[3]; + float global_dir[3] = {0.0f}; if (t->flag & T_INPUT_IS_VALUES_FINAL) { mul_v3_m3v3(global_dir, t->spacemtx, t->values); @@ -363,7 +363,7 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2])) else if (applyNumInput(&t->num, global_dir)) { if (t->con.mode & CON_APPLY) { if (t->con.mode & CON_AXIS0) { - /* Do nothing. */ + mul_v3_v3fl(global_dir, t->spacemtx[0], global_dir[0]); } else if (t->con.mode & CON_AXIS1) { mul_v3_v3fl(global_dir, t->spacemtx[1], global_dir[0]); @@ -372,6 +372,9 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2])) mul_v3_v3fl(global_dir, t->spacemtx[2], global_dir[0]); } } + else { + mul_v3_m3v3(global_dir, t->spacemtx, global_dir); + } } else { copy_v3_v3(global_dir, t->values); |