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
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-03-23 02:33:55 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-03-23 02:33:55 +0400
commitc359de2c3a8d49dab6b11107d5d80052fb5f5c53 (patch)
tree32d49f264f8df19041fdcaad28e9ace10bdbaffa /source
parent97e26494eeacc62c04d805f7774b4159300e84b0 (diff)
Use eyeliner cursor for sampling. Thanks to Thomas Beck for the
suggestion :)
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 85010d1be52..434aaaf8835 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 9ef5852555f..1ddc48edf32 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;