[Bf-blender-cvs] [ca405a7] master: Fix T47148: Hair grid dos not work.

Bastien Montagne noreply at git.blender.org
Mon Jan 11 12:43:40 CET 2016


Commit: ca405a73b4f6c93f2d3833337af0763c15743fb0
Author: Bastien Montagne
Date:   Mon Jan 11 12:35:19 2016 +0100
Branches: master
https://developer.blender.org/rBca405a73b4f6c93f2d3833337af0763c15743fb0

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

===================================================================

M	source/blender/physics/intern/BPH_mass_spring.cpp

===================================================================

diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index 30a8478..29f5ed6 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);




More information about the Bf-blender-cvs mailing list