diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_ops_paint.cc')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_ops_paint.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc index a671c24c514..5d50cdb4d1f 100644 --- a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc +++ b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc @@ -13,6 +13,7 @@ #include "BKE_brush.h" #include "BKE_context.h" +#include "BKE_layer.h" #include "BKE_paint.h" #include "BKE_undo_system.h" @@ -252,7 +253,7 @@ static void gradient_draw_line(bContext *UNUSED(C), int x, int y, void *customda ARegion *region = pop->vc.region; - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); GPU_line_width(4.0); immUniformColor4ub(0, 0, 0, 255); @@ -293,7 +294,8 @@ static PaintOperation *texture_paint_init(bContext *C, wmOperator *op, const flo copy_v2_v2(pop->startmouse, mouse); ViewLayer *view_layer = CTX_data_view_layer(C); - Object *ob = OBACT(view_layer); + BKE_view_layer_synced_ensure(scene, view_layer); + Object *ob = BKE_view_layer_active_object_get(view_layer); /* initialize from context */ if (CTX_wm_region_view3d(C)) { |