[Bf-blender-cvs] [3029bd2b0cd] blender-v3.3-release: Fix T102942: Cycles wrong alpha for multi-layer PSD files

Brecht Van Lommel noreply at git.blender.org
Thu Jan 12 22:26:57 CET 2023


Commit: 3029bd2b0cd15cc5d08cf7d8f8fd492879b8438b
Author: Brecht Van Lommel
Date:   Mon Jan 9 18:13:36 2023 +0100
Branches: blender-v3.3-release
https://developer.blender.org/rB3029bd2b0cd15cc5d08cf7d8f8fd492879b8438b

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 032b787bfba..131d3dd04e2 100644
--- a/intern/cycles/scene/image_oiio.cpp
+++ b/intern/cycles/scene/image_oiio.cpp
@@ -207,6 +207,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