From 93c67b0b8e20a1da514f2dc7e53bac8506dd3aaa Mon Sep 17 00:00:00 2001 From: Valdemar Lindberg Date: Fri, 11 Dec 2020 19:08:45 +0100 Subject: 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 --- intern/cycles/render/image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern') 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 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; } -- cgit v1.2.3