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:
2015-07-13 13:58:17 +02:00
parent 107bbee4c7
commit e142ae77ca
30 changed files with 294 additions and 256 deletions

View File

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