From 396f7ea1582b89fa33af4b4ff0a5562534316f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Thu, 4 Sep 2014 19:58:17 +0200 Subject: [PATCH] Don't try to enforce a velocity change for pinned vertices; their velocity is defined externally by hair root motion. --- source/blender/blenkernel/intern/implicit.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 0d4a7ec7e4a..227bd2aef93 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1768,18 +1768,15 @@ static void setup_constraint_matrix(ClothModifierData *clmd, ColliderContacts *c int numverts = clmd->clothObject->numverts; int i, j, v; - /* Clear matrix from old vertex constraints */ - for (v = 0; v < S[0].vcount; v++) - S[v].c = S[v].r = 0; - - /* pinned vertex constraints */ for (v = 0; v < numverts; v++) { S[v].c = S[v].r = v; if (verts[v].flags & CLOTH_VERT_FLAG_PINNED) { - negate_v3_v3(z[v], verts[v].v); + /* pinned vertex constraints */ + zero_v3(z[v]); /* velocity is defined externally */ zero_m3(S[v].m); } else { + /* free vertex */ zero_v3(z[v]); unit_m3(S[v].m); }