From 5e13097dc3a3463d6b8643a5ace673d7a462c934 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 23 Nov 2017 20:14:31 +0100 Subject: Fix T53145: bevel tool fails when used a second time. Pixel size was not initial early enough. For first time this was not a problem because the bevel amount starts at 0 then, and after the mouse moves the pixel size is initialized. For the second time the bevel amount starts at a non-zero value, and it failed then. --- source/blender/editors/mesh/editmesh_bevel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/mesh') diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 2af05a9ad8d..e541df8ffa3 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -335,11 +335,12 @@ static int edbm_bevel_invoke(bContext *C, wmOperator *op, const wmEvent *event) * ideally this will never happen and should be checked for above */ opdata->mcenter[0] = opdata->mcenter[1] = 0; } - edbm_bevel_calc_initial_length(op, event, false); /* for OFFSET_VALUE only, the scale is the size of a pixel under the mouse in 3d space */ opdata->scale[OFFSET_VALUE] = rv3d ? ED_view3d_pixel_size(rv3d, center_3d) : 1.0f; + edbm_bevel_calc_initial_length(op, event, false); + edbm_bevel_update_header(C, op); if (!edbm_bevel_calc(op)) { -- cgit v1.2.3