Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-11-12 18:24:53 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-13 13:39:02 +0300
commit34058c4ff1684b4d2e4d8619e2a7b690d9286140 (patch)
tree9fbfd91cbc8a8f9719b4a677e7b36df75e01ead2 /source/blender/blenkernel/intern/object.c
parent647a79807600f8ad3159935d1f985fe7a1ede5fc (diff)
Fix T57105: Baked Particles could not be rendered as expected
Same fix as for smoke (and is what caching proposal is AFAIK): share cache between copied and original objects. One thing which is still missing to be fixed is to make auto-cache more reliable. It was already kind of broken, so don't think it should be a stopping factor for this fix.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index bd14de144da..d36a5838630 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1065,7 +1065,14 @@ ParticleSystem *BKE_object_copy_particlesystem(ParticleSystem *psys, const int f
BLI_listbase_clear(&psysn->pathcachebufs);
BLI_listbase_clear(&psysn->childcachebufs);
- psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches, flag);
+ if (flag & LIB_ID_CREATE_NO_MAIN) {
+ BLI_assert((psys->flag & PSYS_SHARED_CACHES) == 0);
+ psysn->flag |= PSYS_SHARED_CACHES;
+ BLI_assert(psysn->pointcache != NULL);
+ }
+ else {
+ psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches, flag);
+ }
/* XXX - from reading existing code this seems correct but intended usage of
* pointcache should /w cloth should be added in 'ParticleSystem' - campbell */