diff options
author | Julian Eisel <julian@blender.org> | 2020-03-12 17:58:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-12 17:58:03 +0300 |
commit | b86be9b2145458037fd0b17433b7af0efa7b6472 (patch) | |
tree | f333625555402992ebb35d258f93eda1130389e6 /source/blender/blenloader/intern/readfile.c | |
parent | 00f83ec125207e90bf180b3eb7752d8cb6482a86 (diff) | |
parent | cb6cec904fa14ce0ab10a2a53af5c936d56376cf (diff) |
Merge branch 'temp-openxr-ghostxr' into temp-openxr-blenderside
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 7e17d1235fe..3059caf83f1 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -157,6 +157,8 @@ #include "RE_engine.h" +#include "engines/eevee/eevee_lightcache.h" + #include "readfile.h" #include <errno.h> @@ -1852,8 +1854,8 @@ void blo_make_scene_pointer_map(FileData *fd, Main *oldmain) fd->scenemap = oldnewmap_new(); for (; sce; sce = sce->id.next) { - if (sce->eevee.light_cache) { - struct LightCache *light_cache = sce->eevee.light_cache; + if (sce->eevee.light_cache_data) { + struct LightCache *light_cache = sce->eevee.light_cache_data; oldnewmap_insert(fd->scenemap, light_cache, light_cache, 0); } } @@ -1873,7 +1875,7 @@ void blo_end_scene_pointer_map(FileData *fd, Main *oldmain) } for (; sce; sce = sce->id.next) { - sce->eevee.light_cache = newsceadr(fd, sce->eevee.light_cache); + sce->eevee.light_cache_data = newsceadr(fd, sce->eevee.light_cache_data); } } @@ -5439,7 +5441,8 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb, Object *ob) mmd->domain->fluid = NULL; mmd->domain->fluid_mutex = BLI_rw_mutex_alloc(); - mmd->domain->tex = NULL; + mmd->domain->tex_density = NULL; + mmd->domain->tex_color = NULL; mmd->domain->tex_shadow = NULL; mmd->domain->tex_flame = NULL; mmd->domain->tex_flame_coba = NULL; @@ -6926,19 +6929,20 @@ static void direct_link_scene(FileData *fd, Scene *sce) if (fd->memfile) { /* If it's undo try to recover the cache. */ if (fd->scenemap) { - sce->eevee.light_cache = newsceadr(fd, sce->eevee.light_cache); + sce->eevee.light_cache_data = newsceadr(fd, sce->eevee.light_cache_data); } else { - sce->eevee.light_cache = NULL; + sce->eevee.light_cache_data = NULL; } } else { /* else try to read the cache from file. */ - sce->eevee.light_cache = newdataadr(fd, sce->eevee.light_cache); - if (sce->eevee.light_cache) { - direct_link_lightcache(fd, sce->eevee.light_cache); + sce->eevee.light_cache_data = newdataadr(fd, sce->eevee.light_cache_data); + if (sce->eevee.light_cache_data) { + direct_link_lightcache(fd, sce->eevee.light_cache_data); } } + EEVEE_lightcache_info_update(&sce->eevee); direct_link_view3dshading(fd, &sce->display.shading); @@ -7791,7 +7795,7 @@ static int lib_link_main_data_restore_cb(LibraryIDLinkCallbackData *cb_data) { const int cb_flag = cb_data->cb_flag; ID **id_pointer = cb_data->id_pointer; - if (cb_flag & IDWALK_CB_PRIVATE || *id_pointer == NULL) { + if (cb_flag & IDWALK_CB_EMBEDDED || *id_pointer == NULL) { return IDWALK_RET_NOP; } @@ -7802,7 +7806,7 @@ static int lib_link_main_data_restore_cb(LibraryIDLinkCallbackData *cb_data) Collection *collection = (Collection *)*id_pointer; if (collection->flag & COLLECTION_IS_MASTER) { /* We should never reach that point anymore, since master collection private ID should be - * properly tagged with IDWALK_CB_PRIVATE. */ + * properly tagged with IDWALK_CB_EMBEDDED. */ BLI_assert(0); return IDWALK_RET_NOP; } |