From 86832ececcb9d5ed8fa05a02415f7c31905eae4a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 2 Jan 2020 17:00:17 +1100 Subject: Tool System: adjust Smooth/Randomize modal operator behavior Previously the default values were left non-zero to avoid having to update scripts. However, this meant it wasn't possible to setup non-modal key bindings for smooth & randomize. Now these operators follow logic of many other operators where setting the value executes immediately, leaving unset runs modal. Existing keymaps & scripts will need to be updated. Addresses issue raised in f4a4ec84255a. --- source/blender/windowmanager/intern/wm_operator_utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/windowmanager/intern/wm_operator_utils.c') diff --git a/source/blender/windowmanager/intern/wm_operator_utils.c b/source/blender/windowmanager/intern/wm_operator_utils.c index ce10ea56251..c2af82c007e 100644 --- a/source/blender/windowmanager/intern/wm_operator_utils.c +++ b/source/blender/windowmanager/intern/wm_operator_utils.c @@ -194,6 +194,10 @@ static void op_generic_value_cancel(bContext *UNUSED(C), wmOperator *op) static int op_generic_value_invoke(bContext *C, wmOperator *op, const wmEvent *event) { + if (RNA_property_is_set(op->ptr, op->type->prop)) { + return WM_operator_call_notest(C, op); + } + ViewLayer *view_layer = CTX_data_view_layer(C); uint objects_len; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( -- cgit v1.2.3