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:
authorCampbell Barton <ideasman42@gmail.com>2013-10-29 04:05:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-29 04:05:03 +0400
commit41587de0167ad6be0f512566916a3e56a6f7107c (patch)
tree34b30a0a4a97525c39a2636e1734d0d6560fb462 /source/blender/windowmanager/intern/wm_gesture.c
parent22396540d7c20afcc931ca6e1a88ee4879d42f4e (diff)
patch [#37217] Make WM_gesture_lines draw the lasso unfilled. (Adding reroute nodes, cutting node links)
by Henrik Aarnio (hjaarnio)
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 05ee23e2361..4d4d46d063a 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -293,13 +293,15 @@ static void draw_filled_lasso(wmWindow *win, wmGesture *gt)
}
-static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt)
+static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt, bool filled)
{
short *lasso = (short *)gt->customdata;
int i;
- draw_filled_lasso(win, gt);
-
+ if (filled) {
+ draw_filled_lasso(win, gt);
+ }
+
glEnable(GL_LINE_STIPPLE);
glColor3ub(96, 96, 96);
glLineStipple(1, 0xAAAA);
@@ -365,9 +367,9 @@ void wm_gesture_draw(wmWindow *win)
wm_gesture_draw_cross(win, gt);
}
else if (gt->type == WM_GESTURE_LINES)
- wm_gesture_draw_lasso(win, gt);
+ wm_gesture_draw_lasso(win, gt, false);
else if (gt->type == WM_GESTURE_LASSO)
- wm_gesture_draw_lasso(win, gt);
+ wm_gesture_draw_lasso(win, gt, true);
else if (gt->type == WM_GESTURE_STRAIGHTLINE)
wm_gesture_draw_line(gt);
}