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:
authorCampbell Barton <ideasman42@gmail.com>2020-01-02 09:00:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-02 09:18:42 +0300
commit86832ececcb9d5ed8fa05a02415f7c31905eae4a (patch)
treedfe7a752b05e0af78120901c61b9e4dc2d44fe14 /source/blender/windowmanager/intern/wm_operator_utils.c
parentb5dd73a48b5a7b7befa98a2f278143c035713fc7 (diff)
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.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operator_utils.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operator_utils.c4
1 files changed, 4 insertions, 0 deletions
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(