diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-11 18:49:29 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-11 19:08:30 +0300 |
commit | 1bc8ddbc6ce4c80919640aee9a29da63d8f6b442 (patch) | |
tree | 21b6ac87f820be6da306ba96b94e5d3b3d511e01 /source/blender/blenloader | |
parent | 19af5bd57e930cc9a2bf73ac9010425338437faf (diff) |
Fix T62310: Batch generate data-block previews broken.
Some uninitialized colormanagement data was breaking RNA acces for them,
exposed in batch preview management when generating previews for scenes
because we have to backup/restore scene and all its settings
before/after rendering it...
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 3832b671b24..98277bab2a3 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -2874,6 +2874,26 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 280, 48)) { + for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { + /* Those are not currently used, but are accessible through RNA API and were not + * properly initialized previously. This is mere copy of BKE_init_scene() code. */ + if (scene->r.im_format.view_settings.look[0] == '\0') { + BKE_color_managed_display_settings_init(&scene->r.im_format.display_settings); + BKE_color_managed_view_settings_init_render(&scene->r.im_format.view_settings, + &scene->r.im_format.display_settings, + "Filmic"); + } + + if (scene->r.bake.im_format.view_settings.look[0] == '\0') { + BKE_color_managed_display_settings_init(&scene->r.bake.im_format.display_settings); + BKE_color_managed_view_settings_init_render(&scene->r.bake.im_format.view_settings, + &scene->r.bake.im_format.display_settings, + "Filmic"); + } + } + } + { /* Versioning code until next subversion bump goes here. */ } |