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;
+      }
     }
   }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to