Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c26
-rw-r--r--source/blender/blenloader/intern/versioning_280.c16
-rw-r--r--source/blender/blenloader/intern/writefile.c6
3 files changed, 32 insertions, 16 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;
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 34041b0ca22..0ce32d234a8 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -4091,7 +4091,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
FOREACH_MAIN_ID_BEGIN (bmain, id) {
bNodeTree *ntree = ntreeFromID(id);
if (ntree) {
- ntree->id.flag |= LIB_PRIVATE_DATA;
+ ntree->id.flag |= LIB_EMBEDDED_DATA;
}
}
FOREACH_MAIN_ID_END;
@@ -4108,7 +4108,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
/* Older files do not have a master collection, which is then added through
* `BKE_collection_master_add()`, so everything is fine. */
if (scene->master_collection != NULL) {
- scene->master_collection->id.flag |= LIB_PRIVATE_DATA;
+ scene->master_collection->id.flag |= LIB_EMBEDDED_DATA;
}
}
}
@@ -4851,6 +4851,18 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
*/
{
/* Keep this block, even when empty. */
+
+ if (!DNA_struct_elem_find(fd->filesdna, "OceanModifierData", "float", "fetch_jonswap")) {
+ for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
+ for (ModifierData *md = object->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Ocean) {
+ OceanModifierData *omd = (OceanModifierData *)md;
+ omd->fetch_jonswap = 120.0f;
+ }
+ }
+ }
+ }
+
if (!DNA_struct_find(fd->filesdna, "XrSessionSettings")) {
for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
const View3D *v3d_default = DNA_struct_default_get(View3D);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 81df00ebdef..a9c5008062b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2767,9 +2767,9 @@ static void write_scene(WriteData *wd, Scene *sce)
}
/* Eevee Lightcache */
- if (sce->eevee.light_cache && !wd->use_memfile) {
- writestruct(wd, DATA, LightCache, 1, sce->eevee.light_cache);
- write_lightcache(wd, sce->eevee.light_cache);
+ if (sce->eevee.light_cache_data && !wd->use_memfile) {
+ writestruct(wd, DATA, LightCache, 1, sce->eevee.light_cache_data);
+ write_lightcache(wd, sce->eevee.light_cache_data);
}
write_view3dshading(wd, &sce->display.shading);