[Bf-blender-cvs] [d3fac16] hair_system: wipwipwip

Antony Riakiotakis noreply at git.blender.org
Fri Aug 22 19:35:43 CEST 2014


Commit: d3fac1663228f0516a974f163c2f6be10be9f80b
Author: Antony Riakiotakis
Date:   Fri Aug 22 19:24:41 2014 +0200
Branches: hair_system
https://developer.blender.org/rBd3fac1663228f0516a974f163c2f6be10be9f80b

wipwipwip

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

M	source/blender/hair/intern/HAIR_scene.cpp

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

diff --git a/source/blender/hair/intern/HAIR_scene.cpp b/source/blender/hair/intern/HAIR_scene.cpp
index 475cc93..93c5a30 100644
--- a/source/blender/hair/intern/HAIR_scene.cpp
+++ b/source/blender/hair/intern/HAIR_scene.cpp
@@ -209,7 +209,6 @@ SolverData *SceneConverter::build_solver_data(Scene *scene, Object *ob, DerivedM
 	
 	Transform mat = Transform(ob->obmat);
 	
-
 	/* count points */
 	int totpoints = 0;
 	for (pa = psys->particles, i = 0; i < psys->totpart; ++pa, ++i) {
@@ -250,7 +249,6 @@ SolverData *SceneConverter::build_solver_data(Scene *scene, Object *ob, DerivedM
 		
 		/* send to world space (normal matrix should be changed to inverse transpose here) */
 		transform_point(mat, curve->root1.co);
-		transform_direction(mat, curve->root1.nor);
 		
 		//mesh_sample_eval_transformed(dm, mat, &hair->root, curve->root1.co, curve->root1.nor);
 		normalize_v3_v3(curve->root1.tan, float3(0,0,1) - dot_v3v3(float3(0,0,1), curve->root1.nor) * curve->root1.nor);
@@ -287,8 +285,8 @@ SolverData *SceneConverter::build_solver_data(Scene *scene, Object *ob, DerivedM
 		}
 		
 		curve->avg_rest_length = len_accum;
-		curve->rest_root_normal = curve->root1.nor;
-		curve->rest_root_tangent = curve->root1.tan;
+		curve->rest_root_normal = transform_direction(mat, curve->root1.nor);
+		curve->rest_root_tangent = 	transform_direction(mat, curve->root1.tan);
 		
 		/*
 		for (int k = 0; k < hair->totpoints; ++k, ++point) {




More information about the Bf-blender-cvs mailing list