Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-05 12:09:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-05 12:09:25 +0300
commit95736683a96d33a8a7220788502250fa9e109132 (patch)
tree5969ed8914b836b80141772620ec639d6199cd71 /source/blender/editors/space_view3d
parent16f49f81dd115ff5323a88309acff194be12609d (diff)
UI: length now scales proportionally w/ multi-but
Use for object dimensions.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index d68ef5c3fbd..87bbb347bd0 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -793,9 +793,12 @@ static void v3d_object_dimension_buts(bContext *C, uiLayout *layout, View3D *v3d
UI_block_align_begin(block);
const float lim = 10000;
for (int i = 0; i < 3; i++) {
+ uiBut *but;
char text[3] = {'X' + i, ':', '\0'};
- uiDefButF(block, UI_BTYPE_NUM, B_TRANSFORM_PANEL_DIMS, text, 0, yi -= buth, butw, buth,
- &(tfp->ob_dims[i]), 0.0f, lim, 10, 3, "");
+ but = uiDefButF(
+ block, UI_BTYPE_NUM, B_TRANSFORM_PANEL_DIMS, text, 0, yi -= buth, butw, buth,
+ &(tfp->ob_dims[i]), 0.0f, lim, 10, 3, "");
+ UI_but_unit_type_set(but, PROP_UNIT_LENGTH);
}
UI_block_align_end(block);
}