[Bf-blender-cvs] [b314d92e7db] master: Fix T102942: Cycles wrong alpha for multi-layer PSD files
Brecht Van Lommel
noreply at git.blender.org
Mon Jan 9 19:05:28 CET 2023
Commit: b314d92e7dbeefee5edd6e65d90e560b215fd992
Author: Brecht Van Lommel
Date: Mon Jan 9 18:13:36 2023 +0100
Branches: master
https://developer.blender.org/rBb314d92e7dbeefee5edd6e65d90e560b215fd992
Fix T102942: Cycles wrong alpha for multi-layer PSD files
===================================================================
M intern/cycles/scene/image_oiio.cpp
===================================================================
diff --git a/intern/cycles/scene/image_oiio.cpp b/intern/cycles/scene/image_oiio.cpp
index d0adef912be..a5824eeb267 100644
--- a/intern/cycles/scene/image_oiio.cpp
+++ b/intern/cycles/scene/image_oiio.cpp
@@ -211,6 +211,11 @@ bool OIIOImageLoader::load_pixels(const ImageMetaData &metadata,
if (strcmp(in->format_name(), "dds") == 0) {
do_associate_alpha = true;
}
+ /* Workaround OIIO bug that sets oiio:UnassociatedAlpha on the last layer
+ * but not composite image that we read. */
+ if (strcmp(in->format_name(), "psd") == 0) {
+ do_associate_alpha = true;
+ }
}
}
More information about the Bf-blender-cvs
mailing list