Merge branch 'blender-v2.81-release'

This commit is contained in:
Sebastián Barschkis 2019-11-07 21:36:23 +01:00
commit 23e1fb365b
Notes: blender-bot 2023-02-14 05:36:11 +01:00
Referenced by issue #71479, Blender 2.81/2.82 - OpenCL - Significan slow render times
1 changed files with 13 additions and 12 deletions

View File

@ -1478,7 +1478,8 @@ static void emit_from_particles(Object *flow_ob,
}
}
state.time = DEG_get_ctime(depsgraph); /* use depsgraph time */
/* DEG_get_ctime(depsgraph) does not give subframe time */
state.time = BKE_scene_frame_get(scene);
if (psys_get_particle_state(&sim, p, &state, 0) == 0) {
continue;
}
@ -2552,6 +2553,17 @@ static void update_flowsfluids(
scene->r.subframe = 0.0f;
}
/* update flow object frame */
BLI_mutex_lock(&object_update_lock);
BKE_object_modifier_update_subframe(depsgraph,
scene,
collob,
true,
5,
BKE_scene_frame_get(scene),
eModifierType_Smoke);
BLI_mutex_unlock(&object_update_lock);
if (sfs->source == MOD_SMOKE_FLOW_SOURCE_PARTICLES) {
/* emit_from_particles() updates timestep internally */
emit_from_particles(collob, sds, sfs, &em_temp, depsgraph, scene, sdt);
@ -2560,17 +2572,6 @@ 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,
BKE_scene_frame_get(scene),
eModifierType_Smoke);
BLI_mutex_unlock(&object_update_lock);
/* apply flow */
emit_from_mesh(collob, sds, sfs, &em_temp, sdt);
}