Particles: child editing bugfixes
[blender.git] / source / blender / blenkernel / intern / particle.c
index bb2f41288911b8fda9fc74ca6203ba54145e2567..ab73b24ba396ee38ad88004fe2c897e5b0c2282b 100644 (file)
@@ -2332,6 +2332,7 @@ static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float c
        ctx->totparent= totparent;
        ctx->parent_pass= 0;
        ctx->cfra= cfra;
+       ctx->editupdate= editupdate;
 
        psys->lattice = psys_get_lattice(&ctx->sim);
 
@@ -2615,6 +2616,9 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
                                get_strand_normal(ctx->ma, ornor, cur_length, (state-1)->vel);
                }
 
+               if(k == ctx->steps)
+                       VECSUB(state->vel,state->co,(state-1)->co);
+
                /* check if path needs to be cut before actual end of data points */
                if(k){
                        VECSUB(dvec,state->co,(state-1)->co);