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:
parent
21b5af766d
commit
7a50d078fe
Notes:
blender-bot
2023-02-14 02:30:10 +01:00
Referenced by issue #64930, FFmpeg Output- no color mode by default
|
@ -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))) {
|
||||
|
|
Loading…
Reference in New Issue