Imbuf types refactor.
ImBuf types were getting stored as bitflags in a 32bit integer which had
already run out of space. Solved the problem by separating file type to
an ftype enum, and file specific options to foptions.
Reviewed by Campbell, thanks a lot!
This commit is contained in:
@@ -932,7 +932,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
|
||||
bool has_alpha = true;
|
||||
|
||||
if (ibuf) {
|
||||
int imtype = BKE_image_ftype_to_imtype(ibuf->ftype);
|
||||
int imtype = BKE_image_ftype_to_imtype(ibuf->ftype, &ibuf->foptions);
|
||||
char valid_channels = BKE_imtype_valid_channels(imtype, false);
|
||||
|
||||
has_alpha = (valid_channels & IMA_CHAN_FLAG_ALPHA) != 0;
|
||||
|
||||
Reference in New Issue
Block a user