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:24:30 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-31 16:24:30 +0300
commitb53d358261a26652d510d62565f1b43035a55e67 (patch)
treeb952fa8fa04aee19d7ae6ebd6555e2220d2dbe31 /source/blender/editors/physics
parent28369f725c10f167e504f0acd695a0f9d3c2a709 (diff)
Cleanup: remove G.main from BKE modifier.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/physics_fluid.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index ce1e9d5cf6a..c050f889eee 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -48,6 +48,7 @@
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_fluidsim.h"
+#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_report.h"
@@ -632,13 +633,13 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom
#define FLUID_SUFFIX_SURFACE "fluidsurface"
static bool fluid_init_filepaths(
- ReportList *reports, FluidsimSettings *domainSettings, Object *fsDomain,
+ Main *bmain, ReportList *reports, FluidsimSettings *domainSettings, Object *fsDomain,
char *targetDir, char *targetFile)
{
const char *suffixConfigTmp = FLUID_SUFFIX_CONFIG_TMP;
/* prepare names... */
- const char *relbase = modifier_path_relbase(fsDomain);
+ const char *relbase = modifier_path_relbase(bmain, fsDomain);
/* We do not accept empty paths, they can end in random places silently, see T51176. */
if (domainSettings->surfdataPath[0] == '\0') {
@@ -835,6 +836,7 @@ static void fluidsim_delete_until_lastframe(FluidsimSettings *fss, const char *r
static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, short do_job)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
int i;
FluidsimSettings *domainSettings;
@@ -842,7 +844,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
char debugStrBuffer[256];
int gridlevels = 0;
- const char *relbase= modifier_path_relbase(fsDomain);
+ const char *relbase= modifier_path_relbase(bmain, fsDomain);
const char *strEnvName = "BLENDER_ELBEEMDEBUG"; // from blendercall.cpp
const char *suffixConfigTmp = FLUID_SUFFIX_CONFIG_TMP;
const char *suffixSurface = FLUID_SUFFIX_SURFACE;
@@ -934,7 +936,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* ******** prepare output file paths ******** */
- if (!fluid_init_filepaths(reports, domainSettings, fsDomain, targetDir, targetFile)) {
+ if (!fluid_init_filepaths(bmain, reports, domainSettings, fsDomain, targetDir, targetFile)) {
fluidbake_free_data(channels, fobjects, fsset, fb);
return false;
}