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.
This commit is contained in:
Bastien Montagne 2021-05-25 19:10:34 +02:00
parent 534fcab994
commit 2a09634d41
1 changed files with 1 additions and 1 deletions

View File

@ -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);