Fix for [#27461] Particle Instance modifier doesn't work correctly with Hair Dynamics.

* Wrong matrix used for dynamic hair.
This commit is contained in:
Janne Karhu
2011-06-03 05:51:39 +00:00
parent 7ee9becfa3
commit 6480ab10db

View File

@@ -4018,7 +4018,11 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
init_particle_interpolation(sim->ob, psys, pa, &pind);
do_particle_interpolation(psys, p, pa, t, &pind, state);
if(!keyed && !cached) {
if(pind.dm) {
mul_m4_v3(sim->ob->obmat, state->co);
mul_mat3_m4_v3(sim->ob->obmat, state->vel);
}
else if(!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) {
if((pa->flag & PARS_REKEY)==0) {
psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat);
mul_m4_v3(hairmat, state->co);