Multiview: compositor - avoid trashing image viewer views/buffers when multiview is off

I found this while investigating why the backdrop shows 'blank' while I
update a node influence factor. This problem still persist, but maybe it
was there before multiview. In release it is not noticeable, but in my
debug build is quite evident.
This commit is contained in:
Dalai Felinto 2015-04-07 16:56:26 -03:00
parent 4c2306d21a
commit cc9c049ff7
1 changed files with 10 additions and 5 deletions

View File

@ -2357,11 +2357,16 @@ Image *BKE_image_verify_viewer(int type, const char *name)
static void image_viewer_create_views(const RenderData *rd, Image *ima)
{
SceneRenderView *srv;
for (srv = rd->views.first; srv; srv = srv->next) {
if (BKE_scene_multiview_is_render_view_active(rd, srv) == false)
continue;
image_add_view(ima, srv->name, "");
if ((rd->scemode & R_MULTIVIEW) == 0) {
image_add_view(ima, "", "");
}
else {
SceneRenderView *srv;
for (srv = rd->views.first; srv; srv = srv->next) {
if (BKE_scene_multiview_is_render_view_active(rd, srv) == false)
continue;
image_add_view(ima, srv->name, "");
}
}
}