diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 16:24:30 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 16:24:30 +0300 |
commit | b53d358261a26652d510d62565f1b43035a55e67 (patch) | |
tree | b952fa8fa04aee19d7ae6ebd6555e2220d2dbe31 /source/blender/modifiers/intern/MOD_ocean.c | |
parent | 28369f725c10f167e504f0acd695a0f9d3c2a709 (diff) |
Cleanup: remove G.main from BKE modifier.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_ocean.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_ocean.c | 8 |
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 d001917fce8..9a60e8e1fbd 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, @@ -447,7 +449,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); } |