Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-07-01 12:32:10 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-07-01 13:31:41 +0300
commit67fc4f4bedded86a04d2bf98ca1642a12d9662b3 (patch)
treed3101b1e6108b547b44ee86cc30c3142d63db1ce /source/blender/modifiers/intern/MOD_cloth.c
parent1f79aa602eb9da2f2f0fdc6be6fa02de6ec6cace (diff)
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
Diffstat (limited to 'source/blender/modifiers/intern/MOD_cloth.c')
-rw-r--r--source/blender/modifiers/intern/MOD_cloth.c14
1 files changed, 8 insertions, 6 deletions
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");
}