Video: Remove non-ffmpeg AVI support #118409

Merged
Aras Pranckevicius merged 7 commits from aras_p/blender:remove_avi into main 2024-02-20 13:15:59 +01:00
3 changed files with 15 additions and 8 deletions
Showing only changes of commit f7e1613933 - Show all commits

View File

@ -29,7 +29,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 3
#define BLENDER_FILE_SUBVERSION 4
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and cancel loading the file, showing a warning to

View File

@ -1939,6 +1939,13 @@ static bool seq_filter_bilinear_to_auto(Sequence *seq, void * /*user_data*/)
return true;
}
static void image_settings_avi_to_ffmpeg(Scene *sce)
{
if (ELEM(sce->r.im_format.imtype, R_IMF_IMTYPE_AVIRAW, R_IMF_IMTYPE_AVIJPEG)) {
sce->r.im_format.imtype = R_IMF_IMTYPE_FFMPEG;
}
}
void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
{
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 1)) {
@ -2938,6 +2945,12 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
FOREACH_NODETREE_END;
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 402, 4)) {
LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) {
image_settings_avi_to_ffmpeg(sce);
}
}
/**
* Always bump subversion in BKE_blender_version.h when adding versioning
* code here, and wrap it inside a MAIN_VERSION_FILE_ATLEAST check.

View File

@ -384,18 +384,12 @@ const EnumPropertyItem rna_enum_image_type_items[] = {
IMAGE_TYPE_ITEMS_IMAGE_ONLY
RNA_ENUM_ITEM_HEADING(N_("Movie"), nullptr),
{R_IMF_IMTYPE_AVIJPEG,
"AVI_JPEG",
ICON_FILE_MOVIE,
"AVI JPEG",
"Output video in AVI JPEG format"},
{R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
#ifdef WITH_FFMPEG
{R_IMF_IMTYPE_FFMPEG,
"FFMPEG",
ICON_FILE_MOVIE,
"FFmpeg Video",
"The most versatile way to output video files"},
""},
#endif
{0, nullptr, 0, nullptr, nullptr},
};