diff options
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 2fb67010bb0..e0e35c88af2 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2634,6 +2634,25 @@ void DepsgraphRelationBuilder::build_simulation(Simulation *simulation) OperationKey nodetree_key( &simulation->nodetree->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EXIT); add_relation(nodetree_key, simulation_eval_key, "NodeTree -> Simulation", 0); + + LISTBASE_FOREACH ( + PersistentDataHandleItem *, handle_item, &simulation->persistent_data_handles) { + if (handle_item->id == nullptr) { + continue; + } + build_id(handle_item->id); + if (GS(handle_item->id->name) == ID_OB) { + Object *object = (Object *)handle_item->id; + if (handle_item->flag & SIM_HANDLE_DEPENDS_ON_TRANSFORM) { + ComponentKey object_transform_key(&object->id, NodeType::TRANSFORM); + add_relation(object_transform_key, simulation_eval_key, "Object Transform -> Simulation"); + } + if (handle_item->flag & SIM_HANDLE_DEPENDS_ON_GEOMETRY) { + ComponentKey object_geometry_key(&object->id, NodeType::GEOMETRY); + add_relation(object_geometry_key, simulation_eval_key, "Object Geometry -> Simulation"); + } + } + } } void DepsgraphRelationBuilder::build_scene_sequencer(Scene *scene) |