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:
authorSebastián Barschkis <sebbas@sebbas.org>2019-10-09 16:00:25 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2019-10-09 16:00:25 +0300
commit6c9178b183f5267e07a6c55497b6d496e468a709 (patch)
tree7d90990a1350f40cdead8c55fdeae2aa76cf3f9f /source/blender/blenkernel/intern/smoke.c
parent4aabea8b87a94ba7a63352364573004b2e054db8 (diff)
Fix T61432: Sampling Subframes not working 2.8
Uncommented subframe logic and added correct time getter function (with subframe part in frame) to subframe update function
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index e6c414b92da..1bd2fbffd58 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 */
@@ -2570,7 +2563,7 @@ static void update_flowsfluids(
/* 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);
+ depsgraph, scene, collob, true, 5, BKE_scene_frame_get(scene), eModifierType_Smoke);
BLI_mutex_unlock(&object_update_lock);
/* apply flow */