diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-11-21 13:06:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-11-21 14:45:15 +0300 |
commit | f4a4ec84255a5f3a8d5566b1817114d2231be215 (patch) | |
tree | c67257d1e71f86ca0ac263cb73e10c480bb10cc2 /source/blender/editors/object/object_random.c | |
parent | 20620afc33cacd11429045f94ce27a8bc297c456 (diff) |
Tool System: make smooth & randomize modal operators
Previously these used a gizmo to redo the operator however this
complicated having on-screen gizmos to access tools (see T66304).
Replace this with a generic way to make an operator that only has an
execute function into a modal operator.
This is used for smooth and randomize tools.
Unlike operator gestures, this handles storing and resetting the data.
Currently this only handles edit-mode data, however it's can be
extended to other kinds of data.
Diffstat (limited to 'source/blender/editors/object/object_random.c')
-rw-r--r-- | source/blender/editors/object/object_random.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_random.c b/source/blender/editors/object/object_random.c index c151f565ecb..a130e3f3766 100644 --- a/source/blender/editors/object/object_random.c +++ b/source/blender/editors/object/object_random.c @@ -180,4 +180,7 @@ void TRANSFORM_OT_vertex_random(struct wmOperatorType *ot) 1.0f); RNA_def_int( ot->srna, "seed", 0, 0, 10000, "Random Seed", "Seed for the random number generator", 0, 50); + + /* Set generic modal callbacks. */ + WM_operator_type_modal_from_exec_for_object_edit_coords(ot); } |