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.
This commit is contained in:
@@ -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
|
/* We could detect better when stereo is actually needed, by inspecting the
|
||||||
* image in the image editor and sequencer. */
|
* 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (sa->spacetype) {
|
switch (sa->spacetype) {
|
||||||
case SPACE_IMAGE:
|
case SPACE_IMAGE:
|
||||||
{
|
{
|
||||||
SpaceImage *sima = sa->spacedata.first;
|
if (ar->regiontype == RGN_TYPE_WINDOW) {
|
||||||
sima->iuser.multiview_eye = sview;
|
SpaceImage *sima = sa->spacedata.first;
|
||||||
return true;
|
sima->iuser.multiview_eye = sview;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case SPACE_VIEW3D:
|
case SPACE_VIEW3D:
|
||||||
{
|
{
|
||||||
View3D *v3d = sa->spacedata.first;
|
if (ar->regiontype == RGN_TYPE_WINDOW) {
|
||||||
if (v3d->camera && v3d->camera->type == OB_CAMERA) {
|
View3D *v3d = sa->spacedata.first;
|
||||||
Camera *cam = v3d->camera->data;
|
if (v3d->camera && v3d->camera->type == OB_CAMERA) {
|
||||||
CameraBGImage *bgpic = cam->bg_images.first;
|
Camera *cam = v3d->camera->data;
|
||||||
v3d->multiview_eye = sview;
|
CameraBGImage *bgpic = cam->bg_images.first;
|
||||||
if (bgpic) bgpic->iuser.multiview_eye = sview;
|
v3d->multiview_eye = sview;
|
||||||
return true;
|
if (bgpic) {
|
||||||
|
bgpic->iuser.multiview_eye = sview;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
case SPACE_NODE:
|
case SPACE_NODE:
|
||||||
{
|
{
|
||||||
SpaceNode *snode = sa->spacedata.first;
|
if (ar->regiontype == RGN_TYPE_WINDOW) {
|
||||||
if ((snode->flag & SNODE_BACKDRAW) && ED_node_is_compositor(snode)) {
|
SpaceNode *snode = sa->spacedata.first;
|
||||||
Image *ima = BKE_image_verify_viewer(bmain, IMA_TYPE_COMPOSITE, "Viewer Node");
|
if ((snode->flag & SNODE_BACKDRAW) && ED_node_is_compositor(snode)) {
|
||||||
ima->eye = sview;
|
Image *ima = BKE_image_verify_viewer(bmain, IMA_TYPE_COMPOSITE, "Viewer Node");
|
||||||
return true;
|
ima->eye = sview;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
case SPACE_SEQ:
|
case SPACE_SEQ:
|
||||||
{
|
{
|
||||||
SpaceSeq *sseq = sa->spacedata.first;
|
SpaceSeq *sseq = sa->spacedata.first;
|
||||||
sseq->multiview_eye = sview;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user