diff --git a/source/blender/editors/space_sequencer/sequencer_preview_draw.cc b/source/blender/editors/space_sequencer/sequencer_preview_draw.cc index 0fde6e51e37..d52100d4fbc 100644 --- a/source/blender/editors/space_sequencer/sequencer_preview_draw.cc +++ b/source/blender/editors/space_sequencer/sequencer_preview_draw.cc @@ -1673,7 +1673,7 @@ static void sequencer_preview_draw_overlays(const bContext *C, else if (space_sequencer.flag & SEQ_USE_ALPHA) { /* Draw checked-board. */ const View2D &v2d = region.v2d; - imm_draw_box_checker_2d(v2d.tot.xmin, v2d.tot.ymin, v2d.tot.xmax, v2d.tot.ymax); + imm_draw_box_checker_2d(v2d.tot.xmin, v2d.tot.ymin, v2d.tot.xmax, v2d.tot.ymax, true); /* Draw current and preview textures in a special way to pierce a hole in the overlay to make * the actual image visible. */ diff --git a/source/blender/gpu/GPU_immediate_util.hh b/source/blender/gpu/GPU_immediate_util.hh index bb77912f296..8e4e2404692 100644 --- a/source/blender/gpu/GPU_immediate_util.hh +++ b/source/blender/gpu/GPU_immediate_util.hh @@ -145,7 +145,7 @@ void imm_draw_box_checker_2d_ex(float x1, const float color_primary[4], const float color_secondary[4], int checker_size); -void imm_draw_box_checker_2d(float x1, float y1, float x2, float y2); +void imm_draw_box_checker_2d(float x1, float y1, float x2, float y2, bool clear_alpha = false); void imm_draw_cube_fill_3d(uint pos, const float center[3], const float aspect[3]); void imm_draw_cube_wire_3d(uint pos, const float center[3], const float aspect[3]); diff --git a/source/blender/gpu/intern/gpu_immediate_util.cc b/source/blender/gpu/intern/gpu_immediate_util.cc index 5dde20c8216..0e774753b96 100644 --- a/source/blender/gpu/intern/gpu_immediate_util.cc +++ b/source/blender/gpu/intern/gpu_immediate_util.cc @@ -484,12 +484,14 @@ void imm_draw_box_checker_2d_ex(float x1, immUnbindProgram(); } -void imm_draw_box_checker_2d(float x1, float y1, float x2, float y2) +void imm_draw_box_checker_2d(float x1, float y1, float x2, float y2, bool clear_alpha) { float checker_primary[4]; float checker_secondary[4]; UI_GetThemeColor4fv(TH_TRANSPARENT_CHECKER_PRIMARY, checker_primary); UI_GetThemeColor4fv(TH_TRANSPARENT_CHECKER_SECONDARY, checker_secondary); + checker_primary[3] = clear_alpha ? 0.0 : checker_primary[3]; + checker_secondary[3] = clear_alpha ? 0.0 : checker_secondary[3]; int checker_size = UI_GetThemeValue(TH_TRANSPARENT_CHECKER_SIZE) * U.pixelsize; imm_draw_box_checker_2d_ex(x1, y1, x2, y2, checker_primary, checker_secondary, checker_size); }