Fix T64827: "Batch-Generate Previews" crashes.

Second completely unrelated issue reported in same task (tssst...),
caused by missing doversion code of some changes in recent-ish 2.80
development (tsst... again).

Proper fix for the issue (reverted rB8a5a8282ce48 was merely sweeping
the dirt under the carpet...).
This commit is contained in:
Bastien Montagne 2019-07-15 22:29:59 +02:00
parent 125e0cfb25
commit f3899c13cd
Notes: blender-bot 2023-02-14 05:50:03 +01:00
Referenced by issue #64827, "Batch-Generate Previews" crashes
1 changed files with 24 additions and 0 deletions

View File

@ -3504,6 +3504,30 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
COLLECTION_RESTRICT_SELECT |
COLLECTION_RESTRICT_RENDER);
}
UnitSettings *unit = &scene->unit;
if (unit->system == USER_UNIT_NONE) {
unit->length_unit = (char)USER_UNIT_ADAPTIVE;
unit->mass_unit = (char)USER_UNIT_ADAPTIVE;
}
RenderData *render_data = &scene->r;
switch (render_data->ffcodecdata.ffmpeg_preset) {
case FFM_PRESET_ULTRAFAST:
case FFM_PRESET_SUPERFAST:
render_data->ffcodecdata.ffmpeg_preset = FFM_PRESET_REALTIME;
break;
case FFM_PRESET_VERYFAST:
case FFM_PRESET_FASTER:
case FFM_PRESET_FAST:
case FFM_PRESET_MEDIUM:
render_data->ffcodecdata.ffmpeg_preset = FFM_PRESET_GOOD;
break;
case FFM_PRESET_SLOW:
case FFM_PRESET_SLOWER:
case FFM_PRESET_VERYSLOW:
render_data->ffcodecdata.ffmpeg_preset = FFM_PRESET_BEST;
}
}
LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) {