forked from bartvdbraak/blender
Use eyeliner cursor for sampling. Thanks to Thomas Beck for the
suggestion :)
This commit is contained in:
parent
97e26494ee
commit
c359de2c3a
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user