From a7bee65d384f9d385c53d6e9d5c39bfdf04958ab Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Nov 2012 02:45:42 +0000 Subject: make smoothing value for ring select compatible with the operator. also wrap long lines in noise.c --- source/blender/editors/mesh/editmesh_loopcut.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 035f930e00a..f951073155d 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -308,7 +308,7 @@ static void ringsel_finish(bContext *C, wmOperator *op) { RingSelOpData *lcd = op->customdata; const int cuts = RNA_int_get(op->ptr, "number_cuts"); - const float smoothness = RNA_float_get(op->ptr, "smoothness"); + const float smoothness = 0.292f * RNA_float_get(op->ptr, "smoothness"); if (lcd->eed) { BMEditMesh *em = lcd->em; @@ -504,7 +504,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event) show_cuts = TRUE; } else { - smoothness = min_ff(smoothness + 0.05f, 1.0f); + smoothness = min_ff(smoothness + 0.05f, 4.0f); RNA_float_set(op->ptr, "smoothness", smoothness); show_cuts = TRUE; } @@ -624,6 +624,6 @@ void MESH_OT_loopcut(wmOperatorType *ot) /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor", 0.0f, 1.0f); + prop = RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor", 0.0f, 4.0f); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } -- cgit v1.2.3