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.
This commit is contained in:
Germano Cavalcante 2021-07-16 09:52:48 -03:00
parent 15cfb375a3
commit a770faa811
Notes: blender-bot 2023-02-14 10:54:29 +01:00
Referenced by issue #89875, False dependency cycle on particle systems
1 changed files with 9 additions and 3 deletions

View File

@ -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. */