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.
This commit is contained in:
Brecht Van Lommel 2014-01-20 17:20:58 +01:00
parent a2930c634f
commit 8506e3a78c
Notes: blender-bot 2023-02-14 11:19:15 +01:00
Referenced by issue #38294, Crash when checking hair dynamics
1 changed files with 1 additions and 2 deletions

View File

@ -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);
}