[Bf-blender-cvs] [2a09634d415] master: Fix particlesystem not duplicating their pointcache in NO_MAIN case.
Bastien Montagne
noreply at git.blender.org
Wed May 26 11:40:03 CEST 2021
Commit: 2a09634d4158747511de1be998052a820b173e9f
Author: Bastien Montagne
Date: Tue May 25 19:10:34 2021 +0200
Branches: master
https://developer.blender.org/rB2a09634d4158747511de1be998052a820b173e9f
Fix particlesystem not duplicating their pointcache in NO_MAIN case.
Sharing data between duplicated IDs should be restricted to depsgraph
(CoW) cases, not all NO_MAIN ones...
While this was probably not an issue currently, we aim at using more and
more out-of-main IDs for temp data processing.
NOTE: Somewhat related to T88555, and similar issue as the one fixed in
rBdfb963c70df5.
===================================================================
M source/blender/blenkernel/intern/object.c
===================================================================
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 034af924ab1..e4cfe64df11 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2369,7 +2369,7 @@ ParticleSystem *BKE_object_copy_particlesystem(ParticleSystem *psys, const int f
BLI_listbase_clear(&psysn->pathcachebufs);
BLI_listbase_clear(&psysn->childcachebufs);
- if (flag & LIB_ID_CREATE_NO_MAIN) {
+ if (flag & LIB_ID_COPY_SET_COPIED_ON_WRITE) {
/* XXX Disabled, fails when evaluating depsgraph after copying ID with no main for preview
* creation. */
// BLI_assert((psys->flag & PSYS_SHARED_CACHES) == 0);
More information about the Bf-blender-cvs
mailing list