From df59d613a6ab2760b4e9329ee478ba4cbc44a697 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 13 Jun 2015 22:43:02 -0400 Subject: [PATCH] Attempt #2 at addressing light group accumulation --- korman/operators/op_lightmap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/korman/operators/op_lightmap.py b/korman/operators/op_lightmap.py index 1354114..03ef14c 100644 --- a/korman/operators/op_lightmap.py +++ b/korman/operators/op_lightmap.py @@ -68,7 +68,9 @@ class _LightingOperator: def _pop_lightgroups(self): for material, lg in self._old_lightgroups.items(): _fake = material.light_group - if _fake is not None: + if _fake is not None and _fake.name.startswith("_LIGHTMAPGEN"): + for i in _fake.objects: + _fake.objects.unlink(i) _fake.user_clear() bpy.data.groups.remove(_fake) material.light_group = lg