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/mesh/editmesh_tools.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/mesh/editmesh_tools.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index f5ff3d0655e..8df392fb04b 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2366,6 +2366,9 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot) RNA_def_boolean(ot->srna, "xaxis", true, "X-Axis", "Smooth along the X axis"); RNA_def_boolean(ot->srna, "yaxis", true, "Y-Axis", "Smooth along the Y axis"); RNA_def_boolean(ot->srna, "zaxis", true, "Z-Axis", "Smooth along the Z axis"); + + /* Set generic modal callbacks. */ + WM_operator_type_modal_from_exec_for_object_edit_coords(ot); } /** \} */ |