diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-03-22 21:08:22 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-03-22 21:55:32 +0300 |
commit | 74b47e4181d70284e125ff4c0012d9c1cc36487d (patch) | |
tree | af694188d3cdecc93d6a5e5c035cca3cb4b4d701 /source | |
parent | dcbc46dacb2fbc2582f3b9fe47d4a36519de668d (diff) |
Fix: VSE preview not showing stereo drawing (unreported)
SpaceSeq main stereo drawing is for ar->regiontype RGN_TYPE_PREVIEW, but
the drawing code was assuming RGN_TYPE_WINDOW was the only one to be
considered for all the regions.
SpaceSeq still needs stereo drawing in RGN_TYPE_WINDOW but only when
backdrop is enabled.
Bug introduced on rBe01cadd657c76267.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index c2488ed0992..6a3eeea14f0 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -125,44 +125,59 @@ static bool wm_draw_region_stereo_set(Main *bmain, ScrArea *sa, ARegion *ar, eSt { /* We could detect better when stereo is actually needed, by inspecting the * image in the image editor and sequencer. */ - if (ar->regiontype != RGN_TYPE_WINDOW) { + if (!ELEM(ar->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_PREVIEW)) { return false; } switch (sa->spacetype) { case SPACE_IMAGE: { - SpaceImage *sima = sa->spacedata.first; - sima->iuser.multiview_eye = sview; - return true; + if (ar->regiontype == RGN_TYPE_WINDOW) { + SpaceImage *sima = sa->spacedata.first; + sima->iuser.multiview_eye = sview; + return true; + } + break; } case SPACE_VIEW3D: { - View3D *v3d = sa->spacedata.first; - if (v3d->camera && v3d->camera->type == OB_CAMERA) { - Camera *cam = v3d->camera->data; - CameraBGImage *bgpic = cam->bg_images.first; - v3d->multiview_eye = sview; - if (bgpic) bgpic->iuser.multiview_eye = sview; - return true; + if (ar->regiontype == RGN_TYPE_WINDOW) { + View3D *v3d = sa->spacedata.first; + if (v3d->camera && v3d->camera->type == OB_CAMERA) { + Camera *cam = v3d->camera->data; + CameraBGImage *bgpic = cam->bg_images.first; + v3d->multiview_eye = sview; + if (bgpic) { + bgpic->iuser.multiview_eye = sview; + } + return true; + } } - return false; + break; } case SPACE_NODE: { - SpaceNode *snode = sa->spacedata.first; - if ((snode->flag & SNODE_BACKDRAW) && ED_node_is_compositor(snode)) { - Image *ima = BKE_image_verify_viewer(bmain, IMA_TYPE_COMPOSITE, "Viewer Node"); - ima->eye = sview; - return true; + if (ar->regiontype == RGN_TYPE_WINDOW) { + SpaceNode *snode = sa->spacedata.first; + if ((snode->flag & SNODE_BACKDRAW) && ED_node_is_compositor(snode)) { + Image *ima = BKE_image_verify_viewer(bmain, IMA_TYPE_COMPOSITE, "Viewer Node"); + ima->eye = sview; + return true; + } } - return false; + break; } case SPACE_SEQ: { SpaceSeq *sseq = sa->spacedata.first; sseq->multiview_eye = sview; - return true; + + if (ar->regiontype == RGN_TYPE_PREVIEW) { + return true; + } + else if (ar->regiontype == RGN_TYPE_WINDOW) { + return (sseq->draw_flag & SEQ_DRAW_BACKDROP) != 0; + } } } |