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.
This commit is contained in:
Sergey Sharybin 2019-03-28 11:04:00 +01:00
parent fdf92b923a
commit 5bcca7ae92
Notes: blender-bot 2023-02-14 03:12:08 +01:00
Referenced by issue #63061, Adding Rigid Body to object causes dependency cycle (POINT_CACHE_RESET() <-> TRANSFORM_SIMULATION_INIT())
1 changed files with 3 additions and 3 deletions

View File

@ -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);