Sequencer: Fix crash caused by stereo rendering fix

Caused by rB2e908156d0c7

This was caused by the sequencer timeline area not using a GPUViewport
but still using `sequencer_draw_preview`.
This commit is contained in:
Clément Foucault 2020-09-01 12:01:02 +02:00
parent 991eb5f79c
commit d6d2897ef0
Notes: blender-bot 2024-01-31 11:35:08 +01:00
Referenced by issue #80533, VSE: Sequencer & Playhead drawing is broken after hibernate
2 changed files with 6 additions and 1 deletions

View File

@ -2271,6 +2271,11 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
seq_prefetch_wm_notify(C, scene);
GPUViewport *viewport = WM_draw_region_get_viewport(region);
GPUFrameBuffer *framebuffer_overlay = GPU_viewport_framebuffer_overlay_get(viewport);
GPU_framebuffer_bind_no_srgb(framebuffer_overlay);
GPU_depth_test(GPU_DEPTH_NONE);
UI_GetThemeColor3fv(TH_BACK, col);
if (ed && ed->metastack.first) {
GPU_clear_color(col[0], col[1], col[2] - 0.1f, 0.0f);

View File

@ -310,7 +310,7 @@ static bool wm_region_use_viewport_by_type(short space_type, short region_type)
{
return (ELEM(space_type, SPACE_VIEW3D, SPACE_IMAGE, SPACE_NODE) &&
region_type == RGN_TYPE_WINDOW) ||
((space_type == SPACE_SEQ) && region_type == RGN_TYPE_PREVIEW);
((space_type == SPACE_SEQ) && ELEM(region_type, RGN_TYPE_PREVIEW, RGN_TYPE_WINDOW));
}
bool WM_region_use_viewport(ScrArea *area, ARegion *region)