Commit: 6751627797fa04aa699cd3ce597d4d384959f978
Author: Lukas Tönne
Date:   Sat Jun 30 11:36:54 2018 +0100
Branches: tmp_hair_curves
https://developer.blender.org/rB6751627797fa04aa699cd3ce597d4d384959f978

Fix fur curve generation function.

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

M       source/blender/editors/object/object_modifier.c

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

diff --git a/source/blender/editors/object/object_modifier.c 
b/source/blender/editors/object/object_modifier.c
index d504594fc79..0c100308bb9 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -2461,7 +2461,8 @@ static int hair_generate_follicles_exec(bContext *C, 
wmOperator *op)
        
        {
                const int numverts = 5;
-               const float taper_length = 0.1f;
+               const float hairlen = 0.05f;
+               const float taper_length = 0.02f;
                const float taper_thickness = 0.8f;
                BKE_hair_fiber_curves_begin(hsys, hsys->pattern->num_follicles);
                for (int i = 0; i < hsys->pattern->num_follicles; ++i)
@@ -2475,8 +2476,8 @@ static int hair_generate_follicles_exec(bContext *C, 
wmOperator *op)
                        BKE_mesh_sample_eval(scalp, 
&hsys->pattern->follicles[i].mesh_sample, loc, nor, tan);
                        for (int j = 0; j < numverts; ++j)
                        {
-                               madd_v3_v3fl(loc, nor, 1.0f/(numverts-1));
-                               BKE_hair_set_fiber_vertex(hsys, i, 0, loc);
+                               madd_v3_v3fl(loc, nor, hairlen / (numverts-1));
+                               BKE_hair_set_fiber_vertex(hsys, i * numverts + 
j, 0, loc);
                        }
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to