Fix T64930: FFmpeg Output- no color mode by default

The issue was that the valid color modes was checked on the old image
format, not the new one. So if you switched formats it would not
correctly check if the settings were valid.
This commit is contained in:
Sebastian Parborg
2019-06-12 15:16:30 +02:00
parent 21b5af766d
commit 7a50d078fe

View File

@@ -1149,13 +1149,13 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
ID *id = ptr->id.data;
imf->imtype = value;
const bool is_render = (id && GS(id->name) == ID_SCE);
/* see note below on why this is */
const char chan_flag = BKE_imtype_valid_channels(imf->imtype, true) |
(is_render ? IMA_CHAN_FLAG_BW : 0);
imf->imtype = value;
/* ensure depth and color settings match */
if (((imf->planes == R_IMF_PLANES_BW) && !(chan_flag & IMA_CHAN_FLAG_BW)) ||
((imf->planes == R_IMF_PLANES_RGBA) && !(chan_flag & IMA_CHAN_FLAG_ALPHA))) {