Fix T102942: Cycles wrong alpha for multi-layer PSD files

This commit is contained in:
Brecht Van Lommel 2023-01-09 18:13:36 +01:00 • committed by Philipp Oeser
parent 427b0a0ab2
commit 3029bd2b0c

View file

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