[Bf-blender-cvs] [cbf18b65868] blender-v2.93-release: Fix straightline gesture snapping not working for modal tools

Philipp Oeser noreply at git.blender.org
Wed Sep 22 08:50:25 CEST 2021


Commit: cbf18b65868661407e97e9451d0838b2e9e4ac70
Author: Philipp Oeser
Date:   Mon Sep 13 15:06:02 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rBcbf18b65868661407e97e9451d0838b2e9e4ac70

Fix straightline gesture snapping not working for modal tools

This was implemented in {rB14d56b4217f8} but was never working for
tools/operators other than the sculpt line mask tool.

To be precise, the preview actually snapped but the operations (e.g.
mesh bisect, vertex weight gradient) still happened "unsnapped" in
modal. For the sculpt line mask tool this wasnt a problem, because it
only draws a preview while modal, the actual mask was only applied
later.

This solves part one of T91320 (snapping), sculpting also introduced
flipping in {rB7ff6bfd1e0af} which does not make much sense for all
tools, but in bisect this could actually be supported, will add that in
a separate Diff.

ref T91320

Maniphest Tasks: T91320

Differential Revision: https://developer.blender.org/D12470

===================================================================

M	source/blender/windowmanager/intern/wm_gesture_ops.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c
index 07d68293714..26d3e6718d6 100644
--- a/source/blender/windowmanager/intern/wm_gesture_ops.c
+++ b/source/blender/windowmanager/intern/wm_gesture_ops.c
@@ -992,6 +992,7 @@ int WM_gesture_straightline_modal(bContext *C, wmOperator *op, const wmEvent *ev
 
         if (gesture->use_snap) {
           wm_gesture_straightline_do_angle_snap(rect);
+          gesture_straightline_apply(C, op);
         }
 
         wm_gesture_tag_redraw(win);



More information about the Bf-blender-cvs mailing list