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:
authorBastien Montagne <bastien@blender.org>2021-09-28 17:38:24 +0300
committerBastien Montagne <bastien@blender.org>2021-09-28 18:41:40 +0300
commit53fa4801a0f8e03248d3f949cf4cd49792949698 (patch)
tree5c8048ad05ed56e40066197912f29590b603eb4b /source/blender/blenkernel/intern/dynamicpaint.c
parent34ba6968b2d4b4803652c3c109963a2de4b070ee (diff)
Fix: Fluid/Cloth/DynamicPaint: Only share pointcaches in CoW case.
Particle copying code was already properly sharing pointcache between orig data and its copy only when `LIB_ID_COPY_SET_COPIED_ON_WRITE` is set, do the same for the other point cache users. Using `LIB_ID_CREATE_NO_MAIN` here is waaaaaaay to much wide scope for such a dangerous/advanced behavior, that kind of things has to be strictly restricted in scope.
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 2bad47f2ed1..9083c507160 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1231,7 +1231,7 @@ void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd,
/* copy existing surfaces */
for (surface = pmd->canvas->surfaces.first; surface; surface = surface->next) {
DynamicPaintSurface *t_surface = dynamicPaint_createNewSurface(tpmd->canvas, NULL);
- if (flag & LIB_ID_CREATE_NO_MAIN) {
+ if (flag & LIB_ID_COPY_SET_COPIED_ON_WRITE) {
/* TODO(sergey): Consider passing some tips to the surface
* creation to avoid this allocate-and-free cache behavior. */
BKE_ptcache_free_list(&t_surface->ptcaches);