[Bf-blender-cvs] [93c67b0b8e2] master: Fix T83586: Cycles failing to load OpenEXR image with EXR RGBAZ channels

Valdemar Lindberg noreply at git.blender.org
Fri Dec 11 19:36:41 CET 2020


Commit: 93c67b0b8e20a1da514f2dc7e53bac8506dd3aaa
Author: Valdemar Lindberg
Date:   Fri Dec 11 19:08:45 2020 +0100
Branches: master
https://developer.blender.org/rB93c67b0b8e20a1da514f2dc7e53bac8506dd3aaa

Fix T83586: Cycles failing to load OpenEXR image with EXR RGBAZ channels

Don't refuse to load 5-channel images, instead drop any channels after the 4th
and hope that the first channels represent RGBA.

Differential Revision: https://developer.blender.org/D9820

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

M	intern/cycles/render/image.cpp

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

diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index 3e6ff289c85..30858c4f68b 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -493,8 +493,8 @@ static bool image_associate_alpha(ImageManager::Image *img)
 template<TypeDesc::BASETYPE FileFormat, typename StorageType>
 bool ImageManager::file_load_image(Image *img, int texture_limit)
 {
-  /* we only handle certain number of components */
-  if (!(img->metadata.channels >= 1 && img->metadata.channels <= 4)) {
+  /* Ignore empty images. */
+  if (!(img->metadata.channels > 0)) {
     return false;
   }



More information about the Bf-blender-cvs mailing list