[Bf-blender-cvs] [c359de2] master: Use eyeliner cursor for sampling. Thanks to Thomas Beck for the suggestion :)
Antony Riakiotakis
noreply at git.blender.org
Sat Mar 22 23:34:11 CET 2014
Commit: c359de2c3a8d49dab6b11107d5d80052fb5f5c53
Author: Antony Riakiotakis
Date: Sun Mar 23 00:33:55 2014 +0200
https://developer.blender.org/rBc359de2c3a8d49dab6b11107d5d80052fb5f5c53
Use eyeliner cursor for sampling. Thanks to Thomas Beck for the
suggestion :)
===================================================================
M source/blender/editors/sculpt_paint/paint_image.c
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 85010d1..434aaaf 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -976,6 +976,7 @@ static int sample_color_invoke(bContext *C, wmOperator *op, const wmEvent *event
RNA_int_set_array(op->ptr, "location", event->mval);
paint_sample_color(C, ar, event->mval[0], event->mval[1]);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
WM_event_add_modal_handler(C, op);
WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush);
@@ -994,6 +995,7 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
paint->flags |= PAINT_SHOW_BRUSH;
}
+ WM_cursor_modal_restore(CTX_wm_window(C));
MEM_freeN(data);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 9ef5852..1ddc48e 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5362,6 +5362,7 @@ static int sculpt_sample_detail_size_exec(bContext *C, wmOperator *op)
static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e)) {
ScrArea *sa = CTX_wm_area(C);
ED_area_headerprint(sa, "Click on the mesh to set the detail");
+ WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -5377,6 +5378,7 @@ static int sculpt_sample_detail_size_modal(bContext *C, wmOperator *op, const wm
sample_detail(C, ss_co);
RNA_int_set_array(op->ptr, "location", ss_co);
+ WM_cursor_modal_restore(CTX_wm_window(C));
ED_area_headerprint(sa, NULL);
WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
@@ -5387,6 +5389,7 @@ static int sculpt_sample_detail_size_modal(bContext *C, wmOperator *op, const wm
case RIGHTMOUSE:
{
ScrArea *sa = CTX_wm_area(C);
+ WM_cursor_modal_restore(CTX_wm_window(C));
ED_area_headerprint(sa, NULL);
return OPERATOR_CANCELLED;
break;
More information about the Bf-blender-cvs
mailing list