diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-11 23:02:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-11 23:02:21 +0300 |
commit | 457057a9e817d5cb410b9464616b6e05cfb054ee (patch) | |
tree | e576a995c7df2979b9c369b07ce5fedbcea7564e /source/blender/src/editparticle.c | |
parent | 160e6afdb8dc36b7d3a982a0411e633be165d2f4 (diff) |
Fix for mirroring issues in particle mode, where the particles were
not mirrored exactly, though the problem is not completely solved.
The way local frames are computed for particles is still not fully
symmetric, which shows especially on long hairs...
Also made the shift+o subsurf switch work recursively into
dupli-groups, did only the first level before.
Diffstat (limited to 'source/blender/src/editparticle.c')
-rw-r--r-- | source/blender/src/editparticle.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/src/editparticle.c b/source/blender/src/editparticle.c index 3611efed995..411a45d0a53 100644 --- a/source/blender/src/editparticle.c +++ b/source/blender/src/editparticle.c @@ -56,6 +56,7 @@ #include "BKE_global.h" #include "BKE_object.h" +#include "BKE_mesh.h" #include "BKE_modifier.h" #include "BKE_particle.h" #include "BKE_scene.h" @@ -560,7 +561,7 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys) /* lookup particles and set in mirror cache */ if(!edit->mirror_cache) edit->mirror_cache= MEM_callocN(sizeof(int)*totpart, "PE mirror cache"); - + LOOP_PARTICLES(i,pa) { psys_mat_hair_to_orco(ob, psmd->dm, psys->part->from, pa, mat); VECCOPY(co, pa->hair[0].co); @@ -599,11 +600,11 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys edit= psys->edit; i= pa - psys->particles; + if(!edit->mirror_cache) + PE_update_mirror_cache(ob, psys); + /* find mirrored particle if needed */ if(!mpa) { - if(!edit->mirror_cache) - PE_update_mirror_cache(ob, psys); - mi= edit->mirror_cache[i]; if(mi == -1) return; |