From 0738ae7688d19b471b7cde9cc631096a6162b3fc Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 13 Aug 2010 14:23:44 +0000 Subject: 2.5: more removal of G.main. --- source/blender/blenkernel/intern/group.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/group.c') diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 6377a6f6ccd..bdf203119c3 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -69,21 +69,22 @@ void free_group_objects(Group *group) void unlink_group(Group *group) { + Main *bmain= G.main; Material *ma; Object *ob; Scene *sce; SceneRenderLayer *srl; ParticleSystem *psys; - for(ma= G.main->mat.first; ma; ma= ma->id.next) { + for(ma= bmain->mat.first; ma; ma= ma->id.next) { if(ma->group==group) ma->group= NULL; } - for(ma= G.main->mat.first; ma; ma= ma->id.next) { + for(ma= bmain->mat.first; ma; ma= ma->id.next) { if(ma->group==group) ma->group= NULL; } - for (sce= G.main->scene.first; sce; sce= sce->id.next) { + for (sce= bmain->scene.first; sce; sce= sce->id.next) { Base *base= sce->base.first; /* ensure objects are not in this group */ @@ -100,7 +101,7 @@ void unlink_group(Group *group) } } - for(ob= G.main->object.first; ob; ob= ob->id.next) { + for(ob= bmain->object.first; ob; ob= ob->id.next) { bActionStrip *strip; if(ob->dup_group==group) { -- cgit v1.2.3