diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-07-16 15:52:48 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-07-16 15:53:00 +0300 |
commit | a770faa811ee62837eb540b0bd83ca0770f16663 (patch) | |
tree | 92350f9a4a8fb3202b57a1fe65ab333c32df726a /source/blender/depsgraph | |
parent | 15cfb375a39b9d9e35e8c83942edb8f43788427f (diff) |
Fix T89875: False dependency cycle on particle systems
`POINT_CACHE_RESET` pointed to `GEOMETRY_EVAL_INIT` while
`GEOMETRY_EVAL_INIT` pointed to `POINT_CACHE_RESET`.
Now `POINT_CACHE_RESET` points to the same nodes pointed to by
`GEOMETRY_EVAL_INIT` thus avoiding the dependency cycle.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 415145c8fa1..c63b3d825a0 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1098,9 +1098,15 @@ void DepsgraphRelationBuilder::build_object_pointcache(Object *object) } else { flag = FLAG_GEOMETRY; - OperationKey geometry_key( - &object->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL_INIT); - add_relation(point_cache_key, geometry_key, "Point Cache -> Geometry"); + OperationKey geometry_key(&object->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL); + add_relation(point_cache_key, geometry_key, "Point Cache -> Geometry Eval"); + if (object->data) { + /* Geometry may change, so rebuild the Drawing Cache. */ + OperationKey object_data_batch_all_key( + (ID *)object->data, NodeType::BATCH_CACHE, OperationCode::BATCH_UPDATE_ALL); + add_relation( + point_cache_key, object_data_batch_all_key, "Point Cache -> Batch Update All"); + } } BLI_assert(flag != -1); /* Tag that we did handle that component. */ |