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:
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py2
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 5f15fcd8a99..f5c6bf96c56 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -640,7 +640,7 @@ class _defs_edit_mesh:
icon="ops.mesh.bevel",
widget=None,
keymap=(
- ("mesh.bevel", dict(),
+ ("mesh.bevel", dict(release_confirm=True),
dict(type='ACTIONMOUSE', value='PRESS')),
),
draw_settings=draw_settings,
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index e87abc6adf7..39bebc9a980 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -582,7 +582,9 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, const wmEvent *event)
case LEFTMOUSE:
case PADENTER:
case RETKEY:
- if (event->val == KM_PRESS) {
+ if ((event->val == KM_PRESS) ||
+ ((event->val == KM_RELEASE) && RNA_boolean_get(op->ptr, "release_confirm")))
+ {
edbm_bevel_calc(op);
edbm_bevel_exit(C, op);
return OPERATOR_FINISHED;
@@ -804,4 +806,7 @@ void MESH_OT_bevel(wmOperatorType *ot)
"Strength of calculated normal", 0.0f, 1.0f);
RNA_def_enum(ot->srna, "hnmode", harden_normals_items, BEVEL_HN_NONE, "Normal Mode",
"Weighting mode for Harden Normals");
+ prop = RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+
}