Fix T58517: Multi-view issues with OpenGL render + scene settings

Patch by Shinsuke Irie.

* * *

Note from reviewer/committer (dfelinto):

OpenGL render from the VSE preview window is working, while the VSE
preview window itself does not show stereo.

That said the patch is ok, and I was able to test that the VSE preview
OpenGL still works. I will tackle VSE preview itself separately myself.
This commit is contained in:
Dalai Felinto 2019-03-22 13:15:05 -03:00
parent 193b708a48
commit 5f45cbb26e
Notes: blender-bot 2023-02-14 04:47:21 +01:00
Referenced by issue #58517, Multiview not working with OpenGL render using scene settings
1 changed files with 4 additions and 3 deletions

View File

@ -156,10 +156,10 @@ static bool screen_opengl_is_multiview(OGLRender *oglrender)
RegionView3D *rv3d = oglrender->rv3d;
RenderData *rd = &oglrender->scene->r;
if ((rd == NULL) || ((!oglrender->is_sequencer) && ((rv3d == NULL) || (v3d == NULL))))
if ((rd == NULL) || ((v3d != NULL) && (rv3d == NULL)))
return false;
return (rd->scemode & R_MULTIVIEW) && ((oglrender->is_sequencer) || (rv3d->persp == RV3D_CAMOB && v3d->camera));
return (rd->scemode & R_MULTIVIEW) && ((v3d == NULL) || (rv3d->persp == RV3D_CAMOB && v3d->camera));
}
static void screen_opengl_views_setup(OGLRender *oglrender)
@ -203,8 +203,9 @@ static void screen_opengl_views_setup(OGLRender *oglrender)
}
}
else {
if (!oglrender->is_sequencer)
if (v3d) {
RE_SetOverrideCamera(oglrender->re, V3D_CAMERA_SCENE(oglrender->scene, v3d));
}
/* remove all the views that are not needed */
rv = rr->views.last;