Fix force fields not affecting rigid bodies

This fixes part of T58991.
Still need to add proper relations so that point cache is marked as outdated
when effectors are modified.
This commit is contained in:
Sergej Reich 2018-12-13 11:54:18 +01:00
parent 4d395a34dc
commit 5cc015f0ad
Notes: blender-bot 2023-02-14 05:04:52 +01:00
Referenced by issue #58991, Force field not affecting rigid body simulation
1 changed files with 8 additions and 0 deletions

View File

@ -1597,6 +1597,14 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
/* set up dependencies between these operations and other builtin nodes --------------- */
/* effectors */
ListBase *relations = deg_build_effector_relations(graph_, rbw->effector_weights->group);
LISTBASE_FOREACH (EffectorRelation *, relation, relations) {
ComponentKey eff_key(&relation->ob->id, DEG_NODE_TYPE_TRANSFORM);
add_relation(eff_key, init_key, "RigidBody Field");
// FIXME add relations so pointache is marked as outdated when effectors are modified
}
/* time dependency */
TimeSourceKey time_src_key;
add_relation(time_src_key, init_key, "TimeSrc -> Rigidbody Reset/Rebuild (Optional)");