From 500d815478966de6ad509c2e6a73c61fce8513a5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 25 Aug 2022 17:21:39 +0200 Subject: Fix T100255: Make RigidBodyWorld (and effector_weights) collections refcounted. Those collections were so far mainly just tagged as fake user (even though a few places in code already incremented usercount on them). Since we now clear the fakeuser flag when linking/appending data, ensure that these collections are preserved by making these usages regular ID refcounting ones. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15783 --- source/blender/editors/physics/rigidbody_constraint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/physics') diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c index 66ae2d323fd..b7c82c18433 100644 --- a/source/blender/editors/physics/rigidbody_constraint.c +++ b/source/blender/editors/physics/rigidbody_constraint.c @@ -88,7 +88,7 @@ bool ED_rigidbody_constraint_add( /* create constraint group if it doesn't already exits */ if (rbw->constraints == NULL) { rbw->constraints = BKE_collection_add(bmain, NULL, "RigidBodyConstraints"); - id_fake_user_set(&rbw->constraints->id); + id_us_plus(&rbw->constraints->id); } /* make rigidbody constraint settings */ ob->rigidbody_constraint = BKE_rigidbody_create_constraint(scene, ob, type); -- cgit v1.2.3