From 750899fd318fae8ddd485936167071481ee1e356 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 22 Jul 2020 15:49:07 +0200 Subject: Simulation: improve depsgraph integration A simulation data block has an embedded node tree, which requires special handling in a couple of places. Some of those places were missing beforehand. This also adds a relation to make sure that the simulation is evaluated after animations on the embedded node tree are evaluated. --- source/blender/simulation/intern/simulation_update.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/simulation') diff --git a/source/blender/simulation/intern/simulation_update.cc b/source/blender/simulation/intern/simulation_update.cc index 09219e0238f..7a748ee57d1 100644 --- a/source/blender/simulation/intern/simulation_update.cc +++ b/source/blender/simulation/intern/simulation_update.cc @@ -108,8 +108,7 @@ void update_simulation_in_depsgraph(Depsgraph *depsgraph, SimulationInfluences influences; RequiredStates required_states; - /* TODO: Use simulation_cow, but need to add depsgraph relations before that. */ - collect_simulation_influences(*simulation_orig, resources, influences, required_states); + collect_simulation_influences(*simulation_cow, resources, influences, required_states); if (current_frame == 1) { reinitialize_empty_simulation_states(simulation_orig, required_states); -- cgit v1.2.3