[Bf-blender-cvs] [f3899c13cd4] master: Fix T64827: "Batch-Generate Previews" crashes.

Bastien Montagne noreply at git.blender.org
Mon Jul 15 22:34:17 CEST 2019


Commit: f3899c13cd458b116fe4fd646632d11b1c26fda3
Author: Bastien Montagne
Date:   Mon Jul 15 22:29:59 2019 +0200
Branches: master
https://developer.blender.org/rBf3899c13cd458b116fe4fd646632d11b1c26fda3

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...).

===================================================================

M	source/blender/blenloader/intern/versioning_280.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list