Browse Source

Don't wreck the layer selection in LM previews

pull/35/head
Adam Johnson 9 years ago
parent
commit
1ad2b73a74
  1. 4
      korman/operators/op_lightmap.py

4
korman/operators/op_lightmap.py

@ -17,6 +17,7 @@ import bpy
from bpy.props import *
from ..exporter.etlight import LightBaker
from ..helpers import GoodNeighbor
class _LightingOperator:
@ -37,6 +38,9 @@ class LightmapAutobakePreviewOperator(_LightingOperator, bpy.types.Operator):
super().__init__()
def execute(self, context):
with GoodNeighbor() as toggle:
toggle.track(context.scene, "layers", tuple(context.scene.layers))
bake = LightBaker()
bake.bake_static_lighting([context.active_object,])

Loading…
Cancel
Save