Multi-View: return correct number of views when rendering only one of the stereo pairs

Without this fix ViewerNode would continously trash the views/buffer
when disabling either stereo eye.
This commit is contained in:
Dalai Felinto 2015-05-12 18:43:07 -03:00
parent b3334d936f
commit 274b0838c7
1 changed files with 4 additions and 2 deletions

View File

@ -2213,11 +2213,13 @@ size_t BKE_scene_multiview_num_views_get(const RenderData *rd)
return 1;
if (rd->views_format == SCE_VIEWS_FORMAT_STEREO_3D) {
if (BLI_findstring(&rd->views, STEREO_LEFT_NAME, offsetof(SceneRenderView, name))) {
srv = BLI_findstring(&rd->views, STEREO_LEFT_NAME, offsetof(SceneRenderView, name));
if ((srv && srv->viewflag & SCE_VIEW_DISABLE) == 0) {
totviews++;
}
if (BLI_findstring(&rd->views, STEREO_RIGHT_NAME, offsetof(SceneRenderView, name))) {
srv = BLI_findstring(&rd->views, STEREO_RIGHT_NAME, offsetof(SceneRenderView, name));
if ((srv && srv->viewflag & SCE_VIEW_DISABLE) == 0) {
totviews++;
}
}