Fix for [#26372] Objects as PS Hair displays and renders differently
[blender.git] / source / blender / blenkernel / intern / anim.c
index 39fea333cbc02249f7a735d4d199f16eba19270a..2e1fbf2917a33638e2bff23bc54b5963f6949557 100644 (file)
@@ -1346,8 +1346,6 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
                                /* for groups, pick the object based on settings */
                                if(part->draw&PART_DRAW_RAND_GR)
                                        b= BLI_rand() % totgroup;
-                               else if(part->from==PART_FROM_PARTICLE)
-                                       b= pa_num % totgroup;
                                else
                                        b= a % totgroup;
 
@@ -1402,7 +1400,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
                                        dob= new_dupli_object(lb, go->ob, mat, par->lay, counter, OB_DUPLIPARTS, animated);
                                        copy_m4_m4(dob->omat, obcopylist[b].obmat);
                                        if(G.rendering)
-                                               psys_get_dupli_texture(par, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
+                                               psys_get_dupli_texture(psys, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
                                }
                        }
                        else {
@@ -1434,7 +1432,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
                                dob= new_dupli_object(lb, ob, mat, ob->lay, counter, GS(id->name) == ID_GR ? OB_DUPLIGROUP : OB_DUPLIPARTS, animated);
                                copy_m4_m4(dob->omat, oldobmat);
                                if(G.rendering)
-                                       psys_get_dupli_texture(par, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
+                                       psys_get_dupli_texture(psys, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
                        }
                }