diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-03-30 09:28:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-04-05 11:36:10 +0300 |
commit | a80f3d7ddb647b19e97817d408494c0b8ec0ee27 (patch) | |
tree | 92b3f9a76103fe2c2c13486997974ceb5f6ab2d2 /source/blender | |
parent | 97836b72500eec76efb65892f21909a9a8ad3b85 (diff) |
Fix T48000: Eyedropper sample-merged ignored at first
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 4d8255353f3..a9cd601c9b0 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1219,7 +1219,6 @@ static int sample_color_invoke(bContext *C, wmOperator *op, const wmEvent *event { Scene *scene = CTX_data_scene(C); Paint *paint = BKE_paint_get_active_from_context(C); - PaintMode mode = BKE_paintmode_get_active_from_context(C); Brush *brush = BKE_paint_brush(paint); SampleColorData *data = MEM_mallocN(sizeof(SampleColorData), "sample color custom data"); ARegion *ar = CTX_wm_region(C); @@ -1242,7 +1241,10 @@ 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], mode == ePaintTextureProjective, false); + PaintMode mode = BKE_paintmode_get_active_from_context(C); + const bool use_sample_texture = (mode == ePaintTextureProjective) && !RNA_boolean_get(op->ptr, "merged"); + + paint_sample_color(C, ar, event->mval[0], event->mval[1], use_sample_texture, false); WM_cursor_modal_set(win, BC_EYEDROPPER_CURSOR); WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush); |