[Bf-blender-cvs] [1076adb] master: OpenEXR: RenderResult should always have a RenderView

Dalai Felinto noreply at git.blender.org
Thu Apr 23 23:17:01 CEST 2015


Commit: 1076adb4587c5fd61258dcb7c79fbfef36b74539
Author: Dalai Felinto
Date:   Thu Apr 23 18:16:33 2015 -0300
Branches: master
https://developer.blender.org/rB1076adb4587c5fd61258dcb7c79fbfef36b74539

OpenEXR: RenderResult should always have a RenderView

===================================================================

M	source/blender/imbuf/intern/openexr/openexr_api.cpp

===================================================================

diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index f3b89f2..58c5be8 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1235,9 +1235,15 @@ void IMB_exr_multilayer_convert(void *handle, void *base,
 	ExrLayer *lay;
 	ExrPass *pass;
 
-	/* add views to RenderResult */
-	for (StringVector::const_iterator i = data->multiView->begin(); i != data->multiView->end(); ++i) {
-		addview(base, (*i).c_str());
+	/* RenderResult needs at least one RenderView */
+	if (data->multiView->size() == 0) {
+		addview(base, "");
+	}
+	else {
+		/* add views to RenderResult */
+		for (StringVector::const_iterator i = data->multiView->begin(); i != data->multiView->end(); ++i) {
+			addview(base, (*i).c_str());
+		}
 	}
 
 	if (BLI_listbase_is_empty(&data->layers)) {




More information about the Bf-blender-cvs mailing list