diff options
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 5fc22bd842a..bbc597788fe 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -1831,9 +1831,11 @@ static void psys_particle_on_shape(int UNUSED(distr), int UNUSED(index), float * void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor){ if(psmd){ if(psmd->psys->part->distr==PART_DISTR_GRID && psmd->psys->part->from != PART_FROM_VERT){ - if(vec){ - VECCOPY(vec,fuv); - } + if(vec) + copy_v3_v3(vec,fuv); + + if(orco) + copy_v3_v3(orco, fuv); return; } /* we cant use the num_dmcache */ @@ -3780,7 +3782,7 @@ void psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTex short blend=mtex->blendtype; short texco = mtex->texco; - if(ELEM(texco, TEXCO_UV, TEXCO_ORCO) && (ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME) == 0 || part->distr == PART_DISTR_GRID)) + if(texco == TEXCO_UV && (ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME) == 0 || part->distr == PART_DISTR_GRID)) texco = TEXCO_GLOB; switch(texco) { |