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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-31 16:37:15 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-31 16:37:15 +0300
commitb809340960693a3e9808e59de4d1e029226fb492 (patch)
treea2f75c291b8ac4d3ffa4abdb3b9fe013f1506dc4 /source/blender/modifiers/intern/MOD_ocean.c
parent3248ac5e83307d623b18ccaed4c0b496121802e5 (diff)
parentb53d358261a26652d510d62565f1b43035a55e67 (diff)
Merge branch 'master' into blender2.8
Conflicts: intern/cycles/blender/blender_curves.cpp source/blender/blenkernel/BKE_particle.h source/blender/blenkernel/intern/modifier.c source/blender/blenkernel/intern/object_update.c source/blender/blenkernel/intern/particle_system.c source/blender/editors/object/object_modifier.c source/blender/editors/physics/physics_fluid.c source/blender/makesrna/intern/rna_particle.c source/blender/modifiers/intern/MOD_particlesystem.c
Diffstat (limited to 'source/blender/modifiers/intern/MOD_ocean.c')
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index 728802882a9..921677ce1b1 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -41,15 +41,17 @@
#include "BLI_utildefines.h"
#include "BKE_cdderivedmesh.h"
+#include "BKE_global.h"
+#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_ocean.h"
#include "MOD_modifiertypes.h"
#ifdef WITH_OCEANSIM
-static void init_cache_data(Object *ob, struct OceanModifierData *omd)
+static void init_cache_data(Main *bmain, Object *ob, struct OceanModifierData *omd)
{
- const char *relbase = modifier_path_relbase(ob);
+ const char *relbase = modifier_path_relbase(bmain, ob);
omd->oceancache = BKE_ocean_init_cache(omd->cachepath, relbase,
omd->bakestart, omd->bakeend, omd->wave_scale,
@@ -446,7 +448,7 @@ static DerivedMesh *doOcean(
/* do ocean simulation */
if (omd->cached == true) {
if (!omd->oceancache) {
- init_cache_data(ob, omd);
+ init_cache_data(G.main, ob, omd);
}
BKE_ocean_simulate_cache(omd->oceancache, md->scene->r.cfra);
}