diff options
author | Benjamin Meyer <> | 2019-04-04 11:39:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-04-04 12:05:52 +0300 |
commit | c384b5ddbdcb4c0b26e55a824681db1f9753e496 (patch) | |
tree | b14a61e9c993c7c7499f18295383f9154593d147 /source/blender/modifiers | |
parent | aa00019de01a175e8c583c801dcf04b9e1c78d89 (diff) |
Fix: Erratic collision response when using constraints on colliders
Missing dependency, which made collission to access object transform
prior it was evaluated.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4636
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_collision.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index 371a33ebfc6..2e56da6f100 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -240,6 +240,10 @@ static void deformVerts( } } +static void updateDepsgraph(ModifierData *UNUSED(md), const ModifierUpdateDepsgraphContext *ctx) +{ + DEG_add_modifier_to_transform_relation(ctx->node, "Collision Modifier"); +} ModifierTypeInfo modifierType_Collision = { /* name */ "Collision", @@ -261,7 +265,7 @@ ModifierTypeInfo modifierType_Collision = { /* requiredDataMask */ NULL, /* freeData */ freeData, /* isDisabled */ NULL, - /* updateDepsgraph */ NULL, + /* updateDepsgraph */ updateDepsgraph, /* dependsOnTime */ dependsOnTime, /* dependsOnNormals */ NULL, /* foreachObjectLink */ NULL, |