From 67fc4f4bedded86a04d2bf98ca1642a12d9662b3 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 1 Jul 2019 11:32:10 +0200 Subject: Fix T66267: only add DEG cloth collision relations if collisions are enabled was detecting unneccessary dependency cycle Reviewers: sergey, brecht Maniphest Tasks: T66267 Differential Revision: https://developer.blender.org/D5160 --- source/blender/modifiers/intern/MOD_cloth.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_cloth.c') diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 3c4dd9f2c56..1a6d172d2f9 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -125,12 +125,14 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte { ClothModifierData *clmd = (ClothModifierData *)md; if (clmd != NULL) { - DEG_add_collision_relations(ctx->node, - ctx->object, - clmd->coll_parms->group, - eModifierType_Collision, - NULL, - "Cloth Collision"); + if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) { + DEG_add_collision_relations(ctx->node, + ctx->object, + clmd->coll_parms->group, + eModifierType_Collision, + NULL, + "Cloth Collision"); + } DEG_add_forcefield_relations( ctx->node, ctx->object, clmd->sim_parms->effector_weights, true, 0, "Cloth Field"); } -- cgit v1.2.3