diff options
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index ac827d8272a..c70e84db568 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -922,7 +922,9 @@ void DepsgraphRelationBuilder::build_object_pointcache(Object *object) } else { flag = FLAG_GEOMETRY; - ComponentKey geometry_key(&object->id, NodeType::GEOMETRY); + OperationKey geometry_key(&object->id, + NodeType::GEOMETRY, + OperationCode::GEOMETRY_EVAL); add_relation( point_cache_key, geometry_key, "Point Cache -> Geometry"); } @@ -933,6 +935,23 @@ void DepsgraphRelationBuilder::build_object_pointcache(Object *object) break; } } + /* Manual edits to any dependency (or self) should reset the point cache. */ + if (!BLI_listbase_is_empty(&ptcache_id_list)) { + OperationKey transform_local_key(&object->id, + NodeType::TRANSFORM, + OperationCode::TRANSFORM_LOCAL); + OperationKey geometry_init_key(&object->id, + NodeType::GEOMETRY, + OperationCode::GEOMETRY_EVAL_INIT); + add_relation(transform_local_key, + point_cache_key, + "Transform Local -> Point Cache", + RELATION_FLAG_FLUSH_USER_EDIT_ONLY); + add_relation(geometry_init_key, + point_cache_key, + "Geometry Init -> Point Cache", + RELATION_FLAG_FLUSH_USER_EDIT_ONLY); + } BLI_freelistN(&ptcache_id_list); } |