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-30 16:29:43 +0300
committerBastien Montagne <bastien@blender.org>2021-09-30 17:00:29 +0300
commitd754d8584528331eac4918413ced8239d2a9c5ed (patch)
tree28a3627c1396bd1f28fd2aea84a4e8672c041c84 /source/blender/blenkernel/intern/rigidbody.c
parent1a72744ddc4a34ce32f308a9011423c2099b49d3 (diff)
Fix RigidBodyWorld copy using `NO_MAIN` instead of `COW` flag for cache handling.
We only want to share caches in case of CoW copying for the depsgraph, not for regular `NO_MAIN` data.
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 947efd88ec1..1ea659b2d41 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1211,8 +1211,8 @@ RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld *rbw, const int flag)
id_us_plus((ID *)rbw_copy->constraints);
}
- if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
- /* This is a regular copy, and not a CoW copy for depsgraph evaluation */
+ if ((flag & LIB_ID_COPY_SET_COPIED_ON_WRITE) == 0) {
+ /* This is a regular copy, and not a CoW copy for depsgraph evaluation. */
rbw_copy->shared = MEM_callocN(sizeof(*rbw_copy->shared), "RigidBodyWorld_Shared");
BKE_ptcache_copy_list(&rbw_copy->shared->ptcaches, &rbw->shared->ptcaches, LIB_ID_COPY_CACHES);
rbw_copy->shared->pointcache = rbw_copy->shared->ptcaches.first;