From 596f33f801f872df22460ad864da193e1a44e36f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 7 Mar 2018 22:19:56 +0100 Subject: Fix T54206: bevel and inset operations repeat did not remember offset. Now repeating the operator will use the previously chosen offset, either with the modal operator or typed in. The modal operator will still start at zero. --- source/blender/editors/mesh/editmesh_inset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_inset.c') diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index 6fd4203e085..3833b84b5d2 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -122,6 +122,11 @@ static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal) return false; } + if (is_modal) { + RNA_float_set(op->ptr, "thickness", 0.01f); + RNA_float_set(op->ptr, "depth", 0.0f); + } + op->customdata = opdata = MEM_mallocN(sizeof(InsetData), "inset_operator_data"); opdata->old_thickness = 0.01; @@ -527,11 +532,9 @@ void MESH_OT_inset(wmOperatorType *ot) prop = RNA_def_float_distance(ot->srna, "thickness", 0.01f, 0.0f, 1e12f, "Thickness", "", 0.0f, 10.0f); /* use 1 rather then 10 for max else dragging the button moves too far */ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.01, 4); - RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_float_distance(ot->srna, "depth", 0.0f, -1e12f, 1e12f, "Depth", "", -10.0f, 10.0f); RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.01, 4); - RNA_def_property_flag(prop, PROP_SKIP_SAVE); RNA_def_boolean(ot->srna, "use_outset", false, "Outset", "Outset rather than inset"); RNA_def_boolean(ot->srna, "use_select_inset", false, "Select Outer", "Select the new inset faces"); -- cgit v1.2.3