[Bf-blender-cvs] [af0eb938b88] master: Fix T61276: Make Single User unlinks original object.

Bastien Montagne noreply at git.blender.org
Sat Feb 9 13:24:46 CET 2019


Commit: af0eb938b8884da3b5fcca4e32b47034eb33e9c6
Author: Bastien Montagne
Date:   Sat Feb 9 13:20:59 2019 +0100
Branches: master
https://developer.blender.org/rBaf0eb938b8884da3b5fcca4e32b47034eb33e9c6

Fix T61276: Make Single User unlinks original object.

In that case, we have to consider number of scenes using an object, not
number of collections.

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

M	source/blender/editors/object/object_relations.c

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

diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 6ce3eab5758..970a64d5e78 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1596,7 +1596,7 @@ static void single_object_users_collection(
 		Object *ob = cob->ob;
 		/* an object may be in more than one collection */
 		if ((ob->id.newid == NULL) && ((ob->flag & flag) == flag)) {
-			if (!ID_IS_LINKED(ob) && ob->id.us > 1) {
+			if (!ID_IS_LINKED(ob) && BKE_object_scenes_users_get(bmain, ob) > 1) {
 				ID_NEW_SET(ob, BKE_object_copy(bmain, ob));
 			}
 		}



More information about the Bf-blender-cvs mailing list