[Bf-blender-cvs] [9ed07cf4612] greasepencil-object: Set sculpt cursor when enter in sculpt mode

Antonio Vazquez noreply at git.blender.org
Wed Jun 7 16:42:01 CEST 2017


Commit: 9ed07cf4612c9563cdc48e5c9de1b65337bc7a04
Author: Antonio Vazquez
Date:   Wed Jun 7 16:35:39 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB9ed07cf4612c9563cdc48e5c9de1b65337bc7a04

Set sculpt cursor when enter in sculpt mode

Include some cursor reset for other modes

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 29da1d7fc92..eb59d7b06f0 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -121,6 +121,7 @@ static int gpencil_editmode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
 	/* set mode */
 	if (gpd->flag & GP_DATA_STROKE_EDITMODE) {
 		mode = OB_MODE_GPENCIL_EDIT;
+		WM_cursor_modal_set(CTX_wm_window(C), CURSOR_STD);
 	}
 	else {
 		mode = OB_MODE_OBJECT;
@@ -264,9 +265,11 @@ static int gpencil_sculptmode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
 	/* set mode */
 	if (gpd->flag & GP_DATA_STROKE_SCULPTMODE) {
 		mode = OB_MODE_GPENCIL_SCULPT;
+		WM_cursor_modal_set(CTX_wm_window(C), BC_CROSSCURSOR);
 	}
 	else {
 		mode = OB_MODE_OBJECT;
+		WM_cursor_modal_set(CTX_wm_window(C), CURSOR_STD);
 	}
 
 	if (is_object) {




More information about the Bf-blender-cvs mailing list