[Bf-blender-cvs] [a770faa811e] master: Fix T89875: False dependency cycle on particle systems

Germano Cavalcante noreply at git.blender.org
Fri Jul 16 14:53:13 CEST 2021


Commit: a770faa811ee62837eb540b0bd83ca0770f16663
Author: Germano Cavalcante
Date:   Fri Jul 16 09:52:48 2021 -0300
Branches: master
https://developer.blender.org/rBa770faa811ee62837eb540b0bd83ca0770f16663

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.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc

===================================================================

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



More information about the Bf-blender-cvs mailing list