diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-20 20:20:58 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-20 20:20:58 +0400 |
commit | 8506e3a78c9955937bbe386b594aeb224bc9f380 (patch) | |
tree | 14ceb68e1b8d2402e313beec323b8c39337bc85f /source/blender/blenkernel/intern/implicit.c | |
parent | a2930c634f5debf2dc25cc2b80e7c91f84eae833 (diff) |
Fix T38294: enabling hair dynamics very slow / hangs with many hairs.
This function call was accidentally placed inside a loop which gave O(n^2)
behavior, but there's no reason for it.
Diffstat (limited to 'source/blender/blenkernel/intern/implicit.c')
-rw-r--r-- | source/blender/blenkernel/intern/implicit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index ef21c3fdb24..af057b6698d 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -776,11 +776,10 @@ int implicit_init(Object *UNUSED(ob), ClothModifierData *clmd) id->z = create_lfvector(cloth->numverts); id->S[0].vcount = 0; + update_matrixS(verts, cloth->numverts, id->S); for (i = 0; i < cloth->numverts; i++) { id->A[i].r = id->A[i].c = id->dFdV[i].r = id->dFdV[i].c = id->dFdX[i].r = id->dFdX[i].c = id->P[i].c = id->P[i].r = id->Pinv[i].c = id->Pinv[i].r = id->bigI[i].c = id->bigI[i].r = id->M[i].r = id->M[i].c = i; - - update_matrixS(verts, cloth->numverts, id->S); initdiag_fmatrixS(id->M[i].m, verts[i].mass); } |