Commit: 227ed1aa3516ae1504f49be90085b2fdc703f6a1
Author: Sergey Sharybin
Date: Fri Feb 1 14:05:00 2019 +0100
Branches: master
https://developer.blender.org/rB227ed1aa3516ae1504f49be90085b2fdc703f6a1
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.
===================================================================
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 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);
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs