Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2021-09-13 16:06:02 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-09-13 17:42:27 +0300
commit503d79cd779f103cbea74eca390419e8c6fd2aad (patch)
tree1a0bcfd64bd957d30071a836fc34a5311b4e2232
parent6f52ebba192b8a9c5fc1e211e4968ebb42ea8408 (diff)
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
-rw-r--r--source/blender/windowmanager/intern/wm_gesture_ops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c
index 1c736647084..0177e336121 100644
--- a/source/blender/windowmanager/intern/wm_gesture_ops.c
+++ b/source/blender/windowmanager/intern/wm_gesture_ops.c
@@ -993,6 +993,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);