Fix T54069: Vertex groups for hair length is wrong in some cases
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 20 Feb 2018 09:47:01 +0000 (10:47 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 20 Feb 2018 09:47:01 +0000 (10:47 +0100)
This is a regression in rB4f1c0a1 which only allowed cutting haior at the
second segment only, while there is nothing wrong with cutting hair at the
first segmewnt.

source/blender/blenkernel/intern/particle_child.c

index fae304d65806b5240e3ebf0fa6b615fcb3f1f79e..c921e1ea107a8dffd35d03262d034a9dff84d942 100644 (file)
@@ -394,7 +394,7 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, struct ListBase *mod
                                        get_strand_normal(ma, ornor, cur_length, (key-1)->vel);
                        }
 
-                       if (use_length_check && k > 1) {
+                       if (use_length_check && k > 0) {
                                float dvec[3];
                                /* check if path needs to be cut before actual end of data points */
                                if (!check_path_length(k, keys, key, max_length, step_length, &cur_length, dvec)) {