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:
authorJacques Lucke <jacques@blender.org>2021-05-21 13:20:36 +0300
committerJacques Lucke <jacques@blender.org>2021-05-21 13:20:36 +0300
commitcfe5232226c43f78782be02848cac64d3576ebcc (patch)
treebfe6707ac9b1f8f45b2b872059e0fd40bed91e97 /source/blender/blenkernel/intern/rigidbody.c
parentaa6817616c17d323fe5da79bba8590f6b2fb1c1d (diff)
parentff51c2e89a0951d043a843435b4c25ba7a15e8e2 (diff)
Merge branch 'master' into temp-attributes-paneltemp-attributes-panel
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 19078446009..2539b990210 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -260,10 +260,12 @@ static RigidBodyOb *rigidbody_copy_object(const Object *ob, const int flag)
RigidBodyOb *rboN = NULL;
if (ob->rigidbody_object) {
+ const bool is_orig = (flag & LIB_ID_COPY_SET_COPIED_ON_WRITE) == 0;
+
/* just duplicate the whole struct first (to catch all the settings) */
rboN = MEM_dupallocN(ob->rigidbody_object);
- if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
+ if (is_orig) {
/* This is a regular copy, and not a CoW copy for depsgraph evaluation */
rboN->shared = MEM_callocN(sizeof(*rboN->shared), "RigidBodyOb_Shared");
}