diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-23 13:09:28 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-23 13:09:36 +0300 |
commit | 634585aa6875f9e6e8a2e43e283f9d530764a094 (patch) | |
tree | 837a72316887305f8e0b14c69bb1469dea4b1c7c /source/blender/simulation/intern/simulation_collect_influences.cc | |
parent | 65968911217380a7a594f8684150b5fa01866d6a (diff) |
Simulation: add depsgraph relations for ids referenced by node tree
I'll really have to refactor `ntreeUpdateTree` soon to avoid scanning
all node trees multiple times.
Diffstat (limited to 'source/blender/simulation/intern/simulation_collect_influences.cc')
-rw-r--r-- | source/blender/simulation/intern/simulation_collect_influences.cc | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/source/blender/simulation/intern/simulation_collect_influences.cc b/source/blender/simulation/intern/simulation_collect_influences.cc index bbc28077dff..876d0b50fc1 100644 --- a/source/blender/simulation/intern/simulation_collect_influences.cc +++ b/source/blender/simulation/intern/simulation_collect_influences.cc @@ -436,28 +436,10 @@ static void prepare_particle_attribute_builders(nodes::MFNetworkTreeMap &network } } -static void find_used_persistent_data(const nodes::DerivedNodeTree &tree, - UsedPersistentData &r_used_persistent_data) -{ - const bNodeSocketType *socktype = nodeSocketTypeFind("NodeSocketObject"); - BLI_assert(socktype != nullptr); - - for (const nodes::DInputSocket *dsocket : tree.input_sockets()) { - const bNodeSocket *bsocket = dsocket->bsocket(); - if (bsocket->typeinfo == socktype) { - Object *object = ((const bNodeSocketValueObject *)bsocket->default_value)->value; - if (object != nullptr) { - r_used_persistent_data.add(DEG_get_original_id(&object->id)); - } - } - } -} - void collect_simulation_influences(Simulation &simulation, ResourceCollector &resources, SimulationInfluences &r_influences, - RequiredStates &r_required_states, - UsedPersistentData &r_used_persistent_data) + RequiredStates &r_required_states) { nodes::NodeTreeRefMap tree_refs; const nodes::DerivedNodeTree tree{simulation.nodetree, tree_refs}; @@ -481,8 +463,6 @@ void collect_simulation_influences(Simulation &simulation, for (const nodes::DNode *dnode : get_particle_simulation_nodes(tree)) { r_required_states.add(dnode_to_path(*dnode), SIM_TYPE_NAME_PARTICLE_SIMULATION); } - - find_used_persistent_data(tree, r_used_persistent_data); } } // namespace blender::sim |