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/editors/physics/physics_fluid.c')
-rw-r--r--source/blender/editors/physics/physics_fluid.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index dc3673c972f..44858e36fab 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -334,6 +334,7 @@ static void free_all_fluidobject_channels(ListBase *fobjects)
}
static void fluid_init_all_channels(bContext *C,
+ Depsgraph *depsgraph,
Object *UNUSED(fsDomain),
FluidsimSettings *domainSettings,
FluidAnimChannels *channels,
@@ -341,7 +342,6 @@ static void fluid_init_all_channels(bContext *C,
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
- Depsgraph *depsgraph = CTX_data_depsgraph(C);
Base *base;
int i;
int length = channels->length;
@@ -514,9 +514,11 @@ static void fluid_init_all_channels(bContext *C,
}
}
-static void export_fluid_objects(const bContext *C, ListBase *fobjects, Scene *scene, int length)
+static void export_fluid_objects(Depsgraph *depsgraph,
+ ListBase *fobjects,
+ Scene *scene,
+ int length)
{
- Depsgraph *depsgraph = CTX_data_depsgraph(C);
FluidObject *fobj;
for (fobj = fobjects->first; fobj; fobj = fobj->next) {
@@ -714,7 +716,7 @@ static bool fluid_init_filepaths(Main *bmain,
/* .tmp: don't overwrite/delete original file */
BLI_join_dirfile(targetFile, FILE_MAX, targetDir, suffixConfigTmp);
- /* Ensure whole path exists and is wirtable. */
+ /* Ensure whole path exists and is writeable. */
const bool dir_exists = BLI_dir_create_recursive(targetDir);
const bool is_writable = BLI_file_is_writable(targetFile);
@@ -747,7 +749,7 @@ static bool fluid_init_filepaths(Main *bmain,
/* .tmp: don't overwrite/delete original file */
BLI_join_dirfile(targetFile, FILE_MAX, targetDir, suffixConfigTmp);
- /* Ensure whole path exists and is wirtable. */
+ /* Ensure whole path exists and is writeable. */
if (!BLI_dir_create_recursive(targetDir) || !BLI_file_is_writable(targetFile)) {
BKE_reportf(reports,
RPT_ERROR,
@@ -922,7 +924,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
- Depsgraph *depsgraph = CTX_data_depsgraph(C);
+ Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
int i;
FluidsimSettings *domainSettings;
@@ -1051,11 +1053,11 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
(double)noFrames;
/* ******** initialize and allocate animation channels ******** */
- fluid_init_all_channels(C, fsDomain, domainSettings, channels, fobjects);
+ fluid_init_all_channels(C, depsgraph, fsDomain, domainSettings, channels, fobjects);
/* reset to original current frame */
scene->r.cfra = origFrame;
- ED_update_for_newframe(CTX_data_main(C), depsgraph);
+ ED_update_for_newframe(CTX_data_main(C), CTX_data_depsgraph_pointer(C));
/* ******** init domain object's matrix ******** */
copy_m4_m4(domainMat, fsDomain->obmat);
@@ -1153,7 +1155,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
elbeemAddDomain(fsset);
/* ******** export all fluid objects to elbeem ******** */
- export_fluid_objects(C, fobjects, scene, channels->length);
+ export_fluid_objects(depsgraph, fobjects, scene, channels->length);
/* custom data for fluid bake job */
fb->settings = fsset;