diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-15 23:29:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-15 23:33:55 +0300 |
commit | f3899c13cd458b116fe4fd646632d11b1c26fda3 (patch) | |
tree | 23837af93a05cdf1e16db38e3ffada8208018adc /source/blender/blenloader | |
parent | 125e0cfb2533b2f2323a5b37e5c98652b1e2e24f (diff) |
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...).
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 5d899ef73a6..ce06364a9f0 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -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) { |