From ca405a73b4f6c93f2d3833337af0763c15743fb0 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 11 Jan 2016 12:35:19 +0100 Subject: Fix T47148: Hair grid dos not work. Actually, it was the whole 'cloth' simulation of hairs that was broken, since grid data could not be initialized correctly. Stupid mistake from looptri conversion, rBc582e186d90291a19a4e404111c492f1fd2c41a4 --- source/blender/physics/intern/BPH_mass_spring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/physics') diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp index 30a8478e0e4..29f5ed63cac 100644 --- a/source/blender/physics/intern/BPH_mass_spring.cpp +++ b/source/blender/physics/intern/BPH_mass_spring.cpp @@ -444,11 +444,11 @@ static void hair_get_boundbox(ClothModifierData *clmd, float gmin[3], float gmax { Cloth *cloth = clmd->clothObject; Implicit_Data *data = cloth->implicit; - unsigned int looptri_num = cloth->tri_num; + unsigned int mvert_num = cloth->mvert_num; int i; INIT_MINMAX(gmin, gmax); - for (i = 0; i < looptri_num; i++) { + for (i = 0; i < mvert_num; i++) { float x[3]; BPH_mass_spring_get_motion_state(data, i, x, NULL); DO_MINMAX(x, gmin, gmax); -- cgit v1.2.3