Doobes has reported that _LIGHTMAPGEN groups can be intermittently left
attached to some lamps. This is similar to a UnicodeDecodeError we were
having before in which a cached Blender object pointer became trashed
somehow. I think in this case our cached copy of the light group is no
longer equal to what is found in bpy.data.groups, so the removal fails...
Or something along those lines.
So, we now find the group again from the list and erase that. As a final
sanity test, on blend file save, we nuke all _LIGHTMAPGEN groups.
Added the Render > Lighting modifier that lets one specify whether or not
we should forcibly use RT lights. This allows us to change the light
baking rules to allow the baking of nonanimated Plasma lights when this
setting is disabled. The modifier also has text explaining what the
lighting results should look like.
I fail to understand why Blender thinks this is legit, but oh well...
Also, as a bonus, we no longer clobber values in the GoodNeighbor tracker.
I wonder how many bugs this will fix?
It tried to bake some stupid stuff before, eg objects with no materials.
The bug was related to items being removed from a list during a loop. This
has been corrected by looping backwards by index.