[Bf-blender-cvs] [ca19521] fluid-mantaflow: mesh normals were read in incorrectly. now using reverse order

Sebastián Barschkis noreply at git.blender.org
Mon Oct 3 19:48:00 CEST 2016


Commit: ca1952184895fcfa25ed015cd11aaaf72367f01d
Author: Sebastián Barschkis
Date:   Sat Sep 24 15:14:54 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBca1952184895fcfa25ed015cd11aaaf72367f01d

mesh normals were read in incorrectly. now using reverse order

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

M	source/blender/blenkernel/intern/smoke.c

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

diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 131804b..3c29c03 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -3015,8 +3015,6 @@ static DerivedMesh *createLiquidMesh(SmokeDomainSettings *sds, DerivedMesh *orgd
 	if (!dm)
 		return NULL;
 	
-	printf("num_verts: %d, num_normals: %d, num_triangles: %d\n", num_verts, num_normals, num_faces);
-	
 	float max_size = MAX3(sds->global_size[0], sds->global_size[1], sds->global_size[2]);
 	
 	// Vertices
@@ -3036,7 +3034,7 @@ static DerivedMesh *createLiquidMesh(SmokeDomainSettings *sds, DerivedMesh *orgd
 	// Normals
 	normals = MEM_callocN(sizeof(short) * num_normals * 3, "liquid_tmp_normals");
 	
-	for (i = num_normals, no_s = normals; i > 0; i--, no_s += 3)
+	for (i = 0, no_s = normals; i < num_normals; no_s += 3, i++)
 	{
 		no[0] = liquid_get_normal_x_at(sds->fluid, i);
 		no[1] = liquid_get_normal_y_at(sds->fluid, i);




More information about the Bf-blender-cvs mailing list