[Bf-blender-cvs] [600f7df] master: Fix return type in case of single channel half.
Thomas Dinges
noreply at git.blender.org
Sun Jun 19 17:39:01 CEST 2016
Commit: 600f7df71b7086a15db0e115edd40129ed2fa7d5
Author: Thomas Dinges
Date: Sun Jun 19 17:38:39 2016 +0200
Branches: master
https://developer.blender.org/rB600f7df71b7086a15db0e115edd40129ed2fa7d5
Fix return type in case of single channel half.
===================================================================
M intern/cycles/render/image.cpp
===================================================================
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index c5e8195..99d2223 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -205,7 +205,7 @@ ImageManager::ImageDataType ImageManager::get_image_metadata(const string& filen
}
if(is_half) {
- return IMAGE_DATA_TYPE_HALF4;
+ return (channels > 1) ? IMAGE_DATA_TYPE_HALF4 : IMAGE_DATA_TYPE_HALF;
}
else if(is_float) {
return (channels > 1) ? IMAGE_DATA_TYPE_FLOAT4 : IMAGE_DATA_TYPE_FLOAT;
More information about the Bf-blender-cvs
mailing list