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:
authorPablo Dobarro <pablodp606@gmail.com>2020-10-05 22:05:45 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-10-20 23:52:12 +0300
commit14d56b4217f857eb78239051593c2391f9227b99 (patch)
tree78a95bb113d68ea1ee69380acff9043a4cb4f4bb /source/blender/windowmanager/WM_types.h
parentcf8aa209678c4b35ed18c9d385d5346d400fe672 (diff)
UI: Add angle snapping to line gesture tools
This adds support for snapping for line gesture tool. It is implemented in the modal keymap as Snap, which is a toggle (similar to how snapping in the transform operator works). Right now it snaps the angle of the line to 15 degree increments, which is defined in code. This should be easy to expose in the UI in the future if we need to. Reviewed By: Severin Differential Revision: https://developer.blender.org/D9115
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 05a35e030ff..b23446e0dce 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -500,6 +500,9 @@ typedef struct wmGesture {
uint wait_for_input : 1;
/** Use for gestures that can be moved, like box selection */
uint move : 1;
+ /** For gestures that support snapping, stores if snapping is enabled using the modal keymap
+ * toggle. */
+ uint use_snap : 1;
/**
* customdata