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 f4a4ec8425.
This commit is contained in:
2020-01-02 17:00:17 +11:00
parent b5dd73a48b
commit 86832ececc
5 changed files with 12 additions and 8 deletions

View File

@@ -2357,7 +2357,7 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_float_factor(
ot->srna, "factor", 0.5f, -10.0f, 10.0f, "Smoothing", "Smoothing factor", 0.0f, 1.0f);
ot->srna, "factor", 0.0f, -10.0f, 10.0f, "Smoothing", "Smoothing factor", 0.0f, 1.0f);
RNA_def_int(
ot->srna, "repeat", 1, 1, 1000, "Repeat", "Number of times to smooth the mesh", 1, 100);