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 18:19:28 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-10-05 20:35:11 +0300
commit628dc91c485afd45881e3df03c5005c92791e5ad (patch)
treec025eab7bddb8c8717addeb2fdf35e77ea2ef003 /source/blender/windowmanager/intern/wm_gesture_ops.c
parentca38bce46aa292654451fa34fc33b88fc5ca72f0 (diff)
Sculpt: Preview the active side of the line gestures
This adds a small gradient to the right side of the line to preview which side of the mesh is going to be affected by the gesture operation. Reviewed By: Severin Differential Revision: https://developer.blender.org/D9106
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture_ops.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture_ops.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c
index 591f95926d4..2c79b1f2215 100644
--- a/source/blender/windowmanager/intern/wm_gesture_ops.c
+++ b/source/blender/windowmanager/intern/wm_gesture_ops.c
@@ -849,6 +849,17 @@ int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, const wmEvent *e
return OPERATOR_RUNNING_MODAL;
}
+/**
+ * This invoke callback starts the straightline gesture with a viewport preview to the right side
+ * of the line.
+ */
+int WM_gesture_straightline_active_side_invoke(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ WM_gesture_straightline_invoke(C, op, event);
+ wmGesture *gesture = op->customdata;
+ gesture->draw_active_side = true;
+ return OPERATOR_RUNNING_MODAL;
+}
/**
* This modal callback calls exec once per mouse move event while the gesture is active with the