[Bf-blender-cvs] [d2f8b48f01f] blender2.8: Depsgraph: preserve memory caches for particles when creating Copy-on-Write
Sergey Sharybin
noreply at git.blender.org
Mon May 28 18:07:06 CEST 2018
Commit: d2f8b48f01f1d9898c806168dc8e46a8d966ecaa
Author: Sergey Sharybin
Date: Mon May 28 18:05:28 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd2f8b48f01f1d9898c806168dc8e46a8d966ecaa
Depsgraph: preserve memory caches for particles when creating Copy-on-Write
Solves issue with particle memory cache ignored.
Thanks Bastien for review!
===================================================================
M source/blender/blenkernel/intern/object.c
M source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index b8764f2c29d..ab3300c4ff7 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -891,8 +891,7 @@ ParticleSystem *BKE_object_copy_particlesystem(ParticleSystem *psys, const int f
BLI_listbase_clear(&psysn->pathcachebufs);
BLI_listbase_clear(&psysn->childcachebufs);
- /* XXX Never copy caches here? */
- psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches, flag & ~LIB_ID_COPY_CACHES);
+ 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 */
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 376e87b38a6..7bfb75ab420 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -277,10 +277,11 @@ bool id_copy_inplace_no_main(const ID *id, ID *newid)
bool result = BKE_id_copy_ex(NULL,
(ID *)id_for_copy,
&newid,
- LIB_ID_CREATE_NO_MAIN |
- LIB_ID_CREATE_NO_USER_REFCOUNT |
- LIB_ID_CREATE_NO_ALLOCATE |
- LIB_ID_CREATE_NO_DEG_TAG,
+ (LIB_ID_CREATE_NO_MAIN |
+ LIB_ID_CREATE_NO_USER_REFCOUNT |
+ LIB_ID_CREATE_NO_ALLOCATE |
+ LIB_ID_CREATE_NO_DEG_TAG |
+ LIB_ID_COPY_CACHES),
false);
#ifdef NESTED_ID_NASTY_WORKAROUND
More information about the Bf-blender-cvs
mailing list