[Bf-blender-cvs] [222c39fe705] master: Transform: Move "Proportional Size" and "AutoIK-Len" values to the beginning of the header
Germano Cavalcante
noreply at git.blender.org
Mon Jun 28 16:48:39 CEST 2021
Commit: 222c39fe7052c0c44eccdca630c5ca273da4d3df
Author: Germano Cavalcante
Date: Mon Jun 28 11:48:20 2021 -0300
Branches: master
https://developer.blender.org/rB222c39fe7052c0c44eccdca630c5ca273da4d3df
Transform: Move "Proportional Size" and "AutoIK-Len" values to the beginning of the header
This prevents the text from shaking while transforming.
===================================================================
M source/blender/editors/transform/transform_mode_translate.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list