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/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index e6c414b92da..3db51c95fcb 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -2527,17 +2527,13 @@ static void update_flowsfluids(
}
/* sample subframes */
else {
-# if 0
int scene_frame = (int)DEG_get_ctime(depsgraph);
-# endif
// float scene_subframe = scene->r.subframe; // UNUSED
int subframe;
for (subframe = 0; subframe <= subframes; subframe++) {
EmissionMap em_temp = {NULL};
float sample_size = 1.0f / (float)(subframes + 1);
-# if 0
float prev_frame_pos = sample_size * (float)(subframe + 1);
-# endif
float sdt = dt * sample_size;
int hires_multiplier = 1;
@@ -2545,8 +2541,6 @@ static void update_flowsfluids(
hires_multiplier = sds->amplify + 1;
}
- /* TODO: setting the scene frame no longer works with the new depsgraph. */
-# if 0
/* set scene frame to match previous frame + subframe
* or use current frame for last sample */
if (subframe < subframes) {
@@ -2557,7 +2551,6 @@ static void update_flowsfluids(
scene->r.cfra = scene_frame;
scene->r.subframe = 0.0f;
}
-# endif
if (sfs->source == MOD_SMOKE_FLOW_SOURCE_PARTICLES) {
/* emit_from_particles() updates timestep internally */
@@ -2569,8 +2562,13 @@ static void update_flowsfluids(
else { /* MOD_SMOKE_FLOW_SOURCE_MESH */
/* update flow object frame */
BLI_mutex_lock(&object_update_lock);
- BKE_object_modifier_update_subframe(
- depsgraph, scene, collob, true, 5, DEG_get_ctime(depsgraph), eModifierType_Smoke);
+ BKE_object_modifier_update_subframe(depsgraph,
+ scene,
+ collob,
+ true,
+ 5,
+ BKE_scene_frame_get(scene),
+ eModifierType_Smoke);
BLI_mutex_unlock(&object_update_lock);
/* apply flow */