diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-02 09:00:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-02 09:18:42 +0300 |
commit | 86832ececcb9d5ed8fa05a02415f7c31905eae4a (patch) | |
tree | dfe7a752b05e0af78120901c61b9e4dc2d44fe14 /release | |
parent | b5dd73a48b5a7b7befa98a2f278143c035713fc7 (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 'release')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 173e7e5f332..36701a7013a 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -5535,7 +5535,7 @@ def km_3d_view_tool_edit_mesh_smooth(params): {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [ ("mesh.vertices_smooth", {"type": params.tool_tweak, "value": 'ANY'}, - {"properties": [("factor", 0.0), ("wait_for_input", False)]}), + {"properties": [("wait_for_input", False)]}), ]}, ) @@ -5686,7 +5686,7 @@ def km_3d_view_tool_edit_curve_randomize(params): {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [ ("transform.vertex_random", {"type": params.tool_tweak, "value": 'ANY'}, - {"properties": [("offset", 0.0), ("wait_for_input", False)]}), + {"properties": [("wait_for_input", False)]}), ]}, ) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index fee8845d88e..02dc03be127 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -918,7 +918,7 @@ class VIEW3D_MT_transform_base(Menu): if context.mode != 'OBJECT': layout.operator("transform.vertex_warp", text="Warp") layout.operator_context = 'EXEC_DEFAULT' - layout.operator("transform.vertex_random", text="Randomize") + layout.operator("transform.vertex_random", text="Randomize").offset = 0.1 layout.operator_context = 'INVOKE_REGION_WIN' @@ -3530,8 +3530,8 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu): col.operator("transform.shear", text="Shear") col.operator("transform.vert_slide", text="Slide Vertices") col.operator_context = 'EXEC_DEFAULT' - col.operator("transform.vertex_random", text="Randomize Vertices") - col.operator("mesh.vertices_smooth", text="Smooth Vertices") + col.operator("transform.vertex_random", text="Randomize Vertices").offset = 0.1 + col.operator("mesh.vertices_smooth", text="Smooth Vertices").factor = 0.5 col.operator_context = 'INVOKE_REGION_WIN' col.operator("mesh.vertices_smooth_laplacian", text="Smooth Laplacian") @@ -3747,7 +3747,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu): layout.operator("transform.vert_slide", text="Slide Vertices") layout.operator_context = 'EXEC_DEFAULT' - layout.operator("mesh.vertices_smooth", text="Smooth Vertices") + layout.operator("mesh.vertices_smooth", text="Smooth Vertices").factor = 0.5 layout.operator_context = 'INVOKE_REGION_WIN' layout.separator() |