diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-14 14:57:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-14 14:57:43 +0400 |
commit | a1138d25008f6718c74d4bbba3bcf23fe09cf242 (patch) | |
tree | 93fd36a25ee0d4c93d3527ece9305ef76d47d8a8 /source/blender/blenkernel | |
parent | c17c2d80592c9b1637ff6563aec74f34ce20fa74 (diff) |
recent changes to particle normal orientation change behavior in a way you might not want (even though in general I think its an improvement).
split this into 2 options, added 'Normal-Tangent' orientation that makes the mesh orient towards the tangent, otherwise it uses Z-Up as before.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 59c2c1d93ff..16ea71204cc 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1670,7 +1670,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P const bool use_boids = ((part->phystype == PART_PHYS_BOIDS) && (pa->boid != NULL)); const bool use_tangents = ((use_boids == false) && - ((part->tanfac != 0.0f) || (part->rotmode == PART_ROT_NOR))); + ((part->tanfac != 0.0f) || (part->rotmode == PART_ROT_NOR_TAN))); int p = pa - psys->particles; @@ -1833,6 +1833,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P /* create vector into which rotation is aligned */ switch (part->rotmode) { case PART_ROT_NOR: + case PART_ROT_NOR_TAN: copy_v3_v3(rot_vec, nor); use_global_space = false; break; @@ -1881,7 +1882,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P invert_qt_qt(q_imat, q_obmat); - if (part->rotmode != PART_ROT_NOR) { + if (part->rotmode != PART_ROT_NOR_TAN) { float rot_vec_local[3]; /* rot_vec */ @@ -1893,7 +1894,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P vec_to_quat(q2, rot_vec_local, OB_POSX, OB_POSZ); } else { - /* (part->rotmode == PART_ROT_NOR) */ + /* (part->rotmode == PART_ROT_NOR_TAN) */ float tmat[3][3]; /* note: utan_local is not taken from 'utan', we calculate from rot_vec/vtan */ |