[Bf-blender-cvs] [a8e8808d586] blender2.8: Give RigidBodyWorld collection a fake user

Sybren A. Stüvel noreply at git.blender.org
Thu Jun 14 17:36:52 CEST 2018


Commit: a8e8808d586f89145cc18352a0beef4a4ef7f289
Author: Sybren A. Stüvel
Date:   Thu Jun 14 17:34:01 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBa8e8808d586f89145cc18352a0beef4a4ef7f289

Give RigidBodyWorld collection a fake user

This prevents it from disappearing when the blend file is saved.

===================================================================

M	source/blender/editors/physics/rigidbody_object.c

===================================================================

diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index 99976898ac1..c2bcb55c3bb 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -110,6 +110,7 @@ bool ED_rigidbody_object_add(Main *bmain, Scene *scene, Object *ob, int type, Re
 	}
 	if (rbw->group == NULL) {
 		rbw->group = BKE_collection_add(bmain, NULL, "RigidBodyWorld");
+		id_fake_user_set(&rbw->group->id);
 	}
 
 	/* make rigidbody object settings */



More information about the Bf-blender-cvs mailing list