Bugfix for [#17561] when i try to change the particle to hair I cant choose group...
[blender.git] / source / blender / blenkernel / intern / anim.c
index e2ce4b9f6f3a7892df20f6bf08665c60dba9a6d2..ceb0e132ff98aca90ed00240920df81be04c4ba8 100644 (file)
@@ -783,6 +783,10 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
                                hair= (totchild == 0 || psys->childcache) && psys->pathcache;
                        if(!hair)
                                return;
+                       
+                       /* we use cache, update totchild according to cached data */
+                       totchild = psys->totchildcache;
+                       totpart = psys->totcached;
                }
 
                psys->lattice = psys_get_lattice(par, psys);
@@ -865,6 +869,8 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
                                        }
 
                                        VECCOPY(pamat[3], cache->co);
+                                       pamat[3][3]= 1.0f;
+                                       
                                }
                                else if(step_nbr) {
                                        /* other keys */