diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-03-14 16:44:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-03-14 16:50:16 +0300 |
commit | 6b1d77a8052b0706ef2277cb1a5e4f3c67310806 (patch) | |
tree | ea917e1a8d1b4a8b7df3e8386760fd84acfdf354 /source/blender/editors/object | |
parent | 2a9bc888d0b5dfbea12ccd5024d6d90770aaa396 (diff) |
Fix T47787: When performing operation 'Make single user' -> 'obj&data', object could be removed from group.
Similar cause as in T47482, we used to have poor handling of 'user_one' cases of ID usage,
leading to inconsistent behavior depending on order of operations e.g.
Here, was object used by a group but not linked in any scene - once linked in scene,
their usercount would be 2, leading to 'making single copy', when it's actually not needed.
We now have better control here, so let's use it!
Note that other ID 'make single user' code will likely need similar fix (Images, etc.).
Safe to be backported to 2.77.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 1a3209a8ca8..0422ac61c69 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1749,7 +1749,7 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const in ob = base->object; if ((base->flag & flag) == flag) { - if (ob->id.lib == NULL && ob->id.us > 1) { + if (ob->id.lib == NULL && ID_REFCOUNT_USERS(ob) > 1) { /* base gets copy of object */ obn = BKE_object_copy(ob); base->object = obn; |