diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-02-18 03:17:46 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-02-18 03:17:46 +0300 |
commit | 6a9734821dd93a936e54fdc2bb75f376ddceecc6 (patch) | |
tree | dfbf0fed5b70060955d330c1d09ad622ea8e3c76 /source | |
parent | 9e6e34df6cc5aa9b514d32b42c0732b91f293008 (diff) |
Particle textures didn't use original coordinates properly for grid distribution.
Diffstat (limited to 'source')
-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) { |