diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-13 20:53:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-13 20:53:17 +0400 |
commit | c0ba1671c34683654b691684473bb4f3899604a7 (patch) | |
tree | 58b2e6b3a1ae2cc45bb50b30a6e59dc7ef5a8c30 /source/blender/editors/space_outliner/outliner.c | |
parent | 8ee36e1da56b10a84e02ba9790fbcafbdbf43f51 (diff) |
group refcount checking was inconsistent.
- if a group has one or more objects in it, it gets a refcount of 1 on load (unchanged from before)
- dupli-groups, and materials no longer add/remove a reference.
- now groups are only freed when they contain no objects or when manually unlinked.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 794c700f8ce..95e2cb920fc 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -1411,7 +1411,7 @@ static void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops) GroupObject *go; for(group= mainvar->group.first; group; group= group->id.next) { - if(group->id.us) { + if(group->gobject.first) { te= outliner_add_element(soops, &soops->tree, group, NULL, 0, 0); tselem= TREESTORE(te); @@ -3124,7 +3124,6 @@ static void unlink_group_cb(bContext *C, Scene *scene, TreeElement *te, TreeStor if( GS(tsep->id->name)==ID_OB) { Object *ob= (Object *)tsep->id; ob->dup_group= NULL; - group->id.us--; } } else { |