diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-10-05 13:32:35 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-10-05 13:32:35 +0400 |
commit | 6ca186fc5ac422001559a0c86d3d436163acc849 (patch) | |
tree | 38037fdd8260e5a8b6c35d8f18f712a122c618c4 /source/blender/makesrna | |
parent | a92c232c8b94d926b14785fb95cf8592f7deb1c3 (diff) |
Fix for [#24107] Hair/General particle glitch- Presets
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 1151215f5f7..7a8165e9aa5 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -325,15 +325,21 @@ static PointerRNA rna_particle_settings_get(PointerRNA *ptr) static void rna_particle_settings_set(PointerRNA *ptr, PointerRNA value) { ParticleSystem *psys= (ParticleSystem*)ptr->data; + int old_type = 0; - if(psys->part) + + if(psys->part) { + old_type = psys->part->type; psys->part->id.us--; + } psys->part = (ParticleSettings *)value.data; if(psys->part) { psys->part->id.us++; psys_check_boid_data(psys); + if(old_type != psys->part->type) + psys->recalc |= PSYS_RECALC_TYPE; } } static void rna_Particle_abspathtime_update(Main *bmain, Scene *scene, PointerRNA *ptr) |