diff options
Diffstat (limited to 'source/blender/blenkernel/intern/group.c')
-rw-r--r-- | source/blender/blenkernel/intern/group.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 20d874e7243..98d1d301f65 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -79,6 +79,7 @@ void BKE_group_unlink(Group *group) Object *ob; Scene *sce; SceneRenderLayer *srl; + FreestyleLineSet *lineset; ParticleSystem *psys; for (ma = bmain->mat.first; ma; ma = ma->id.next) { @@ -103,6 +104,10 @@ void BKE_group_unlink(Group *group) for (srl = sce->r.layers.first; srl; srl = srl->next) { if (srl->light_override == group) srl->light_override = NULL; + for(lineset = srl->freestyleConfig.linesets.first; lineset; lineset= lineset->next) { + if (lineset->group == group) + lineset->group = NULL; + } } } @@ -127,11 +132,11 @@ void BKE_group_unlink(Group *group) group->id.us = 0; } -Group *add_group(const char *name) +Group *add_group(Main *bmain, const char *name) { Group *group; - group = BKE_libblock_alloc(&G.main->group, ID_GR, name); + group = BKE_libblock_alloc(&bmain->group, ID_GR, name); group->layer = (1 << 20) - 1; return group; } |