diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-06-28 17:48:20 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-06-28 17:48:32 +0300 |
commit | 222c39fe7052c0c44eccdca630c5ca273da4d3df (patch) | |
tree | 86c8e98e272d90bd801cb450225e8e57064536c1 /source/blender/editors/transform | |
parent | 8de878e202514efbbaeaff7a0693e4899e150bed (diff) |
Transform: Move "Proportional Size" and "AutoIK-Len" values to the beginning of the header
This prevents the text from shaking while transforming.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_mode_translate.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c index 7ee8834c1fe..e68db21c7e0 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -115,6 +115,26 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ translate_dist_to_str(dist_str, sizeof(dist_str), dist, unit); + if (t->flag & T_PROP_EDIT_ALL) { + char prop_str[NUM_STR_REP_LEN]; + translate_dist_to_str(prop_str, sizeof(prop_str), t->prop_size, unit); + + ofs += BLI_snprintf_rlen(str + ofs, + UI_MAX_DRAW_STR - ofs, + "%s %s: %s ", + TIP_("Proportional Size"), + t->proptext, + prop_str); + } + + if (t->flag & T_AUTOIK) { + short chainlen = t->settings->autoik_chainlen; + if (chainlen) { + ofs += BLI_snprintf_rlen(str + ofs, UI_MAX_DRAW_STR - ofs, TIP_("AutoIK-Len: %d"), chainlen); + ofs += BLI_strncpy_rlen(str + ofs, " ", UI_MAX_DRAW_STR - ofs); + } + } + if (t->con.mode & CON_APPLY) { switch (t->num.idx_max) { case 0: @@ -133,7 +153,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ case 2: ofs += BLI_snprintf_rlen(str + ofs, UI_MAX_DRAW_STR - ofs, - "D: %s D: %s D: %s (%s)%s", + "D: %s D: %s D: %s (%s)%s", dvec_str[0], dvec_str[1], dvec_str[2], @@ -155,7 +175,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ else { ofs += BLI_snprintf_rlen(str + ofs, UI_MAX_DRAW_STR - ofs, - "Dx: %s Dy: %s Dz: %s (%s)%s", + "Dx: %s Dy: %s Dz: %s (%s)%s", dvec_str[0], dvec_str[1], dvec_str[2], @@ -164,26 +184,6 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ } } - if (t->flag & T_PROP_EDIT_ALL) { - char prop_str[NUM_STR_REP_LEN]; - translate_dist_to_str(prop_str, sizeof(prop_str), t->prop_size, unit); - - ofs += BLI_snprintf_rlen(str + ofs, - UI_MAX_DRAW_STR - ofs, - " %s %s: %s", - TIP_("Proportional Size"), - t->proptext, - prop_str); - } - - if (t->flag & T_AUTOIK) { - short chainlen = t->settings->autoik_chainlen; - if (chainlen) { - ofs += BLI_strncpy_rlen(str + ofs, " ", UI_MAX_DRAW_STR - ofs); - ofs += BLI_snprintf_rlen(str + ofs, UI_MAX_DRAW_STR - ofs, TIP_("AutoIK-Len: %d"), chainlen); - } - } - if (t->spacetype == SPACE_NODE) { SpaceNode *snode = (SpaceNode *)t->area->spacedata.first; |