diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-04 19:54:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-04 19:54:25 +0300 |
commit | eedf5cbe89826faa728cf90d935cc696dd79b045 (patch) | |
tree | 9b99b27c44ecd63bfdd32804c58224d22794e3eb /source/blender/blenkernel/intern | |
parent | eaca7fa8b573c08fb724082a923775ac2004651e (diff) |
reading in hair with dynamics wasnt working but mostly crashed when duplicating the object.
from reading all places dynamic hair is used I think these changes are correct (cloth seems to share pointcache with the psys) but its not obvious.
jahka: please check this is ok.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 0baf9b00ecf..3be01e38368 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1164,6 +1164,12 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys) psysn->pointcache= BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches); + /* XXX - from reading existing code this seems correct but intended usage of + * pointcache should /w cloth should be added in 'ParticleSystem' - campbell */ + if(psysn->clmd) { + psysn->clmd->point_cache= psysn->pointcache; + } + id_us_plus((ID *)psysn->part); return psysn; |