diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 3 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/fluid_script.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index 58d49622597..b8dc631b08e 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -1254,6 +1254,7 @@ bool MANTA::writeConfiguration(FluidModifierData *mmd, int framenr) gzwrite(gzf, &mds->res_min, 3 * sizeof(int)); gzwrite(gzf, &mds->res_max, 3 * sizeof(int)); gzwrite(gzf, &mds->active_color, 3 * sizeof(float)); + gzwrite(gzf, &mds->time_total, sizeof(int)); return (gzclose(gzf) == Z_OK); } @@ -1353,6 +1354,8 @@ bool MANTA::readConfiguration(FluidModifierData *mmd, int framenr) gzread(gzf, &mds->res_min, 3 * sizeof(int)); gzread(gzf, &mds->res_max, 3 * sizeof(int)); gzread(gzf, &mds->active_color, 3 * sizeof(float)); + gzread(gzf, &mds->time_total, sizeof(int)); + mds->total_cells = mds->res[0] * mds->res[1] * mds->res[2]; return (gzclose(gzf) == Z_OK); diff --git a/intern/mantaflow/intern/strings/fluid_script.h b/intern/mantaflow/intern/strings/fluid_script.h index 0619da67f64..b237d782f09 100644 --- a/intern/mantaflow/intern/strings/fluid_script.h +++ b/intern/mantaflow/intern/strings/fluid_script.h @@ -552,7 +552,7 @@ def bake_noise_process_$ID$(framenr, format_data, format_noise, path_data, path_ \n\ sn$ID$.frame = framenr\n\ sn$ID$.frameLength = frameLength_s$ID$\n\ - sn$ID$.timeTotal = abs(framenr - start_frame_s$ID$) * frameLength_s$ID$\n\ + sn$ID$.timeTotal = timeTotal_s$ID$\n\ sn$ID$.timestep = frameLength_s$ID$ # no adaptive timestep for noise\n\ \n\ smoke_step_noise_$ID$(framenr)\n\ @@ -570,7 +570,7 @@ def bake_mesh_process_$ID$(framenr, format_data, format_mesh, format_particles, \n\ sm$ID$.frame = framenr\n\ sm$ID$.frameLength = frameLength_s$ID$\n\ - sm$ID$.timeTotal = abs(framenr - start_frame_s$ID$) * frameLength_s$ID$\n\ + sm$ID$.timeTotal = timeTotal_s$ID$\n\ sm$ID$.timestep = frameLength_s$ID$ # no adaptive timestep for mesh\n\ \n\ #if using_smoke_s$ID$:\n\ @@ -594,7 +594,7 @@ def bake_particles_process_$ID$(framenr, format_data, format_particles, path_dat \n\ sp$ID$.frame = framenr\n\ sp$ID$.frameLength = frameLength_s$ID$\n\ - sp$ID$.timeTotal = abs(framenr - start_frame_s$ID$) * frameLength_s$ID$\n\ + sp$ID$.timeTotal = timeTotal_s$ID$\n\ sp$ID$.timestep = frameLength_s$ID$ # no adaptive timestep for particles\n\ \n\ #if using_smoke_s$ID$:\n\ |