[Bf-blender-cvs] [5bcca7ae929] master: Depsgraph: Fix dependency cycle when adding rigid body

Sergey Sharybin noreply at git.blender.org
Thu Mar 28 11:14:48 CET 2019


Commit: 5bcca7ae9296408717449d24a4bc9ca6e30e3c44
Author: Sergey Sharybin
Date:   Thu Mar 28 11:04:00 2019 +0100
Branches: master
https://developer.blender.org/rB5bcca7ae9296408717449d24a4bc9ca6e30e3c44

Depsgraph: Fix dependency cycle when adding rigid body

Was a mistake in the recent change.

The idea here is: manual should invalidate point cache, but
rigid body simulation should only happen after point cache
was ensured to be in the correct state.

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

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 444502b9538..33850181f60 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -976,14 +976,14 @@ void DepsgraphRelationBuilder::build_object_pointcache(Object *object)
 	}
 	/* Manual edits to any dependency (or self) should reset the point cache. */
 	if (!BLI_listbase_is_empty(&ptcache_id_list)) {
-		OperationKey transform_simulation_init_key(
+		OperationKey transform_eval_key(
 		        &object->id,
 		        NodeType::TRANSFORM,
-		        OperationCode::TRANSFORM_SIMULATION_INIT);
+		        OperationCode::TRANSFORM_EVAL);
 		OperationKey geometry_init_key(&object->id,
 		                               NodeType::GEOMETRY,
 		                               OperationCode::GEOMETRY_EVAL_INIT);
-		add_relation(transform_simulation_init_key,
+		add_relation(transform_eval_key,
 		             point_cache_key,
 		             "Transform Simulation -> Point Cache",
 		             RELATION_FLAG_FLUSH_USER_EDIT_ONLY);



More information about the Bf-blender-cvs mailing list