diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-01 16:05:00 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-01 17:40:19 +0300 |
commit | 227ed1aa3516ae1504f49be90085b2fdc703f6a1 (patch) | |
tree | a860729536c8e32359503482c1286ca3f4ae3230 /source/blender/depsgraph | |
parent | 97fa7974daad5334508fffc825484e1942068d16 (diff) |
Fix T60451: Soft body cache not being cleared when it should
Manual edits to object or its dependencies should reset the
point cache. Added special relations for this now.
Diffstat (limited to 'source/blender/depsgraph')
-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); } |