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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-11-09 16:44:53 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-11-09 16:53:03 +0300
commit18ecc8a78f9eba45e513f7903989ef88cffbdb54 (patch)
treee57af8abbd2d1cd6cc10c25777a2dc48d880f9da /source/blender/blenkernel/intern/group.c
parentff3cf93405e63fa367f64412bcfe96b382b24b38 (diff)
Fix broken groupobject usercount handling.
As we can see in (original) read code, ob pointer in groupobject is actually a 'USER_ONE' case. This was not done in 'add object to group' code, probably because we can assume objects always have at least one user in that case? Made it explicit now. Also fixed foreach_ID_link looper. In general we have waaayyyyyy too much 'own handling' of ID->us count in code currently, will clean up that...
Diffstat (limited to 'source/blender/blenkernel/intern/group.c')
-rw-r--r--source/blender/blenkernel/intern/group.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 150226523f2..96cf0fe574a 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -182,6 +182,7 @@ static bool group_object_add_internal(Group *group, Object *ob)
BLI_addtail(&group->gobject, go);
go->ob = ob;
+ id_us_ensure_real(&go->ob->id);
return true;
}