diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-07-14 23:45:31 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-07-14 23:45:57 +0300 |
commit | d493fc43bd4aac7f2e0e448957f3ab1412d9691d (patch) | |
tree | ee3f538f61dc01940074404e55dd9d451e0b23c9 /source | |
parent | 7f67e3200a5f692e8889ad09b0ff88d44c97d0d3 (diff) |
Fix T78875: Numerical display of delta of translation is not updating in 3d view
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_mode_translate.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c index aee05197f10..cde06a9eaac 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -67,15 +67,27 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ dist = len_v3(t->num.val); } else { + int i = 0; float dvec[3]; - - copy_v3_v3(dvec, vec); - applyAspectRatio(t, dvec); + if (!(t->flag & T_2D_EDIT) && t->con.mode & CON_APPLY) { + zero_v3(dvec); + if (t->con.mode & CON_AXIS0) { + dvec[i++] = vec[0]; + } + if (t->con.mode & CON_AXIS1) { + dvec[i++] = vec[1]; + } + if (t->con.mode & CON_AXIS2) { + dvec[i++] = vec[2]; + } + } + else { + copy_v3_v3(dvec, vec); + applyAspectRatio(t, dvec); + } dist = len_v3(vec); if (!(t->flag & T_2D_EDIT) && t->scene->unit.system) { - int i; - for (i = 0; i < 3; i++) { bUnit_AsString2(&tvec[NUM_STR_REP_LEN * i], NUM_STR_REP_LEN, |