diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-06-30 12:57:39 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-06-30 12:57:39 +0400 |
commit | cadf77d5ef97935885802d1841184d9a044d2249 (patch) | |
tree | 69c10f127a46b5358128ae48bd116e732f7e169c /source/blender/editors/mesh | |
parent | 61e1ea382b84c1c1d3cd4c03da37fa4c282ea1d4 (diff) |
Fix T40862: numinput transform did not take into account scale_length.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bevel.c | 3 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_inset.c | 3 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_loopcut.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index ec1ea3e8e62..e25919b7400 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -79,13 +79,14 @@ static void edbm_bevel_update_header(wmOperator *op, bContext *C) char msg[HEADER_LENGTH]; ScrArea *sa = CTX_wm_area(C); + Scene *sce = CTX_data_scene(C); if (sa) { BevelData *opdata = op->customdata; char offset_str[NUM_STR_REP_LEN]; if (hasNumInput(&opdata->num_input)) { - outputNumInput(&opdata->num_input, offset_str); + outputNumInput(&opdata->num_input, offset_str, sce->unit.scale_length); } else { BLI_snprintf(offset_str, NUM_STR_REP_LEN, "%f", RNA_float_get(op->ptr, "offset")); diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index aa3a2c83243..dc40330b309 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -85,11 +85,12 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C) char msg[HEADER_LENGTH]; ScrArea *sa = CTX_wm_area(C); + Scene *sce = CTX_data_scene(C); if (sa) { char flts_str[NUM_STR_REP_LEN * 2]; if (hasNumInput(&opdata->num_input)) - outputNumInput(&opdata->num_input, flts_str); + outputNumInput(&opdata->num_input, flts_str, sce->unit.scale_length); else { BLI_snprintf(flts_str, NUM_STR_REP_LEN, "%f", RNA_float_get(op->ptr, "thickness")); BLI_snprintf(flts_str + NUM_STR_REP_LEN, NUM_STR_REP_LEN, "%f", RNA_float_get(op->ptr, "depth")); diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 4ef6c13ec3e..bb044f39fba 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -696,10 +696,11 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) } if (show_cuts) { + Scene *sce = CTX_data_scene(C); char buf[64 + NUM_STR_REP_LEN * 2]; char str_rep[NUM_STR_REP_LEN * 2]; if (hasNumInput(&lcd->num)) { - outputNumInput(&lcd->num, str_rep); + outputNumInput(&lcd->num, str_rep, sce->unit.scale_length); } else { BLI_snprintf(str_rep, NUM_STR_REP_LEN, "%d", cuts); |