[Bf-blender-cvs] [d754d858452] master: Fix RigidBodyWorld copy using `NO_MAIN` instead of `COW` flag for cache handling.
Bastien Montagne
noreply at git.blender.org
Thu Sep 30 16:05:13 CEST 2021
Commit: d754d8584528331eac4918413ced8239d2a9c5ed
Author: Bastien Montagne
Date: Thu Sep 30 15:29:43 2021 +0200
Branches: master
https://developer.blender.org/rBd754d8584528331eac4918413ced8239d2a9c5ed
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.
===================================================================
M source/blender/blenkernel/intern/rigidbody.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list