[Bf-blender-cvs] [3e67c06] GPencil_Editing_Stage3: GPencil Sculpt: Draw a '+' cursor when in sculptmode

Joshua Leung noreply at git.blender.org
Sat Jun 13 02:45:05 CEST 2015


Commit: 3e67c06bd3733ce381da6467d07d7302d5bea55f
Author: Joshua Leung
Date:   Mon Jun 8 13:20:07 2015 +1200
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rB3e67c06bd3733ce381da6467d07d7302d5bea55f

GPencil Sculpt: Draw a '+' cursor when in sculptmode

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

M	source/blender/editors/gpencil/gpencil_brush.c

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

diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 50a8532..83f7be4 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -340,6 +340,7 @@ static bool gpsculpt_brush_init(bContext *C, wmOperator *op)
 	ED_area_headerprint(CTX_wm_area(C), IFACE_("Grease Pencil: Stroke Sculptmode"));
 	
 	/* setup cursor drawing */
+	WM_cursor_modal_set(CTX_wm_window(C), BC_CROSSCURSOR);
 	gpencil_toggle_brush_cursor(C, true);
 	
 	return true;
@@ -348,16 +349,18 @@ static bool gpsculpt_brush_init(bContext *C, wmOperator *op)
 static void gpsculpt_brush_exit(bContext *C, wmOperator *op)
 {
 	tGP_BrushEditData *gso = op->customdata;
+	wmWindow *win = CTX_wm_window(C);
 	
 #if 0
 	/* unregister timer (only used for realtime) */
 	if (gso->timer) {
-		WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), gso->timer);
+		WM_event_remove_timer(CTX_wm_manager(C), win, gso->timer);
 	}
 #endif
 
 	/* disable cursor and headerprints */
 	ED_area_headerprint(CTX_wm_area(C), NULL);
+	WM_cursor_modal_restore(win);
 	gpencil_toggle_brush_cursor(C, false);
 	
 	/* free operator data */




More information about the Bf-blender-cvs mailing list