|
|
@ -69,11 +69,12 @@ class LightBaker: |
|
|
|
with GoodNeighbor() as toggle: |
|
|
|
with GoodNeighbor() as toggle: |
|
|
|
try: |
|
|
|
try: |
|
|
|
# reduce the amount of indentation |
|
|
|
# reduce the amount of indentation |
|
|
|
self._bake_static_lighting(bake, toggle) |
|
|
|
result = self._bake_static_lighting(bake, toggle) |
|
|
|
finally: |
|
|
|
finally: |
|
|
|
# this stuff has been observed to be problematic with GoodNeighbor |
|
|
|
# this stuff has been observed to be problematic with GoodNeighbor |
|
|
|
self._pop_lightgroups() |
|
|
|
self._pop_lightgroups() |
|
|
|
self._restore_uvtexs() |
|
|
|
self._restore_uvtexs() |
|
|
|
|
|
|
|
return result |
|
|
|
|
|
|
|
|
|
|
|
def _bake_static_lighting(self, bake, toggle): |
|
|
|
def _bake_static_lighting(self, bake, toggle): |
|
|
|
# Step 0.9: Make all layers visible. |
|
|
|
# Step 0.9: Make all layers visible. |
|
|
@ -112,6 +113,9 @@ class LightBaker: |
|
|
|
else: |
|
|
|
else: |
|
|
|
raise RuntimeError(key[0]) |
|
|
|
raise RuntimeError(key[0]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Return how many thingos we baked |
|
|
|
|
|
|
|
return sum(map(sum, bake.values())) |
|
|
|
|
|
|
|
|
|
|
|
def _generate_lightgroup(self, mesh, user_lg=None): |
|
|
|
def _generate_lightgroup(self, mesh, user_lg=None): |
|
|
|
"""Makes a new light group for the baking process that excludes all Plasma RT lamps""" |
|
|
|
"""Makes a new light group for the baking process that excludes all Plasma RT lamps""" |
|
|
|
|
|
|
|
|
|
|
|